IBM Cloud API Docs

Introduction

With IBM Cloud® Secrets Manager, you can create, lease, and centrally manage secrets that are used in IBM Cloud services or your custom-built applications. Secrets are stored in a dedicated instance of Secrets Manager that is built on open source HashiCorp Vault.

SDKs for Java, Node, Python, and Go are available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries.

For more information about using the SDKs, see the IBM Cloud SDK Common project on GitHub. For more information about getting started with Secrets Manager, check out the docs.

Installing the Java SDK

Maven

<dependency>
    <groupId>com.ibm.cloud</groupId>
    <artifactId>secrets-manager-sdk</artifactId>
    <version>${version}</version>
</dependency>

Gradle

compile 'com.ibm.cloud:secrets-manager-sdk:${version}'

Replace {version} in these examples with the release version.

View on GitHub

Installing the Python SDK

pip install --upgrade "ibm-secrets-manager-sdk"

View on GitHub

Installing the Go SDK

Go modules (recommended): Add the following import in your code, and then run go build or go mod tidy

import (
   sm "github.com/IBM/secrets-manager-go-sdk/v2/secretsmanagerv2"
)

Go get

go get -u github.com/IBM/secrets-manager-go-sdk/v2

View on GitHub

Installing the Node SDK

npm install @ibm-cloud/secrets-manager

View on GitHub

Endpoint URLs

Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To make requests to the API, you supply the instance ID that is unique to your Secrets Manager service instance.

You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.

Endpoint URLs by location

  • Dallas: https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
  • Frankfurt: https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
  • London: https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
  • Madrid: https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
  • Osaka: https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
  • Sao Paulo: https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
  • Sydney: https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
  • Tokyo: https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
  • Toronto: https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
  • Washington DC: https://{instance_ID}.us-east.secrets-manager.appdomain.cloud

Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Java SDK, use the setServiceUrl() method. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.

Endpoint URLs by location

  • Dallas: https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
  • Frankfurt: https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
  • London: https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
  • Madrid: https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
  • Osaka: https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
  • Sao Paulo: https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
  • Sydney: https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
  • Tokyo: https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
  • Toronto: https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
  • Washington DC: https://{instance_ID}.us-east.secrets-manager.appdomain.cloud

Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Node.js SDK, use the serviceUrl parameter. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.

Endpoint URLs by location

  • Dallas: https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
  • Frankfurt: https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
  • London: https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
  • Madrid: https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
  • Osaka: https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
  • Sao Paulo: https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
  • Sydney: https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
  • Tokyo: https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
  • Toronto: https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
  • Washington DC: https://{instance_ID}.us-east.secrets-manager.appdomain.cloud

Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Python SDK, use the set_service_url() method. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.

Endpoint URLs by location

  • Dallas: https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
  • Frankfurt: https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
  • London: https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
  • Madrid: https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
  • Osaka: https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
  • Sao Paulo: https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
  • Sydney: https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
  • Tokyo: https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
  • Toronto: https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
  • Washington DC: https://{instance_ID}.us-east.secrets-manager.appdomain.cloud

Secrets Manager supports instance-specific endpoint URLs that you can use to interact with the service over public or private service endpoints. To target your Secrets Manager service instance by using the Go SDK, use the URL parameter. You can copy your endpoint URL from the Endpoints page in the Secrets Manager service dashboard.

Endpoint URLs by location

  • Dallas: https://{instance_ID}.us-south.secrets-manager.appdomain.cloud
  • Frankfurt: https://{instance_ID}.eu-de.secrets-manager.appdomain.cloud
  • London: https://{instance_ID}.eu-gb.secrets-manager.appdomain.cloud
  • Madrid: https://{instance_ID}.eu-es.secrets-manager.appdomain.cloud
  • Osaka: https://{instance_ID}.jp-osa.secrets-manager.appdomain.cloud
  • Sao Paulo: https://{instance_ID}.br-sao.secrets-manager.appdomain.cloud
  • Sydney: https://{instance_ID}.au-syd.secrets-manager.appdomain.cloud
  • Tokyo: https://{instance_ID}.jp-tok.secrets-manager.appdomain.cloud
  • Toronto: https://{instance_ID}.ca-tor.secrets-manager.appdomain.cloud
  • Washington DC: https://{instance_ID}.us-east.secrets-manager.appdomain.cloud

Base URL

https://{instance_ID}.{region}.secrets-manager.appdomain.cloud

Example for the Dallas location

import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.SecretsManager;
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.model.*;
import com.ibm.cloud.sdk.core.http.Response;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;

import java.util.Collections;
...

// Create an IAM authenticator
IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
        .apikey("<API_KEY>")
        .build();

// Construct the service client
SecretsManager secretsManagerService = new SecretsManager("My Secrets-Manager service", iamAuthenticator);

// Set the service URL
secretsManagerService.setServiceUrl("https://{instance_ID}.us-south.secrets-manager.appdomain.cloud");

Example for the Dallas location

const IbmCloudSecretsManagerApiV2 =  require('@ibm-cloud/secrets-manager/secrets-manager/v2');
const { IamAuthenticator } = require('@ibm-cloud/secrets-manager/auth');

const secretsManagerService = new SecretsManagerV2({
  authenticator: new IamAuthenticator({
    apikey: '<API_KEY>',
  }),
  serviceUrl: 'https://{instance_ID}.us-south.secrets-manager.appdomain.cloud',
});

Example for the Dallas location

from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
from ibm_secrets_manager_sdk.secrets_manager_v2 import *

secrets_manager_service = SecretsManagerV2(
    authenticator=IAMAuthenticator(apikey='<API_KEY>')
)

secrets_manager_service.set_service_url('https://{instance_ID}.us-south.secrets-manager.appdomain.cloud')

Example for the Dallas location

import (
    "encoding/json"
    "fmt"
    "github.com/IBM/go-sdk-core/v5/core"
    sm "github.com/IBM/secrets-manager-go-sdk/secretsmanagerv2"
)

func main() {

    secretsManagerService, err := sm.NewSecretsManagerV2(&sm.SecretsManagerV2Options {
        URL: "https://{instance_ID}.us-south.secrets-manager.appdomain.cloud",
        Authenticator: & core.IamAuthenticator {
            ApiKey: "<API_KEY>",
        },
    })

    if err != nil {
        panic(err)
    }
}

Authentication

Authorization to the Secrets Manager API is enforced by using an IBM Cloud Identity and Access Management (IAM) access token. The token is used to determine the actions that a user or service ID has access to when they use the API.

To work with the API, include a valid IAM token in each outgoing request to the service. You can generate an access token by first creating an API key and then exchanging your API key for an IBM Cloud IAM token.

Don't have an API key? Try running ibmcloud iam oauth-tokens in the IBM Cloud Shell to quickly generate a personal access token.

To generate an access token from your API key, use the following cURL command.

curl -X POST \
  "https://iam.cloud.ibm.com/identity/token" \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Accept: application/json' \
  --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' \
  --data-urlencode 'apikey=<API_KEY>'

Replace <API_KEY> with your IBM Cloud API key.

When you use the SDK, configure an IAM authenticator with an IBM Cloud IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can configure an authenticator in either of two ways:

  • Programmatically by constructing an IAM authenticator instance and supplying your IAM API key
  • By defining the API key in external configuration properties and then using the SDK authenticator factory to construct an IAM authenticator that uses the configured IAM API key

For more information, see the Authentication section of the IBM Cloud SDK Common documentation.

Example API request

curl -X {request_method} "{base_url}/api/v2/{method_endpoint}" --header "Authorization: Bearer {IAM_token}"

Replace {IAM_token} with your access token.

Constructing the service client

import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.SecretsManager;
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.model.*;
import com.ibm.cloud.sdk.core.http.Response;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;

import java.util.Collections;
...

// Create an IAM authenticator
IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
        .apikey("<API_KEY>")
        .build();

// Construct the service client
SecretsManager secretsManagerService = new SecretsManager("My Secrets-Manager service", iamAuthenticator);

// Set the service URL
secretsManagerService.setServiceUrl("<URL>");

Replace <API_KEY> with your IBM Cloud API key. Replace <URL> with the endpoint URL for your instance. Invoke service operations by using the secretsManagerService variable.

Constructing the service client

from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
from ibm_secrets_manager_sdk.secrets_manager_v2 import *

secrets_manager_service = SecretsManagerV2(
    authenticator=IAMAuthenticator(apikey='<API_KEY>')
)

secrets_manager_service.set_service_url('<URL>')

Replace <API_KEY> with your IBM Cloud API key. Replace <URL> with the endpoint URL for your instance.

Constructing the service client

import (
    "encoding/json"
    "fmt"
    "github.com/IBM/go-sdk-core/v5/core"
    sm "github.com/IBM/secrets-manager-go-sdk/secretsmanagerv2"
)

func main() {

    secretsManagerService, err := sm.NewSecretsManagerV2(&sm.SecretsManagerV2Options {
        URL: "<URL>",
        Authenticator: & core.IamAuthenticator {
            ApiKey: "<API_KEY>",
        },
    })

    if err != nil {
        panic(err)
    }
}

Replace <API_KEY> with your IBM Cloud API key. Replace <URL> with the endpoint URL for your instance.

Constructing the service client

const IbmCloudSecretsManagerApiV2 =  require('@ibm-cloud/secrets-manager/secrets-manager/v2');
const { IamAuthenticator } = require('@ibm-cloud/secrets-manager/auth');

const secretsManagerService = new IbmCloudSecretsManagerApiV2({
  authenticator: new IamAuthenticator({
    apikey: '<API_KEY>',
  }),
  serviceUrl: '<URL>',
});

Replace <API_KEY> with your IBM Cloud API key. Replace <URL> with the endpoint URL for your instance.

Auditing

You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method.

For more information about how to track Secrets Manager activity, see Auditing events for Secrets Manager.

Error handling

The Secrets Manager APIs use standard HTTP status codes to indicate whether a method completed successfully. HTTP response codes in the 2xx range indicate success. A response in the 4xx range is some sort of failure, and a response in the 5xx range usually indicates an internal system error.

Status code summary
Status code Description
200 OK Everything worked as expected.
300 Multiple Choices The request has more than one possible responses.
400 Bad Request The request was unsuccessful, often due to a missing required parameter.
401 Unauthorized Access token is missing or invalid.
402 Payment Required Your Trial plan is now expired.
403 Forbidden You are not allowed to access this resource.
404 Not Found The requested resource doesn't exist.
409 Conflict The requested resource conflicts with an already existing resource.
410 Gone The requested resource was deleted and no longer exists.
429 Too Many Requests Too many requests hit the API too quickly.
500 Internal Server Error Something went wrong on Secrets Manager's end.

Example error handling

secretsManagerApi.method(params)
  .catch(err => {
    console.log('Error:', err);
  });

Example error handling

import sm "github.com/IBM/secrets-manager-go-sdk/v2/secretsmanagerv2"

// Instantiate a service
secretsManagerApi, err := sm.NewSecretsManagerV2(&sm.SecretsManagerV2Options)

// Check for errors
if err != nil {
  panic(err)
}

// Call a method
result, response, err := secretsManagerApi.MethodName(&methodOptions)

// Check for errors
if err != nil {
  panic(err)
}

Pagination

Some API requests might return a large number of results. To avoid performance issues, the Secrets Manager API returns one page of results at a time, with a limited number of results on each page.

The default page size is defined differently for each operation. To use a different page size, use the limit query parameter.

Rate limiting

Secrets Manager API does not enforce a hard rate-limit. However as requests rate increase, some performance degradation is expected. The impact depends on the requests patterns. As a rule of thumb it is recommended to keep the rate below 20 requests per second.

Change log

For the latest changes, improvements, and updates for this API, see the API change log.

Methods

Create a new secret group

Create a secret group that you can use to organize secrets and control who can access them.

A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.

Create a secret group that you can use to organize secrets and control who can access them.

A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.

Create a secret group that you can use to organize secrets and control who can access them.

A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.

Create a secret group that you can use to organize secrets and control who can access them.

A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.

Create a secret group that you can use to organize secrets and control who can access them.

A successful request returns the ID value of the secret group, along with other properties. To learn more about secret groups, check out the docs.

POST /api/v2/secret_groups
ServiceCall<SecretGroup> createSecretGroup(CreateSecretGroupOptions createSecretGroupOptions)
createSecretGroup(params)
create_secret_group(
        self,
        name: str,
        *,
        description: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
(secretsManager *SecretsManagerV2) CreateSecretGroup(createSecretGroupOptions *CreateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) CreateSecretGroupWithContext(ctx context.Context, createSecretGroupOptions *CreateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • secrets-manager.secret-group.create

Auditing

Calling this method generates the following auditing event.

  • secrets-manager.secret-group.create

Request

Use the CreateSecretGroupOptions.Builder to create a CreateSecretGroupOptions object that contains the parameter values for the createSecretGroup method.

Instantiate the CreateSecretGroupOptions struct and set the fields to provide parameter values for the CreateSecretGroup method.

The request body to create a new secret group.

Examples:
{
  "name": "my-secret-group",
  "description": "Extended description for this group."
}

The createSecretGroup options.

parameters

  • The name of your secret group.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/

    Examples:
  • An extended description of your secret group.

    To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /(.*?)/

    Examples:

parameters

  • The name of your secret group.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/

    Examples:
  • An extended description of your secret group.

    To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /(.*?)/

    Examples:

WithContext method only

The CreateSecretGroup options.

  • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"name":"my-secret-group","description":"Extended description for this group."}'   "${base_url}/api/v2/secret_groups"
  • CreateSecretGroupOptions createSecretGroupOptions = new CreateSecretGroupOptions.Builder()
      .name("my-secret-group")
      .build();
    
    Response<SecretGroup> response = secretsManagerService.createSecretGroup(createSecretGroupOptions).execute();
    SecretGroup secretGroup = response.getResult();
    
    System.out.println(secretGroup);
  • const params = {
      name: 'my-secret-group',
    };
    
    let res;
    try {
      res = await secretsManagerService.createSecretGroup(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = secrets_manager_service.create_secret_group(
      name='my-secret-group',
    )
    secret_group = response.get_result()
    
    print(json.dumps(secret_group, indent=2))
  • createSecretGroupOptions := secretsManagerService.NewCreateSecretGroupOptions(
      "my-secret-group",
    )
    
    secretGroup, response, err := secretsManagerService.CreateSecretGroup(createSecretGroupOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(secretGroup, "", "  ")
    fmt.Println(string(b))

Response

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Status Code

  • The secret group was successfully created.

  • BadRequest

  • Unauthorized

  • PaymentRequired

  • Forbidden

  • The specified resource was not found

  • InternalServerError

  • BadGatewayError

  • ServiceUnavailableError

Example responses
  • Example of SecretGroup response

    {
      "created_at": "2020-10-05T21:33:11Z",
      "description": "Extended description for this group.",
      "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
      "name": "my-secret-group",
      "updated_at": "2020-11-25T22:13:10Z",
      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
    }
  • Example of SecretGroup response

    {
      "created_at": "2020-10-05T21:33:11Z",
      "description": "Extended description for this group.",
      "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
      "name": "my-secret-group",
      "updated_at": "2020-11-25T22:13:10Z",
      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }

List secret groups

List the secret groups that are available in your Secrets Manager instance.

List the secret groups that are available in your Secrets Manager instance.

List the secret groups that are available in your Secrets Manager instance.

List the secret groups that are available in your Secrets Manager instance.

List the secret groups that are available in your Secrets Manager instance.

GET /api/v2/secret_groups
ServiceCall<SecretGroupCollection> listSecretGroups()
listSecretGroups(params)
list_secret_groups(
        self,
        **kwargs,
    ) -> DetailedResponse
(secretsManager *SecretsManagerV2) ListSecretGroups(listSecretGroupsOptions *ListSecretGroupsOptions) (result *SecretGroupCollection, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) ListSecretGroupsWithContext(ctx context.Context, listSecretGroupsOptions *ListSecretGroupsOptions) (result *SecretGroupCollection, response *core.DetailedResponse, err error)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • secrets-manager.secret-groups.list

Auditing

Calling this method generates the following auditing event.

  • secrets-manager.secret-groups.list

Request

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any request parameters.

  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secret_groups"
  • ListSecretGroupsOptions listSecretGroupsOptions = new ListSecretGroupsOptions();
    
    Response<SecretGroupCollection> response = secretsManagerService.listSecretGroups(listSecretGroupsOptions).execute();
    SecretGroupCollection secretGroupCollection = response.getResult();
    
    System.out.println(secretGroupCollection);
  • let res;
    try {
      res = await secretsManagerService.listSecretGroups({});
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = secrets_manager_service.list_secret_groups()
    secret_group_collection = response.get_result()
    
    print(json.dumps(secret_group_collection, indent=2))
  • listSecretGroupsOptions := secretsManagerService.NewListSecretGroupsOptions()
    
    secretGroupCollection, response, err := secretsManagerService.ListSecretGroups(listSecretGroupsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(secretGroupCollection, "", "  ")
    fmt.Println(string(b))

Response

Properties that describe a collection of secret groups.

Properties that describe a collection of secret groups.

Properties that describe a collection of secret groups.

Properties that describe a collection of secret groups.

Properties that describe a collection of secret groups.

Status Code

  • The list of secret groups was successfully retrieved.

  • BadRequest

  • Unauthorized

  • PaymentRequired

  • Forbidden

  • The specified resource was not found

  • InternalServerError

  • BadGatewayError

  • ServiceUnavailableError

Example responses
  • Example SecretGroup collection response

    {
      "secret_groups": [
        {
          "created_at": "2020-09-05T21:33:11Z",
          "description": "Default Secret Group",
          "id": "ee52ebb6-1728-4580-8ede-13f6504e3ae0",
          "name": "default",
          "updated_at": "2020-09-25T22:13:10Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
        },
        {
          "created_at": "2020-10-05T21:33:11Z",
          "description": "Extended description for this group.",
          "id": "cb52ebb6-1728-4580-8ede-13f6504e3ae0",
          "name": "my-secret-group",
          "updated_at": "2020-11-25T22:13:10Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
        },
        {
          "created_at": "2020-10-05T22:05:15Z",
          "description": "Extended description for this group.",
          "id": "19f88b9c-4f2f-405c-b877-a09338575c3f",
          "name": "my-second-secret-group",
          "updated_at": "2020-11-25T22:13:10Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
        }
      ],
      "total_count": 3
    }
  • Example SecretGroup collection response

    {
      "secret_groups": [
        {
          "created_at": "2020-09-05T21:33:11Z",
          "description": "Default Secret Group",
          "id": "ee52ebb6-1728-4580-8ede-13f6504e3ae0",
          "name": "default",
          "updated_at": "2020-09-25T22:13:10Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
        },
        {
          "created_at": "2020-10-05T21:33:11Z",
          "description": "Extended description for this group.",
          "id": "cb52ebb6-1728-4580-8ede-13f6504e3ae0",
          "name": "my-secret-group",
          "updated_at": "2020-11-25T22:13:10Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
        },
        {
          "created_at": "2020-10-05T22:05:15Z",
          "description": "Extended description for this group.",
          "id": "19f88b9c-4f2f-405c-b877-a09338575c3f",
          "name": "my-second-secret-group",
          "updated_at": "2020-11-25T22:13:10Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
        }
      ],
      "total_count": 3
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }

Get a secret group

Get the properties of an existing secret group by specifying the ID of the group.

Get the properties of an existing secret group by specifying the ID of the group.

Get the properties of an existing secret group by specifying the ID of the group.

Get the properties of an existing secret group by specifying the ID of the group.

Get the properties of an existing secret group by specifying the ID of the group.

GET /api/v2/secret_groups/{id}
ServiceCall<SecretGroup> getSecretGroup(GetSecretGroupOptions getSecretGroupOptions)
getSecretGroup(params)
get_secret_group(
        self,
        id: str,
        **kwargs,
    ) -> DetailedResponse
(secretsManager *SecretsManagerV2) GetSecretGroup(getSecretGroupOptions *GetSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) GetSecretGroupWithContext(ctx context.Context, getSecretGroupOptions *GetSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • secrets-manager.secret-group.read

Auditing

Calling this method generates the following auditing event.

  • secrets-manager.secret-group.read

Request

Use the GetSecretGroupOptions.Builder to create a GetSecretGroupOptions object that contains the parameter values for the getSecretGroup method.

Instantiate the GetSecretGroupOptions struct and set the fields to provide parameter values for the GetSecretGroup method.

Path Parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$

    Example: d898bb90-82f6-4d61-b5cc-b079b66cfa76

The getSecretGroup options.

parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/

    Examples:

parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/

    Examples:

WithContext method only

The GetSecretGroup options.

  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secret_groups/${id}"
  • GetSecretGroupOptions getSecretGroupOptions = new GetSecretGroupOptions.Builder()
      .id(secretGroupIdForGetSecretGroupLink)
      .build();
    
    Response<SecretGroup> response = secretsManagerService.getSecretGroup(getSecretGroupOptions).execute();
    SecretGroup secretGroup = response.getResult();
    
    System.out.println(secretGroup);
  • const params = {
      id: secretGroupIdForGetSecretGroupLink,
    };
    
    let res;
    try {
      res = await secretsManagerService.getSecretGroup(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = secrets_manager_service.get_secret_group(
      id=secret_group_id_for_get_secret_group_link,
    )
    secret_group = response.get_result()
    
    print(json.dumps(secret_group, indent=2))
  • getSecretGroupOptions := secretsManagerService.NewGetSecretGroupOptions(
      secretGroupIdForGetSecretGroupLink,
    )
    
    secretGroup, response, err := secretsManagerService.GetSecretGroup(getSecretGroupOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(secretGroup, "", "  ")
    fmt.Println(string(b))

Response

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Status Code

  • The secret group was successfully retrieved.

  • BadRequest

  • Unauthorized

  • PaymentRequired

  • Forbidden

  • The specified resource was not found

  • InternalServerError

  • BadGatewayError

  • ServiceUnavailableError

Example responses
  • Example of SecretGroup response

    {
      "created_at": "2020-10-05T21:33:11Z",
      "description": "Extended description for this group.",
      "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
      "name": "my-secret-group",
      "updated_at": "2020-11-25T22:13:10Z",
      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
    }
  • Example of SecretGroup response

    {
      "created_at": "2020-10-05T21:33:11Z",
      "description": "Extended description for this group.",
      "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
      "name": "my-secret-group",
      "updated_at": "2020-11-25T22:13:10Z",
      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }

Update a secret group

Update the properties of an existing secret group, such as its name or description.

Update the properties of an existing secret group, such as its name or description.

Update the properties of an existing secret group, such as its name or description.

Update the properties of an existing secret group, such as its name or description.

Update the properties of an existing secret group, such as its name or description.

PATCH /api/v2/secret_groups/{id}
ServiceCall<SecretGroup> updateSecretGroup(UpdateSecretGroupOptions updateSecretGroupOptions)
updateSecretGroup(params)
update_secret_group(
        self,
        id: str,
        secret_group_patch: 'SecretGroupPatch',
        **kwargs,
    ) -> DetailedResponse
(secretsManager *SecretsManagerV2) UpdateSecretGroup(updateSecretGroupOptions *UpdateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) UpdateSecretGroupWithContext(ctx context.Context, updateSecretGroupOptions *UpdateSecretGroupOptions) (result *SecretGroup, response *core.DetailedResponse, err error)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • secrets-manager.secret-group.update

Auditing

Calling this method generates the following auditing event.

  • secrets-manager.secret-group.update

Request

Use the UpdateSecretGroupOptions.Builder to create a UpdateSecretGroupOptions object that contains the parameter values for the updateSecretGroup method.

Instantiate the UpdateSecretGroupOptions struct and set the fields to provide parameter values for the UpdateSecretGroup method.

Path Parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

    Example: d898bb90-82f6-4d61-b5cc-b079b66cfa76

The request body to update a secret group.

Examples:
{
  "name": "updated-secret-group-name",
  "description": "Updated description for this group."
}

The updateSecretGroup options.

parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

    Examples:
  • The name of your secret group.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$/

    Examples:
  • An extended description of your secret group.

    To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /(.*?)/

    Examples:

parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

    Examples:
  • Update the name or description of your secret group.

    Examples:
    {
      "name": "updated-secret-group-name",
      "description": "Updated description for this group."
    }

WithContext method only

The UpdateSecretGroup options.

  • curl -X PATCH --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/merge-patch+json"   --data ''   "${base_url}/api/v2/secret_groups/${id}"
  • SecretGroupPatch secretGroupPatchModel = new SecretGroupPatch.Builder()
      .build();
    Map<String, Object> secretGroupPatchModelAsPatch = secretGroupPatchModel.asPatch();
    UpdateSecretGroupOptions updateSecretGroupOptions = new UpdateSecretGroupOptions.Builder()
      .id(secretGroupIdForGetSecretGroupLink)
      .secretGroupPatch(secretGroupPatchModelAsPatch)
      .build();
    
    Response<SecretGroup> response = secretsManagerService.updateSecretGroup(updateSecretGroupOptions).execute();
    SecretGroup secretGroup = response.getResult();
    
    System.out.println(secretGroup);
  • const params = {
      id: secretGroupIdForGetSecretGroupLink,
    };
    
    let res;
    try {
      res = await secretsManagerService.updateSecretGroup(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • secret_group_patch_model = {
    }
    
    response = secrets_manager_service.update_secret_group(
      id=secret_group_id_for_get_secret_group_link,
      secret_group_patch=secret_group_patch_model,
    )
    secret_group = response.get_result()
    
    print(json.dumps(secret_group, indent=2))
  • secretGroupPatchModel := &secretsmanagerv2.SecretGroupPatch{
    }
    secretGroupPatchModelAsPatch, asPatchErr := secretGroupPatchModel.AsPatch()
    Expect(asPatchErr).To(BeNil())
    
    updateSecretGroupOptions := secretsManagerService.NewUpdateSecretGroupOptions(
      secretGroupIdForGetSecretGroupLink,
      secretGroupPatchModelAsPatch,
    )
    
    secretGroup, response, err := secretsManagerService.UpdateSecretGroup(updateSecretGroupOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(secretGroup, "", "  ")
    fmt.Println(string(b))

Response

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Properties that describe a secret group.

Status Code

  • The secret group was successfully updated.

  • BadRequest

  • Unauthorized

  • PaymentRequired

  • Forbidden

  • The specified resource was not found

  • InternalServerError

  • BadGatewayError

  • ServiceUnavailableError

Example responses
  • Example of SecretGroup response

    {
      "created_at": "2020-10-05T21:33:11Z",
      "description": "Extended description for this group.",
      "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
      "name": "my-secret-group",
      "updated_at": "2020-11-25T22:13:10Z",
      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
    }
  • Example of SecretGroup response

    {
      "created_at": "2020-10-05T21:33:11Z",
      "description": "Extended description for this group.",
      "id": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
      "name": "my-secret-group",
      "updated_at": "2020-11-25T22:13:10Z",
      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21"
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }

Delete a secret group

Delete a secret group by specifying the ID of the secret group.

Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.

Delete a secret group by specifying the ID of the secret group.

Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.

Delete a secret group by specifying the ID of the secret group.

Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.

Delete a secret group by specifying the ID of the secret group.

Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.

Delete a secret group by specifying the ID of the secret group.

Note: To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets, you must first delete the secrets that are associated with the group.

DELETE /api/v2/secret_groups/{id}
ServiceCall<Void> deleteSecretGroup(DeleteSecretGroupOptions deleteSecretGroupOptions)
deleteSecretGroup(params)
delete_secret_group(
        self,
        id: str,
        **kwargs,
    ) -> DetailedResponse
(secretsManager *SecretsManagerV2) DeleteSecretGroup(deleteSecretGroupOptions *DeleteSecretGroupOptions) (response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) DeleteSecretGroupWithContext(ctx context.Context, deleteSecretGroupOptions *DeleteSecretGroupOptions) (response *core.DetailedResponse, err error)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • secrets-manager.secret-group.delete

Auditing

Calling this method generates the following auditing event.

  • secrets-manager.secret-group.delete

Request

Use the DeleteSecretGroupOptions.Builder to create a DeleteSecretGroupOptions object that contains the parameter values for the deleteSecretGroup method.

Instantiate the DeleteSecretGroupOptions struct and set the fields to provide parameter values for the DeleteSecretGroup method.

Path Parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

    Example: d898bb90-82f6-4d61-b5cc-b079b66cfa76

The deleteSecretGroup options.

parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

    Examples:

parameters

  • The v4 UUID that uniquely identifies your secret group.

    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

    Examples:

WithContext method only

The DeleteSecretGroup options.

  • curl -X DELETE --location --header "Authorization: Bearer ${iam_token}"   "${base_url}/api/v2/secret_groups/${id}"
  • DeleteSecretGroupOptions deleteSecretGroupOptions = new DeleteSecretGroupOptions.Builder()
      .id(secretGroupIdForGetSecretGroupLink)
      .build();
    
    Response<Void> response = secretsManagerService.deleteSecretGroup(deleteSecretGroupOptions).execute();
  • const params = {
      id: secretGroupIdForGetSecretGroupLink,
    };
    
    try {
      await secretsManagerService.deleteSecretGroup(params);
    } catch (err) {
      console.warn(err);
    }
  • response = secrets_manager_service.delete_secret_group(
      id=secret_group_id_for_get_secret_group_link,
    )
  • deleteSecretGroupOptions := secretsManagerService.NewDeleteSecretGroupOptions(
      secretGroupIdForGetSecretGroupLink,
    )
    
    response, err := secretsManagerService.DeleteSecretGroup(deleteSecretGroupOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteSecretGroup(): %d\n", response.StatusCode)
    }

Response

Status Code

  • The secret group was successfully deleted.

  • BadRequest

  • Unauthorized

  • PaymentRequired

  • Forbidden

  • The specified resource was not found

  • Conflict

  • InternalServerError

  • BadGatewayError

  • ServiceUnavailableError

Example responses
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad request error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 400,
      "errors": [
        {
          "code": "bad_request",
          "message": "required.name:property \"name\" is missing",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of unauthorized error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 401,
      "errors": [
        {
          "code": "unauthorized",
          "message": "You provided no credentials or invalid credentials.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of payment required error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 402,
      "errors": [
        {
          "code": "payment_required",
          "message": "Your Trial plan is now expired.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of forbidden error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 403,
      "errors": [
        {
          "code": "access_forbidden",
          "message": "You are not allowed to access this resource.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of NotFound error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 404,
      "errors": [
        {
          "code": "not_found",
          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example Conflict error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 409,
      "errors": [
        {
          "code": "conflict",
          "message": "The request conflicts with the current state of the target resource",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example Conflict error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 409,
      "errors": [
        {
          "code": "conflict",
          "message": "The request conflicts with the current state of the target resource",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of internal server error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "Internal server error",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of bad gateway error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 502,
      "errors": [
        {
          "code": "bad_gateway",
          "message": "Bad Gateway",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }
  • Example of service unavailable error

    {
      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
      "status_code": 503,
      "errors": [
        {
          "code": "service_unavailable",
          "message": "Service Unavailable",
          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
        }
      ]
    }

Create a new secret

Create a secret or import an existing value that you can use to access or authenticate to a protected resource.

Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.

To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.

Create a secret or import an existing value that you can use to access or authenticate to a protected resource.

Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.

To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.

Create a secret or import an existing value that you can use to access or authenticate to a protected resource.

Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.

To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.

Create a secret or import an existing value that you can use to access or authenticate to a protected resource.

Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.

To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.

Create a secret or import an existing value that you can use to access or authenticate to a protected resource.

Use this operation to either generate or import an existing secret, such as a TLS certificate, that you can manage in your Secrets Manager service instance. A successful request stores the secret in your dedicated instance, based on the secret type and data that you specify. The response returns the ID value of the secret, along with other metadata.

To learn more about the types of secrets that you can create with Secrets Manager, check out the docs.

POST /api/v2/secrets
ServiceCall<Secret> createSecret(CreateSecretOptions createSecretOptions)
createSecret(params)
create_secret(
        self,
        secret_prototype: 'SecretPrototype',
        **kwargs,
    ) -> DetailedResponse
(secretsManager *SecretsManagerV2) CreateSecret(createSecretOptions *CreateSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)
(secretsManager *SecretsManagerV2) CreateSecretWithContext(ctx context.Context, createSecretOptions *CreateSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • secrets-manager.secret.create

Auditing

Calling this method generates the following auditing event.

  • secrets-manager.secret.create

Request

Use the CreateSecretOptions.Builder to create a CreateSecretOptions object that contains the parameter values for the createSecret method.

Instantiate the CreateSecretOptions struct and set the fields to provide parameter values for the CreateSecret method.

Example:

Example of arbitrary secret's request body

{
  "custom_metadata": {
    "metadata_custom_key": "metadata_custom_value"
  },
  "description": "Description of my arbitrary secret.",
  "expiration_date": "2030-10-05T11:49:42Z",
  "labels": [
    "dev",
    "us-south"
  ],
  "name": "example-arbitrary-secret",
  "payload": "secret-data",
  "secret_group_id": "default",
  "secret_type": "arbitrary",
  "version_custom_metadata": {
    "custom_version_key": "custom_version_value"
  }
}

The createSecret options.

parameters

  • Specify the properties for your secret.

    parameters

    • Specify the properties for your secret.

      WithContext method only

      The CreateSecret options.

      • ibmcloud secrets-manager secret-create --secret-name=example-arbitrary-secret --secret-type=arbitrary --arbitrary-payload=example-secret-data
        
        ibmcloud secrets-manager secret-create \
          --secret-prototype='{"name": "example-arbitrary-secret", "secret_type": "arbitrary", "payload":"example-secret-data"}'
        
      • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "description": "Description of my arbitrary secret.", "expiration_date": "2030-10-05T11:49:42Z", "labels": [ "dev", "us-south" ], "name": "example-arbitrary-secret", "payload": "secret-data", "secret_group_id": "default", "secret_type": "arbitrary", "version_custom_metadata": { "custom_version_key": "custom_version_value" } }'   "${base_url}/api/v2/secrets"
      • ArbitrarySecretPrototype secretPrototypeModel = new ArbitrarySecretPrototype.Builder()
          .description("Description of my arbitrary secret.")
          .expirationDate(DateUtils.parseAsDateTime("2030-10-05T11:49:42Z"))
          .labels(java.util.Arrays.asList("dev", "us-south"))
          .name("example-arbitrary-secret")
          .secretGroupId("default")
          .secretType("arbitrary")
          .payload("secret-data")
          .build();
        CreateSecretOptions createSecretOptions = new CreateSecretOptions.Builder()
          .secretPrototype(secretPrototypeModel)
          .build();
        
        Response<Secret> response = secretsManagerService.createSecret(createSecretOptions).execute();
        Secret secret = response.getResult();
        
        System.out.println(secret);
      • // Request models needed by this operation.
        
        // ArbitrarySecretPrototype
        const secretPrototypeModel = {
          custom_metadata: { metadata_custom_key: 'metadata_custom_value' },
          description: 'Description of my arbitrary secret.',
          expiration_date: '2030-10-05T11:49:42Z',
          labels: ['dev', 'us-south'],
          name: 'example-arbitrary-secret',
          secret_group_id: 'default',
          secret_type: 'arbitrary',
          payload: 'secret-data',
          version_custom_metadata: { custom_version_key: 'custom_version_value' },
        };
        
        const params = {
          secretPrototype: secretPrototypeModel,
        };
        
        let res;
        try {
          res = await secretsManagerService.createSecret(params);
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • secret_prototype_model = {
          'custom_metadata': {'metadata_custom_key': 'metadata_custom_value'},
          'description': 'Description of my arbitrary secret.',
          'expiration_date': '2030-10-05T11:49:42Z',
          'labels': ['dev', 'us-south'],
          'name': 'example-arbitrary-secret',
          'secret_group_id': 'default',
          'secret_type': 'arbitrary',
          'payload': 'secret-data',
          'version_custom_metadata': {'custom_version_key': 'custom_version_value'},
        }
        
        response = secrets_manager_service.create_secret(
          secret_prototype=secret_prototype_model,
        )
        secret = response.get_result()
        
        print(json.dumps(secret, indent=2))
      • secretPrototypeModel := &secretsmanagerv2.ArbitrarySecretPrototype{
          Description: core.StringPtr("Description of my arbitrary secret."),
          Labels: []string{"dev", "us-south"},
          Name: core.StringPtr("example-arbitrary-secret"),
          SecretGroupID: core.StringPtr("default"),
          SecretType: core.StringPtr("arbitrary"),
          Payload: core.StringPtr("secret-data"),
        }
        
        createSecretOptions := secretsManagerService.NewCreateSecretOptions(
          secretPrototypeModel,
        )
        
        secret, response, err := secretsManagerService.CreateSecret(createSecretOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(secret, "", "  ")
        fmt.Println(string(b))

      Response

      Your secret.

      Your arbitrary secret.

      Your arbitrary secret.

      Your arbitrary secret.

      Your arbitrary secret.

      Status Code

      • The secret was successfully created.

      • BadRequest

      • Unauthorized

      • PaymentRequired

      • Forbidden

      • The specified resource was not found

      • Conflict

      • UnprocessableEntity

      • InternalServerError

      • BadGatewayError

      • ServiceUnavailableError

      Example responses
      • Example arbitrary secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "description of my arbitrary secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-arbitrary-secret",
          "payload": "secret-data",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "arbitrary",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example arbitrary secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "description of my arbitrary secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-arbitrary-secret",
          "payload": "secret-data",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "arbitrary",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example create IAM Credentials using Service ID

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": false,
          "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-iam-credentials-secret",
          "reuse_api_key": false,
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "iam_credentials",
          "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
          "service_id_is_static": false,
          "state": 1,
          "state_description": "active",
          "ttl": "1800",
          "updated_at": "2020-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example create IAM Credentials using Service ID

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": false,
          "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-iam-credentials-secret",
          "reuse_api_key": false,
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "iam_credentials",
          "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
          "service_id_is_static": false,
          "state": 1,
          "state_description": "active",
          "ttl": "1800",
          "updated_at": "2020-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example imported certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2020-10-05T21:33:11Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my imported certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "intermediate_included": true,
          "issuer": "GlobalSign",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-imported-certificate",
          "private_key_included": true,
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "imported_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example imported certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2020-10-05T21:33:11Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my imported certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "intermediate_included": true,
          "issuer": "GlobalSign",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-imported-certificate",
          "private_key_included": true,
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "imported_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example kv secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my key-value secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-kv-secret",
          "data": {
            "key1": "val1"
          },
          "secret_type": "kv",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example kv secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my key-value secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-kv-secret",
          "data": {
            "key1": "val1"
          },
          "secret_type": "kv",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example private certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "certificate_authority": "example-intermediate-CA",
          "certificate_template": "example-certificate-template",
          "common_name": "example.com",
          "created_at": "2022-10-02T14:08:07Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2030-03-02T15:08:37Z",
          "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "issuer": "example.com",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-private-certificate",
          "next_rotation_date": "2022-03-02T14:08:07Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "month"
          },
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "ca_chain": [
            "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
          ],
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "private_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-03-02T14:08:37Z",
          "validity": {
            "not_before": "2022-03-02T15:08:37Z",
            "not_after": "2030-03-01T00:00:00Z"
          },
          "versions_total": 1
        }
      • Example private certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "certificate_authority": "example-intermediate-CA",
          "certificate_template": "example-certificate-template",
          "common_name": "example.com",
          "created_at": "2022-10-02T14:08:07Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2030-03-02T15:08:37Z",
          "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "issuer": "example.com",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-private-certificate",
          "next_rotation_date": "2022-03-02T14:08:07Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "month"
          },
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "ca_chain": [
            "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
          ],
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "private_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-03-02T14:08:37Z",
          "validity": {
            "not_before": "2022-03-02T15:08:37Z",
            "not_after": "2030-03-01T00:00:00Z"
          },
          "versions_total": 1
        }
      • Example of created public certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2022-10-06T06:15:55Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description of my public certificate.",
          "downloaded": false,
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "issuance_info": {
            "auto_rotated": false,
            "ordered_on": "2022-10-06T06:15:55Z",
            "state": 0,
            "state_description": "pre_activation"
          },
          "bundle_certs": true,
          "ca": "lets-encrypt-config",
          "dns": "cloud-internet-services-config",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-public-certificate",
          "rotation": {
            "auto_rotate": true,
            "rotate_keys": true
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "public_cert",
          "state": 0,
          "state_description": "pre_activation",
          "updated_at": "2022-10-06T06:15:55Z",
          "versions_total": 1
        }
      • Example of created public certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2022-10-06T06:15:55Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description of my public certificate.",
          "downloaded": false,
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "issuance_info": {
            "auto_rotated": false,
            "ordered_on": "2022-10-06T06:15:55Z",
            "state": 0,
            "state_description": "pre_activation"
          },
          "bundle_certs": true,
          "ca": "lets-encrypt-config",
          "dns": "cloud-internet-services-config",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-public-certificate",
          "rotation": {
            "auto_rotate": true,
            "rotate_keys": true
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "public_cert",
          "state": 0,
          "state_description": "pre_activation",
          "updated_at": "2022-10-06T06:15:55Z",
          "versions_total": 1
        }
      • A sample service credentials secret body.

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "credentials": {
            "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
            "cos_hmac_keys": {
              "access_key_id": "af56af3af56a4c738afea662c47840b3",
              "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
            },
            "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
            "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234",
            "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::"
          },
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "The description for my service credentials secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-service-credentials-secret",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": true,
            "interval": 10,
            "unit": "day"
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "service_credentials",
          "source_service": {
            "instance": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
            },
            "parameters": {
              "HMAC": true,
              "serviceid_crn": "existing sid"
            },
            "role": {
              "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
            },
            "iam": {
              "apikey": {
                "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
              },
              "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              },
              "serviceid": {
                "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234"
              },
              "resource_key": {
                "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                "name": "secret_name_versionid"
              }
            }
          },
          "state": 1,
          "state_description": "active",
          "ttl": "86400",
          "updated_at": "2022-10-05T21:33:11Z",
          "version_custom_metadata": {
            "custom_version_key": "custom_version_value"
          },
          "versions_total": 1
        }
      • A sample service credentials secret body.

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "credentials": {
            "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
            "cos_hmac_keys": {
              "access_key_id": "af56af3af56a4c738afea662c47840b3",
              "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
            },
            "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
            "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234",
            "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::"
          },
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "The description for my service credentials secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-service-credentials-secret",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": true,
            "interval": 10,
            "unit": "day"
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "service_credentials",
          "source_service": {
            "instance": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
            },
            "parameters": {
              "HMAC": true,
              "serviceid_crn": "existing sid"
            },
            "role": {
              "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
            },
            "iam": {
              "apikey": {
                "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
              },
              "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              },
              "serviceid": {
                "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234"
              },
              "resource_key": {
                "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                "name": "secret_name_versionid"
              }
            }
          },
          "state": 1,
          "state_description": "active",
          "ttl": "86400",
          "updated_at": "2022-10-05T21:33:11Z",
          "version_custom_metadata": {
            "custom_version_key": "custom_version_value"
          },
          "versions_total": 1
        }
      • Example user credentials

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my user credentials secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-username-password",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "day"
          },
          "password_generation_policy": {
            "length": 32,
            "include_digits": true,
            "include_symbols": true,
            "include_uppercase": true
          },
          "username": "admin",
          "password": "admin1234",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "username_password",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example user credentials

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my user credentials secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-username-password",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "day"
          },
          "password_generation_policy": {
            "length": 32,
            "include_digits": true,
            "include_symbols": true,
            "include_uppercase": true
          },
          "username": "admin",
          "password": "admin1234",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "username_password",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example Conflict error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 409,
          "errors": [
            {
              "code": "conflict",
              "message": "The request conflicts with the current state of the target resource",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example Conflict error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 409,
          "errors": [
            {
              "code": "conflict",
              "message": "The request conflicts with the current state of the target resource",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example UnprocessableEntity error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 422,
          "errors": [
            {
              "code": "unprocessable_entity",
              "message": "The API key is locked. Unlock the API key to complete this operation.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example UnprocessableEntity error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 422,
          "errors": [
            {
              "code": "unprocessable_entity",
              "message": "The API key is locked. Unlock the API key to complete this operation.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }

      List secrets

      List the secrets that are available in your Secrets Manager instance.

      List the secrets that are available in your Secrets Manager instance.

      List the secrets that are available in your Secrets Manager instance.

      List the secrets that are available in your Secrets Manager instance.

      List the secrets that are available in your Secrets Manager instance.

      GET /api/v2/secrets
      ServiceCall<SecretMetadataPaginatedCollection> listSecrets(ListSecretsOptions listSecretsOptions)
      listSecrets(params)
      list_secrets(
              self,
              *,
              offset: Optional[int] = None,
              limit: Optional[int] = None,
              sort: Optional[str] = None,
              search: Optional[str] = None,
              groups: Optional[List[str]] = None,
              secret_types: Optional[List[str]] = None,
              match_all_labels: Optional[List[str]] = None,
              **kwargs,
          ) -> DetailedResponse
      (secretsManager *SecretsManagerV2) ListSecrets(listSecretsOptions *ListSecretsOptions) (result *SecretMetadataPaginatedCollection, response *core.DetailedResponse, err error)
      (secretsManager *SecretsManagerV2) ListSecretsWithContext(ctx context.Context, listSecretsOptions *ListSecretsOptions) (result *SecretMetadataPaginatedCollection, response *core.DetailedResponse, err error)

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      • secrets-manager.secrets.list

      Auditing

      Calling this method generates the following auditing event.

      • secrets-manager.secrets.list

      Request

      Use the ListSecretsOptions.Builder to create a ListSecretsOptions object that contains the parameter values for the listSecrets method.

      Instantiate the ListSecretsOptions struct and set the fields to provide parameter values for the ListSecrets method.

      Query Parameters

      • The number of secrets to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

        Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use ..?offset=25&limit=25.

        Possible values: value ≥ 0

        Default: 0

      • The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

        Usage: If you want to retrieve only the first 25 secrets in your instance, use ..?limit=25.

        Possible values: 1 ≤ value ≤ 1000

        Default: 200

      • Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the - character

        Available values: id | created_at | updated_at | expiration_date | secret_type | name

        Usage: To sort a list of secrets by their creation date, use ../secrets?sort=created_at.

        Possible values: 2 ≤ length ≤ 17, Value must match regular expression ^-?(id|created_at|updated_at|expiration_date|secret_type|name)$

        Example: created_at

      • Obtain a collection of secrets that contain the specified string in one or more of the fields: id, name, description, labels, secret_type.

        Usage: If you want to list only the secrets that contain the string text, use ../secrets?search=text.

        Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

        Example: example

      • Filter secrets by groups.

        You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the default keyword.

        Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use ..?groups={secret_group_ID},default.

        Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$

        Examples:
        [
          "default",
          "cac40995-c37a-4dcb-9506-472869077634"
        ]
      • Filter secrets by types.

        You can apply multiple filters by using a comma-separated list of secret types.

        Usage: To retrieve a list of imported certificates and public certificates use ..?secret_types=imported_cert,public_cert.

        Allowable values: [arbitrary,iam_credentials,imported_cert,kv,private_cert,public_cert,service_credentials,username_password]

        Possible values: 0 ≤ number of items ≤ 8, allows empty value

        Examples:
        [
          "arbitrary",
          "kv"
        ]
      • Filter secrets by labels.

        You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.

        Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use ..?labels=dev,us-south.

        Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression (.*?)

        Examples:
        [
          "dev",
          "us-south"
        ]

      The listSecrets options.

      parameters

      • The number of secrets to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

        Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use ..?offset=25&limit=25.

        Possible values: value ≥ 0

        Default: 0

      • The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

        Usage: If you want to retrieve only the first 25 secrets in your instance, use ..?limit=25.

        Possible values: 1 ≤ value ≤ 1000

        Default: 200

      • Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the - character

        Available values: id | created_at | updated_at | expiration_date | secret_type | name

        Usage: To sort a list of secrets by their creation date, use ../secrets?sort=created_at.

        Possible values: 2 ≤ length ≤ 17, Value must match regular expression /^-?(id|created_at|updated_at|expiration_date|secret_type|name)$/

        Examples:
      • Obtain a collection of secrets that contain the specified string in one or more of the fields: id, name, description, labels, secret_type.

        Usage: If you want to list only the secrets that contain the string text, use ../secrets?search=text.

        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

        Examples:
      • Filter secrets by groups.

        You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the default keyword.

        Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use ..?groups={secret_group_ID},default.

        Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/

        Examples:
      • Filter secrets by types.

        You can apply multiple filters by using a comma-separated list of secret types.

        Usage: To retrieve a list of imported certificates and public certificates use ..?secret_types=imported_cert,public_cert.

        Allowable values: [arbitrary,iam_credentials,imported_cert,kv,private_cert,public_cert,service_credentials,username_password]

        Possible values: 0 ≤ number of items ≤ 8

        Examples:
      • Filter secrets by labels.

        You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.

        Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use ..?labels=dev,us-south.

        Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression /(.*?)/

        Examples:

      parameters

      • The number of secrets to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

        Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use ..?offset=25&limit=25.

        Possible values: value ≥ 0

        Default: 0

      • The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

        Usage: If you want to retrieve only the first 25 secrets in your instance, use ..?limit=25.

        Possible values: 1 ≤ value ≤ 1000

        Default: 200

      • Sort a collection of secrets by the specified field in ascending order. To sort in descending order use the - character

        Available values: id | created_at | updated_at | expiration_date | secret_type | name

        Usage: To sort a list of secrets by their creation date, use ../secrets?sort=created_at.

        Possible values: 2 ≤ length ≤ 17, Value must match regular expression /^-?(id|created_at|updated_at|expiration_date|secret_type|name)$/

        Examples:
      • Obtain a collection of secrets that contain the specified string in one or more of the fields: id, name, description, labels, secret_type.

        Usage: If you want to list only the secrets that contain the string text, use ../secrets?search=text.

        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

        Examples:
      • Filter secrets by groups.

        You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the default keyword.

        Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use ..?groups={secret_group_ID},default.

        Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/

        Examples:
      • Filter secrets by types.

        You can apply multiple filters by using a comma-separated list of secret types.

        Usage: To retrieve a list of imported certificates and public certificates use ..?secret_types=imported_cert,public_cert.

        Allowable values: [arbitrary,iam_credentials,imported_cert,kv,private_cert,public_cert,service_credentials,username_password]

        Possible values: 0 ≤ number of items ≤ 8

        Examples:
      • Filter secrets by labels.

        You can use a comma-separated list of labels to filter secrets that include all of the labels in the list.

        Usage: To retrieve a list of secrets that include both the label "dev" and the label "us-south" in their list of labels, use ..?labels=dev,us-south.

        Possible values: 0 ≤ number of items ≤ 30, 2 ≤ length ≤ 64, Value must match regular expression /(.*?)/

        Examples:

      WithContext method only

      The ListSecrets options.

      • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets?sort=created_at&search=example&groups=default,cac40995-c37a-4dcb-9506-472869077634&secret_types=arbitrary,kv&match_all_labels=dev,us-south"
      • ListSecretsOptions listSecretsOptions = new ListSecretsOptions.Builder()
          .limit(Long.valueOf("10"))
          .sort("created_at")
          .search("example")
          .groups(java.util.Arrays.asList("default", "cac40995-c37a-4dcb-9506-472869077634"))
          .secretTypes(java.util.Arrays.asList("arbitrary", "kv"))
          .matchAllLabels(java.util.Arrays.asList("dev", "us-south"))
          .build();
        
        SecretsPager pager = new SecretsPager(secretsManagerService, listSecretsOptions);
        List<SecretMetadata> allResults = new ArrayList<>();
        while (pager.hasNext()) {
          List<SecretMetadata> nextPage = pager.getNext();
          allResults.addAll(nextPage);
        }
        
        System.out.println(GsonSingleton.getGson().toJson(allResults));
      • const params = {
          limit: 10,
          sort: 'created_at',
          search: 'example',
          groups: ['default', 'cac40995-c37a-4dcb-9506-472869077634'],
          secretTypes: ['arbitrary', 'kv'],
          matchAllLabels: ['dev', 'us-south'],
        };
        
        const allResults = [];
        try {
          const pager = new SecretsManagerV2.SecretsPager(secretsManagerService, params);
          while (pager.hasNext()) {
            const nextPage = await pager.getNext();
            expect(nextPage).not.toBeNull();
            allResults.push(...nextPage);
          }
          console.log(JSON.stringify(allResults, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • all_results = []
        pager = SecretsPager(
          client=secrets_manager_service,
          limit=10,
          sort='created_at',
          search='example',
          groups=['default', 'cac40995-c37a-4dcb-9506-472869077634'],
          secret_types=['arbitrary', 'kv'],
          match_all_labels=['dev', 'us-south'],
        )
        while pager.has_next():
          next_page = pager.get_next()
          assert next_page is not None
          all_results.extend(next_page)
        
        print(json.dumps(all_results, indent=2))
      • listSecretsOptions := &secretsmanagerv2.ListSecretsOptions{
          Limit: core.Int64Ptr(int64(10)),
          Sort: core.StringPtr("created_at"),
          Search: core.StringPtr("example"),
          Groups: []string{"default", "cac40995-c37a-4dcb-9506-472869077634"},
          SecretTypes: []string{"arbitrary", "kv"},
          MatchAllLabels: []string{"dev", "us-south"},
        }
        
        pager, err := secretsManagerService.NewSecretsPager(listSecretsOptions)
        if err != nil {
          panic(err)
        }
        
        var allResults []secretsmanagerv2.SecretMetadataIntf
        for pager.HasNext() {
          nextPage, err := pager.GetNext()
          if err != nil {
            panic(err)
          }
          allResults = append(allResults, nextPage...)
        }
        b, _ := json.MarshalIndent(allResults, "", "  ")
        fmt.Println(string(b))

      Response

      Properties that describe a paginated collection of your secret metadata.

      Properties that describe a paginated collection of your secret metadata.

      Properties that describe a paginated collection of your secret metadata.

      Properties that describe a paginated collection of your secret metadata.

      Properties that describe a paginated collection of your secret metadata.

      Status Code

      • The list of secrets was successfully retrieved.

      • BadRequest

      • Unauthorized

      • PaymentRequired

      • Forbidden

      • The specified resource was not found

      • InternalServerError

      • BadGatewayError

      • ServiceUnavailableError

      Example responses
      • Example secret metadata collection response

        {
          "first": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?limit=50"
          },
          "previous": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=50&limit=50"
          },
          "last": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=200&limit=50"
          },
          "limit": 50,
          "next": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=150&limit=50"
          },
          "offset": 100,
          "secrets": [
            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:a931192f-b6a9-43d6-a59a-834f3003af7b",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for this secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "a931192f-b6a9-43d6-a59a-834f3003af7b",
              "intermediate_included": true,
              "issuer": "DigiCert",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-imported-certificate",
              "private_key_included": true,
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
              "secret_type": "imported_cert",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "validity": {
                "not_before": "2020-10-05T21:33:11Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            },
            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "created_at": "2020-10-05T21:33:11Z",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for this secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "issuer": "Lets Encrypt",
              "issuance_info": {
                "auto_rotated": false,
                "ordered_on": "2022-10-06T06:15:55Z",
                "state": 1,
                "state_description": "active"
              },
              "bundle_certs": true,
              "ca": "lets-encrypt-config",
              "dns": "cloud-internet-services-config",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "updated_at": "2022-10-05T21:33:11Z",
              "locks_total": 0,
              "name": "my-public-certificate",
              "rotation": {
                "auto_rotate": true,
                "rotate_keys": true
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
              "secret_type": "public_cert",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "validity": {
                "not_before": "2020-10-05T21:33:11Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            }
          ],
          "total_count": 232
        }
      • Example secret metadata collection response

        {
          "first": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?limit=50"
          },
          "previous": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=50&limit=50"
          },
          "last": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=200&limit=50"
          },
          "limit": 50,
          "next": {
            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets?offset=150&limit=50"
          },
          "offset": 100,
          "secrets": [
            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:a931192f-b6a9-43d6-a59a-834f3003af7b",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for this secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "a931192f-b6a9-43d6-a59a-834f3003af7b",
              "intermediate_included": true,
              "issuer": "DigiCert",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-imported-certificate",
              "private_key_included": true,
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
              "secret_type": "imported_cert",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "validity": {
                "not_before": "2020-10-05T21:33:11Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            },
            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "created_at": "2020-10-05T21:33:11Z",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for this secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "issuer": "Lets Encrypt",
              "issuance_info": {
                "auto_rotated": false,
                "ordered_on": "2022-10-06T06:15:55Z",
                "state": 1,
                "state_description": "active"
              },
              "bundle_certs": true,
              "ca": "lets-encrypt-config",
              "dns": "cloud-internet-services-config",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "updated_at": "2022-10-05T21:33:11Z",
              "locks_total": 0,
              "name": "my-public-certificate",
              "rotation": {
                "auto_rotate": true,
                "rotate_keys": true
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
              "secret_type": "public_cert",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "validity": {
                "not_before": "2020-10-05T21:33:11Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            }
          ],
          "total_count": 232
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }

      Get a secret

      Get a secret and its details by specifying the ID of the secret.

      A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

      Get a secret and its details by specifying the ID of the secret.

      A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

      Get a secret and its details by specifying the ID of the secret.

      A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

      Get a secret and its details by specifying the ID of the secret.

      A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

      Get a secret and its details by specifying the ID of the secret.

      A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

      GET /api/v2/secrets/{id}
      ServiceCall<Secret> getSecret(GetSecretOptions getSecretOptions)
      getSecret(params)
      get_secret(
              self,
              id: str,
              **kwargs,
          ) -> DetailedResponse
      (secretsManager *SecretsManagerV2) GetSecret(getSecretOptions *GetSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)
      (secretsManager *SecretsManagerV2) GetSecretWithContext(ctx context.Context, getSecretOptions *GetSecretOptions) (result SecretIntf, response *core.DetailedResponse, err error)

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      • secrets-manager.secret.read

      Auditing

      Calling this method generates the following auditing event.

      • secrets-manager.secret.read

      Request

      Use the GetSecretOptions.Builder to create a GetSecretOptions object that contains the parameter values for the getSecret method.

      Instantiate the GetSecretOptions struct and set the fields to provide parameter values for the GetSecret method.

      Path Parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

      The getSecret options.

      parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

        Examples:

      parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

        Examples:

      WithContext method only

      The GetSecret options.

      • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${id}"
      • GetSecretOptions getSecretOptions = new GetSecretOptions.Builder()
          .id(secretIdForGetSecretLink)
          .build();
        
        Response<Secret> response = secretsManagerService.getSecret(getSecretOptions).execute();
        Secret secret = response.getResult();
        
        System.out.println(secret);
      • const params = {
          id: secretIdForGetSecretLink,
        };
        
        let res;
        try {
          res = await secretsManagerService.getSecret(params);
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • response = secrets_manager_service.get_secret(
          id=secret_id_for_get_secret_link,
        )
        secret = response.get_result()
        
        print(json.dumps(secret, indent=2))
      • getSecretOptions := secretsManagerService.NewGetSecretOptions(
          secretIdForGetSecretLink,
        )
        
        secret, response, err := secretsManagerService.GetSecret(getSecretOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(secret, "", "  ")
        fmt.Println(string(b))

      Response

      Your secret.

      Your arbitrary secret.

      Your arbitrary secret.

      Your arbitrary secret.

      Your arbitrary secret.

      Status Code

      • The secret was successfully retrieved.

      • BadRequest

      • Unauthorized

      • PaymentRequired

      • Forbidden

      • The specified resource was not found

      • Conflict

      • InternalServerError

      • BadGatewayError

      • ServiceUnavailableError

      Example responses
      • Example arbitrary secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "description of my arbitrary secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-arbitrary-secret",
          "payload": "secret-data",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "arbitrary",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example arbitrary secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "description of my arbitrary secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-arbitrary-secret",
          "payload": "secret-data",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "arbitrary",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example IAM Credentials using Service ID

        {
          "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2021-01-01T00:00:00Z",
          "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-iam-credentials-secret",
          "reuse_api_key": false,
          "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "iam_credentials",
          "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
          "service_id_is_static": false,
          "state": 1,
          "state_description": "active",
          "ttl": "1800",
          "updated_at": "2020-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example IAM Credentials using Service ID

        {
          "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2021-01-01T00:00:00Z",
          "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-iam-credentials-secret",
          "reuse_api_key": false,
          "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "iam_credentials",
          "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
          "service_id_is_static": false,
          "state": 1,
          "state_description": "active",
          "ttl": "1800",
          "updated_at": "2020-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example imported certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2020-10-05T21:33:11Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my imported certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "intermediate_included": true,
          "issuer": "GlobalSign",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-imported-certificate",
          "private_key_included": true,
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "imported_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example imported certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2020-10-05T21:33:11Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my imported certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "intermediate_included": true,
          "issuer": "GlobalSign",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-imported-certificate",
          "private_key_included": true,
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "imported_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example kv secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my key-value secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-kv-secret",
          "data": {
            "key1": "val1"
          },
          "secret_type": "kv",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example kv secret

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my key-value secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-kv-secret",
          "data": {
            "key1": "val1"
          },
          "secret_type": "kv",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example private certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "certificate_authority": "example-intermediate-CA",
          "certificate_template": "example-certificate-template",
          "common_name": "example.com",
          "created_at": "2022-10-02T14:08:07Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2030-03-02T15:08:37Z",
          "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "issuer": "example.com",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-private-certificate",
          "next_rotation_date": "2022-03-02T14:08:07Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "month"
          },
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "ca_chain": [
            "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
          ],
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "private_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-03-02T14:08:37Z",
          "validity": {
            "not_before": "2022-03-02T15:08:37Z",
            "not_after": "2030-03-01T00:00:00Z"
          },
          "versions_total": 1
        }
      • Example private certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "certificate_authority": "example-intermediate-CA",
          "certificate_template": "example-certificate-template",
          "common_name": "example.com",
          "created_at": "2022-10-02T14:08:07Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2030-03-02T15:08:37Z",
          "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "issuer": "example.com",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-private-certificate",
          "next_rotation_date": "2022-03-02T14:08:07Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "month"
          },
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "ca_chain": [
            "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
          ],
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "private_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-03-02T14:08:37Z",
          "validity": {
            "not_before": "2022-03-02T15:08:37Z",
            "not_after": "2030-03-01T00:00:00Z"
          },
          "versions_total": 1
        }
      • Example public certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "issuer": "Lets Encrypt",
          "issuance_info": {
            "auto_rotated": false,
            "ordered_on": "2022-10-06T06:15:55Z",
            "state": 1,
            "state_description": "active"
          },
          "bundle_certs": true,
          "ca": "lets-encrypt-config",
          "dns": "cloud-internet-services-config",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-public-certificate",
          "rotation": {
            "auto_rotate": true,
            "rotate_keys": true
          },
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "secret_type": "public_cert",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example public certificate

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "issuer": "Lets Encrypt",
          "issuance_info": {
            "auto_rotated": false,
            "ordered_on": "2022-10-06T06:15:55Z",
            "state": 1,
            "state_description": "active"
          },
          "bundle_certs": true,
          "ca": "lets-encrypt-config",
          "dns": "cloud-internet-services-config",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-public-certificate",
          "rotation": {
            "auto_rotate": true,
            "rotate_keys": true
          },
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
          "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "secret_type": "public_cert",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • A sample service credentials secret body.

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "credentials": {
            "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
            "cos_hmac_keys": {
              "access_key_id": "af56af3af56a4c738afea662c47840b3",
              "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
            },
            "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
            "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234",
            "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::"
          },
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "The description for my service credentials secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-service-credentials-secret",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": true,
            "interval": 10,
            "unit": "day"
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "service_credentials",
          "source_service": {
            "instance": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
            },
            "parameters": {
              "HMAC": true,
              "serviceid_crn": "existing sid"
            },
            "role": {
              "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
            },
            "iam": {
              "apikey": {
                "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
              },
              "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              },
              "serviceid": {
                "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234"
              },
              "resource_key": {
                "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                "name": "secret_name_versionid"
              }
            }
          },
          "state": 1,
          "state_description": "active",
          "ttl": "86400",
          "updated_at": "2022-10-05T21:33:11Z",
          "version_custom_metadata": {
            "custom_version_key": "custom_version_value"
          },
          "versions_total": 1
        }
      • A sample service credentials secret body.

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "credentials": {
            "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
            "cos_hmac_keys": {
              "access_key_id": "af56af3af56a4c738afea662c47840b3",
              "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
            },
            "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
            "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
            "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234",
            "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::"
          },
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "The description for my service credentials secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-service-credentials-secret",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": true,
            "interval": 10,
            "unit": "day"
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "service_credentials",
          "source_service": {
            "instance": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
            },
            "parameters": {
              "HMAC": true,
              "serviceid_crn": "existing sid"
            },
            "role": {
              "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
            },
            "iam": {
              "apikey": {
                "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
              },
              "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              },
              "serviceid": {
                "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234"
              },
              "resource_key": {
                "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                "name": "secret_name_versionid"
              }
            }
          },
          "state": 1,
          "state_description": "active",
          "ttl": "86400",
          "updated_at": "2022-10-05T21:33:11Z",
          "version_custom_metadata": {
            "custom_version_key": "custom_version_value"
          },
          "versions_total": 1
        }
      • Example user credentials

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my user credentials secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-username-password",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "day"
          },
          "password_generation_policy": {
            "length": 32,
            "include_digits": true,
            "include_symbols": true,
            "include_uppercase": true
          },
          "username": "admin",
          "password": "admin1234",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "username_password",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example user credentials

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my user credentials secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-username-password",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "day"
          },
          "password_generation_policy": {
            "length": 32,
            "include_digits": true,
            "include_symbols": true,
            "include_uppercase": true
          },
          "username": "admin",
          "password": "admin1234",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "username_password",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example Conflict error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 409,
          "errors": [
            {
              "code": "conflict",
              "message": "The request conflicts with the current state of the target resource",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example Conflict error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 409,
          "errors": [
            {
              "code": "conflict",
              "message": "The request conflicts with the current state of the target resource",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }

      Delete a secret

      Delete a secret by specifying the ID of the secret.

      Delete a secret by specifying the ID of the secret.

      Delete a secret by specifying the ID of the secret.

      Delete a secret by specifying the ID of the secret.

      Delete a secret by specifying the ID of the secret.

      DELETE /api/v2/secrets/{id}
      ServiceCall<Void> deleteSecret(DeleteSecretOptions deleteSecretOptions)
      deleteSecret(params)
      delete_secret(
              self,
              id: str,
              **kwargs,
          ) -> DetailedResponse
      (secretsManager *SecretsManagerV2) DeleteSecret(deleteSecretOptions *DeleteSecretOptions) (response *core.DetailedResponse, err error)
      (secretsManager *SecretsManagerV2) DeleteSecretWithContext(ctx context.Context, deleteSecretOptions *DeleteSecretOptions) (response *core.DetailedResponse, err error)

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      • secrets-manager.secret.delete

      Auditing

      Calling this method generates the following auditing event.

      • secrets-manager.secret.delete

      Request

      Use the DeleteSecretOptions.Builder to create a DeleteSecretOptions object that contains the parameter values for the deleteSecret method.

      Instantiate the DeleteSecretOptions struct and set the fields to provide parameter values for the DeleteSecret method.

      Path Parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

      The deleteSecret options.

      parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

        Examples:

      parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

        Examples:

      WithContext method only

      The DeleteSecret options.

      • curl -X DELETE --location --header "Authorization: Bearer ${iam_token}"   "${base_url}/api/v2/secrets/${id}"
      • DeleteSecretOptions deleteSecretOptions = new DeleteSecretOptions.Builder()
          .id(secretIdForGetSecretLink)
          .build();
        
        Response<Void> response = secretsManagerService.deleteSecret(deleteSecretOptions).execute();
      • const params = {
          id: secretIdForGetSecretLink,
        };
        
        try {
          await secretsManagerService.deleteSecret(params);
        } catch (err) {
          console.warn(err);
        }
      • response = secrets_manager_service.delete_secret(
          id=secret_id_for_get_secret_link,
        )
      • deleteSecretOptions := secretsManagerService.NewDeleteSecretOptions(
          secretIdForGetSecretLink,
        )
        
        response, err := secretsManagerService.DeleteSecret(deleteSecretOptions)
        if err != nil {
          panic(err)
        }
        if response.StatusCode != 204 {
          fmt.Printf("\nUnexpected response status code received from DeleteSecret(): %d\n", response.StatusCode)
        }

      Response

      Status Code

      • The secret was successfully deleted.

      • BadRequest

      • Unauthorized

      • PaymentRequired

      • Forbidden

      • The specified resource was not found

      • Conflict

      • UnprocessableEntity

      • InternalServerError

      • BadGatewayError

      • ServiceUnavailableError

      Example responses
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example Conflict error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 409,
          "errors": [
            {
              "code": "conflict",
              "message": "The request conflicts with the current state of the target resource",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example Conflict error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 409,
          "errors": [
            {
              "code": "conflict",
              "message": "The request conflicts with the current state of the target resource",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example UnprocessableEntity error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 422,
          "errors": [
            {
              "code": "unprocessable_entity",
              "message": "The API key is locked. Unlock the API key to complete this operation.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example UnprocessableEntity error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 422,
          "errors": [
            {
              "code": "unprocessable_entity",
              "message": "The API key is locked. Unlock the API key to complete this operation.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }

      Get the metadata of a secret

      Get the metadata of a secret by specifying the ID of the secret.

      Get the metadata of a secret by specifying the ID of the secret.

      Get the metadata of a secret by specifying the ID of the secret.

      Get the metadata of a secret by specifying the ID of the secret.

      Get the metadata of a secret by specifying the ID of the secret.

      GET /api/v2/secrets/{id}/metadata
      ServiceCall<SecretMetadata> getSecretMetadata(GetSecretMetadataOptions getSecretMetadataOptions)
      getSecretMetadata(params)
      get_secret_metadata(
              self,
              id: str,
              **kwargs,
          ) -> DetailedResponse
      (secretsManager *SecretsManagerV2) GetSecretMetadata(getSecretMetadataOptions *GetSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)
      (secretsManager *SecretsManagerV2) GetSecretMetadataWithContext(ctx context.Context, getSecretMetadataOptions *GetSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      • secrets-manager.secret-metadata.read

      Auditing

      Calling this method generates the following auditing event.

      • secrets-manager.secret-metadata.read

      Request

      Use the GetSecretMetadataOptions.Builder to create a GetSecretMetadataOptions object that contains the parameter values for the getSecretMetadata method.

      Instantiate the GetSecretMetadataOptions struct and set the fields to provide parameter values for the GetSecretMetadata method.

      Path Parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

      The getSecretMetadata options.

      parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

        Examples:

      parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

        Examples:

      WithContext method only

      The GetSecretMetadata options.

      • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${id}/metadata"
      • GetSecretMetadataOptions getSecretMetadataOptions = new GetSecretMetadataOptions.Builder()
          .id(secretIdForGetSecretLink)
          .build();
        
        Response<SecretMetadata> response = secretsManagerService.getSecretMetadata(getSecretMetadataOptions).execute();
        SecretMetadata secretMetadata = response.getResult();
        
        System.out.println(secretMetadata);
      • const params = {
          id: secretIdForGetSecretLink,
        };
        
        let res;
        try {
          res = await secretsManagerService.getSecretMetadata(params);
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • response = secrets_manager_service.get_secret_metadata(
          id=secret_id_for_get_secret_link,
        )
        secret_metadata = response.get_result()
        
        print(json.dumps(secret_metadata, indent=2))
      • getSecretMetadataOptions := secretsManagerService.NewGetSecretMetadataOptions(
          secretIdForGetSecretLink,
        )
        
        secretMetadata, response, err := secretsManagerService.GetSecretMetadata(getSecretMetadataOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(secretMetadata, "", "  ")
        fmt.Println(string(b))

      Response

      Properties of your secret metadata.

      Properties of the metadata of your arbitrary secret..

      Properties of the metadata of your arbitrary secret..

      Properties of the metadata of your arbitrary secret..

      Properties of the metadata of your arbitrary secret..

      Status Code

      • The secret metadata was successfully retrieved.

      • BadRequest

      • Unauthorized

      • PaymentRequired

      • Forbidden

      • The specified resource was not found

      • InternalServerError

      • BadGatewayError

      • ServiceUnavailableError

      Example responses
      • Example of arbitrary secret's metadata

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my arbitrary secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-arbitrary-secret",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "arbitrary",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of arbitrary secret's metadata

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my arbitrary secret.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-arbitrary-secret",
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "arbitrary",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example IAM Credentials metadata

        {
          "access_groups": [
            "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699"
          ],
          "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2021-01-01T00:00:00Z",
          "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 2,
          "name": "example-iam-credentials-secret",
          "reuse_api_key": false,
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "iam_credentials",
          "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
          "service_id_is_static": false,
          "state": 1,
          "state_description": "active",
          "ttl": "1800",
          "updated_at": "2020-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example IAM Credentials metadata

        {
          "access_groups": [
            "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699"
          ],
          "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2021-01-01T00:00:00Z",
          "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 2,
          "name": "example-iam-credentials-secret",
          "reuse_api_key": false,
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "iam_credentials",
          "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
          "service_id_is_static": false,
          "state": 1,
          "state_description": "active",
          "ttl": "1800",
          "updated_at": "2020-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of imported certificate's metadata

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2022-06-27T11:58:15Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my imported certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "intermediate_included": true,
          "issuer": "GlobalSign",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-imported-certificate",
          "private_key_included": true,
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "imported_cert",
          "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2022-06-27T11:58:15Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example of imported certificate's metadata

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2022-06-27T11:58:15Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my imported certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "intermediate_included": true,
          "issuer": "GlobalSign",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-imported-certificate",
          "private_key_included": true,
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "imported_cert",
          "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2022-06-27T11:58:15Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example of KV secret's metadata

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description of my key-value secret..",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-kv-secret",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "kv",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of KV secret's metadata

        {
          "created_at": "2020-10-05T21:33:11Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description of my key-value secret..",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-kv-secret",
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "kv",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of private certificate metadata

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "certificate_authority": "example-intermediate-CA",
          "certificate_template": "example-certificate-template",
          "common_name": "example.com",
          "created_at": "2022-03-02T14:08:07Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2022-03-02T15:08:37Z",
          "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "issuer": "example.com",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 1,
          "name": "example-private-certificate",
          "next_rotation_date": "2022-03-02T14:08:07Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "month"
          },
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "private_cert",
          "serial_number": "d9:be:fe:35:ba:09:42:b5",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-03-02T14:08:37Z",
          "validity": {
            "not_after": "2022-03-01T00:00:00Z",
            "not_before": "2022-03-02T15:08:37Z"
          },
          "versions_total": 1
        }
      • Example of private certificate metadata

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "certificate_authority": "example-intermediate-CA",
          "certificate_template": "example-certificate-template",
          "common_name": "example.com",
          "created_at": "2022-03-02T14:08:07Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description for this secret.",
          "downloaded": true,
          "expiration_date": "2022-03-02T15:08:37Z",
          "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
          "issuer": "example.com",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 1,
          "name": "example-private-certificate",
          "next_rotation_date": "2022-03-02T14:08:07Z",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "month"
          },
          "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "secret_type": "private_cert",
          "serial_number": "d9:be:fe:35:ba:09:42:b5",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-03-02T14:08:37Z",
          "validity": {
            "not_after": "2022-03-01T00:00:00Z",
            "not_before": "2022-03-02T15:08:37Z"
          },
          "versions_total": 1
        }
      • Example of public certificates' metadata

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2022-10-06T06:15:55Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description of my public certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "issuance_info": {
            "auto_rotated": false,
            "ordered_on": "2022-10-06T06:15:55Z",
            "state": 1,
            "state_description": "active"
          },
          "bundle_certs": true,
          "ca": "lets-encrypt-config",
          "dns": "cloud-internet-services-config",
          "issuer": "Lets Encrypt",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-public-certificate",
          "rotation": {
            "auto_rotate": true,
            "rotate_keys": true
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "public_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • Example of public certificates' metadata

        {
          "alt_names": [
            "s1.example.com",
            "*.s2.example.com"
          ],
          "common_name": "example.com",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "created_at": "2022-10-06T06:15:55Z",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Extended description of my public certificate.",
          "downloaded": false,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
          "issuance_info": {
            "auto_rotated": false,
            "ordered_on": "2022-10-06T06:15:55Z",
            "state": 1,
            "state_description": "active"
          },
          "bundle_certs": true,
          "ca": "lets-encrypt-config",
          "dns": "cloud-internet-services-config",
          "issuer": "Lets Encrypt",
          "key_algorithm": "RSA2048",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "my-public-certificate",
          "rotation": {
            "auto_rotate": true,
            "rotate_keys": true
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "public_cert",
          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
          "signing_algorithm": "SHA256-RSA",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "validity": {
            "not_before": "2020-10-05T21:33:11Z",
            "not_after": "2030-10-05T11:49:42Z"
          },
          "versions_total": 1
        }
      • A sample metadata body for a service credentials secret.

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "The description for my service credentials secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-service-credentials-secret",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": true,
            "interval": 10,
            "unit": "day"
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "service_credentials",
          "source_service": {
            "instance": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
            },
            "parameters": {
              "HMAC": true,
              "serviceid_crn": "existing sid"
            },
            "role": {
              "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
            },
            "iam": {
              "apikey": {
                "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
              },
              "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              },
              "serviceid": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              }
            },
            "resource_key": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
              "name": "secret_name_versionid"
            }
          },
          "state": 1,
          "state_description": "active",
          "ttl": "86400",
          "updated_at": "2022-10-05T21:33:11Z",
          "version_custom_metadata": {
            "custom_version_key": "custom_version_value"
          },
          "versions_total": 1
        }
      • A sample metadata body for a service credentials secret.

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "The description for my service credentials secret.",
          "downloaded": false,
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-service-credentials-secret",
          "next_rotation_date": "2022-10-10T21:33:11Z",
          "rotation": {
            "auto_rotate": true,
            "interval": 10,
            "unit": "day"
          },
          "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
          "secret_type": "service_credentials",
          "source_service": {
            "instance": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
            },
            "parameters": {
              "HMAC": true,
              "serviceid_crn": "existing sid"
            },
            "role": {
              "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
            },
            "iam": {
              "apikey": {
                "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
              },
              "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              },
              "serviceid": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
              }
            },
            "resource_key": {
              "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
              "name": "secret_name_versionid"
            }
          },
          "state": 1,
          "state_description": "active",
          "ttl": "86400",
          "updated_at": "2022-10-05T21:33:11Z",
          "version_custom_metadata": {
            "custom_version_key": "custom_version_value"
          },
          "versions_total": 1
        }
      • Example of user credentials' metadata

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my user credentials secret.",
          "downloaded": true,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-username-password-secret",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "day"
          },
          "password_generation_policy": {
            "length": 32,
            "include_digits": true,
            "include_symbols": true,
            "include_uppercase": true
          },
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "username_password",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of user credentials' metadata

        {
          "created_at": "2022-06-27T11:58:15Z",
          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
          "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "custom_metadata": {
            "metadata_custom_key": "metadata_custom_value"
          },
          "description": "Description of my user credentials secret.",
          "downloaded": true,
          "expiration_date": "2030-10-05T11:49:42Z",
          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
          "labels": [
            "dev",
            "us-south"
          ],
          "locks_total": 0,
          "name": "example-username-password-secret",
          "rotation": {
            "auto_rotate": false,
            "interval": 1,
            "unit": "day"
          },
          "password_generation_policy": {
            "length": 32,
            "include_digits": true,
            "include_symbols": true,
            "include_uppercase": true
          },
          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
          "secret_type": "username_password",
          "state": 1,
          "state_description": "active",
          "updated_at": "2022-10-05T21:33:11Z",
          "versions_total": 1
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad request error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 400,
          "errors": [
            {
              "code": "bad_request",
              "message": "required.name:property \"name\" is missing",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of unauthorized error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 401,
          "errors": [
            {
              "code": "unauthorized",
              "message": "You provided no credentials or invalid credentials.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of payment required error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 402,
          "errors": [
            {
              "code": "payment_required",
              "message": "Your Trial plan is now expired.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of forbidden error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 403,
          "errors": [
            {
              "code": "access_forbidden",
              "message": "You are not allowed to access this resource.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of NotFound error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 404,
          "errors": [
            {
              "code": "not_found",
              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of internal server error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 500,
          "errors": [
            {
              "code": "internal_server_error",
              "message": "Internal server error",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of bad gateway error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 502,
          "errors": [
            {
              "code": "bad_gateway",
              "message": "Bad Gateway",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }
      • Example of service unavailable error

        {
          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
          "status_code": 503,
          "errors": [
            {
              "code": "service_unavailable",
              "message": "Service Unavailable",
              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
            }
          ]
        }

      Update the metadata of a secret

      Update the metadata of a secret, such as its name or description.

      Update the metadata of a secret, such as its name or description.

      Update the metadata of a secret, such as its name or description.

      Update the metadata of a secret, such as its name or description.

      Update the metadata of a secret, such as its name or description.

      PATCH /api/v2/secrets/{id}/metadata
      ServiceCall<SecretMetadata> updateSecretMetadata(UpdateSecretMetadataOptions updateSecretMetadataOptions)
      updateSecretMetadata(params)
      update_secret_metadata(
              self,
              id: str,
              secret_metadata_patch: 'SecretMetadataPatch',
              **kwargs,
          ) -> DetailedResponse
      (secretsManager *SecretsManagerV2) UpdateSecretMetadata(updateSecretMetadataOptions *UpdateSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)
      (secretsManager *SecretsManagerV2) UpdateSecretMetadataWithContext(ctx context.Context, updateSecretMetadataOptions *UpdateSecretMetadataOptions) (result SecretMetadataIntf, response *core.DetailedResponse, err error)

      Authorization

      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

      • secrets-manager.secret-metadata.update

      Auditing

      Calling this method generates the following auditing event.

      • secrets-manager.secret-metadata.update

      Request

      Use the UpdateSecretMetadataOptions.Builder to create a UpdateSecretMetadataOptions object that contains the parameter values for the updateSecretMetadata method.

      Instantiate the UpdateSecretMetadataOptions struct and set the fields to provide parameter values for the UpdateSecretMetadata method.

      Path Parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

      Example:

      Example update input of arbitrary secret

      {
        "custom_metadata": {
          "metadata_custom_key": "metadata_custom_value"
        },
        "description": "updated Arbitrary Secret description",
        "labels": [
          "dev",
          "us-south"
        ],
        "name": "updated-arbitrary-secret-name-example"
      }

      The updateSecretMetadata options.

      parameters

      • The v4 UUID that uniquely identifies your secret.

        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

        Examples:
      • Update your secret metadata.

        parameters

        • The v4 UUID that uniquely identifies your secret.

          Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

          Examples:
        • Update your secret metadata.

          WithContext method only

          The UpdateSecretMetadata options.

          • curl -X PATCH --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/merge-patch+json"   --data '{"custom_metadata":{"metadata_custom_key":"metadata_custom_value"},"description":"updated Arbitrary Secret description","labels":["dev","us-south"],"name":"updated-arbitrary-secret-name-example"}'   "${base_url}/api/v2/secrets/${id}/metadata"
          • ArbitrarySecretMetadataPatch secretMetadataPatchModel = new ArbitrarySecretMetadataPatch.Builder()
              .name("updated-arbitrary-secret-name-example")
              .description("updated Arbitrary Secret description")
              .labels(java.util.Arrays.asList("dev", "us-south"))
              .build();
            Map<String, Object> secretMetadataPatchModelAsPatch = secretMetadataPatchModel.asPatch();
            UpdateSecretMetadataOptions updateSecretMetadataOptions = new UpdateSecretMetadataOptions.Builder()
              .id(secretIdForGetSecretLink)
              .secretMetadataPatch(secretMetadataPatchModelAsPatch)
              .build();
            
            Response<SecretMetadata> response = secretsManagerService.updateSecretMetadata(updateSecretMetadataOptions).execute();
            SecretMetadata secretMetadata = response.getResult();
            
            System.out.println(secretMetadata);
          • // Request models needed by this operation.
            
            // ArbitrarySecretMetadataPatch
            const secretMetadataPatchModel = {
              name: 'updated-arbitrary-secret-name-example',
              description: 'updated Arbitrary Secret description',
              labels: ['dev', 'us-south'],
              custom_metadata: { metadata_custom_key: 'metadata_custom_value' },
            };
            
            const params = {
              id: secretIdForGetSecretLink,
              secretMetadataPatch: secretMetadataPatchModel,
            };
            
            let res;
            try {
              res = await secretsManagerService.updateSecretMetadata(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • secret_metadata_patch_model = {
              'name': 'updated-arbitrary-secret-name-example',
              'description': 'updated Arbitrary Secret description',
              'labels': ['dev', 'us-south'],
              'custom_metadata': {'metadata_custom_key': 'metadata_custom_value'},
            }
            
            response = secrets_manager_service.update_secret_metadata(
              id=secret_id_for_get_secret_link,
              secret_metadata_patch=secret_metadata_patch_model,
            )
            secret_metadata = response.get_result()
            
            print(json.dumps(secret_metadata, indent=2))
          • secretMetadataPatchModel := &secretsmanagerv2.ArbitrarySecretMetadataPatch{
              Name: core.StringPtr("updated-arbitrary-secret-name-example"),
              Description: core.StringPtr("updated Arbitrary Secret description"),
              Labels: []string{"dev", "us-south"},
            }
            secretMetadataPatchModelAsPatch, asPatchErr := secretMetadataPatchModel.AsPatch()
            Expect(asPatchErr).To(BeNil())
            
            updateSecretMetadataOptions := secretsManagerService.NewUpdateSecretMetadataOptions(
              secretIdForGetSecretLink,
              secretMetadataPatchModelAsPatch,
            )
            
            secretMetadata, response, err := secretsManagerService.UpdateSecretMetadata(updateSecretMetadataOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(secretMetadata, "", "  ")
            fmt.Println(string(b))

          Response

          Properties of your secret metadata.

          Properties of the metadata of your arbitrary secret..

          Properties of the metadata of your arbitrary secret..

          Properties of the metadata of your arbitrary secret..

          Properties of the metadata of your arbitrary secret..

          Status Code

          • The secret's metadata was successfully updated.

          • BadRequest

          • Unauthorized

          • PaymentRequired

          • Forbidden

          • The specified resource was not found

          • Conflict

          • InternalServerError

          • BadGatewayError

          • ServiceUnavailableError

          Example responses
          • Example of arbitrary secret's metadata

            {
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Description of my arbitrary secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "example-arbitrary-secret",
              "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
              "secret_type": "arbitrary",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example of arbitrary secret's metadata

            {
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Description of my arbitrary secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "example-arbitrary-secret",
              "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
              "secret_type": "arbitrary",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example IAM Credentials metadata

            {
              "access_groups": [
                "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699"
              ],
              "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
              "description": "Extended description for this secret.",
              "downloaded": true,
              "expiration_date": "2021-01-01T00:00:00Z",
              "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 2,
              "name": "example-iam-credentials-secret",
              "reuse_api_key": false,
              "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "secret_type": "iam_credentials",
              "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
              "service_id_is_static": false,
              "state": 1,
              "state_description": "active",
              "ttl": "1800",
              "updated_at": "2020-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example IAM Credentials metadata

            {
              "access_groups": [
                "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699"
              ],
              "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
              "description": "Extended description for this secret.",
              "downloaded": true,
              "expiration_date": "2021-01-01T00:00:00Z",
              "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 2,
              "name": "example-iam-credentials-secret",
              "reuse_api_key": false,
              "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "secret_type": "iam_credentials",
              "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
              "service_id_is_static": false,
              "state": 1,
              "state_description": "active",
              "ttl": "1800",
              "updated_at": "2020-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example of imported certificate's metadata

            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "created_at": "2022-06-27T11:58:15Z",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Description of my imported certificate.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "intermediate_included": true,
              "issuer": "GlobalSign",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "example-imported-certificate",
              "private_key_included": true,
              "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
              "secret_type": "imported_cert",
              "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "validity": {
                "not_before": "2022-06-27T11:58:15Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            }
          • Example of imported certificate's metadata

            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "created_at": "2022-06-27T11:58:15Z",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Description of my imported certificate.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "intermediate_included": true,
              "issuer": "GlobalSign",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "example-imported-certificate",
              "private_key_included": true,
              "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
              "secret_type": "imported_cert",
              "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "validity": {
                "not_before": "2022-06-27T11:58:15Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            }
          • Example of KV secret's metadata

            {
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description of my key-value secret..",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-kv-secret",
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "kv",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example of KV secret's metadata

            {
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description of my key-value secret..",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-kv-secret",
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "kv",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example of private certificate metadata

            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "certificate_authority": "example-intermediate-CA",
              "certificate_template": "example-certificate-template",
              "common_name": "example.com",
              "created_at": "2022-03-02T14:08:07Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for this secret.",
              "downloaded": true,
              "expiration_date": "2022-03-02T15:08:37Z",
              "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "issuer": "example.com",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 1,
              "name": "example-private-certificate",
              "next_rotation_date": "2022-03-02T14:08:07Z",
              "rotation": {
                "auto_rotate": false,
                "interval": 1,
                "unit": "month"
              },
              "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "secret_type": "private_cert",
              "serial_number": "d9:be:fe:35:ba:09:42:b5",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-03-02T14:08:37Z",
              "validity": {
                "not_after": "2022-03-01T00:00:00Z",
                "not_before": "2022-03-02T15:08:37Z"
              },
              "versions_total": 1
            }
          • Example of private certificate metadata

            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "certificate_authority": "example-intermediate-CA",
              "certificate_template": "example-certificate-template",
              "common_name": "example.com",
              "created_at": "2022-03-02T14:08:07Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for this secret.",
              "downloaded": true,
              "expiration_date": "2022-03-02T15:08:37Z",
              "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
              "issuer": "example.com",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 1,
              "name": "example-private-certificate",
              "next_rotation_date": "2022-03-02T14:08:07Z",
              "rotation": {
                "auto_rotate": false,
                "interval": 1,
                "unit": "month"
              },
              "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "secret_type": "private_cert",
              "serial_number": "d9:be:fe:35:ba:09:42:b5",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-03-02T14:08:37Z",
              "validity": {
                "not_after": "2022-03-01T00:00:00Z",
                "not_before": "2022-03-02T15:08:37Z"
              },
              "versions_total": 1
            }
          • Example of public certificates' metadata

            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "created_at": "2022-10-06T06:15:55Z",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description of my public certificate.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "issuance_info": {
                "auto_rotated": false,
                "ordered_on": "2022-10-06T06:15:55Z",
                "state": 1,
                "state_description": "active"
              },
              "bundle_certs": true,
              "ca": "lets-encrypt-config",
              "dns": "cloud-internet-services-config",
              "issuer": "Lets Encrypt",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-public-certificate",
              "rotation": {
                "auto_rotate": true,
                "rotate_keys": true
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "public_cert",
              "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "validity": {
                "not_before": "2020-10-05T21:33:11Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            }
          • Example of public certificates' metadata

            {
              "alt_names": [
                "s1.example.com",
                "*.s2.example.com"
              ],
              "common_name": "example.com",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "created_at": "2022-10-06T06:15:55Z",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description of my public certificate.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "issuance_info": {
                "auto_rotated": false,
                "ordered_on": "2022-10-06T06:15:55Z",
                "state": 1,
                "state_description": "active"
              },
              "bundle_certs": true,
              "ca": "lets-encrypt-config",
              "dns": "cloud-internet-services-config",
              "issuer": "Lets Encrypt",
              "key_algorithm": "RSA2048",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-public-certificate",
              "rotation": {
                "auto_rotate": true,
                "rotate_keys": true
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "public_cert",
              "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
              "signing_algorithm": "SHA256-RSA",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "validity": {
                "not_before": "2020-10-05T21:33:11Z",
                "not_after": "2030-10-05T11:49:42Z"
              },
              "versions_total": 1
            }
          • A sample metadata body for a service credentials secret.

            {
              "created_at": "2022-06-27T11:58:15Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "The description for my service credentials secret.",
              "downloaded": false,
              "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "example-service-credentials-secret",
              "next_rotation_date": "2022-10-10T21:33:11Z",
              "rotation": {
                "auto_rotate": true,
                "interval": 10,
                "unit": "day"
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "service_credentials",
              "source_service": {
                "instance": {
                  "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
                },
                "parameters": {
                  "HMAC": true,
                  "serviceid_crn": "existing sid"
                },
                "role": {
                  "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                },
                "iam": {
                  "apikey": {
                    "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                    "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
                  },
                  "role": {
                    "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                  },
                  "serviceid": {
                    "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                  }
                },
                "resource_key": {
                  "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                  "name": "secret_name_versionid"
                }
              },
              "state": 1,
              "state_description": "active",
              "ttl": "86400",
              "updated_at": "2022-10-05T21:33:11Z",
              "version_custom_metadata": {
                "custom_version_key": "custom_version_value"
              },
              "versions_total": 1
            }
          • A sample metadata body for a service credentials secret.

            {
              "created_at": "2022-06-27T11:58:15Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "The description for my service credentials secret.",
              "downloaded": false,
              "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "example-service-credentials-secret",
              "next_rotation_date": "2022-10-10T21:33:11Z",
              "rotation": {
                "auto_rotate": true,
                "interval": 10,
                "unit": "day"
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "service_credentials",
              "source_service": {
                "instance": {
                  "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
                },
                "parameters": {
                  "HMAC": true,
                  "serviceid_crn": "existing sid"
                },
                "role": {
                  "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                },
                "iam": {
                  "apikey": {
                    "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                    "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
                  },
                  "role": {
                    "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                  },
                  "serviceid": {
                    "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                  }
                },
                "resource_key": {
                  "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                  "name": "secret_name_versionid"
                }
              },
              "state": 1,
              "state_description": "active",
              "ttl": "86400",
              "updated_at": "2022-10-05T21:33:11Z",
              "version_custom_metadata": {
                "custom_version_key": "custom_version_value"
              },
              "versions_total": 1
            }
          • Example of user credentials' metadata

            {
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for my user credentials secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-username-password-secret",
              "rotation": {
                "auto_rotate": true,
                "interval": 30,
                "unit": "day"
              },
              "password_generation_policy": {
                "length": 32,
                "include_digits": true,
                "include_symbols": true,
                "include_uppercase": true
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "username_password",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example of user credentials' metadata

            {
              "created_at": "2020-10-05T21:33:11Z",
              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
              "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "custom_metadata": {
                "metadata_custom_key": "metadata_custom_value"
              },
              "description": "Extended description for my user credentials secret.",
              "downloaded": false,
              "expiration_date": "2030-10-05T11:49:42Z",
              "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
              "labels": [
                "dev",
                "us-south"
              ],
              "locks_total": 0,
              "name": "my-username-password-secret",
              "rotation": {
                "auto_rotate": true,
                "interval": 30,
                "unit": "day"
              },
              "password_generation_policy": {
                "length": 32,
                "include_digits": true,
                "include_symbols": true,
                "include_uppercase": true
              },
              "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
              "secret_type": "username_password",
              "state": 1,
              "state_description": "active",
              "updated_at": "2022-10-05T21:33:11Z",
              "versions_total": 1
            }
          • Example of bad request error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 400,
              "errors": [
                {
                  "code": "bad_request",
                  "message": "required.name:property \"name\" is missing",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of bad request error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 400,
              "errors": [
                {
                  "code": "bad_request",
                  "message": "required.name:property \"name\" is missing",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of unauthorized error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 401,
              "errors": [
                {
                  "code": "unauthorized",
                  "message": "You provided no credentials or invalid credentials.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of unauthorized error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 401,
              "errors": [
                {
                  "code": "unauthorized",
                  "message": "You provided no credentials or invalid credentials.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of payment required error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 402,
              "errors": [
                {
                  "code": "payment_required",
                  "message": "Your Trial plan is now expired.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of payment required error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 402,
              "errors": [
                {
                  "code": "payment_required",
                  "message": "Your Trial plan is now expired.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of forbidden error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 403,
              "errors": [
                {
                  "code": "access_forbidden",
                  "message": "You are not allowed to access this resource.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of forbidden error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 403,
              "errors": [
                {
                  "code": "access_forbidden",
                  "message": "You are not allowed to access this resource.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of NotFound error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 404,
              "errors": [
                {
                  "code": "not_found",
                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of NotFound error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 404,
              "errors": [
                {
                  "code": "not_found",
                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example Conflict error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 409,
              "errors": [
                {
                  "code": "conflict",
                  "message": "The request conflicts with the current state of the target resource",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example Conflict error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 409,
              "errors": [
                {
                  "code": "conflict",
                  "message": "The request conflicts with the current state of the target resource",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of internal server error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 500,
              "errors": [
                {
                  "code": "internal_server_error",
                  "message": "Internal server error",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of internal server error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 500,
              "errors": [
                {
                  "code": "internal_server_error",
                  "message": "Internal server error",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of bad gateway error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 502,
              "errors": [
                {
                  "code": "bad_gateway",
                  "message": "Bad Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of bad gateway error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 502,
              "errors": [
                {
                  "code": "bad_gateway",
                  "message": "Bad Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of service unavailable error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 503,
              "errors": [
                {
                  "code": "service_unavailable",
                  "message": "Service Unavailable",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }
          • Example of service unavailable error

            {
              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
              "status_code": 503,
              "errors": [
                {
                  "code": "service_unavailable",
                  "message": "Service Unavailable",
                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                }
              ]
            }

          Create a secret action

          Create a secret action. This operation supports the following actions:

          Create a secret action. This operation supports the following actions:.

          Create a secret action. This operation supports the following actions:.

          Create a secret action. This operation supports the following actions:.

          Create a secret action. This operation supports the following actions:.

          POST /api/v2/secrets/{id}/actions
          ServiceCall<SecretAction> createSecretAction(CreateSecretActionOptions createSecretActionOptions)
          createSecretAction(params)
          create_secret_action(
                  self,
                  id: str,
                  secret_action_prototype: 'SecretActionPrototype',
                  **kwargs,
              ) -> DetailedResponse
          (secretsManager *SecretsManagerV2) CreateSecretAction(createSecretActionOptions *CreateSecretActionOptions) (result SecretActionIntf, response *core.DetailedResponse, err error)
          (secretsManager *SecretsManagerV2) CreateSecretActionWithContext(ctx context.Context, createSecretActionOptions *CreateSecretActionOptions) (result SecretActionIntf, response *core.DetailedResponse, err error)

          Authorization

          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

          • secrets-manager.secret-action.create

          Auditing

          Calling this method generates the following auditing event.

          • secrets-manager.secret-action.create

          Request

          Use the CreateSecretActionOptions.Builder to create a CreateSecretActionOptions object that contains the parameter values for the createSecretAction method.

          Instantiate the CreateSecretActionOptions struct and set the fields to provide parameter values for the CreateSecretAction method.

          Path Parameters

          • The v4 UUID that uniquely identifies your secret.

            Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

            Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

          The request body to specify the properties of the action to revoke the private certificate.

          Example:

          The request body of the action to revoke private certificates.

          {
            "action_type": "private_cert_action_revoke_certificate"
          }

          The createSecretAction options.

          parameters

          • The v4 UUID that uniquely identifies your secret.

            Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

            Examples:
          • The request body to specify the properties of the action to revoke the private certificate.

            parameters

            • The v4 UUID that uniquely identifies your secret.

              Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

              Examples:
            • The request body to specify the properties of the action to revoke the private certificate.

              WithContext method only

              The CreateSecretAction options.

              • ibmcloud secrets-manager secret-action-create --id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 --secret-action-type=public_cert_action_validate_dns_challenge
                
                ibmcloud secrets-manager secret-action-create \
                  --id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 \
                  --secret-action-prototype='{"action_type": "public_cert_action_validate_dns_challenge"}'
                
              • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "action_type": "private_cert_action_revoke_certificate" }'   "${base_url}/api/v2/secrets/${id}/actions"
              • PrivateCertificateActionRevokePrototype secretActionPrototypeModel = new PrivateCertificateActionRevokePrototype.Builder()
                  .actionType("private_cert_action_revoke_certificate")
                  .build();
                CreateSecretActionOptions createSecretActionOptions = new CreateSecretActionOptions.Builder()
                  .id(secretIdForGetSecretLink)
                  .secretActionPrototype(secretActionPrototypeModel)
                  .build();
                
                Response<SecretAction> response = secretsManagerService.createSecretAction(createSecretActionOptions).execute();
                SecretAction secretAction = response.getResult();
                
                System.out.println(secretAction);
              • // Request models needed by this operation.
                
                // PrivateCertificateActionRevokePrototype
                const secretActionPrototypeModel = {
                  action_type: 'private_cert_action_revoke_certificate',
                };
                
                const params = {
                  id: secretIdForGetSecretLink,
                  secretActionPrototype: secretActionPrototypeModel,
                };
                
                let res;
                try {
                  res = await secretsManagerService.createSecretAction(params);
                  console.log(JSON.stringify(res.result, null, 2));
                } catch (err) {
                  console.warn(err);
                }
              • secret_action_prototype_model = {
                  'action_type': 'private_cert_action_revoke_certificate',
                }
                
                response = secrets_manager_service.create_secret_action(
                  id=secret_id_for_get_secret_link,
                  secret_action_prototype=secret_action_prototype_model,
                )
                secret_action = response.get_result()
                
                print(json.dumps(secret_action, indent=2))
              • secretActionPrototypeModel := &secretsmanagerv2.PrivateCertificateActionRevokePrototype{
                  ActionType: core.StringPtr("private_cert_action_revoke_certificate"),
                }
                
                createSecretActionOptions := secretsManagerService.NewCreateSecretActionOptions(
                  secretIdForGetSecretLink,
                  secretActionPrototypeModel,
                )
                
                secretAction, response, err := secretsManagerService.CreateSecretAction(createSecretActionOptions)
                if err != nil {
                  panic(err)
                }
                b, _ := json.MarshalIndent(secretAction, "", "  ")
                fmt.Println(string(b))

              Response

              The response body to specify the properties of the action to create a secret.

              The response body of the action to validate manual DNS challenges for the public certificate.

              The response body of the action to validate manual DNS challenges for the public certificate.

              The response body of the action to validate manual DNS challenges for the public certificate.

              The response body of the action to validate manual DNS challenges for the public certificate.

              Status Code

              • The secret action was successfully created.

              • BadRequest

              • Unauthorized

              • PaymentRequired

              • Forbidden

              • The specified resource was not found

              • Conflict

              • InternalServerError

              • BadGatewayError

              • ServiceUnavailableError

              Example responses
              • The request body of the action to revoke private certificates.

                {
                  "action_type": "private_cert_action_revoke_certificate",
                  "revocation_time_seconds": 1667982994
                }
              • The request body of the action to revoke private certificates.

                {
                  "action_type": "private_cert_action_revoke_certificate",
                  "revocation_time_seconds": 1667982994
                }
              • The response body of the action to validate manual DNS challenges for public certificates.

                {
                  "action_type": "public_cert_action_validate_dns_challenge"
                }
              • The response body of the action to validate manual DNS challenges for public certificates.

                {
                  "action_type": "public_cert_action_validate_dns_challenge"
                }
              • Example of bad request error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 400,
                  "errors": [
                    {
                      "code": "bad_request",
                      "message": "required.name:property \"name\" is missing",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of bad request error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 400,
                  "errors": [
                    {
                      "code": "bad_request",
                      "message": "required.name:property \"name\" is missing",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of unauthorized error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 401,
                  "errors": [
                    {
                      "code": "unauthorized",
                      "message": "You provided no credentials or invalid credentials.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of unauthorized error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 401,
                  "errors": [
                    {
                      "code": "unauthorized",
                      "message": "You provided no credentials or invalid credentials.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of payment required error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 402,
                  "errors": [
                    {
                      "code": "payment_required",
                      "message": "Your Trial plan is now expired.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of payment required error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 402,
                  "errors": [
                    {
                      "code": "payment_required",
                      "message": "Your Trial plan is now expired.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of forbidden error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 403,
                  "errors": [
                    {
                      "code": "access_forbidden",
                      "message": "You are not allowed to access this resource.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of forbidden error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 403,
                  "errors": [
                    {
                      "code": "access_forbidden",
                      "message": "You are not allowed to access this resource.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of NotFound error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 404,
                  "errors": [
                    {
                      "code": "not_found",
                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of NotFound error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 404,
                  "errors": [
                    {
                      "code": "not_found",
                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example Conflict error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 409,
                  "errors": [
                    {
                      "code": "conflict",
                      "message": "The request conflicts with the current state of the target resource",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example Conflict error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 409,
                  "errors": [
                    {
                      "code": "conflict",
                      "message": "The request conflicts with the current state of the target resource",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of internal server error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 500,
                  "errors": [
                    {
                      "code": "internal_server_error",
                      "message": "Internal server error",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of internal server error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 500,
                  "errors": [
                    {
                      "code": "internal_server_error",
                      "message": "Internal server error",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of bad gateway error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 502,
                  "errors": [
                    {
                      "code": "bad_gateway",
                      "message": "Bad Gateway",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of bad gateway error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 502,
                  "errors": [
                    {
                      "code": "bad_gateway",
                      "message": "Bad Gateway",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of service unavailable error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 503,
                  "errors": [
                    {
                      "code": "service_unavailable",
                      "message": "Service Unavailable",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of service unavailable error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 503,
                  "errors": [
                    {
                      "code": "service_unavailable",
                      "message": "Service Unavailable",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }

              Get a secret by name

              Get a secret and its details by specifying the Name and Type of the secret.

              A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

              Get a secret and its details by specifying the Name and Type of the secret.

              A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

              Get a secret and its details by specifying the Name and Type of the secret.

              A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

              Get a secret and its details by specifying the Name and Type of the secret.

              A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

              Get a secret and its details by specifying the Name and Type of the secret.

              A successful request returns the secret data that is associated with your secret, along with other metadata. To view only the details of a specified secret without retrieving its value, use the Get secret metadata operation.

              GET /api/v2/secret_groups/{secret_group_name}/secret_types/{secret_type}/secrets/{name}
              ServiceCall<Secret> getSecretByNameType(GetSecretByNameTypeOptions getSecretByNameTypeOptions)
              getSecretByNameType(params)
              get_secret_by_name_type(
                      self,
                      secret_type: str,
                      name: str,
                      secret_group_name: str,
                      **kwargs,
                  ) -> DetailedResponse
              (secretsManager *SecretsManagerV2) GetSecretByNameType(getSecretByNameTypeOptions *GetSecretByNameTypeOptions) (result SecretIntf, response *core.DetailedResponse, err error)
              (secretsManager *SecretsManagerV2) GetSecretByNameTypeWithContext(ctx context.Context, getSecretByNameTypeOptions *GetSecretByNameTypeOptions) (result SecretIntf, response *core.DetailedResponse, err error)

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              • secrets-manager.secret.read

              Auditing

              Calling this method generates the following auditing event.

              • secrets-manager.secret.read

              Request

              Use the GetSecretByNameTypeOptions.Builder to create a GetSecretByNameTypeOptions object that contains the parameter values for the getSecretByNameType method.

              Instantiate the GetSecretByNameTypeOptions struct and set the fields to provide parameter values for the GetSecretByNameType method.

              Path Parameters

              • The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.

                Allowable values: [arbitrary,iam_credentials,imported_cert,kv,private_cert,public_cert,service_credentials,username_password]

              • A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.

                Possible values: 2 ≤ length ≤ 256, Value must match regular expression ^\w(([\w-.]+)?\w)?$

                Example: my-secret

              • The name of your secret group.

                Possible values: 2 ≤ length ≤ 64, Value must match regular expression (.*?)

                Example: default

              The getSecretByNameType options.

              parameters

              • The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.

                Allowable values: [arbitrary,iam_credentials,imported_cert,kv,private_cert,public_cert,service_credentials,username_password]

              • A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.

                Possible values: 2 ≤ length ≤ 256, Value must match regular expression /^\\w(([\\w-.]+)?\\w)?$/

                Examples:
              • The name of your secret group.

                Possible values: 2 ≤ length ≤ 64, Value must match regular expression /(.*?)/

                Examples:

              parameters

              • The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.

                Allowable values: [arbitrary,iam_credentials,imported_cert,kv,private_cert,public_cert,service_credentials,username_password]

              • A human-readable name to assign to your secret. To protect your privacy, do not use personal data, such as your name or location, as a name for your secret.

                Possible values: 2 ≤ length ≤ 256, Value must match regular expression /^\\w(([\\w-.]+)?\\w)?$/

                Examples:
              • The name of your secret group.

                Possible values: 2 ≤ length ≤ 64, Value must match regular expression /(.*?)/

                Examples:

              WithContext method only

              The GetSecretByNameType options.

              • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secret_groups/${secret_group_name}/secret_types/${secret_type}/secrets/${name}"
              • GetSecretByNameTypeOptions getSecretByNameTypeOptions = new GetSecretByNameTypeOptions.Builder()
                  .secretType("arbitrary")
                  .name(secretNameLink)
                  .secretGroupName("default")
                  .build();
                
                Response<Secret> response = secretsManagerService.getSecretByNameType(getSecretByNameTypeOptions).execute();
                Secret secret = response.getResult();
                
                System.out.println(secret);
              • const params = {
                  secretType: 'arbitrary',
                  name: secretNameLink,
                  secretGroupName: 'default',
                };
                
                let res;
                try {
                  res = await secretsManagerService.getSecretByNameType(params);
                  console.log(JSON.stringify(res.result, null, 2));
                } catch (err) {
                  console.warn(err);
                }
              • response = secrets_manager_service.get_secret_by_name_type(
                  secret_type='arbitrary',
                  name=secret_name_link,
                  secret_group_name='default',
                )
                secret = response.get_result()
                
                print(json.dumps(secret, indent=2))
              • getSecretByNameTypeOptions := secretsManagerService.NewGetSecretByNameTypeOptions(
                  "arbitrary",
                  secretNameLink,
                  "default",
                )
                
                secret, response, err := secretsManagerService.GetSecretByNameType(getSecretByNameTypeOptions)
                if err != nil {
                  panic(err)
                }
                b, _ := json.MarshalIndent(secret, "", "  ")
                fmt.Println(string(b))

              Response

              Your secret.

              Your arbitrary secret.

              Your arbitrary secret.

              Your arbitrary secret.

              Your arbitrary secret.

              Status Code

              • The secret was successfully retrieved.

              • BadRequest

              • Unauthorized

              • PaymentRequired

              • Forbidden

              • The specified resource was not found

              • Conflict

              • InternalServerError

              • The specified api is not implemented

              • BadGatewayError

              • ServiceUnavailableError

              Example responses
              • Example arbitrary secret

                {
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "description of my arbitrary secret.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-arbitrary-secret",
                  "payload": "secret-data",
                  "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                  "secret_type": "arbitrary",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example arbitrary secret

                {
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "description of my arbitrary secret.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-arbitrary-secret",
                  "payload": "secret-data",
                  "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                  "secret_type": "arbitrary",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example IAM Credentials using Service ID

                {
                  "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Extended description for this secret.",
                  "downloaded": true,
                  "expiration_date": "2021-01-01T00:00:00Z",
                  "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-iam-credentials-secret",
                  "reuse_api_key": false,
                  "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
                  "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "secret_type": "iam_credentials",
                  "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
                  "service_id_is_static": false,
                  "state": 1,
                  "state_description": "active",
                  "ttl": "1800",
                  "updated_at": "2020-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example IAM Credentials using Service ID

                {
                  "api_key_id": "ApiKey-dcd0b857-b590-4507-8c64-ae89a23e8d76",
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Extended description for this secret.",
                  "downloaded": true,
                  "expiration_date": "2021-01-01T00:00:00Z",
                  "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-iam-credentials-secret",
                  "reuse_api_key": false,
                  "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
                  "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "secret_type": "iam_credentials",
                  "service_id": "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
                  "service_id_is_static": false,
                  "state": 1,
                  "state_description": "active",
                  "ttl": "1800",
                  "updated_at": "2020-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example imported certificate

                {
                  "alt_names": [
                    "s1.example.com",
                    "*.s2.example.com"
                  ],
                  "common_name": "example.com",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "created_at": "2020-10-05T21:33:11Z",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Description of my imported certificate.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "intermediate_included": true,
                  "issuer": "GlobalSign",
                  "key_algorithm": "RSA2048",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-imported-certificate",
                  "private_key_included": true,
                  "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                  "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                  "secret_type": "imported_cert",
                  "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                  "signing_algorithm": "SHA256-RSA",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "validity": {
                    "not_before": "2020-10-05T21:33:11Z",
                    "not_after": "2030-10-05T11:49:42Z"
                  },
                  "versions_total": 1
                }
              • Example imported certificate

                {
                  "alt_names": [
                    "s1.example.com",
                    "*.s2.example.com"
                  ],
                  "common_name": "example.com",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "created_at": "2020-10-05T21:33:11Z",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Description of my imported certificate.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "intermediate_included": true,
                  "issuer": "GlobalSign",
                  "key_algorithm": "RSA2048",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-imported-certificate",
                  "private_key_included": true,
                  "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                  "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                  "secret_type": "imported_cert",
                  "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                  "signing_algorithm": "SHA256-RSA",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "validity": {
                    "not_before": "2020-10-05T21:33:11Z",
                    "not_after": "2030-10-05T11:49:42Z"
                  },
                  "versions_total": 1
                }
              • Example kv secret

                {
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Description of my key-value secret.",
                  "downloaded": false,
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-kv-secret",
                  "data": {
                    "key1": "val1"
                  },
                  "secret_type": "kv",
                  "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example kv secret

                {
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Description of my key-value secret.",
                  "downloaded": false,
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-kv-secret",
                  "data": {
                    "key1": "val1"
                  },
                  "secret_type": "kv",
                  "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example private certificate

                {
                  "alt_names": [
                    "s1.example.com",
                    "*.s2.example.com"
                  ],
                  "certificate_authority": "example-intermediate-CA",
                  "certificate_template": "example-certificate-template",
                  "common_name": "example.com",
                  "created_at": "2022-10-02T14:08:07Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Extended description for this secret.",
                  "downloaded": true,
                  "expiration_date": "2030-03-02T15:08:37Z",
                  "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "issuer": "example.com",
                  "key_algorithm": "RSA2048",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-private-certificate",
                  "next_rotation_date": "2022-03-02T14:08:07Z",
                  "rotation": {
                    "auto_rotate": false,
                    "interval": 1,
                    "unit": "month"
                  },
                  "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "ca_chain": [
                    "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                  ],
                  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                  "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "secret_type": "private_cert",
                  "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                  "signing_algorithm": "SHA256-RSA",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-03-02T14:08:37Z",
                  "validity": {
                    "not_before": "2022-03-02T15:08:37Z",
                    "not_after": "2030-03-01T00:00:00Z"
                  },
                  "versions_total": 1
                }
              • Example private certificate

                {
                  "alt_names": [
                    "s1.example.com",
                    "*.s2.example.com"
                  ],
                  "certificate_authority": "example-intermediate-CA",
                  "certificate_template": "example-certificate-template",
                  "common_name": "example.com",
                  "created_at": "2022-10-02T14:08:07Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Extended description for this secret.",
                  "downloaded": true,
                  "expiration_date": "2030-03-02T15:08:37Z",
                  "id": "cb7a2502-8ede-47d6-b5b6-1b7af6b6f563",
                  "issuer": "example.com",
                  "key_algorithm": "RSA2048",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-private-certificate",
                  "next_rotation_date": "2022-03-02T14:08:07Z",
                  "rotation": {
                    "auto_rotate": false,
                    "interval": 1,
                    "unit": "month"
                  },
                  "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "ca_chain": [
                    "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                  ],
                  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                  "secret_group_id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "secret_type": "private_cert",
                  "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                  "signing_algorithm": "SHA256-RSA",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-03-02T14:08:37Z",
                  "validity": {
                    "not_before": "2022-03-02T15:08:37Z",
                    "not_after": "2030-03-01T00:00:00Z"
                  },
                  "versions_total": 1
                }
              • Example public certificate

                {
                  "alt_names": [
                    "s1.example.com",
                    "*.s2.example.com"
                  ],
                  "common_name": "example.com",
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Extended description for this secret.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                  "issuer": "Lets Encrypt",
                  "issuance_info": {
                    "auto_rotated": false,
                    "ordered_on": "2022-10-06T06:15:55Z",
                    "state": 1,
                    "state_description": "active"
                  },
                  "bundle_certs": true,
                  "ca": "lets-encrypt-config",
                  "dns": "cloud-internet-services-config",
                  "key_algorithm": "RSA2048",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "my-public-certificate",
                  "rotation": {
                    "auto_rotate": true,
                    "rotate_keys": true
                  },
                  "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                  "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                  "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                  "secret_type": "public_cert",
                  "signing_algorithm": "SHA256-RSA",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "validity": {
                    "not_before": "2020-10-05T21:33:11Z",
                    "not_after": "2030-10-05T11:49:42Z"
                  },
                  "versions_total": 1
                }
              • Example public certificate

                {
                  "alt_names": [
                    "s1.example.com",
                    "*.s2.example.com"
                  ],
                  "common_name": "example.com",
                  "created_at": "2020-10-05T21:33:11Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Extended description for this secret.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                  "issuer": "Lets Encrypt",
                  "issuance_info": {
                    "auto_rotated": false,
                    "ordered_on": "2022-10-06T06:15:55Z",
                    "state": 1,
                    "state_description": "active"
                  },
                  "bundle_certs": true,
                  "ca": "lets-encrypt-config",
                  "dns": "cloud-internet-services-config",
                  "key_algorithm": "RSA2048",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "my-public-certificate",
                  "rotation": {
                    "auto_rotate": true,
                    "rotate_keys": true
                  },
                  "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                  "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                  "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                  "secret_type": "public_cert",
                  "signing_algorithm": "SHA256-RSA",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "validity": {
                    "not_before": "2020-10-05T21:33:11Z",
                    "not_after": "2030-10-05T11:49:42Z"
                  },
                  "versions_total": 1
                }
              • A sample service credentials secret body.

                {
                  "created_at": "2022-06-27T11:58:15Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "credentials": {
                    "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                    "cos_hmac_keys": {
                      "access_key_id": "af56af3af56a4c738afea662c47840b3",
                      "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
                    },
                    "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
                    "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                    "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234",
                    "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::"
                  },
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "The description for my service credentials secret.",
                  "downloaded": false,
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-service-credentials-secret",
                  "next_rotation_date": "2022-10-10T21:33:11Z",
                  "rotation": {
                    "auto_rotate": true,
                    "interval": 10,
                    "unit": "day"
                  },
                  "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                  "secret_type": "service_credentials",
                  "source_service": {
                    "instance": {
                      "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
                    },
                    "parameters": {
                      "HMAC": true,
                      "serviceid_crn": "existing sid"
                    },
                    "role": {
                      "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                    },
                    "iam": {
                      "apikey": {
                        "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
                      },
                      "role": {
                        "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                      },
                      "serviceid": {
                        "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234"
                      },
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      }
                    }
                  },
                  "state": 1,
                  "state_description": "active",
                  "ttl": "86400",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "version_custom_metadata": {
                    "custom_version_key": "custom_version_value"
                  },
                  "versions_total": 1
                }
              • A sample service credentials secret body.

                {
                  "created_at": "2022-06-27T11:58:15Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "credentials": {
                    "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                    "cos_hmac_keys": {
                      "access_key_id": "af56af3af56a4c738afea662c47840b3",
                      "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
                    },
                    "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
                    "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                    "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                    "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234",
                    "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234::"
                  },
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "The description for my service credentials secret.",
                  "downloaded": false,
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-service-credentials-secret",
                  "next_rotation_date": "2022-10-10T21:33:11Z",
                  "rotation": {
                    "auto_rotate": true,
                    "interval": 10,
                    "unit": "day"
                  },
                  "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                  "secret_type": "service_credentials",
                  "source_service": {
                    "instance": {
                      "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce::"
                    },
                    "parameters": {
                      "HMAC": true,
                      "serviceid_crn": "existing sid"
                    },
                    "role": {
                      "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                    },
                    "iam": {
                      "apikey": {
                        "description": "Auto-generated for key af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "name": "6d1f818f-0ceb-4353-ad37-b1d6421c5898"
                      },
                      "role": {
                        "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
                      },
                      "serviceid": {
                        "crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca311234::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b81234"
                      },
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca311234:871d0a4d-feb1-4cb0-8dc1-77c78cee1234:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      }
                    }
                  },
                  "state": 1,
                  "state_description": "active",
                  "ttl": "86400",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "version_custom_metadata": {
                    "custom_version_key": "custom_version_value"
                  },
                  "versions_total": 1
                }
              • Example user credentials

                {
                  "created_at": "2022-06-27T11:58:15Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Description of my user credentials secret.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-username-password",
                  "next_rotation_date": "2022-10-10T21:33:11Z",
                  "rotation": {
                    "auto_rotate": false,
                    "interval": 1,
                    "unit": "day"
                  },
                  "password_generation_policy": {
                    "length": 32,
                    "include_digits": true,
                    "include_symbols": true,
                    "include_uppercase": true
                  },
                  "username": "admin",
                  "password": "admin1234",
                  "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                  "secret_type": "username_password",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example user credentials

                {
                  "created_at": "2022-06-27T11:58:15Z",
                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                  "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "custom_metadata": {
                    "metadata_custom_key": "metadata_custom_value"
                  },
                  "description": "Description of my user credentials secret.",
                  "downloaded": false,
                  "expiration_date": "2030-10-05T11:49:42Z",
                  "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                  "labels": [
                    "dev",
                    "us-south"
                  ],
                  "locks_total": 0,
                  "name": "example-username-password",
                  "next_rotation_date": "2022-10-10T21:33:11Z",
                  "rotation": {
                    "auto_rotate": false,
                    "interval": 1,
                    "unit": "day"
                  },
                  "password_generation_policy": {
                    "length": 32,
                    "include_digits": true,
                    "include_symbols": true,
                    "include_uppercase": true
                  },
                  "username": "admin",
                  "password": "admin1234",
                  "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                  "secret_type": "username_password",
                  "state": 1,
                  "state_description": "active",
                  "updated_at": "2022-10-05T21:33:11Z",
                  "versions_total": 1
                }
              • Example of bad request error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 400,
                  "errors": [
                    {
                      "code": "bad_request",
                      "message": "required.name:property \"name\" is missing",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of bad request error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 400,
                  "errors": [
                    {
                      "code": "bad_request",
                      "message": "required.name:property \"name\" is missing",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of unauthorized error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 401,
                  "errors": [
                    {
                      "code": "unauthorized",
                      "message": "You provided no credentials or invalid credentials.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of unauthorized error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 401,
                  "errors": [
                    {
                      "code": "unauthorized",
                      "message": "You provided no credentials or invalid credentials.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of payment required error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 402,
                  "errors": [
                    {
                      "code": "payment_required",
                      "message": "Your Trial plan is now expired.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of payment required error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 402,
                  "errors": [
                    {
                      "code": "payment_required",
                      "message": "Your Trial plan is now expired.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of forbidden error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 403,
                  "errors": [
                    {
                      "code": "access_forbidden",
                      "message": "You are not allowed to access this resource.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of forbidden error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 403,
                  "errors": [
                    {
                      "code": "access_forbidden",
                      "message": "You are not allowed to access this resource.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of NotFound error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 404,
                  "errors": [
                    {
                      "code": "not_found",
                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of NotFound error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 404,
                  "errors": [
                    {
                      "code": "not_found",
                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example Conflict error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 409,
                  "errors": [
                    {
                      "code": "conflict",
                      "message": "The request conflicts with the current state of the target resource",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example Conflict error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 409,
                  "errors": [
                    {
                      "code": "conflict",
                      "message": "The request conflicts with the current state of the target resource",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of internal server error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 500,
                  "errors": [
                    {
                      "code": "internal_server_error",
                      "message": "Internal server error",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of internal server error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 500,
                  "errors": [
                    {
                      "code": "internal_server_error",
                      "message": "Internal server error",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of Not Implemented error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 501,
                  "errors": [
                    {
                      "code": "not_implemented",
                      "message": "The specified api is not implemented.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of Not Implemented error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 501,
                  "errors": [
                    {
                      "code": "not_implemented",
                      "message": "The specified api is not implemented.",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of bad gateway error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 502,
                  "errors": [
                    {
                      "code": "bad_gateway",
                      "message": "Bad Gateway",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of bad gateway error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 502,
                  "errors": [
                    {
                      "code": "bad_gateway",
                      "message": "Bad Gateway",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of service unavailable error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 503,
                  "errors": [
                    {
                      "code": "service_unavailable",
                      "message": "Service Unavailable",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }
              • Example of service unavailable error

                {
                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                  "status_code": 503,
                  "errors": [
                    {
                      "code": "service_unavailable",
                      "message": "Service Unavailable",
                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                    }
                  ]
                }

              Create a new secret version

              Create a new secret version.

              Create a new secret version.

              Create a new secret version.

              Create a new secret version.

              Create a new secret version.

              POST /api/v2/secrets/{secret_id}/versions
              ServiceCall<SecretVersion> createSecretVersion(CreateSecretVersionOptions createSecretVersionOptions)
              createSecretVersion(params)
              create_secret_version(
                      self,
                      secret_id: str,
                      secret_version_prototype: 'SecretVersionPrototype',
                      **kwargs,
                  ) -> DetailedResponse
              (secretsManager *SecretsManagerV2) CreateSecretVersion(createSecretVersionOptions *CreateSecretVersionOptions) (result SecretVersionIntf, response *core.DetailedResponse, err error)
              (secretsManager *SecretsManagerV2) CreateSecretVersionWithContext(ctx context.Context, createSecretVersionOptions *CreateSecretVersionOptions) (result SecretVersionIntf, response *core.DetailedResponse, err error)

              Authorization

              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

              • secrets-manager.secret-version.create

              Auditing

              Calling this method generates the following auditing event.

              • secrets-manager.secret-version.create

              Request

              Use the CreateSecretVersionOptions.Builder to create a CreateSecretVersionOptions object that contains the parameter values for the createSecretVersion method.

              Instantiate the CreateSecretVersionOptions struct and set the fields to provide parameter values for the CreateSecretVersion method.

              Path Parameters

              • The v4 UUID that uniquely identifies your secret.

                Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

              Example:

              The request body to rotate arbitrary secrets.

              {
                "custom_metadata": {
                  "metadata_custom_key": "metadata_custom_value"
                },
                "payload": "updated secret credentials",
                "version_custom_metadata": {
                  "custom_version_key": "custom_version_value"
                }
              }

              The createSecretVersion options.

              parameters

              • The v4 UUID that uniquely identifies your secret.

                Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                Examples:
              • Specify the properties for your new secret version.

                parameters

                • The v4 UUID that uniquely identifies your secret.

                  Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                  Examples:
                • Specify the properties for your new secret version.

                  WithContext method only

                  The CreateSecretVersion options.

                  • ibmcloud secrets-manager secret-version-create --secret-id 0b5571f7-21e6-42b7-91c5-3f5ac9793a46 --arbitrary-payload='updated secret credentials' --secret-version-custom-metadata='{"anyKey": "anyValue"}'
                    
                    ibmcloud secrets-manager secret-version-create \
                      --secret-id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 \
                      --secret-version-prototype='{"payload": "updated secret credentials", "custom_metadata": {"anyKey": "anyValue"}, "version_custom_metadata": {"anyKey": "anyValue"}}'
                    
                  • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "custom_metadata": { "metadata_custom_key": "metadata_custom_value" }, "payload": "updated secret credentials", "version_custom_metadata": { "custom_version_key": "custom_version_value" } }'   "${base_url}/api/v2/secrets/${secret_id}/versions"
                  • ArbitrarySecretVersionPrototype secretVersionPrototypeModel = new ArbitrarySecretVersionPrototype.Builder()
                      .payload("updated secret credentials")
                      .build();
                    CreateSecretVersionOptions createSecretVersionOptions = new CreateSecretVersionOptions.Builder()
                      .secretId(secretIdForGetSecretLink)
                      .secretVersionPrototype(secretVersionPrototypeModel)
                      .build();
                    
                    Response<SecretVersion> response = secretsManagerService.createSecretVersion(createSecretVersionOptions).execute();
                    SecretVersion secretVersion = response.getResult();
                    
                    System.out.println(secretVersion);
                  • // Request models needed by this operation.
                    
                    // ArbitrarySecretVersionPrototype
                    const secretVersionPrototypeModel = {
                      payload: 'updated secret credentials',
                      custom_metadata: { metadata_custom_key: 'metadata_custom_value' },
                      version_custom_metadata: { custom_version_key: 'custom_version_value' },
                    };
                    
                    const params = {
                      secretId: secretIdForGetSecretLink,
                      secretVersionPrototype: secretVersionPrototypeModel,
                    };
                    
                    let res;
                    try {
                      res = await secretsManagerService.createSecretVersion(params);
                      console.log(JSON.stringify(res.result, null, 2));
                    } catch (err) {
                      console.warn(err);
                    }
                  • secret_version_prototype_model = {
                      'payload': 'updated secret credentials',
                      'custom_metadata': {'metadata_custom_key': 'metadata_custom_value'},
                      'version_custom_metadata': {'custom_version_key': 'custom_version_value'},
                    }
                    
                    response = secrets_manager_service.create_secret_version(
                      secret_id=secret_id_for_get_secret_link,
                      secret_version_prototype=secret_version_prototype_model,
                    )
                    secret_version = response.get_result()
                    
                    print(json.dumps(secret_version, indent=2))
                  • secretVersionPrototypeModel := &secretsmanagerv2.ArbitrarySecretVersionPrototype{
                      Payload: core.StringPtr("updated secret credentials"),
                    }
                    
                    createSecretVersionOptions := secretsManagerService.NewCreateSecretVersionOptions(
                      secretIdForGetSecretLink,
                      secretVersionPrototypeModel,
                    )
                    
                    secretVersion, response, err := secretsManagerService.CreateSecretVersion(createSecretVersionOptions)
                    if err != nil {
                      panic(err)
                    }
                    b, _ := json.MarshalIndent(secretVersion, "", "  ")
                    fmt.Println(string(b))

                  Response

                  Your secret version.

                  Your arbitrary secret version.

                  Your arbitrary secret version.

                  Your arbitrary secret version.

                  Your arbitrary secret version.

                  Status Code

                  • A new secret version was successfully created.

                  • BadRequest

                  • Unauthorized

                  • PaymentRequired

                  • Forbidden

                  • The specified resource was not found

                  • Conflict

                  • UnprocessableEntity

                  • InternalServerError

                  • BadGatewayError

                  • ServiceUnavailableError

                  Example responses
                  • Example arbitrary secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "payload": "secret-data",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example arbitrary secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "payload": "secret-data",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "imported_cert",
                      "secret_name": "example-imported-certificate",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "imported_cert",
                      "secret_name": "example-imported-certificate",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "data": {
                        "key1": "val1"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "kv",
                      "secret_name": "example-kv-secret",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "data": {
                        "key1": "val1"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "kv",
                      "secret_name": "example-kv-secret",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of the private certificate version

                    {
                      "alias": "current",
                      "auto_rotated": true,
                      "created_at": "2022-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "downloaded": false,
                      "expiration_date": "2030-01-01T00:00:00Z",
                      "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "ca_chain": [
                        "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                      ],
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-01-01T00:00:00Z",
                        "not_before": "2022-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of the private certificate version

                    {
                      "alias": "current",
                      "auto_rotated": true,
                      "created_at": "2022-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "downloaded": false,
                      "expiration_date": "2030-01-01T00:00:00Z",
                      "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "ca_chain": [
                        "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                      ],
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-01-01T00:00:00Z",
                        "not_before": "2022-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "credentials": {
                        "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                        "cos_hmac_keys": {
                          "access_key_id": "af56af3af56a4c738afea662c47840b3",
                          "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
                        },
                        "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
                        "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                        "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca316946::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b87feb",
                        "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab::"
                      },
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "credentials": {
                        "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                        "cos_hmac_keys": {
                          "access_key_id": "af56af3af56a4c738afea662c47840b3",
                          "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
                        },
                        "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
                        "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                        "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca316946::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b87feb",
                        "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab::"
                      },
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example username password secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "username": "admin",
                      "password": "admin1234",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-username-password-secret",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example username password secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "username": "admin",
                      "password": "admin1234",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-username-password-secret",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example Conflict error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 409,
                      "errors": [
                        {
                          "code": "conflict",
                          "message": "The request conflicts with the current state of the target resource",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example Conflict error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 409,
                      "errors": [
                        {
                          "code": "conflict",
                          "message": "The request conflicts with the current state of the target resource",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example UnprocessableEntity error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 422,
                      "errors": [
                        {
                          "code": "unprocessable_entity",
                          "message": "The API key is locked. Unlock the API key to complete this operation.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example UnprocessableEntity error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 422,
                      "errors": [
                        {
                          "code": "unprocessable_entity",
                          "message": "The API key is locked. Unlock the API key to complete this operation.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }

                  List versions of a secret

                  List the versions of a secret.

                  A successful request returns the list of versions of a secret, along with the metadata of each version.

                  List the versions of a secret.

                  A successful request returns the list of versions of a secret, along with the metadata of each version.

                  List the versions of a secret.

                  A successful request returns the list of versions of a secret, along with the metadata of each version.

                  List the versions of a secret.

                  A successful request returns the list of versions of a secret, along with the metadata of each version.

                  List the versions of a secret.

                  A successful request returns the list of versions of a secret, along with the metadata of each version.

                  GET /api/v2/secrets/{secret_id}/versions
                  ServiceCall<SecretVersionMetadataCollection> listSecretVersions(ListSecretVersionsOptions listSecretVersionsOptions)
                  listSecretVersions(params)
                  list_secret_versions(
                          self,
                          secret_id: str,
                          **kwargs,
                      ) -> DetailedResponse
                  (secretsManager *SecretsManagerV2) ListSecretVersions(listSecretVersionsOptions *ListSecretVersionsOptions) (result *SecretVersionMetadataCollection, response *core.DetailedResponse, err error)
                  (secretsManager *SecretsManagerV2) ListSecretVersionsWithContext(ctx context.Context, listSecretVersionsOptions *ListSecretVersionsOptions) (result *SecretVersionMetadataCollection, response *core.DetailedResponse, err error)

                  Authorization

                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                  • secrets-manager.secret-versions.list

                  Auditing

                  Calling this method generates the following auditing event.

                  • secrets-manager.secret-versions.list

                  Request

                  Use the ListSecretVersionsOptions.Builder to create a ListSecretVersionsOptions object that contains the parameter values for the listSecretVersions method.

                  Instantiate the ListSecretVersionsOptions struct and set the fields to provide parameter values for the ListSecretVersions method.

                  Path Parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                    Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                  The listSecretVersions options.

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:

                  WithContext method only

                  The ListSecretVersions options.

                  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${secret_id}/versions"
                  • ListSecretVersionsOptions listSecretVersionsOptions = new ListSecretVersionsOptions.Builder()
                      .secretId(secretIdForGetSecretLink)
                      .build();
                    
                    Response<SecretVersionMetadataCollection> response = secretsManagerService.listSecretVersions(listSecretVersionsOptions).execute();
                    SecretVersionMetadataCollection secretVersionMetadataCollection = response.getResult();
                    
                    System.out.println(secretVersionMetadataCollection);
                  • const params = {
                      secretId: secretIdForGetSecretLink,
                    };
                    
                    let res;
                    try {
                      res = await secretsManagerService.listSecretVersions(params);
                      console.log(JSON.stringify(res.result, null, 2));
                    } catch (err) {
                      console.warn(err);
                    }
                  • response = secrets_manager_service.list_secret_versions(
                      secret_id=secret_id_for_get_secret_link,
                    )
                    secret_version_metadata_collection = response.get_result()
                    
                    print(json.dumps(secret_version_metadata_collection, indent=2))
                  • listSecretVersionsOptions := secretsManagerService.NewListSecretVersionsOptions(
                      secretIdForGetSecretLink,
                    )
                    
                    secretVersionMetadataCollection, response, err := secretsManagerService.ListSecretVersions(listSecretVersionsOptions)
                    if err != nil {
                      panic(err)
                    }
                    b, _ := json.MarshalIndent(secretVersionMetadataCollection, "", "  ")
                    fmt.Println(string(b))

                  Response

                  Properties that describe a collection of your secret version metadata.

                  Properties that describe a collection of your secret version metadata.

                  Properties that describe a collection of your secret version metadata.

                  Properties that describe a collection of your secret version metadata.

                  Properties that describe a collection of your secret version metadata.

                  Status Code

                  • The list of secret versions was successfully retrieved.

                  • BadRequest

                  • Unauthorized

                  • PaymentRequired

                  • Forbidden

                  • The specified resource was not found

                  • InternalServerError

                  • BadGatewayError

                  • ServiceUnavailableError

                  Example responses
                  • Example secret version metadata collection response

                    {
                      "versions": [
                        {
                          "created_at": "2022-06-27T11:58:15Z",
                          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                          "expiration_date": "2030-10-05T11:49:42Z",
                          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                          "payload_available": true,
                          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                          "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                          "secret_name": "example-imported-certificate",
                          "secret_type": "imported_cert",
                          "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                          "validity": {
                            "not_after": "2030-10-05T11:49:42Z",
                            "not_before": "2022-06-27T11:58:15Z"
                          },
                          "version_custom_metadata": {
                            "custom_version_key": "custom_version_value"
                          }
                        }
                      ],
                      "total_count": 1
                    }
                  • Example secret version metadata collection response

                    {
                      "versions": [
                        {
                          "created_at": "2022-06-27T11:58:15Z",
                          "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                          "expiration_date": "2030-10-05T11:49:42Z",
                          "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                          "payload_available": true,
                          "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                          "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                          "secret_name": "example-imported-certificate",
                          "secret_type": "imported_cert",
                          "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                          "validity": {
                            "not_after": "2030-10-05T11:49:42Z",
                            "not_before": "2022-06-27T11:58:15Z"
                          },
                          "version_custom_metadata": {
                            "custom_version_key": "custom_version_value"
                          }
                        }
                      ],
                      "total_count": 1
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }

                  Get a version of a secret

                  Get a version of a secret by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the secret data that is associated with the specified version of your secret, along with other metadata.

                  Get a version of a secret by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the secret data that is associated with the specified version of your secret, along with other metadata.

                  Get a version of a secret by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the secret data that is associated with the specified version of your secret, along with other metadata.

                  Get a version of a secret by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the secret data that is associated with the specified version of your secret, along with other metadata.

                  Get a version of a secret by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the secret data that is associated with the specified version of your secret, along with other metadata.

                  GET /api/v2/secrets/{secret_id}/versions/{id}
                  ServiceCall<SecretVersion> getSecretVersion(GetSecretVersionOptions getSecretVersionOptions)
                  getSecretVersion(params)
                  get_secret_version(
                          self,
                          secret_id: str,
                          id: str,
                          **kwargs,
                      ) -> DetailedResponse
                  (secretsManager *SecretsManagerV2) GetSecretVersion(getSecretVersionOptions *GetSecretVersionOptions) (result SecretVersionIntf, response *core.DetailedResponse, err error)
                  (secretsManager *SecretsManagerV2) GetSecretVersionWithContext(ctx context.Context, getSecretVersionOptions *GetSecretVersionOptions) (result SecretVersionIntf, response *core.DetailedResponse, err error)

                  Authorization

                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                  • secrets-manager.secret-version.read

                  Auditing

                  Calling this method generates the following auditing event.

                  • secrets-manager.secret-version.read

                  Request

                  Use the GetSecretVersionOptions.Builder to create a GetSecretVersionOptions object that contains the parameter values for the getSecretVersion method.

                  Instantiate the GetSecretVersionOptions struct and set the fields to provide parameter values for the GetSecretVersion method.

                  Path Parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                    Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                    Example: eb4cf24d-9cae-424b-945e-159788a5f535

                  The getSecretVersion options.

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:

                  WithContext method only

                  The GetSecretVersion options.

                  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}"
                  • GetSecretVersionOptions getSecretVersionOptions = new GetSecretVersionOptions.Builder()
                      .secretId(secretIdForGetSecretLink)
                      .id(secretVersionIdForGetSecretVersionLink)
                      .build();
                    
                    Response<SecretVersion> response = secretsManagerService.getSecretVersion(getSecretVersionOptions).execute();
                    SecretVersion secretVersion = response.getResult();
                    
                    System.out.println(secretVersion);
                  • const params = {
                      secretId: secretIdForGetSecretLink,
                      id: secretVersionIdForGetSecretVersionLink,
                    };
                    
                    let res;
                    try {
                      res = await secretsManagerService.getSecretVersion(params);
                      console.log(JSON.stringify(res.result, null, 2));
                    } catch (err) {
                      console.warn(err);
                    }
                  • response = secrets_manager_service.get_secret_version(
                      secret_id=secret_id_for_get_secret_link,
                      id=secret_version_id_for_get_secret_version_link,
                    )
                    secret_version = response.get_result()
                    
                    print(json.dumps(secret_version, indent=2))
                  • getSecretVersionOptions := secretsManagerService.NewGetSecretVersionOptions(
                      secretIdForGetSecretLink,
                      secretVersionIdForGetSecretVersionLink,
                    )
                    
                    secretVersion, response, err := secretsManagerService.GetSecretVersion(getSecretVersionOptions)
                    if err != nil {
                      panic(err)
                    }
                    b, _ := json.MarshalIndent(secretVersion, "", "  ")
                    fmt.Println(string(b))

                  Response

                  Your secret version.

                  Your arbitrary secret version.

                  Your arbitrary secret version.

                  Your arbitrary secret version.

                  Your arbitrary secret version.

                  Status Code

                  • The secret version was successfully retrieved.

                  • BadRequest

                  • Unauthorized

                  • PaymentRequired

                  • Forbidden

                  • The specified resource was not found

                  • The specified resource no longer exists

                  • InternalServerError

                  • BadGatewayError

                  • ServiceUnavailableError

                  Example responses
                  • Example arbitrary secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "payload": "secret-data",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example arbitrary secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "payload": "secret-data",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "api_key": "RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "imported_cert",
                      "secret_name": "example-imported-certificate",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "imported_cert",
                      "secret_name": "example-imported-certificate",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "data": {
                        "key1": "val1"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "kv",
                      "secret_name": "example-kv-secret",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "data": {
                        "key1": "val1"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_type": "kv",
                      "secret_name": "example-kv-secret",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of the private certificate version

                    {
                      "alias": "current",
                      "auto_rotated": true,
                      "created_at": "2022-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "downloaded": false,
                      "expiration_date": "2030-01-01T00:00:00Z",
                      "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "ca_chain": [
                        "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                      ],
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-01-01T00:00:00Z",
                        "not_before": "2022-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of the private certificate version

                    {
                      "alias": "current",
                      "auto_rotated": true,
                      "created_at": "2022-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "downloaded": false,
                      "expiration_date": "2030-01-01T00:00:00Z",
                      "id": "24ec2c34-38ee-4038-9f1d-9a629423158d",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "ca_chain": [
                        "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                      ],
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-01-01T00:00:00Z",
                        "not_before": "2022-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "intermediate": "-----BEGIN CERTIFICATE-----\nMIIE3DCCBGKgAwIBAgIUKncnp6BdSUKAFGBcP4YVp/gTb7gwCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----",
                      "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END RSA PRIVATE KEY-----",
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_before": "2020-10-05T21:33:11Z",
                        "not_after": "2030-10-05T11:49:42Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "credentials": {
                        "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                        "cos_hmac_keys": {
                          "access_key_id": "af56af3af56a4c738afea662c47840b3",
                          "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
                        },
                        "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
                        "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                        "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca316946::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b87feb",
                        "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab::"
                      },
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "credentials": {
                        "apikey": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                        "cos_hmac_keys": {
                          "access_key_id": "af56af3af56a4c738afea662c47840b3",
                          "secret_access_key": "bc69b010402011eebe560242ac120002aedc950c7ea6ac4d"
                        },
                        "endpoints": "https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints",
                        "iam_apikey_description": "Auto-generated for key 6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_id": "ApiKey-6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_apikey_name": "6d1f818f-0ceb-4353-ac36-b1d6421c5898",
                        "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                        "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22018f3c34ff4ff193698d15ca316946::serviceid:ServiceId-6183f10e-6db1-44e8-806c-cfb711b87feb",
                        "resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab::"
                      },
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example username password secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "username": "admin",
                      "password": "admin1234",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-username-password-secret",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example username password secret version

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "username": "admin",
                      "password": "admin1234",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-username-password-secret",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of Gone error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 410,
                      "errors": [
                        {
                          "code": "gone",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f no longer exists.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of Gone error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 410,
                      "errors": [
                        {
                          "code": "gone",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f no longer exists.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }

                  Delete the data of a secret version

                  Delete the data of a secret version by specifying the ID of the version.

                  This operation is available for secret type: iam_credentials current version.

                  Delete the data of a secret version by specifying the ID of the version.

                  This operation is available for secret type: iam_credentials current version.

                  Delete the data of a secret version by specifying the ID of the version.

                  This operation is available for secret type: iam_credentials current version.

                  Delete the data of a secret version by specifying the ID of the version.

                  This operation is available for secret type: iam_credentials current version.

                  Delete the data of a secret version by specifying the ID of the version.

                  This operation is available for secret type: iam_credentials current version.

                  DELETE /api/v2/secrets/{secret_id}/versions/{id}/secret_data
                  ServiceCall<Void> deleteSecretVersionData(DeleteSecretVersionDataOptions deleteSecretVersionDataOptions)
                  deleteSecretVersionData(params)
                  delete_secret_version_data(
                          self,
                          secret_id: str,
                          id: str,
                          **kwargs,
                      ) -> DetailedResponse
                  (secretsManager *SecretsManagerV2) DeleteSecretVersionData(deleteSecretVersionDataOptions *DeleteSecretVersionDataOptions) (response *core.DetailedResponse, err error)
                  (secretsManager *SecretsManagerV2) DeleteSecretVersionDataWithContext(ctx context.Context, deleteSecretVersionDataOptions *DeleteSecretVersionDataOptions) (response *core.DetailedResponse, err error)

                  Authorization

                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                  • secrets-manager.secret-version-data.delete

                  Auditing

                  Calling this method generates the following auditing event.

                  • secrets-manager.secret-version-data.delete

                  Request

                  Use the DeleteSecretVersionDataOptions.Builder to create a DeleteSecretVersionDataOptions object that contains the parameter values for the deleteSecretVersionData method.

                  Instantiate the DeleteSecretVersionDataOptions struct and set the fields to provide parameter values for the DeleteSecretVersionData method.

                  Path Parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                    Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                    Example: eb4cf24d-9cae-424b-945e-159788a5f535

                  The deleteSecretVersionData options.

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:

                  WithContext method only

                  The DeleteSecretVersionData options.

                  • curl -X DELETE --location --header "Authorization: Bearer ${iam_token}"   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}/secret_data"
                  • DeleteSecretVersionDataOptions deleteSecretVersionDataOptions = new DeleteSecretVersionDataOptions.Builder()
                      .secretId(secretIdForGetSecretLink)
                      .id(secretVersionIdForGetSecretVersionLink)
                      .build();
                    
                    Response<Void> response = secretsManagerService.deleteSecretVersionData(deleteSecretVersionDataOptions).execute();
                  • const params = {
                      secretId: secretIdForGetSecretLink,
                      id: secretVersionIdForGetSecretVersionLink,
                    };
                    
                    try {
                      await secretsManagerService.deleteSecretVersionData(params);
                    } catch (err) {
                      console.warn(err);
                    }
                  • response = secrets_manager_service.delete_secret_version_data(
                      secret_id=secret_id_for_get_secret_link,
                      id=secret_version_id_for_get_secret_version_link,
                    )
                  • deleteSecretVersionDataOptions := secretsManagerService.NewDeleteSecretVersionDataOptions(
                      secretIdForGetSecretLink,
                      secretVersionIdForGetSecretVersionLink,
                    )
                    
                    response, err := secretsManagerService.DeleteSecretVersionData(deleteSecretVersionDataOptions)
                    if err != nil {
                      panic(err)
                    }
                    if response.StatusCode != 204 {
                      fmt.Printf("\nUnexpected response status code received from DeleteSecretVersionData(): %d\n", response.StatusCode)
                    }

                  Response

                  Status Code

                  • The secret version's data was successfully deleted.

                  • BadRequest

                  • Unauthorized

                  • PaymentRequired

                  • Forbidden

                  • The specified resource was not found

                  • Conflict

                  • InternalServerError

                  • BadGatewayError

                  • ServiceUnavailableError

                  Example responses
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example Conflict error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 409,
                      "errors": [
                        {
                          "code": "conflict",
                          "message": "The request conflicts with the current state of the target resource",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example Conflict error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 409,
                      "errors": [
                        {
                          "code": "conflict",
                          "message": "The request conflicts with the current state of the target resource",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }

                  Get the metadata of a secret version

                  Get the metadata of a secret version by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the metadata that is associated with the specified version of your secret.

                  Get the metadata of a secret version by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the metadata that is associated with the specified version of your secret.

                  Get the metadata of a secret version by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the metadata that is associated with the specified version of your secret.

                  Get the metadata of a secret version by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the metadata that is associated with the specified version of your secret.

                  Get the metadata of a secret version by specifying the ID of the version. You can use the current or previous aliases to refer to the current or previous secret version.

                  A successful request returns the metadata that is associated with the specified version of your secret.

                  GET /api/v2/secrets/{secret_id}/versions/{id}/metadata
                  ServiceCall<SecretVersionMetadata> getSecretVersionMetadata(GetSecretVersionMetadataOptions getSecretVersionMetadataOptions)
                  getSecretVersionMetadata(params)
                  get_secret_version_metadata(
                          self,
                          secret_id: str,
                          id: str,
                          **kwargs,
                      ) -> DetailedResponse
                  (secretsManager *SecretsManagerV2) GetSecretVersionMetadata(getSecretVersionMetadataOptions *GetSecretVersionMetadataOptions) (result SecretVersionMetadataIntf, response *core.DetailedResponse, err error)
                  (secretsManager *SecretsManagerV2) GetSecretVersionMetadataWithContext(ctx context.Context, getSecretVersionMetadataOptions *GetSecretVersionMetadataOptions) (result SecretVersionMetadataIntf, response *core.DetailedResponse, err error)

                  Authorization

                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                  • secrets-manager.secret-version-metadata.read

                  Auditing

                  Calling this method generates the following auditing event.

                  • secrets-manager.secret-version-metadata.read

                  Request

                  Use the GetSecretVersionMetadataOptions.Builder to create a GetSecretVersionMetadataOptions object that contains the parameter values for the getSecretVersionMetadata method.

                  Instantiate the GetSecretVersionMetadataOptions struct and set the fields to provide parameter values for the GetSecretVersionMetadata method.

                  Path Parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                    Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                    Example: eb4cf24d-9cae-424b-945e-159788a5f535

                  The getSecretVersionMetadata options.

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:

                  WithContext method only

                  The GetSecretVersionMetadata options.

                  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}/metadata"
                  • GetSecretVersionMetadataOptions getSecretVersionMetadataOptions = new GetSecretVersionMetadataOptions.Builder()
                      .secretId(secretIdForGetSecretLink)
                      .id(secretVersionIdForGetSecretVersionLink)
                      .build();
                    
                    Response<SecretVersionMetadata> response = secretsManagerService.getSecretVersionMetadata(getSecretVersionMetadataOptions).execute();
                    SecretVersionMetadata secretVersionMetadata = response.getResult();
                    
                    System.out.println(secretVersionMetadata);
                  • const params = {
                      secretId: secretIdForGetSecretLink,
                      id: secretVersionIdForGetSecretVersionLink,
                    };
                    
                    let res;
                    try {
                      res = await secretsManagerService.getSecretVersionMetadata(params);
                      console.log(JSON.stringify(res.result, null, 2));
                    } catch (err) {
                      console.warn(err);
                    }
                  • response = secrets_manager_service.get_secret_version_metadata(
                      secret_id=secret_id_for_get_secret_link,
                      id=secret_version_id_for_get_secret_version_link,
                    )
                    secret_version_metadata = response.get_result()
                    
                    print(json.dumps(secret_version_metadata, indent=2))
                  • getSecretVersionMetadataOptions := secretsManagerService.NewGetSecretVersionMetadataOptions(
                      secretIdForGetSecretLink,
                      secretVersionIdForGetSecretVersionLink,
                    )
                    
                    secretVersionMetadata, response, err := secretsManagerService.GetSecretVersionMetadata(getSecretVersionMetadataOptions)
                    if err != nil {
                      panic(err)
                    }
                    b, _ := json.MarshalIndent(secretVersionMetadata, "", "  ")
                    fmt.Println(string(b))

                  Response

                  Properties of the version metadata of your secret.

                  Properties of the version metadata of your arbitrary secret.

                  Properties of the version metadata of your arbitrary secret.

                  Properties of the version metadata of your arbitrary secret.

                  Properties of the version metadata of your arbitrary secret.

                  Status Code

                  • The secret version metadata was successfully retrieved.

                  • BadRequest

                  • Unauthorized

                  • PaymentRequired

                  • Forbidden

                  • The specified resource was not found

                  • InternalServerError

                  • BadGatewayError

                  • ServiceUnavailableError

                  Example responses
                  • Example arbitrary version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example arbitrary version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-imported-certificate",
                      "secret_type": "imported_cert",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2022-06-27T11:58:15Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-imported-certificate",
                      "secret_type": "imported_cert",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2022-06-27T11:58:15Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-kv-secret",
                      "secret_type": "kv",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-kv-secret",
                      "secret_type": "kv",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of private certificate version metadata

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "downloaded": false,
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2030-09-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of private certificate version metadata

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "downloaded": false,
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2030-09-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2020-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2020-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample of the metadata for a service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "resource_key_name": "secret_name_versionid",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample of the metadata for a service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "resource_key_name": "secret_name_versionid",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example user credentials secret metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "rotation": {
                        "auto_rotate": true,
                        "interval": 30,
                        "unit": "day"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example user credentials secret metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "rotation": {
                        "auto_rotate": true,
                        "interval": 30,
                        "unit": "day"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }

                  Update the metadata of a secret version

                  Update the custom metadata of a secret version.

                  Update the custom metadata of a secret version.

                  Update the custom metadata of a secret version.

                  Update the custom metadata of a secret version.

                  Update the custom metadata of a secret version.

                  PATCH /api/v2/secrets/{secret_id}/versions/{id}/metadata
                  ServiceCall<SecretVersionMetadata> updateSecretVersionMetadata(UpdateSecretVersionMetadataOptions updateSecretVersionMetadataOptions)
                  updateSecretVersionMetadata(params)
                  update_secret_version_metadata(
                          self,
                          secret_id: str,
                          id: str,
                          secret_version_metadata_patch: 'SecretVersionMetadataPatch',
                          **kwargs,
                      ) -> DetailedResponse
                  (secretsManager *SecretsManagerV2) UpdateSecretVersionMetadata(updateSecretVersionMetadataOptions *UpdateSecretVersionMetadataOptions) (result SecretVersionMetadataIntf, response *core.DetailedResponse, err error)
                  (secretsManager *SecretsManagerV2) UpdateSecretVersionMetadataWithContext(ctx context.Context, updateSecretVersionMetadataOptions *UpdateSecretVersionMetadataOptions) (result SecretVersionMetadataIntf, response *core.DetailedResponse, err error)

                  Authorization

                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                  • secrets-manager.secret-version-metadata.update

                  Auditing

                  Calling this method generates the following auditing event.

                  • secrets-manager.secret-version-metadata.update

                  Request

                  Use the UpdateSecretVersionMetadataOptions.Builder to create a UpdateSecretVersionMetadataOptions object that contains the parameter values for the updateSecretVersionMetadata method.

                  Instantiate the UpdateSecretVersionMetadataOptions struct and set the fields to provide parameter values for the UpdateSecretVersionMetadata method.

                  Path Parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                    Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                    Example: eb4cf24d-9cae-424b-945e-159788a5f535

                  Update your secret version metadata.

                  The updateSecretVersionMetadata options.

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:
                  • The secret version metadata that a user can customize.

                    Examples:

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:
                  • Update your secret version metadata.

                  WithContext method only

                  The UpdateSecretVersionMetadata options.

                  • curl -X PATCH --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/merge-patch+json"   --data ''   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}/metadata"
                  • SecretVersionMetadataPatch secretVersionMetadataPatchModel = new SecretVersionMetadataPatch.Builder()
                      .build();
                    Map<String, Object> secretVersionMetadataPatchModelAsPatch = secretVersionMetadataPatchModel.asPatch();
                    UpdateSecretVersionMetadataOptions updateSecretVersionMetadataOptions = new UpdateSecretVersionMetadataOptions.Builder()
                      .secretId(secretIdForGetSecretLink)
                      .id(secretVersionIdForGetSecretVersionLink)
                      .secretVersionMetadataPatch(secretVersionMetadataPatchModelAsPatch)
                      .build();
                    
                    Response<SecretVersionMetadata> response = secretsManagerService.updateSecretVersionMetadata(updateSecretVersionMetadataOptions).execute();
                    SecretVersionMetadata secretVersionMetadata = response.getResult();
                    
                    System.out.println(secretVersionMetadata);
                  • const params = {
                      secretId: secretIdForGetSecretLink,
                      id: secretVersionIdForGetSecretVersionLink,
                    };
                    
                    let res;
                    try {
                      res = await secretsManagerService.updateSecretVersionMetadata(params);
                      console.log(JSON.stringify(res.result, null, 2));
                    } catch (err) {
                      console.warn(err);
                    }
                  • secret_version_metadata_patch_model = {
                    }
                    
                    response = secrets_manager_service.update_secret_version_metadata(
                      secret_id=secret_id_for_get_secret_link,
                      id=secret_version_id_for_get_secret_version_link,
                      secret_version_metadata_patch=secret_version_metadata_patch_model,
                    )
                    secret_version_metadata = response.get_result()
                    
                    print(json.dumps(secret_version_metadata, indent=2))
                  • secretVersionMetadataPatchModel := &secretsmanagerv2.SecretVersionMetadataPatch{
                    }
                    secretVersionMetadataPatchModelAsPatch, asPatchErr := secretVersionMetadataPatchModel.AsPatch()
                    Expect(asPatchErr).To(BeNil())
                    
                    updateSecretVersionMetadataOptions := secretsManagerService.NewUpdateSecretVersionMetadataOptions(
                      secretIdForGetSecretLink,
                      secretVersionIdForGetSecretVersionLink,
                      secretVersionMetadataPatchModelAsPatch,
                    )
                    
                    secretVersionMetadata, response, err := secretsManagerService.UpdateSecretVersionMetadata(updateSecretVersionMetadataOptions)
                    if err != nil {
                      panic(err)
                    }
                    b, _ := json.MarshalIndent(secretVersionMetadata, "", "  ")
                    fmt.Println(string(b))

                  Response

                  Properties of the version metadata of your secret.

                  Properties of the version metadata of your arbitrary secret.

                  Properties of the version metadata of your arbitrary secret.

                  Properties of the version metadata of your arbitrary secret.

                  Properties of the version metadata of your arbitrary secret.

                  Status Code

                  • The secret version's metadata was successfully updated.

                  • BadRequest

                  • Unauthorized

                  • PaymentRequired

                  • Forbidden

                  • The specified resource was not found

                  • InternalServerError

                  • BadGatewayError

                  • ServiceUnavailableError

                  Example responses
                  • Example arbitrary version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example arbitrary version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary-secret",
                      "secret_type": "arbitrary",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example IAM Credentials secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9aaa",
                      "secret_name": "example-iam-credentials-secret",
                      "secret_type": "iam_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-imported-certificate",
                      "secret_type": "imported_cert",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2022-06-27T11:58:15Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example imported certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-imported-certificate",
                      "secret_type": "imported_cert",
                      "serial_number": "38:eb:01:a3:22:e9:de:55:24:56:9b:14:cb:e2:f3:e3:e2:fb:f5:18",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2022-06-27T11:58:15Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-kv-secret",
                      "secret_type": "kv",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example KV secret version metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-kv-secret",
                      "secret_type": "kv",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of private certificate version metadata

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "downloaded": false,
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2030-09-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of private certificate version metadata

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/a5ebf2570dcaedf18d7ed78e216c263a:f1bc94a6-64aa-4c55-b00f-f6cd70e4b2ce:secret:f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "downloaded": false,
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-private-certificate",
                      "secret_type": "private_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2030-09-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2020-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example public certificate version metadata

                    {
                      "alias": "current",
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "f075f0b3-71e4-4a14-b60f-0b38b855a3d1",
                      "payload_available": true,
                      "secret_group_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_id": "bfc0a4a9-3d58-4fda-945b-76756af516aa",
                      "secret_name": "example-public-certificate",
                      "secret_type": "public_cert",
                      "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd",
                      "validity": {
                        "not_after": "2030-10-05T11:49:42Z",
                        "not_before": "2020-10-05T21:33:11Z"
                      },
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample of the metadata for a service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "resource_key_name": "secret_name_versionid",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • A sample of the metadata for a service credentials secret version.

                    {
                      "alias": "current",
                      "auto_rotated": false,
                      "created_at": "2020-10-05T21:33:11Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2023-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "resource_key": {
                        "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/22018f3c34ff4ff193698d15ca316946:871d0a4d-feb1-4cb0-8dc1-77c78cee8aab:resource-key:af56af3a-f56a-4c73-8afe-a662c47840b3",
                        "name": "secret_name_versionid"
                      },
                      "resource_key_name": "secret_name_versionid",
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-service-credentials-secret",
                      "secret_type": "service_credentials",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example user credentials secret metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "rotation": {
                        "auto_rotate": true,
                        "interval": 30,
                        "unit": "day"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example user credentials secret metadata

                    {
                      "alias": "current",
                      "created_at": "2022-06-27T11:58:15Z",
                      "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                      "expiration_date": "2030-10-05T11:49:42Z",
                      "id": "bc656587-8fda-4d05-9ad8-b1de1ec7e712",
                      "payload_available": true,
                      "rotation": {
                        "auto_rotate": true,
                        "interval": 30,
                        "unit": "day"
                      },
                      "secret_group_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_id": "67d025e1-0248-418f-83ba-deb0ebfb9b4a",
                      "secret_name": "example-arbitrary",
                      "secret_type": "username_password",
                      "version_custom_metadata": {
                        "custom_version_key": "custom_version_value"
                      }
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad request error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 400,
                      "errors": [
                        {
                          "code": "bad_request",
                          "message": "required.name:property \"name\" is missing",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of unauthorized error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 401,
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You provided no credentials or invalid credentials.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of payment required error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 402,
                      "errors": [
                        {
                          "code": "payment_required",
                          "message": "Your Trial plan is now expired.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of forbidden error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 403,
                      "errors": [
                        {
                          "code": "access_forbidden",
                          "message": "You are not allowed to access this resource.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of NotFound error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 404,
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of internal server error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 500,
                      "errors": [
                        {
                          "code": "internal_server_error",
                          "message": "Internal server error",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of bad gateway error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 502,
                      "errors": [
                        {
                          "code": "bad_gateway",
                          "message": "Bad Gateway",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }
                  • Example of service unavailable error

                    {
                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                      "status_code": 503,
                      "errors": [
                        {
                          "code": "service_unavailable",
                          "message": "Service Unavailable",
                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                        }
                      ]
                    }

                  Create a version action

                  Create a secret version action. This operation supports the following actions:

                  • private_cert_action_revoke_certificate: Revoke a version of a private certificate.

                  Create a secret version action. This operation supports the following actions:

                  • private_cert_action_revoke_certificate: Revoke a version of a private certificate.

                  Create a secret version action. This operation supports the following actions:

                  • private_cert_action_revoke_certificate: Revoke a version of a private certificate.

                  Create a secret version action. This operation supports the following actions:

                  • private_cert_action_revoke_certificate: Revoke a version of a private certificate.

                  Create a secret version action. This operation supports the following actions:

                  • private_cert_action_revoke_certificate: Revoke a version of a private certificate.
                  POST /api/v2/secrets/{secret_id}/versions/{id}/actions
                  ServiceCall<VersionAction> createSecretVersionAction(CreateSecretVersionActionOptions createSecretVersionActionOptions)
                  createSecretVersionAction(params)
                  create_secret_version_action(
                          self,
                          secret_id: str,
                          id: str,
                          secret_version_action_prototype: 'SecretVersionActionPrototype',
                          **kwargs,
                      ) -> DetailedResponse
                  (secretsManager *SecretsManagerV2) CreateSecretVersionAction(createSecretVersionActionOptions *CreateSecretVersionActionOptions) (result VersionActionIntf, response *core.DetailedResponse, err error)
                  (secretsManager *SecretsManagerV2) CreateSecretVersionActionWithContext(ctx context.Context, createSecretVersionActionOptions *CreateSecretVersionActionOptions) (result VersionActionIntf, response *core.DetailedResponse, err error)

                  Authorization

                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                  • secrets-manager.secret-version-action.create

                  Auditing

                  Calling this method generates the following auditing event.

                  • secrets-manager.secret-version-action.create

                  Request

                  Use the CreateSecretVersionActionOptions.Builder to create a CreateSecretVersionActionOptions object that contains the parameter values for the createSecretVersionAction method.

                  Instantiate the CreateSecretVersionActionOptions struct and set the fields to provide parameter values for the CreateSecretVersionAction method.

                  Path Parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                    Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                    Example: eb4cf24d-9cae-424b-945e-159788a5f535

                  The request body to specify the properties of the action to revoke the private certificate.

                  Examples:

                  The request body of the action to revoke private certificate versions.

                  {
                    "action_type": "private_cert_action_revoke_certificate"
                  }

                  The createSecretVersionAction options.

                  parameters

                  • The v4 UUID that uniquely identifies your secret.

                    Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                    Examples:
                  • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                    Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                    Examples:
                  • The request body to specify the properties of the action to revoke the private certificate.

                    parameters

                    • The v4 UUID that uniquely identifies your secret.

                      Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                      Examples:
                    • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                      Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                      Examples:
                    • The request body to specify the properties of the action to revoke the private certificate.

                      WithContext method only

                      The CreateSecretVersionAction options.

                      • ibmcloud secrets-manager secret--version-action-create --secret-id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 --id=eb4cf24d-9cae-424b-945e-159788a5f535 --secret-version-action-type=private_cert_action_revoke_certificate
                        
                        ibmcloud secrets-manager secret-version-action-create \
                          --secret-id=0b5571f7-21e6-42b7-91c5-3f5ac9793a46 \
                          --id=eb4cf24d-9cae-424b-945e-159788a5f535 \
                          --secret-version-action-prototype='{"action_type": "private_cert_action_revoke_certificate"}'
                        
                      • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "action_type": "private_cert_action_revoke_certificate" }'   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}/actions"
                      • PrivateCertificateVersionActionRevokePrototype secretVersionActionPrototypeModel = new PrivateCertificateVersionActionRevokePrototype.Builder()
                          .actionType("private_cert_action_revoke_certificate")
                          .build();
                        CreateSecretVersionActionOptions createSecretVersionActionOptions = new CreateSecretVersionActionOptions.Builder()
                          .secretId(secretIdForGetSecretLink)
                          .id(secretVersionIdForGetSecretVersionLink)
                          .secretVersionActionPrototype(secretVersionActionPrototypeModel)
                          .build();
                        
                        Response<VersionAction> response = secretsManagerService.createSecretVersionAction(createSecretVersionActionOptions).execute();
                        VersionAction versionAction = response.getResult();
                        
                        System.out.println(versionAction);
                      • // Request models needed by this operation.
                        
                        // PrivateCertificateVersionActionRevokePrototype
                        const secretVersionActionPrototypeModel = {
                          action_type: 'private_cert_action_revoke_certificate',
                        };
                        
                        const params = {
                          secretId: secretIdForGetSecretLink,
                          id: secretVersionIdForGetSecretVersionLink,
                          secretVersionActionPrototype: secretVersionActionPrototypeModel,
                        };
                        
                        let res;
                        try {
                          res = await secretsManagerService.createSecretVersionAction(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • secret_version_action_prototype_model = {
                          'action_type': 'private_cert_action_revoke_certificate',
                        }
                        
                        response = secrets_manager_service.create_secret_version_action(
                          secret_id=secret_id_for_get_secret_link,
                          id=secret_version_id_for_get_secret_version_link,
                          secret_version_action_prototype=secret_version_action_prototype_model,
                        )
                        version_action = response.get_result()
                        
                        print(json.dumps(version_action, indent=2))
                      • secretVersionActionPrototypeModel := &secretsmanagerv2.PrivateCertificateVersionActionRevokePrototype{
                          ActionType: core.StringPtr("private_cert_action_revoke_certificate"),
                        }
                        
                        createSecretVersionActionOptions := secretsManagerService.NewCreateSecretVersionActionOptions(
                          secretIdForGetSecretLink,
                          secretVersionIdForGetSecretVersionLink,
                          secretVersionActionPrototypeModel,
                        )
                        
                        versionAction, response, err := secretsManagerService.CreateSecretVersionAction(createSecretVersionActionOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(versionAction, "", "  ")
                        fmt.Println(string(b))

                      Response

                      The request body to specify the properties of the action to create a secret version.

                      The response body to specify the properties of the action to revoke the private certificate.

                      The response body to specify the properties of the action to revoke the private certificate.

                      The response body to specify the properties of the action to revoke the private certificate.

                      The response body to specify the properties of the action to revoke the private certificate.

                      Status Code

                      • The version action was successfully created.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • Conflict

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • The request body of the action to revoke private certificate versions.

                        {
                          "action_type": "private_cert_action_revoke_certificate",
                          "revocation_time_seconds": 1667982994
                        }
                      • The request body of the action to revoke private certificate versions.

                        {
                          "action_type": "private_cert_action_revoke_certificate",
                          "revocation_time_seconds": 1667982994
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example Conflict error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 409,
                          "errors": [
                            {
                              "code": "conflict",
                              "message": "The request conflicts with the current state of the target resource",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example Conflict error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 409,
                          "errors": [
                            {
                              "code": "conflict",
                              "message": "The request conflicts with the current state of the target resource",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      List secrets and their locks

                      List the secrets and their locks in your Secrets Manager instance.

                      List the secrets and their locks in your Secrets Manager instance.

                      List the secrets and their locks in your Secrets Manager instance.

                      List the secrets and their locks in your Secrets Manager instance.

                      List the secrets and their locks in your Secrets Manager instance.

                      GET /api/v2/secrets_locks
                      ServiceCall<SecretsLocksPaginatedCollection> listSecretsLocks(ListSecretsLocksOptions listSecretsLocksOptions)
                      listSecretsLocks(params)
                      list_secrets_locks(
                              self,
                              *,
                              offset: Optional[int] = None,
                              limit: Optional[int] = None,
                              search: Optional[str] = None,
                              groups: Optional[List[str]] = None,
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) ListSecretsLocks(listSecretsLocksOptions *ListSecretsLocksOptions) (result *SecretsLocksPaginatedCollection, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) ListSecretsLocksWithContext(ctx context.Context, listSecretsLocksOptions *ListSecretsLocksOptions) (result *SecretsLocksPaginatedCollection, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.secrets-locks.list

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.secrets-locks.list

                      Request

                      Use the ListSecretsLocksOptions.Builder to create a ListSecretsLocksOptions object that contains the parameter values for the listSecretsLocks method.

                      Instantiate the ListSecretsLocksOptions struct and set the fields to provide parameter values for the ListSecretsLocks method.

                      Query Parameters

                      • The number of secrets to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

                        Usage: If you want to retrieve only the first 25 secrets in your instance, use ..?limit=25.

                        Possible values: 1 ≤ value ≤ 1000

                        Default: 200

                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                        Example: example

                      • Filter secrets by groups.

                        You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the default keyword.

                        Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use ..?groups={secret_group_ID},default.

                        Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$

                        Examples:
                        [
                          "default",
                          "cac40995-c37a-4dcb-9506-472869077634"
                        ]

                      The listSecretsLocks options.

                      parameters

                      • The number of secrets to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

                        Usage: If you want to retrieve only the first 25 secrets in your instance, use ..?limit=25.

                        Possible values: 1 ≤ value ≤ 1000

                        Default: 200

                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                        Examples:
                      • Filter secrets by groups.

                        You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the default keyword.

                        Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use ..?groups={secret_group_ID},default.

                        Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/

                        Examples:

                      parameters

                      • The number of secrets to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of secrets to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

                        Usage: If you want to retrieve only the first 25 secrets in your instance, use ..?limit=25.

                        Possible values: 1 ≤ value ≤ 1000

                        Default: 200

                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                        Examples:
                      • Filter secrets by groups.

                        You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets that are in the default secret group, use the default keyword.

                        Usage: To retrieve a list of secrets that are associated with an existing secret group or the default group, use ..?groups={secret_group_ID},default.

                        Possible values: 0 ≤ number of items ≤ 201, 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/

                        Examples:

                      WithContext method only

                      The ListSecretsLocks options.

                      • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets_locks?search=example&groups=default,cac40995-c37a-4dcb-9506-472869077634"
                      • ListSecretsLocksOptions listSecretsLocksOptions = new ListSecretsLocksOptions.Builder()
                          .limit(Long.valueOf("10"))
                          .search("example")
                          .groups(java.util.Arrays.asList("default", "cac40995-c37a-4dcb-9506-472869077634"))
                          .build();
                        
                        SecretsLocksPager pager = new SecretsLocksPager(secretsManagerService, listSecretsLocksOptions);
                        List<SecretLocks> allResults = new ArrayList<>();
                        while (pager.hasNext()) {
                          List<SecretLocks> nextPage = pager.getNext();
                          allResults.addAll(nextPage);
                        }
                        
                        System.out.println(GsonSingleton.getGson().toJson(allResults));
                      • const params = {
                          limit: 10,
                          search: 'example',
                          groups: ['default', 'cac40995-c37a-4dcb-9506-472869077634'],
                        };
                        
                        const allResults = [];
                        try {
                          const pager = new SecretsManagerV2.SecretsLocksPager(secretsManagerService, params);
                          while (pager.hasNext()) {
                            const nextPage = await pager.getNext();
                            expect(nextPage).not.toBeNull();
                            allResults.push(...nextPage);
                          }
                          console.log(JSON.stringify(allResults, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • all_results = []
                        pager = SecretsLocksPager(
                          client=secrets_manager_service,
                          limit=10,
                          search='example',
                          groups=['default', 'cac40995-c37a-4dcb-9506-472869077634'],
                        )
                        while pager.has_next():
                          next_page = pager.get_next()
                          assert next_page is not None
                          all_results.extend(next_page)
                        
                        print(json.dumps(all_results, indent=2))
                      • listSecretsLocksOptions := &secretsmanagerv2.ListSecretsLocksOptions{
                          Limit: core.Int64Ptr(int64(10)),
                          Search: core.StringPtr("example"),
                          Groups: []string{"default", "cac40995-c37a-4dcb-9506-472869077634"},
                        }
                        
                        pager, err := secretsManagerService.NewSecretsLocksPager(listSecretsLocksOptions)
                        if err != nil {
                          panic(err)
                        }
                        
                        var allResults []secretsmanagerv2.SecretLocks
                        for pager.HasNext() {
                          nextPage, err := pager.GetNext()
                          if err != nil {
                            panic(err)
                          }
                          allResults = append(allResults, nextPage...)
                        }
                        b, _ := json.MarshalIndent(allResults, "", "  ")
                        fmt.Println(string(b))

                      Response

                      Properties that describe a paginated collection of your secrets locks.

                      Properties that describe a paginated collection of your secrets locks.

                      Properties that describe a paginated collection of your secrets locks.

                      Properties that describe a paginated collection of your secrets locks.

                      Properties that describe a paginated collection of your secrets locks.

                      Status Code

                      • The list of secrets and their locks was successfully retrieved.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • Example response for listing all Secrets and locks

                        {
                          "secrets_locks": [
                            {
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_type": "imported_cert",
                              "secret_name": "example-imported-certificate",
                              "versions": [
                                {
                                  "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                                  "version_alias": "current",
                                  "locks": [
                                    "lock-example-1",
                                    "lock-example-2"
                                  ]
                                }
                              ]
                            }
                          ],
                          "first": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?limit=50"
                          },
                          "previous": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?offset=50&limit=50"
                          },
                          "last": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?offset=200&limit=50"
                          },
                          "limit": 50,
                          "next": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?offset=150&limit=50"
                          },
                          "offset": 100,
                          "total_count": 1
                        }
                      • Example response for listing all Secrets and locks

                        {
                          "secrets_locks": [
                            {
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_type": "imported_cert",
                              "secret_name": "example-imported-certificate",
                              "versions": [
                                {
                                  "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                                  "version_alias": "current",
                                  "locks": [
                                    "lock-example-1",
                                    "lock-example-2"
                                  ]
                                }
                              ]
                            }
                          ],
                          "first": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?limit=50"
                          },
                          "previous": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?offset=50&limit=50"
                          },
                          "last": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?offset=200&limit=50"
                          },
                          "limit": 50,
                          "next": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets_locks?offset=150&limit=50"
                          },
                          "offset": 100,
                          "total_count": 1
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      List secret locks

                      List the locks that are associated with a specified secret.

                      List the locks that are associated with a specified secret.

                      List the locks that are associated with a specified secret.

                      List the locks that are associated with a specified secret.

                      List the locks that are associated with a specified secret.

                      GET /api/v2/secrets/{id}/locks
                      ServiceCall<SecretLocksPaginatedCollection> listSecretLocks(ListSecretLocksOptions listSecretLocksOptions)
                      listSecretLocks(params)
                      list_secret_locks(
                              self,
                              id: str,
                              *,
                              offset: Optional[int] = None,
                              limit: Optional[int] = None,
                              sort: Optional[str] = None,
                              search: Optional[str] = None,
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) ListSecretLocks(listSecretLocksOptions *ListSecretLocksOptions) (result *SecretLocksPaginatedCollection, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) ListSecretLocksWithContext(ctx context.Context, listSecretLocksOptions *ListSecretLocksOptions) (result *SecretLocksPaginatedCollection, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.secret-locks.list

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.secret-locks.list

                      Request

                      Use the ListSecretLocksOptions.Builder to create a ListSecretLocksOptions object that contains the parameter values for the listSecretLocks method.

                      Instantiate the ListSecretLocksOptions struct and set the fields to provide parameter values for the ListSecretLocks method.

                      Path Parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                      Query Parameters

                      • The number of locks to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of locks with associated secret to retrieve. By default, list operations return the first 25 items. To retrieve a different set of items, use limit with offset to page through your available resources.

                        Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5, use ..?limit=5.

                        Possible values: 1 ≤ value ≤ 100

                        Default: 25

                      • Sort a collection of locks by the specified field in ascending order. To sort in descending order use the - character

                        Available values: created_at | updated_at | name

                        Usage: To sort a list of locks by their creation date, use ../locks?sort=created_at.

                        Possible values: 4 ≤ length ≤ 17, Value must match regular expression ^-?(created_at|updated_at|name)$

                        Example: name

                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                        Example: example

                      The listSecretLocks options.

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The number of locks to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of locks with associated secret to retrieve. By default, list operations return the first 25 items. To retrieve a different set of items, use limit with offset to page through your available resources.

                        Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5, use ..?limit=5.

                        Possible values: 1 ≤ value ≤ 100

                        Default: 25

                      • Sort a collection of locks by the specified field in ascending order. To sort in descending order use the - character

                        Available values: created_at | updated_at | name

                        Usage: To sort a list of locks by their creation date, use ../locks?sort=created_at.

                        Possible values: 4 ≤ length ≤ 17, Value must match regular expression /^-?(created_at|updated_at|name)$/

                        Examples:
                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                        Examples:

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The number of locks to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of locks with associated secret to retrieve. By default, list operations return the first 25 items. To retrieve a different set of items, use limit with offset to page through your available resources.

                        Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5, use ..?limit=5.

                        Possible values: 1 ≤ value ≤ 100

                        Default: 25

                      • Sort a collection of locks by the specified field in ascending order. To sort in descending order use the - character

                        Available values: created_at | updated_at | name

                        Usage: To sort a list of locks by their creation date, use ../locks?sort=created_at.

                        Possible values: 4 ≤ length ≤ 17, Value must match regular expression /^-?(created_at|updated_at|name)$/

                        Examples:
                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                        Examples:

                      WithContext method only

                      The ListSecretLocks options.

                      • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${id}/locks?sort=name&search=example"
                      • ListSecretLocksOptions listSecretLocksOptions = new ListSecretLocksOptions.Builder()
                          .id(secretIdForGetSecretLink)
                          .limit(Long.valueOf("10"))
                          .sort("name")
                          .search("example")
                          .build();
                        
                        SecretLocksPager pager = new SecretLocksPager(secretsManagerService, listSecretLocksOptions);
                        List<SecretLock> allResults = new ArrayList<>();
                        while (pager.hasNext()) {
                          List<SecretLock> nextPage = pager.getNext();
                          allResults.addAll(nextPage);
                        }
                        
                        System.out.println(GsonSingleton.getGson().toJson(allResults));
                      • const params = {
                          id: secretIdForGetSecretLink,
                          limit: 10,
                          sort: 'name',
                          search: 'example',
                        };
                        
                        const allResults = [];
                        try {
                          const pager = new SecretsManagerV2.SecretLocksPager(secretsManagerService, params);
                          while (pager.hasNext()) {
                            const nextPage = await pager.getNext();
                            expect(nextPage).not.toBeNull();
                            allResults.push(...nextPage);
                          }
                          console.log(JSON.stringify(allResults, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • all_results = []
                        pager = SecretLocksPager(
                          client=secrets_manager_service,
                          id=secret_id_for_get_secret_link,
                          limit=10,
                          sort='name',
                          search='example',
                        )
                        while pager.has_next():
                          next_page = pager.get_next()
                          assert next_page is not None
                          all_results.extend(next_page)
                        
                        print(json.dumps(all_results, indent=2))
                      • listSecretLocksOptions := &secretsmanagerv2.ListSecretLocksOptions{
                          ID: &secretIdForGetSecretLink,
                          Limit: core.Int64Ptr(int64(10)),
                          Sort: core.StringPtr("name"),
                          Search: core.StringPtr("example"),
                        }
                        
                        pager, err := secretsManagerService.NewSecretLocksPager(listSecretLocksOptions)
                        if err != nil {
                          panic(err)
                        }
                        
                        var allResults []secretsmanagerv2.SecretLock
                        for pager.HasNext() {
                          nextPage, err := pager.GetNext()
                          if err != nil {
                            panic(err)
                          }
                          allResults = append(allResults, nextPage...)
                        }
                        b, _ := json.MarshalIndent(allResults, "", "  ")
                        fmt.Println(string(b))

                      Response

                      Properties that describe a paginated collection of your secret locks.

                      Properties that describe a paginated collection of your secret locks.

                      Properties that describe a paginated collection of your secret locks.

                      Properties that describe a paginated collection of your secret locks.

                      Properties that describe a paginated collection of your secret locks.

                      Status Code

                      • The locks were successfully retrieved.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • Example of response body for listing secret locks

                        {
                          "first": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?limit=50"
                          },
                          "previous": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?offset=50&limit=50"
                          },
                          "limit": 50,
                          "last": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?offset=200&limit=50"
                          },
                          "locks": [
                            {
                              "attributes": {
                                "key": "value"
                              },
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "description": "Lock for consumer 1.",
                              "name": "lock-example-1",
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "secret_version_alias": "current",
                              "updated_at": "2022-10-05T21:33:11Z"
                            },
                            {
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "description": "Lock for consumer 2.",
                              "name": "lock-example-2",
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "secret_version_alias": "current",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          ],
                          "next": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?offset=150&limit=50"
                          },
                          "offset": 100,
                          "total_count": 2
                        }
                      • Example of response body for listing secret locks

                        {
                          "first": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?limit=50"
                          },
                          "previous": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?offset=50&limit=50"
                          },
                          "limit": 50,
                          "last": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?offset=200&limit=50"
                          },
                          "locks": [
                            {
                              "attributes": {
                                "key": "value"
                              },
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "description": "Lock for consumer 1.",
                              "name": "lock-example-1",
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "secret_version_alias": "current",
                              "updated_at": "2022-10-05T21:33:11Z"
                            },
                            {
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "description": "Lock for consumer 2.",
                              "name": "lock-example-2",
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "secret_version_alias": "current",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          ],
                          "next": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/locks?offset=150&limit=50"
                          },
                          "offset": 100,
                          "total_count": 2
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      Create secret locks

                      Create a lock on the current version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.\n
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the current version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.\n
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the current version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.\n
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the current version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.\n
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the current version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.\n
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.
                      POST /api/v2/secrets/{id}/locks_bulk
                      ServiceCall<SecretLocks> createSecretLocksBulk(CreateSecretLocksBulkOptions createSecretLocksBulkOptions)
                      createSecretLocksBulk(params)
                      create_secret_locks_bulk(
                              self,
                              id: str,
                              locks: List['SecretLockPrototype'],
                              *,
                              mode: Optional[str] = None,
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) CreateSecretLocksBulk(createSecretLocksBulkOptions *CreateSecretLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) CreateSecretLocksBulkWithContext(ctx context.Context, createSecretLocksBulkOptions *CreateSecretLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.secret-locks.create

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.secret-locks.create

                      Request

                      Use the CreateSecretLocksBulkOptions.Builder to create a CreateSecretLocksBulkOptions object that contains the parameter values for the createSecretLocksBulk method.

                      Instantiate the CreateSecretLocksBulkOptions struct and set the fields to provide parameter values for the CreateSecretLocksBulk method.

                      Path Parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                      Query Parameters

                      • An optional lock mode. When you create a lock, you can set one of the following modes to clear any matching locks on a secret version.

                        • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret. - remove_previous_and_delete: Completes the same action as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                        Allowable values: [remove_previous,remove_previous_and_delete]

                      The request body to create secret locks.

                      Examples:

                      Example of request body to create secret locks

                      {
                        "locks": [
                          {
                            "name": "lock-example-1",
                            "description": "lock for consumer 1",
                            "attributes": {
                              "key": "value"
                            }
                          },
                          {
                            "name": "lock-example-2",
                            "description": "lock for consumer 2",
                            "attributes": {
                              "key": "value"
                            }
                          }
                        ]
                      }

                      The createSecretLocksBulk options.

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The locks data to be attached to a secret version.

                        Possible values: 0 ≤ number of items ≤ 1000

                        Examples:
                      • An optional lock mode. When you create a lock, you can set one of the following modes to clear any matching locks on a secret version.

                        • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret. - remove_previous_and_delete: Completes the same action as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                        Allowable values: [remove_previous,remove_previous_and_delete]

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The locks data to be attached to a secret version.

                        Possible values: 0 ≤ number of items ≤ 1000

                        Examples:
                      • An optional lock mode. When you create a lock, you can set one of the following modes to clear any matching locks on a secret version.

                        • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret. - remove_previous_and_delete: Completes the same action as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                        Allowable values: [remove_previous,remove_previous_and_delete]

                      WithContext method only

                      The CreateSecretLocksBulk options.

                      • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "locks": [ { "name": "lock-example-1", "description": "lock for consumer 1", "attributes": { "key": "value" } }, { "name": "lock-example-2", "description": "lock for consumer 2", "attributes": { "key": "value" } } ] }'   "${base_url}/api/v2/secrets/${id}/locks_bulk"
                      • SecretLockPrototype secretLockPrototypeModel = new SecretLockPrototype.Builder()
                          .name("lock-example-1")
                          .description("lock for consumer 1")
                          .build();
                        CreateSecretLocksBulkOptions createSecretLocksBulkOptions = new CreateSecretLocksBulkOptions.Builder()
                          .id(secretIdForGetSecretLink)
                          .locks(java.util.Arrays.asList(secretLockPrototypeModel))
                          .build();
                        
                        Response<SecretLocks> response = secretsManagerService.createSecretLocksBulk(createSecretLocksBulkOptions).execute();
                        SecretLocks secretLocks = response.getResult();
                        
                        System.out.println(secretLocks);
                      • // Request models needed by this operation.
                        
                        // SecretLockPrototype
                        const secretLockPrototypeModel = {
                          name: 'lock-example-1',
                          description: 'lock for consumer 1',
                          attributes: { key: 'value' },
                        };
                        
                        const params = {
                          id: secretIdForGetSecretLink,
                          locks: [secretLockPrototypeModel],
                        };
                        
                        let res;
                        try {
                          res = await secretsManagerService.createSecretLocksBulk(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • secret_lock_prototype_model = {
                          'name': 'lock-example-1',
                          'description': 'lock for consumer 1',
                          'attributes': {'key': 'value'},
                        }
                        
                        response = secrets_manager_service.create_secret_locks_bulk(
                          id=secret_id_for_get_secret_link,
                          locks=[secret_lock_prototype_model],
                        )
                        secret_locks = response.get_result()
                        
                        print(json.dumps(secret_locks, indent=2))
                      • secretLockPrototypeModel := &secretsmanagerv2.SecretLockPrototype{
                          Name: core.StringPtr("lock-example-1"),
                          Description: core.StringPtr("lock for consumer 1"),
                        }
                        
                        createSecretLocksBulkOptions := secretsManagerService.NewCreateSecretLocksBulkOptions(
                          secretIdForGetSecretLink,
                          []secretsmanagerv2.SecretLockPrototype{*secretLockPrototypeModel},
                        )
                        
                        secretLocks, response, err := secretsManagerService.CreateSecretLocksBulk(createSecretLocksBulkOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(secretLocks, "", "  ")
                        fmt.Println(string(b))

                      Response

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Status Code

                      • Secret locks were successfully created.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      Delete secret locks

                      Delete all the locks or a subset of the locks that are associated with a version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after you remove all of its locks. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with a version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after you remove all of its locks. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with a version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after you remove all of its locks. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with a version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after you remove all of its locks. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with a version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after you remove all of its locks. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      DELETE /api/v2/secrets/{id}/locks_bulk
                      ServiceCall<SecretLocks> deleteSecretLocksBulk(DeleteSecretLocksBulkOptions deleteSecretLocksBulkOptions)
                      deleteSecretLocksBulk(params)
                      delete_secret_locks_bulk(
                              self,
                              id: str,
                              *,
                              name: Optional[List[str]] = None,
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) DeleteSecretLocksBulk(deleteSecretLocksBulkOptions *DeleteSecretLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) DeleteSecretLocksBulkWithContext(ctx context.Context, deleteSecretLocksBulkOptions *DeleteSecretLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.secret-locks.delete

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.secret-locks.delete

                      Request

                      Use the DeleteSecretLocksBulkOptions.Builder to create a DeleteSecretLocksBulkOptions object that contains the parameter values for the deleteSecretLocksBulk method.

                      Instantiate the DeleteSecretLocksBulkOptions struct and set the fields to provide parameter values for the DeleteSecretLocksBulk method.

                      Path Parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                      Query Parameters

                      • Specify the names of the secret locks to be deleted.

                        Possible values: 1 ≤ number of items ≤ 1000, 2 ≤ length ≤ 64, Value must match regular expression ^[a-zA-Z]{1}[a-zA-Z0-9-_.]{1,63}$

                        Examples:
                        [
                          "lock-example-1"
                        ]

                      The deleteSecretLocksBulk options.

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • Specify the names of the secret locks to be deleted.

                        Possible values: 1 ≤ number of items ≤ 1000, 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z]{1}[a-zA-Z0-9-_.]{1,63}$/

                        Examples:

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • Specify the names of the secret locks to be deleted.

                        Possible values: 1 ≤ number of items ≤ 1000, 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z]{1}[a-zA-Z0-9-_.]{1,63}$/

                        Examples:

                      WithContext method only

                      The DeleteSecretLocksBulk options.

                      • curl -X DELETE --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${id}/locks_bulk?name=lock-example-1"
                      • DeleteSecretLocksBulkOptions deleteSecretLocksBulkOptions = new DeleteSecretLocksBulkOptions.Builder()
                          .id(secretIdForGetSecretLink)
                          .name(java.util.Arrays.asList("lock-example-1"))
                          .build();
                        
                        Response<SecretLocks> response = secretsManagerService.deleteSecretLocksBulk(deleteSecretLocksBulkOptions).execute();
                        SecretLocks secretLocks = response.getResult();
                        
                        System.out.println(secretLocks);
                      • const params = {
                          id: secretIdForGetSecretLink,
                          name: ['lock-example-1'],
                        };
                        
                        let res;
                        try {
                          res = await secretsManagerService.deleteSecretLocksBulk(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • response = secrets_manager_service.delete_secret_locks_bulk(
                          id=secret_id_for_get_secret_link,
                          name=['lock-example-1'],
                        )
                        secret_locks = response.get_result()
                        
                        print(json.dumps(secret_locks, indent=2))
                      • deleteSecretLocksBulkOptions := secretsManagerService.NewDeleteSecretLocksBulkOptions(
                          secretIdForGetSecretLink,
                        )
                        deleteSecretLocksBulkOptions.SetName([]string{"lock-example-1"})
                        
                        secretLocks, response, err := secretsManagerService.DeleteSecretLocksBulk(deleteSecretLocksBulkOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(secretLocks, "", "  ")
                        fmt.Println(string(b))

                      Response

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Status Code

                      • The locks were deleted successfully.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      List secret version locks

                      List the locks that are associated with a specified secret version.

                      List the locks that are associated with a specified secret version.

                      List the locks that are associated with a specified secret version.

                      List the locks that are associated with a specified secret version.

                      List the locks that are associated with a specified secret version.

                      GET /api/v2/secrets/{secret_id}/versions/{id}/locks
                      ServiceCall<SecretVersionLocksPaginatedCollection> listSecretVersionLocks(ListSecretVersionLocksOptions listSecretVersionLocksOptions)
                      listSecretVersionLocks(params)
                      list_secret_version_locks(
                              self,
                              secret_id: str,
                              id: str,
                              *,
                              offset: Optional[int] = None,
                              limit: Optional[int] = None,
                              sort: Optional[str] = None,
                              search: Optional[str] = None,
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) ListSecretVersionLocks(listSecretVersionLocksOptions *ListSecretVersionLocksOptions) (result *SecretVersionLocksPaginatedCollection, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) ListSecretVersionLocksWithContext(ctx context.Context, listSecretVersionLocksOptions *ListSecretVersionLocksOptions) (result *SecretVersionLocksPaginatedCollection, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.secret-version-locks.list

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.secret-versions-locks.list

                      Request

                      Use the ListSecretVersionLocksOptions.Builder to create a ListSecretVersionLocksOptions object that contains the parameter values for the listSecretVersionLocks method.

                      Instantiate the ListSecretVersionLocksOptions struct and set the fields to provide parameter values for the ListSecretVersionLocks method.

                      Path Parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                        Example: eb4cf24d-9cae-424b-945e-159788a5f535

                      Query Parameters

                      • The number of locks to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of locks with associated secret to retrieve. By default, list operations return the first 25 items. To retrieve a different set of items, use limit with offset to page through your available resources.

                        Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5, use ..?limit=5.

                        Possible values: 1 ≤ value ≤ 100

                        Default: 25

                      • Sort a collection of locks by the specified field in ascending order. To sort in descending order use the - character

                        Available values: created_at | updated_at | name

                        Usage: To sort a list of locks by their creation date, use ../locks?sort=created_at.

                        Possible values: 4 ≤ length ≤ 17, Value must match regular expression ^-?(created_at|updated_at|name)$

                        Example: name

                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                        Example: example

                      The listSecretVersionLocks options.

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                        Examples:
                      • The number of locks to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of locks with associated secret to retrieve. By default, list operations return the first 25 items. To retrieve a different set of items, use limit with offset to page through your available resources.

                        Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5, use ..?limit=5.

                        Possible values: 1 ≤ value ≤ 100

                        Default: 25

                      • Sort a collection of locks by the specified field in ascending order. To sort in descending order use the - character

                        Available values: created_at | updated_at | name

                        Usage: To sort a list of locks by their creation date, use ../locks?sort=created_at.

                        Possible values: 4 ≤ length ≤ 17, Value must match regular expression /^-?(created_at|updated_at|name)$/

                        Examples:
                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                        Examples:

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                        Examples:
                      • The number of locks to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                        Usage: If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use ..?offset=25&limit=25.

                        Possible values: value ≥ 0

                        Default: 0

                      • The number of locks with associated secret to retrieve. By default, list operations return the first 25 items. To retrieve a different set of items, use limit with offset to page through your available resources.

                        Usage: If you have 20 secrets in your instance, and you want to retrieve only the first 5, use ..?limit=5.

                        Possible values: 1 ≤ value ≤ 100

                        Default: 25

                      • Sort a collection of locks by the specified field in ascending order. To sort in descending order use the - character

                        Available values: created_at | updated_at | name

                        Usage: To sort a list of locks by their creation date, use ../locks?sort=created_at.

                        Possible values: 4 ≤ length ≤ 17, Value must match regular expression /^-?(created_at|updated_at|name)$/

                        Examples:
                      • Filter locks that contain the specified string in the field "name".

                        Usage: If you want to list only the locks that contain the string "text" in the field "name", use ..?search=text.

                        Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                        Examples:

                      WithContext method only

                      The ListSecretVersionLocks options.

                      • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}/locks?sort=name&search=example"
                      • ListSecretVersionLocksOptions listSecretVersionLocksOptions = new ListSecretVersionLocksOptions.Builder()
                          .secretId(secretIdForGetSecretLink)
                          .id(secretVersionIdForGetSecretVersionLink)
                          .limit(Long.valueOf("10"))
                          .sort("name")
                          .search("example")
                          .build();
                        
                        SecretVersionLocksPager pager = new SecretVersionLocksPager(secretsManagerService, listSecretVersionLocksOptions);
                        List<SecretLock> allResults = new ArrayList<>();
                        while (pager.hasNext()) {
                          List<SecretLock> nextPage = pager.getNext();
                          allResults.addAll(nextPage);
                        }
                        
                        System.out.println(GsonSingleton.getGson().toJson(allResults));
                      • const params = {
                          secretId: secretIdForGetSecretLink,
                          id: secretVersionIdForGetSecretVersionLink,
                          limit: 10,
                          sort: 'name',
                          search: 'example',
                        };
                        
                        const allResults = [];
                        try {
                          const pager = new SecretsManagerV2.SecretVersionLocksPager(secretsManagerService, params);
                          while (pager.hasNext()) {
                            const nextPage = await pager.getNext();
                            expect(nextPage).not.toBeNull();
                            allResults.push(...nextPage);
                          }
                          console.log(JSON.stringify(allResults, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • all_results = []
                        pager = SecretVersionLocksPager(
                          client=secrets_manager_service,
                          secret_id=secret_id_for_get_secret_link,
                          id=secret_version_id_for_get_secret_version_link,
                          limit=10,
                          sort='name',
                          search='example',
                        )
                        while pager.has_next():
                          next_page = pager.get_next()
                          assert next_page is not None
                          all_results.extend(next_page)
                        
                        print(json.dumps(all_results, indent=2))
                      • listSecretVersionLocksOptions := &secretsmanagerv2.ListSecretVersionLocksOptions{
                          SecretID: &secretIdForGetSecretLink,
                          ID: &secretVersionIdForGetSecretVersionLink,
                          Limit: core.Int64Ptr(int64(10)),
                          Sort: core.StringPtr("name"),
                          Search: core.StringPtr("example"),
                        }
                        
                        pager, err := secretsManagerService.NewSecretVersionLocksPager(listSecretVersionLocksOptions)
                        if err != nil {
                          panic(err)
                        }
                        
                        var allResults []secretsmanagerv2.SecretLock
                        for pager.HasNext() {
                          nextPage, err := pager.GetNext()
                          if err != nil {
                            panic(err)
                          }
                          allResults = append(allResults, nextPage...)
                        }
                        b, _ := json.MarshalIndent(allResults, "", "  ")
                        fmt.Println(string(b))

                      Response

                      Properties that describe a paginated collection of your secret version locks.

                      Properties that describe a paginated collection of your secret version locks.

                      Properties that describe a paginated collection of your secret version locks.

                      Properties that describe a paginated collection of your secret version locks.

                      Properties that describe a paginated collection of your secret version locks.

                      Status Code

                      • Locks were successfully retrieved.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • Example response for listing secret version locks

                        {
                          "first": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?limit=50"
                          },
                          "previous": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?offset=50&limit=50"
                          },
                          "last": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?offset=200&limit=50"
                          },
                          "limit": 50,
                          "locks": [
                            {
                              "attributes": {
                                "key": "value"
                              },
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "description": "lock for consumer 1.",
                              "name": "lock-example-1",
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_version_alias": "current",
                              "secret_version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          ],
                          "next": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?offset=150&limit=50"
                          },
                          "offset": 100,
                          "total_count": 1
                        }
                      • Example response for listing secret version locks

                        {
                          "first": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?limit=50"
                          },
                          "previous": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?offset=50&limit=50"
                          },
                          "last": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?offset=200&limit=50"
                          },
                          "limit": 50,
                          "locks": [
                            {
                              "attributes": {
                                "key": "value"
                              },
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "description": "lock for consumer 1.",
                              "name": "lock-example-1",
                              "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                              "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                              "secret_version_alias": "current",
                              "secret_version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          ],
                          "next": {
                            "href": "https://us-south.secrets-maanger.cloud.ibm.com/88b75b20-aa21-4174-85c9-1feb3cc93c9a/api/v2/secrets/0cf4addb-7a90-410b-a3a7-a15bbe2b7909/versions/7bf3814d-58f8-4df8-9cbd-f6860e4ca973/locks?offset=150&limit=50"
                          },
                          "offset": 100,
                          "total_count": 1
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      Create secret version locks

                      Create a lock on the specified version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the specified version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the specified version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the specified version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                      Create a lock on the specified version of a secret.

                      A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists. Additionally, you can use this operation to clear any matching locks on a secret by using one of the following optional lock modes:

                      • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret.
                      • remove_previous_and_delete: Carries out the same function as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.
                      POST /api/v2/secrets/{secret_id}/versions/{id}/locks_bulk
                      ServiceCall<SecretLocks> createSecretVersionLocksBulk(CreateSecretVersionLocksBulkOptions createSecretVersionLocksBulkOptions)
                      createSecretVersionLocksBulk(params)
                      create_secret_version_locks_bulk(
                              self,
                              secret_id: str,
                              id: str,
                              locks: List['SecretLockPrototype'],
                              *,
                              mode: Optional[str] = None,
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) CreateSecretVersionLocksBulk(createSecretVersionLocksBulkOptions *CreateSecretVersionLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) CreateSecretVersionLocksBulkWithContext(ctx context.Context, createSecretVersionLocksBulkOptions *CreateSecretVersionLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.secret-version-locks.create

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.secret-version-locks.create

                      Request

                      Use the CreateSecretVersionLocksBulkOptions.Builder to create a CreateSecretVersionLocksBulkOptions object that contains the parameter values for the createSecretVersionLocksBulk method.

                      Instantiate the CreateSecretVersionLocksBulkOptions struct and set the fields to provide parameter values for the CreateSecretVersionLocksBulk method.

                      Path Parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                        Example: eb4cf24d-9cae-424b-945e-159788a5f535

                      Query Parameters

                      • An optional lock mode. When you create a lock, you can set one of the following modes to clear any matching locks on a secret version.

                        • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret. - remove_previous_and_delete: Completes the same action as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                        Allowable values: [remove_previous,remove_previous_and_delete]

                      The request body to create secret locks.

                      Examples:

                      Example of request body to create secret locks

                      {
                        "locks": [
                          {
                            "name": "lock-example-1",
                            "description": "lock for consumer 1",
                            "attributes": {
                              "key": "value"
                            }
                          },
                          {
                            "name": "lock-example-2",
                            "description": "lock for consumer 2",
                            "attributes": {
                              "key": "value"
                            }
                          }
                        ]
                      }

                      The createSecretVersionLocksBulk options.

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                        Examples:
                      • The locks data to be attached to a secret version.

                        Possible values: 0 ≤ number of items ≤ 1000

                        Examples:
                      • An optional lock mode. When you create a lock, you can set one of the following modes to clear any matching locks on a secret version.

                        • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret. - remove_previous_and_delete: Completes the same action as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                        Allowable values: [remove_previous,remove_previous_and_delete]

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                        Examples:
                      • The locks data to be attached to a secret version.

                        Possible values: 0 ≤ number of items ≤ 1000

                        Examples:
                      • An optional lock mode. When you create a lock, you can set one of the following modes to clear any matching locks on a secret version.

                        • remove_previous: Removes any other locks with matching names if they are found in the previous version of the secret. - remove_previous_and_delete: Completes the same action as remove_previous, but also permanently deletes the data of the previous secret version if it doesn't have any locks.

                        Allowable values: [remove_previous,remove_previous_and_delete]

                      WithContext method only

                      The CreateSecretVersionLocksBulk options.

                      • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "locks": [ { "name": "lock-example-1", "description": "lock for consumer 1", "attributes": { "key": "value" } }, { "name": "lock-example-2", "description": "lock for consumer 2", "attributes": { "key": "value" } } ] }'   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}/locks_bulk"
                      • SecretLockPrototype secretLockPrototypeModel = new SecretLockPrototype.Builder()
                          .name("lock-example-1")
                          .description("lock for consumer 1")
                          .build();
                        CreateSecretVersionLocksBulkOptions createSecretVersionLocksBulkOptions = new CreateSecretVersionLocksBulkOptions.Builder()
                          .secretId(secretIdForGetSecretLink)
                          .id(secretVersionIdForGetSecretVersionLink)
                          .locks(java.util.Arrays.asList(secretLockPrototypeModel))
                          .build();
                        
                        Response<SecretLocks> response = secretsManagerService.createSecretVersionLocksBulk(createSecretVersionLocksBulkOptions).execute();
                        SecretLocks secretLocks = response.getResult();
                        
                        System.out.println(secretLocks);
                      • // Request models needed by this operation.
                        
                        // SecretLockPrototype
                        const secretLockPrototypeModel = {
                          name: 'lock-example-1',
                          description: 'lock for consumer 1',
                          attributes: { key: 'value' },
                        };
                        
                        const params = {
                          secretId: secretIdForGetSecretLink,
                          id: secretVersionIdForGetSecretVersionLink,
                          locks: [secretLockPrototypeModel],
                        };
                        
                        let res;
                        try {
                          res = await secretsManagerService.createSecretVersionLocksBulk(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • secret_lock_prototype_model = {
                          'name': 'lock-example-1',
                          'description': 'lock for consumer 1',
                          'attributes': {'key': 'value'},
                        }
                        
                        response = secrets_manager_service.create_secret_version_locks_bulk(
                          secret_id=secret_id_for_get_secret_link,
                          id=secret_version_id_for_get_secret_version_link,
                          locks=[secret_lock_prototype_model],
                        )
                        secret_locks = response.get_result()
                        
                        print(json.dumps(secret_locks, indent=2))
                      • secretLockPrototypeModel := &secretsmanagerv2.SecretLockPrototype{
                          Name: core.StringPtr("lock-example-1"),
                          Description: core.StringPtr("lock for consumer 1"),
                        }
                        
                        createSecretVersionLocksBulkOptions := secretsManagerService.NewCreateSecretVersionLocksBulkOptions(
                          secretIdForGetSecretLink,
                          secretVersionIdForGetSecretVersionLink,
                          []secretsmanagerv2.SecretLockPrototype{*secretLockPrototypeModel},
                        )
                        
                        secretLocks, response, err := secretsManagerService.CreateSecretVersionLocksBulk(createSecretVersionLocksBulkOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(secretLocks, "", "  ")
                        fmt.Println(string(b))

                      Response

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Status Code

                      • Secret locks were successfully created.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      Delete locks on a secret version

                      Delete all the locks or a subset of the locks that are associated with the specified version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after all of its locks are removed. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with the specified version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after all of its locks are removed. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with the specified version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after all of its locks are removed. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with the specified version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after all of its locks are removed. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      Delete all the locks or a subset of the locks that are associated with the specified version of a secret.

                      To delete only a subset of the locks, add a query param with a comma to separate the list of lock names:

                      Example: ?name=lock-example-1,lock-example-2.

                      Note: A secret is considered unlocked and able to be deleted only after all of its locks are removed. To determine whether a secret contains locks, check the locks_total field that is returned as part of the metadata of your secret.

                      DELETE /api/v2/secrets/{secret_id}/versions/{id}/locks_bulk
                      ServiceCall<SecretLocks> deleteSecretVersionLocksBulk(DeleteSecretVersionLocksBulkOptions deleteSecretVersionLocksBulkOptions)
                      deleteSecretVersionLocksBulk(params)
                      delete_secret_version_locks_bulk(
                              self,
                              secret_id: str,
                              id: str,
                              *,
                              name: Optional[List[str]] = None,
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) DeleteSecretVersionLocksBulk(deleteSecretVersionLocksBulkOptions *DeleteSecretVersionLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) DeleteSecretVersionLocksBulkWithContext(ctx context.Context, deleteSecretVersionLocksBulkOptions *DeleteSecretVersionLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.secret-version-locks.delete

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.secret-version-locks.delete

                      Request

                      Use the DeleteSecretVersionLocksBulkOptions.Builder to create a DeleteSecretVersionLocksBulkOptions object that contains the parameter values for the deleteSecretVersionLocksBulk method.

                      Instantiate the DeleteSecretVersionLocksBulkOptions struct and set the fields to provide parameter values for the DeleteSecretVersionLocksBulk method.

                      Path Parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

                        Example: 0b5571f7-21e6-42b7-91c5-3f5ac9793a46

                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$

                        Example: eb4cf24d-9cae-424b-945e-159788a5f535

                      Query Parameters

                      • Specify the names of the secret locks to be deleted.

                        Possible values: 1 ≤ number of items ≤ 1000, 2 ≤ length ≤ 64, Value must match regular expression ^[a-zA-Z]{1}[a-zA-Z0-9-_.]{1,63}$

                        Examples:
                        [
                          "lock-example-1"
                        ]

                      The deleteSecretVersionLocksBulk options.

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                        Examples:
                      • Specify the names of the secret locks to be deleted.

                        Possible values: 1 ≤ number of items ≤ 1000, 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z]{1}[a-zA-Z0-9-_.]{1,63}$/

                        Examples:

                      parameters

                      • The v4 UUID that uniquely identifies your secret.

                        Possible values: length = 36, Value must match regular expression /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/

                        Examples:
                      • The v4 UUID that uniquely identifies your secret version. You can use the current or previous aliases to refer to the current or previous secret version.

                        Possible values: 7 ≤ length ≤ 36, Value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|current|previous)$/

                        Examples:
                      • Specify the names of the secret locks to be deleted.

                        Possible values: 1 ≤ number of items ≤ 1000, 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z]{1}[a-zA-Z0-9-_.]{1,63}$/

                        Examples:

                      WithContext method only

                      The DeleteSecretVersionLocksBulk options.

                      • curl -X DELETE --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/secrets/${secret_id}/versions/${id}/locks_bulk?name=lock-example-1"
                      • DeleteSecretVersionLocksBulkOptions deleteSecretVersionLocksBulkOptions = new DeleteSecretVersionLocksBulkOptions.Builder()
                          .secretId(secretIdForGetSecretLink)
                          .id(secretVersionIdForGetSecretVersionLink)
                          .name(java.util.Arrays.asList("lock-example-1"))
                          .build();
                        
                        Response<SecretLocks> response = secretsManagerService.deleteSecretVersionLocksBulk(deleteSecretVersionLocksBulkOptions).execute();
                        SecretLocks secretLocks = response.getResult();
                        
                        System.out.println(secretLocks);
                      • const params = {
                          secretId: secretIdForGetSecretLink,
                          id: secretVersionIdForGetSecretVersionLink,
                          name: ['lock-example-1'],
                        };
                        
                        let res;
                        try {
                          res = await secretsManagerService.deleteSecretVersionLocksBulk(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • response = secrets_manager_service.delete_secret_version_locks_bulk(
                          secret_id=secret_id_for_get_secret_link,
                          id=secret_version_id_for_get_secret_version_link,
                          name=['lock-example-1'],
                        )
                        secret_locks = response.get_result()
                        
                        print(json.dumps(secret_locks, indent=2))
                      • deleteSecretVersionLocksBulkOptions := secretsManagerService.NewDeleteSecretVersionLocksBulkOptions(
                          secretIdForGetSecretLink,
                          secretVersionIdForGetSecretVersionLink,
                        )
                        deleteSecretVersionLocksBulkOptions.SetName([]string{"lock-example-1"})
                        
                        secretLocks, response, err := secretsManagerService.DeleteSecretVersionLocksBulk(deleteSecretVersionLocksBulkOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(secretLocks, "", "  ")
                        fmt.Println(string(b))

                      Response

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Create locks response body containing a collection of locks that are attached to a secret.

                      Status Code

                      • The locks were deleted successfully.

                      • BadRequest

                      • Unauthorized

                      • PaymentRequired

                      • Forbidden

                      • The specified resource was not found

                      • InternalServerError

                      • BadGatewayError

                      • ServiceUnavailableError

                      Example responses
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of response body to create secret locks

                        {
                          "secret_id": "0cf4addb-7a90-410b-a3a7-a15bbe2b7909",
                          "secret_group_id": "d8371728-95c8-4c12-b2af-1af98adb9e41",
                          "versions": [
                            {
                              "version_id": "7bf3814d-58f8-4df8-9cbd-f6860e4ca973",
                              "version_alias": "current",
                              "locks": [
                                "lock-3",
                                "lock-4"
                              ],
                              "payload_available": true
                            },
                            {
                              "version_id": "5bf89b0c-df55-c8d5-7ad6-8816951c6784",
                              "version_alias": "previous",
                              "locks": [
                                "lock-example-1",
                                "lock-example-2"
                              ],
                              "payload_available": true
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad request error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 400,
                          "errors": [
                            {
                              "code": "bad_request",
                              "message": "required.name:property \"name\" is missing",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of unauthorized error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 401,
                          "errors": [
                            {
                              "code": "unauthorized",
                              "message": "You provided no credentials or invalid credentials.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of payment required error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 402,
                          "errors": [
                            {
                              "code": "payment_required",
                              "message": "Your Trial plan is now expired.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of forbidden error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 403,
                          "errors": [
                            {
                              "code": "access_forbidden",
                              "message": "You are not allowed to access this resource.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of NotFound error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 404,
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of internal server error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 500,
                          "errors": [
                            {
                              "code": "internal_server_error",
                              "message": "Internal server error",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of bad gateway error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 502,
                          "errors": [
                            {
                              "code": "bad_gateway",
                              "message": "Bad Gateway",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }
                      • Example of service unavailable error

                        {
                          "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                          "status_code": 503,
                          "errors": [
                            {
                              "code": "service_unavailable",
                              "message": "Service Unavailable",
                              "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                            }
                          ]
                        }

                      Create a new configuration

                      Add a configuration to the specified secret type.

                      Use this operation to define the configurations that are required to create public certificates (public_cert), private certificates (private_cert) and IAM Credentials secrets (iam_credentials).

                      You can add multiple configurations for your instance as follows:

                      • A single configuration for IAM Credentials.
                      • Up to 10 CA configurations for public certificates.
                      • Up to 10 DNS configurations for public certificates.
                      • Up to 10 Root CA configurations for private certificates.
                      • Up to 10 Intermediate CA configurations for private certificates.
                      • Up to 10 Certificate Template configurations for private certificates.

                      Add a configuration to the specified secret type.

                      Use this operation to define the configurations that are required to create public certificates (public_cert), private certificates (private_cert) and IAM Credentials secrets (iam_credentials).

                      You can add multiple configurations for your instance as follows:

                      • A single configuration for IAM Credentials.
                      • Up to 10 CA configurations for public certificates.
                      • Up to 10 DNS configurations for public certificates.
                      • Up to 10 Root CA configurations for private certificates.
                      • Up to 10 Intermediate CA configurations for private certificates.
                      • Up to 10 Certificate Template configurations for private certificates.

                      Add a configuration to the specified secret type.

                      Use this operation to define the configurations that are required to create public certificates (public_cert), private certificates (private_cert) and IAM Credentials secrets (iam_credentials).

                      You can add multiple configurations for your instance as follows:

                      • A single configuration for IAM Credentials.
                      • Up to 10 CA configurations for public certificates.
                      • Up to 10 DNS configurations for public certificates.
                      • Up to 10 Root CA configurations for private certificates.
                      • Up to 10 Intermediate CA configurations for private certificates.
                      • Up to 10 Certificate Template configurations for private certificates.

                      Add a configuration to the specified secret type.

                      Use this operation to define the configurations that are required to create public certificates (public_cert), private certificates (private_cert) and IAM Credentials secrets (iam_credentials).

                      You can add multiple configurations for your instance as follows:

                      • A single configuration for IAM Credentials.
                      • Up to 10 CA configurations for public certificates.
                      • Up to 10 DNS configurations for public certificates.
                      • Up to 10 Root CA configurations for private certificates.
                      • Up to 10 Intermediate CA configurations for private certificates.
                      • Up to 10 Certificate Template configurations for private certificates.

                      Add a configuration to the specified secret type.

                      Use this operation to define the configurations that are required to create public certificates (public_cert), private certificates (private_cert) and IAM Credentials secrets (iam_credentials).

                      You can add multiple configurations for your instance as follows:

                      • A single configuration for IAM Credentials.
                      • Up to 10 CA configurations for public certificates.
                      • Up to 10 DNS configurations for public certificates.
                      • Up to 10 Root CA configurations for private certificates.
                      • Up to 10 Intermediate CA configurations for private certificates.
                      • Up to 10 Certificate Template configurations for private certificates.
                      POST /api/v2/configurations
                      ServiceCall<Configuration> createConfiguration(CreateConfigurationOptions createConfigurationOptions)
                      createConfiguration(params)
                      create_configuration(
                              self,
                              configuration_prototype: 'ConfigurationPrototype',
                              **kwargs,
                          ) -> DetailedResponse
                      (secretsManager *SecretsManagerV2) CreateConfiguration(createConfigurationOptions *CreateConfigurationOptions) (result ConfigurationIntf, response *core.DetailedResponse, err error)
                      (secretsManager *SecretsManagerV2) CreateConfigurationWithContext(ctx context.Context, createConfigurationOptions *CreateConfigurationOptions) (result ConfigurationIntf, response *core.DetailedResponse, err error)

                      Authorization

                      To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                      • secrets-manager.configuration.create

                      Auditing

                      Calling this method generates the following auditing event.

                      • secrets-manager.configuration.create

                      Request

                      Use the CreateConfigurationOptions.Builder to create a CreateConfigurationOptions object that contains the parameter values for the createConfiguration method.

                      Instantiate the CreateConfigurationOptions struct and set the fields to provide parameter values for the CreateConfiguration method.

                      Specify the properties for Cloud Internet Services DNS configuration.

                      Example:

                      The configuration body of the Cloud Internet Services DNS request for public certificates.

                      {
                        "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                        "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::",
                        "config_type": "public_cert_configuration_dns_cloud_internet_services",
                        "name": "example-cloud-internet-services-config"
                      }

                      The createConfiguration options.

                      parameters

                      • Specify the properties for Cloud Internet Services DNS configuration.

                        parameters

                        • Specify the properties for Cloud Internet Services DNS configuration.

                          WithContext method only

                          The CreateConfiguration options.

                          • ibmcloud secrets-manager configuration-create --config-type=private_cert_configuration_root_ca \
                              --name=example-root-CA --certificate-common-name=example.com  --private-cert-max-ttl=7365
                            
                            ibmcloud secrets-manager configuration-create --config-type=private_cert_configuration_root_ca   --name=example-root-CA-HSM \
                            --certificate-common-name=example.com  --private-cert-max-ttl=73654 \
                            --private-cert-crypto-key='{ "provider": { "type": "hyper_protect_crypto_services", "instance_crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/791f3fb10486421e97aa8512f18b7e65:b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5::","pin_iam_credentials_secret_id": "14a7aff4-432d-11dc-a0f0-56a5b473394f", "private_keystore_id": "14a7aff4-432d-11dc-a0f0-56a5b473394f" }, "label": "cli-created", "allow_generate_key": true }'
                            
                            ibmcloud secrets-manager configuration-create \
                              --configuration-prototype='{"config_type": "private_cert_configuration_root_ca", "name": "example-root-CA", "max_ttl": "43830h", "crl_expiry": "72h", "crl_disable": false, "crl_distribution_points_encoded": true, "issuing_certificates_urls_encoded": true, "common_name": "example.com", "alt_names": ["alt-name-1","alt-name-2"], "ip_sans": "127.0.0.1", "uri_sans": "https://www.example.com/test", "other_sans": ["1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"], "ttl": "2190h", "format": "pem", "private_key_format": "der", "key_type": "rsa", "key_bits": 4096, "max_path_length": -1, "exclude_cn_from_sans": false, "permitted_dns_domains": ["exampleString"], "ou": ["exampleString"], "organization": ["exampleString"], "country": ["exampleString"], "locality": ["exampleString"], "province": ["exampleString"], "street_address": ["exampleString"], "postal_code": ["exampleString"], "serial_number": "d9:be:fe:35:ba:09:42:b5:35:ba:09:42:b5"}'
                          • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ", "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::", "config_type": "public_cert_configuration_dns_cloud_internet_services", "name": "example-cloud-internet-services-config" }'   "${base_url}/api/v2/configurations"
                          • PublicCertificateConfigurationDNSCloudInternetServicesPrototype configurationPrototypeModel = new PublicCertificateConfigurationDNSCloudInternetServicesPrototype.Builder()
                              .configType("public_cert_configuration_dns_cloud_internet_services")
                              .name("example-cloud-internet-services-config")
                              .cloudInternetServicesApikey("5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ")
                              .cloudInternetServicesCrn("crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::")
                              .build();
                            CreateConfigurationOptions createConfigurationOptions = new CreateConfigurationOptions.Builder()
                              .configurationPrototype(configurationPrototypeModel)
                              .build();
                            
                            Response<Configuration> response = secretsManagerService.createConfiguration(createConfigurationOptions).execute();
                            Configuration configuration = response.getResult();
                            
                            System.out.println(configuration);
                          • // Request models needed by this operation.
                            
                            // PublicCertificateConfigurationDNSCloudInternetServicesPrototype
                            const configurationPrototypeModel = {
                              config_type: 'public_cert_configuration_dns_cloud_internet_services',
                              name: 'example-cloud-internet-services-config',
                              cloud_internet_services_apikey: '5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ',
                              cloud_internet_services_crn: 'crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::',
                            };
                            
                            const params = {
                              configurationPrototype: configurationPrototypeModel,
                            };
                            
                            let res;
                            try {
                              res = await secretsManagerService.createConfiguration(params);
                              console.log(JSON.stringify(res.result, null, 2));
                            } catch (err) {
                              console.warn(err);
                            }
                          • configuration_prototype_model = {
                              'config_type': 'public_cert_configuration_dns_cloud_internet_services',
                              'name': 'example-cloud-internet-services-config',
                              'cloud_internet_services_apikey': '5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ',
                              'cloud_internet_services_crn': 'crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::',
                            }
                            
                            response = secrets_manager_service.create_configuration(
                              configuration_prototype=configuration_prototype_model,
                            )
                            configuration = response.get_result()
                            
                            print(json.dumps(configuration, indent=2))
                          • configurationPrototypeModel := &secretsmanagerv2.PublicCertificateConfigurationDNSCloudInternetServicesPrototype{
                              ConfigType: core.StringPtr("public_cert_configuration_dns_cloud_internet_services"),
                              Name: core.StringPtr("example-cloud-internet-services-config"),
                              CloudInternetServicesApikey: core.StringPtr("5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ"),
                              CloudInternetServicesCrn: core.StringPtr("crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::"),
                            }
                            
                            createConfigurationOptions := secretsManagerService.NewCreateConfigurationOptions(
                              configurationPrototypeModel,
                            )
                            
                            configuration, response, err := secretsManagerService.CreateConfiguration(createConfigurationOptions)
                            if err != nil {
                              panic(err)
                            }
                            b, _ := json.MarshalIndent(configuration, "", "  ")
                            fmt.Println(string(b))

                          Response

                          Your configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Status Code

                          • The configuration was successfully created.

                          • BadRequest

                          • Unauthorized

                          • PaymentRequired

                          • Forbidden

                          • The specified resource was not found

                          • Conflict

                          • InternalServerError

                          • BadGatewayError

                          • ServiceUnavailableError

                          Example responses
                          • Example Cloud Internet Services DNS configuration for public certificates

                            {
                              "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                              "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::",
                              "config_type": "public_cert_configuration_dns_cloud_internet_services",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "example-cloud-internet-services-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example Cloud Internet Services DNS configuration for public certificates

                            {
                              "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                              "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::",
                              "config_type": "public_cert_configuration_dns_cloud_internet_services",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "example-cloud-internet-services-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of IBM Cloud classic infrastructure (SoftLayer) DNS configuration for public certificates

                            {
                              "classic_infrastructure_password": "sRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0OD",
                              "classic_infrastructure_username": "1234567_JohnDoe@mail.com",
                              "config_type": "public_cert_configuration_dns_classic_infrastructure",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "classic-infrastructure-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of IBM Cloud classic infrastructure (SoftLayer) DNS configuration for public certificates

                            {
                              "classic_infrastructure_password": "sRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0OD",
                              "classic_infrastructure_username": "1234567_JohnDoe@mail.com",
                              "config_type": "public_cert_configuration_dns_classic_infrastructure",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "classic-infrastructure-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of the Let's Encrypt CA configuration for public certificates.

                            {
                              "config_type": "public_cert_configuration_ca_lets_encrypt",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "lets_encrypt_environment": "production",
                              "lets_encrypt_private_key": "-----BEGIN PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END PRIVATE KEY-----",
                              "name": "lets-encrypt-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of the Let's Encrypt CA configuration for public certificates.

                            {
                              "config_type": "public_cert_configuration_ca_lets_encrypt",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "lets_encrypt_environment": "production",
                              "lets_encrypt_private_key": "-----BEGIN PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END PRIVATE KEY-----",
                              "name": "lets-encrypt-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • The request body of the root certificate authority for private certificates.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "data": {
                                "certificate": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBsQ9YmHmWDP4=\\n-----END CERTIFICATE-----",
                                "expiration": 1686689494,
                                "issuing_ca": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBAsQ9YmHmWDP4=\\n-----END CERTIFICATE-----"
                              },
                              "exclude_cn_from_sans": false,
                              "expiration_date": "2030-06-13T20:51:34.000Z",
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_path_length": -1,
                              "max_ttl_seconds": 157788000,
                              "name": "example-root-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "permitted_dns_domains": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "serial_number": "59:09:26:bd:32:5e:dd:29:1d:7f:36:48:9f:c1:79:9f:05:7a:f3:c1",
                              "status": "configured",
                              "street_address": [],
                              "ttl_seconds": 7884000,
                              "updated_at": "2030-03-14T14:51:32.802Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The request body of the root certificate authority for private certificates.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "data": {
                                "certificate": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBsQ9YmHmWDP4=\\n-----END CERTIFICATE-----",
                                "expiration": 1686689494,
                                "issuing_ca": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBAsQ9YmHmWDP4=\\n-----END CERTIFICATE-----"
                              },
                              "exclude_cn_from_sans": false,
                              "expiration_date": "2030-06-13T20:51:34.000Z",
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_path_length": -1,
                              "max_ttl_seconds": 157788000,
                              "name": "example-root-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "permitted_dns_domains": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "serial_number": "59:09:26:bd:32:5e:dd:29:1d:7f:36:48:9f:c1:79:9f:05:7a:f3:c1",
                              "status": "configured",
                              "street_address": [],
                              "ttl_seconds": 7884000,
                              "updated_at": "2030-03-14T14:51:32.802Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The intermediate certificate authority.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "serial_number": "4e:b8:52:7a:cd:4f:2c:96:31:37:9b:05:21:74:c6:81:91:7c:96:82",
                              "data": {
                                "ca_chain": [
                                  "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxNJYxN5sFIX\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----"
                                ],
                                "certificate": "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxN5h\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----",
                                "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                "expiration": 1982238414
                              },
                              "exclude_cn_from_sans": false,
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuer": "example-root-CA",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_ttl_seconds": 94680000,
                              "name": "example-intermediate-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "signing_method": "internal",
                              "status": "configured",
                              "street_address": [],
                              "updated_at": "2030-03-14T14:57:05.965Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The intermediate certificate authority.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "serial_number": "4e:b8:52:7a:cd:4f:2c:96:31:37:9b:05:21:74:c6:81:91:7c:96:82",
                              "data": {
                                "ca_chain": [
                                  "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxNJYxN5sFIX\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----"
                                ],
                                "certificate": "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxN5h\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----",
                                "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                "expiration": 1982238414
                              },
                              "exclude_cn_from_sans": false,
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuer": "example-root-CA",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_ttl_seconds": 94680000,
                              "name": "example-intermediate-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "signing_method": "internal",
                              "status": "configured",
                              "street_address": [],
                              "updated_at": "2030-03-14T14:57:05.965Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The certificate template.

                            {
                              "allow_any_name": true,
                              "allow_bare_domains": true,
                              "allow_glob_domains": true,
                              "allow_ip_sans": true,
                              "allow_localhost": true,
                              "allow_subdomains": false,
                              "allowed_domains": [
                                "example.com",
                                "acme.com"
                              ],
                              "allowed_domains_template": true,
                              "allowed_other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com",
                                "1.3.6.1.4.1.201.10.5.5;UTF-8:*"
                              ],
                              "allowed_secret_groups": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
                              "allowed_uri_sans": [
                                "example.com",
                                "acme://*"
                              ],
                              "basic_constraints_valid_for_non_ca": false,
                              "certificate_authority": "example-intermediate-CA",
                              "client_flag": true,
                              "code_signing_flag": false,
                              "config_type": "private_cert_configuration_template",
                              "country": [],
                              "created_at": "2030-03-14T15:26:17.257Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "email_protection_flag": false,
                              "enforce_hostnames": false,
                              "ext_key_usage": [],
                              "ext_key_usage_oids": [],
                              "key_bits": 2048,
                              "key_type": "rsa",
                              "key_usage": [
                                "DigitalSignature",
                                "KeyAgreement",
                                "KeyEncipherment"
                              ],
                              "locality": [],
                              "max_ttl_seconds": 86400,
                              "name": "example-certificate-template",
                              "not_before_duration_seconds": 30,
                              "organization": [],
                              "ou": [],
                              "policy_identifiers": [],
                              "postal_code": [],
                              "province": [],
                              "require_cn": true,
                              "secret_type": "private_cert",
                              "server_flag": true,
                              "street_address": [],
                              "ttl_seconds": 28800,
                              "updated_at": "2030-03-14T15:26:17.257Z",
                              "use_csr_common_name": true,
                              "use_csr_sans": true
                            }
                          • The certificate template.

                            {
                              "allow_any_name": true,
                              "allow_bare_domains": true,
                              "allow_glob_domains": true,
                              "allow_ip_sans": true,
                              "allow_localhost": true,
                              "allow_subdomains": false,
                              "allowed_domains": [
                                "example.com",
                                "acme.com"
                              ],
                              "allowed_domains_template": true,
                              "allowed_other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com",
                                "1.3.6.1.4.1.201.10.5.5;UTF-8:*"
                              ],
                              "allowed_secret_groups": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
                              "allowed_uri_sans": [
                                "example.com",
                                "acme://*"
                              ],
                              "basic_constraints_valid_for_non_ca": false,
                              "certificate_authority": "example-intermediate-CA",
                              "client_flag": true,
                              "code_signing_flag": false,
                              "config_type": "private_cert_configuration_template",
                              "country": [],
                              "created_at": "2030-03-14T15:26:17.257Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "email_protection_flag": false,
                              "enforce_hostnames": false,
                              "ext_key_usage": [],
                              "ext_key_usage_oids": [],
                              "key_bits": 2048,
                              "key_type": "rsa",
                              "key_usage": [
                                "DigitalSignature",
                                "KeyAgreement",
                                "KeyEncipherment"
                              ],
                              "locality": [],
                              "max_ttl_seconds": 86400,
                              "name": "example-certificate-template",
                              "not_before_duration_seconds": 30,
                              "organization": [],
                              "ou": [],
                              "policy_identifiers": [],
                              "postal_code": [],
                              "province": [],
                              "require_cn": true,
                              "secret_type": "private_cert",
                              "server_flag": true,
                              "street_address": [],
                              "ttl_seconds": 28800,
                              "updated_at": "2030-03-14T15:26:17.257Z",
                              "use_csr_common_name": true,
                              "use_csr_sans": true
                            }
                          • Example of the configuration of the IBM Cloud IAM credentials engine

                            {
                              "api_key": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                              "disabled": false,
                              "config_type": "iam_credentials_configuration",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "iam-configuration",
                              "secret_type": "iam_credentials",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of the configuration of the IBM Cloud IAM credentials engine

                            {
                              "api_key": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                              "disabled": false,
                              "config_type": "iam_credentials_configuration",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "iam-configuration",
                              "secret_type": "iam_credentials",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of bad request error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 400,
                              "errors": [
                                {
                                  "code": "bad_request",
                                  "message": "required.name:property \"name\" is missing",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad request error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 400,
                              "errors": [
                                {
                                  "code": "bad_request",
                                  "message": "required.name:property \"name\" is missing",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of unauthorized error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 401,
                              "errors": [
                                {
                                  "code": "unauthorized",
                                  "message": "You provided no credentials or invalid credentials.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of unauthorized error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 401,
                              "errors": [
                                {
                                  "code": "unauthorized",
                                  "message": "You provided no credentials or invalid credentials.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of payment required error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 402,
                              "errors": [
                                {
                                  "code": "payment_required",
                                  "message": "Your Trial plan is now expired.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of payment required error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 402,
                              "errors": [
                                {
                                  "code": "payment_required",
                                  "message": "Your Trial plan is now expired.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of forbidden error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 403,
                              "errors": [
                                {
                                  "code": "access_forbidden",
                                  "message": "You are not allowed to access this resource.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of forbidden error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 403,
                              "errors": [
                                {
                                  "code": "access_forbidden",
                                  "message": "You are not allowed to access this resource.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of NotFound error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 404,
                              "errors": [
                                {
                                  "code": "not_found",
                                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of NotFound error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 404,
                              "errors": [
                                {
                                  "code": "not_found",
                                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example Conflict error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 409,
                              "errors": [
                                {
                                  "code": "conflict",
                                  "message": "The request conflicts with the current state of the target resource",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example Conflict error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 409,
                              "errors": [
                                {
                                  "code": "conflict",
                                  "message": "The request conflicts with the current state of the target resource",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of internal server error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 500,
                              "errors": [
                                {
                                  "code": "internal_server_error",
                                  "message": "Internal server error",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of internal server error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 500,
                              "errors": [
                                {
                                  "code": "internal_server_error",
                                  "message": "Internal server error",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad gateway error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 502,
                              "errors": [
                                {
                                  "code": "bad_gateway",
                                  "message": "Bad Gateway",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad gateway error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 502,
                              "errors": [
                                {
                                  "code": "bad_gateway",
                                  "message": "Bad Gateway",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of service unavailable error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 503,
                              "errors": [
                                {
                                  "code": "service_unavailable",
                                  "message": "Service Unavailable",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of service unavailable error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 503,
                              "errors": [
                                {
                                  "code": "service_unavailable",
                                  "message": "Service Unavailable",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }

                          List configurations

                          List the configurations that are available in your Secrets Manager instance.

                          List the configurations that are available in your Secrets Manager instance.

                          List the configurations that are available in your Secrets Manager instance.

                          List the configurations that are available in your Secrets Manager instance.

                          List the configurations that are available in your Secrets Manager instance.

                          GET /api/v2/configurations
                          ServiceCall<ConfigurationMetadataPaginatedCollection> listConfigurations(ListConfigurationsOptions listConfigurationsOptions)
                          listConfigurations(params)
                          list_configurations(
                                  self,
                                  *,
                                  offset: Optional[int] = None,
                                  limit: Optional[int] = None,
                                  sort: Optional[str] = None,
                                  search: Optional[str] = None,
                                  secret_types: Optional[List[str]] = None,
                                  **kwargs,
                              ) -> DetailedResponse
                          (secretsManager *SecretsManagerV2) ListConfigurations(listConfigurationsOptions *ListConfigurationsOptions) (result *ConfigurationMetadataPaginatedCollection, response *core.DetailedResponse, err error)
                          (secretsManager *SecretsManagerV2) ListConfigurationsWithContext(ctx context.Context, listConfigurationsOptions *ListConfigurationsOptions) (result *ConfigurationMetadataPaginatedCollection, response *core.DetailedResponse, err error)

                          Authorization

                          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                          • secrets-manager.configurations.list

                          Auditing

                          Calling this method generates the following auditing event.

                          • secrets-manager.configurations.list

                          Request

                          Use the ListConfigurationsOptions.Builder to create a ListConfigurationsOptions object that contains the parameter values for the listConfigurations method.

                          Instantiate the ListConfigurationsOptions struct and set the fields to provide parameter values for the ListConfigurations method.

                          Query Parameters

                          • The number of configurations to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                            Usage: If you have 100 configurations in your instance, and you want to retrieve configurations 26 through 50, use ..?offset=25&limit=25.

                            Possible values: value ≥ 0

                            Default: 0

                          • The number of configurations to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

                            Usage: If you want to retrieve only the first 25 configurations in your instance, use ..?limit=25.

                            Possible values: 1 ≤ value ≤ 1000

                            Default: 200

                          • Sort a collection of configurations by the specified field in ascending order. To sort in descending order use the - character

                            Available values: config_type | secret_type | name

                            Usage: To sort a list of configurations by their creation date, use ../configurations?sort=config_type.

                            Possible values: 2 ≤ length ≤ 17, Value must match regular expression ^-?(config_type|secret_type|name)$

                            Example: config_type

                          • Obtain a collection of configurations that contain the specified string in one or more of the fields: name, config_type, secret_type.

                            Usage: If you want to list only the configurations that contain the string text, use ../configurations?search=text.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                            Example: example

                          • Filter configurations by secret types, iam_credentials, public_cert or private_cert.

                            You can apply multiple filters by using a comma-separated list of secret types.

                            Usage: To retrieve a list of configurations that are associated with all secret types, use ..?secret_types=iam_credentials,public_cert,private_cert.

                            Allowable values: [iam_credentials,private_cert,public_cert]

                            Possible values: 0 ≤ number of items ≤ 3

                            Examples:
                            [
                              "iam_credentials",
                              "public_cert",
                              "private_cert"
                            ]

                          The listConfigurations options.

                          parameters

                          • The number of configurations to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                            Usage: If you have 100 configurations in your instance, and you want to retrieve configurations 26 through 50, use ..?offset=25&limit=25.

                            Possible values: value ≥ 0

                            Default: 0

                          • The number of configurations to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

                            Usage: If you want to retrieve only the first 25 configurations in your instance, use ..?limit=25.

                            Possible values: 1 ≤ value ≤ 1000

                            Default: 200

                          • Sort a collection of configurations by the specified field in ascending order. To sort in descending order use the - character

                            Available values: config_type | secret_type | name

                            Usage: To sort a list of configurations by their creation date, use ../configurations?sort=config_type.

                            Possible values: 2 ≤ length ≤ 17, Value must match regular expression /^-?(config_type|secret_type|name)$/

                            Examples:
                          • Obtain a collection of configurations that contain the specified string in one or more of the fields: name, config_type, secret_type.

                            Usage: If you want to list only the configurations that contain the string text, use ../configurations?search=text.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                            Examples:
                          • Filter configurations by secret types, iam_credentials, public_cert or private_cert.

                            You can apply multiple filters by using a comma-separated list of secret types.

                            Usage: To retrieve a list of configurations that are associated with all secret types, use ..?secret_types=iam_credentials,public_cert,private_cert.

                            Allowable values: [iam_credentials,private_cert,public_cert]

                            Possible values: 0 ≤ number of items ≤ 3

                            Examples:

                          parameters

                          • The number of configurations to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through your available resources.

                            Usage: If you have 100 configurations in your instance, and you want to retrieve configurations 26 through 50, use ..?offset=25&limit=25.

                            Possible values: value ≥ 0

                            Default: 0

                          • The number of configurations to retrieve. By default, list operations return the first 200 items. To retrieve a different set of items, use limit with offset to page through your available resources. Maximum limit allowed is 1000 secrets.

                            Usage: If you want to retrieve only the first 25 configurations in your instance, use ..?limit=25.

                            Possible values: 1 ≤ value ≤ 1000

                            Default: 200

                          • Sort a collection of configurations by the specified field in ascending order. To sort in descending order use the - character

                            Available values: config_type | secret_type | name

                            Usage: To sort a list of configurations by their creation date, use ../configurations?sort=config_type.

                            Possible values: 2 ≤ length ≤ 17, Value must match regular expression /^-?(config_type|secret_type|name)$/

                            Examples:
                          • Obtain a collection of configurations that contain the specified string in one or more of the fields: name, config_type, secret_type.

                            Usage: If you want to list only the configurations that contain the string text, use ../configurations?search=text.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                            Examples:
                          • Filter configurations by secret types, iam_credentials, public_cert or private_cert.

                            You can apply multiple filters by using a comma-separated list of secret types.

                            Usage: To retrieve a list of configurations that are associated with all secret types, use ..?secret_types=iam_credentials,public_cert,private_cert.

                            Allowable values: [iam_credentials,private_cert,public_cert]

                            Possible values: 0 ≤ number of items ≤ 3

                            Examples:

                          WithContext method only

                          The ListConfigurations options.

                          • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/configurations?sort=config_type&search=example&secret_types=iam_credentials,public_cert,private_cert"
                          • ListConfigurationsOptions listConfigurationsOptions = new ListConfigurationsOptions.Builder()
                              .limit(Long.valueOf("10"))
                              .sort("config_type")
                              .search("example")
                              .secretTypes(java.util.Arrays.asList("iam_credentials", "public_cert", "private_cert"))
                              .build();
                            
                            ConfigurationsPager pager = new ConfigurationsPager(secretsManagerService, listConfigurationsOptions);
                            List<ConfigurationMetadata> allResults = new ArrayList<>();
                            while (pager.hasNext()) {
                              List<ConfigurationMetadata> nextPage = pager.getNext();
                              allResults.addAll(nextPage);
                            }
                            
                            System.out.println(GsonSingleton.getGson().toJson(allResults));
                          • const params = {
                              limit: 10,
                              sort: 'config_type',
                              search: 'example',
                              secretTypes: ['iam_credentials', 'public_cert', 'private_cert'],
                            };
                            
                            const allResults = [];
                            try {
                              const pager = new SecretsManagerV2.ConfigurationsPager(secretsManagerService, params);
                              while (pager.hasNext()) {
                                const nextPage = await pager.getNext();
                                expect(nextPage).not.toBeNull();
                                allResults.push(...nextPage);
                              }
                              console.log(JSON.stringify(allResults, null, 2));
                            } catch (err) {
                              console.warn(err);
                            }
                          • all_results = []
                            pager = ConfigurationsPager(
                              client=secrets_manager_service,
                              limit=10,
                              sort='config_type',
                              search='example',
                              secret_types=['iam_credentials', 'public_cert', 'private_cert'],
                            )
                            while pager.has_next():
                              next_page = pager.get_next()
                              assert next_page is not None
                              all_results.extend(next_page)
                            
                            print(json.dumps(all_results, indent=2))
                          • listConfigurationsOptions := &secretsmanagerv2.ListConfigurationsOptions{
                              Limit: core.Int64Ptr(int64(10)),
                              Sort: core.StringPtr("config_type"),
                              Search: core.StringPtr("example"),
                              SecretTypes: []string{"iam_credentials", "public_cert", "private_cert"},
                            }
                            
                            pager, err := secretsManagerService.NewConfigurationsPager(listConfigurationsOptions)
                            if err != nil {
                              panic(err)
                            }
                            
                            var allResults []secretsmanagerv2.ConfigurationMetadataIntf
                            for pager.HasNext() {
                              nextPage, err := pager.GetNext()
                              if err != nil {
                                panic(err)
                              }
                              allResults = append(allResults, nextPage...)
                            }
                            b, _ := json.MarshalIndent(allResults, "", "  ")
                            fmt.Println(string(b))

                          Response

                          Properties that describe a paginated collection of secret locks.

                          Properties that describe a paginated collection of secret locks.

                          Properties that describe a paginated collection of secret locks.

                          Properties that describe a paginated collection of secret locks.

                          Properties that describe a paginated collection of secret locks.

                          Status Code

                          • The list of configurations was successfully retrieved.

                          • BadRequest

                          • Unauthorized

                          • PaymentRequired

                          • Forbidden

                          • The specified resource was not found

                          • InternalServerError

                          • BadGatewayError

                          • ServiceUnavailableError

                          Example responses
                          • Example response for configuring metadata collection

                            {
                              "first": {
                                "href": "https://something.com"
                              },
                              "next": {
                                "href": "https://something.com"
                              },
                              "previous": {
                                "href": "https://something.com"
                              },
                              "last": {
                                "href": "https://something.com"
                              },
                              "limit": 25,
                              "offset": 0,
                              "configurations": [
                                {
                                  "config_type": "public_cert_configuration_ca_lets_encrypt",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "lets_encrypt_environment": "production",
                                  "name": "lets-encrypt-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                },
                                {
                                  "config_type": "public_cert_configuration_dns_cloud_internet_services",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "cloud-internet-services-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                },
                                {
                                  "config_type": "public_cert_configuration_dns_classic_infrastructure",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "classic-infrastructure-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                },
                                {
                                  "common_name": "ibm.com",
                                  "config_type": "private_cert_configuration_root_ca",
                                  "created_at": "2022-11-08T11:22:19Z",
                                  "created_by": "iam-ServiceId-1ba95813-1b0f-45c1-b46c-969a5fda08d1",
                                  "expiration_date": "2030-03-31T01:13:07Z",
                                  "key_bits": 2048,
                                  "key_type": "rsa",
                                  "name": "internal-root",
                                  "secret_type": "private_cert",
                                  "status": "configured",
                                  "updated_at": "2022-11-08T11:22:19Z"
                                },
                                {
                                  "common_name": "ibm.com",
                                  "config_type": "private_cert_configuration_intermediate_ca",
                                  "created_at": "2022-11-08T11:22:19Z",
                                  "created_by": "iam-ServiceId-1ba95813-1b0f-45c1-b46c-969a5fda08d1",
                                  "expiration_date": "2030-03-31T01:13:07Z",
                                  "issuer": "internal-root",
                                  "name": "example-intermediate-CA",
                                  "key_bits": 2048,
                                  "key_type": "rsa",
                                  "secret_type": "private_cert",
                                  "status": "configured",
                                  "updated_at": "2022-11-08T11:22:19Z"
                                },
                                {
                                  "certificate_authority": "inter-1",
                                  "config_type": "private_cert_configuration_template",
                                  "created_at": "2022-11-08T11:22:23Z",
                                  "created_by": "iam-ServiceId-8e54a866-476b-46cd-ba05-dbeae5f1d984",
                                  "name": "example-certificate-template",
                                  "secret_type": "private_cert",
                                  "updated_at": "2022-11-08T11:22:23Z"
                                }
                              ],
                              "total_count": 6
                            }
                          • Example response for configuring metadata collection

                            {
                              "first": {
                                "href": "https://something.com"
                              },
                              "next": {
                                "href": "https://something.com"
                              },
                              "previous": {
                                "href": "https://something.com"
                              },
                              "last": {
                                "href": "https://something.com"
                              },
                              "limit": 25,
                              "offset": 0,
                              "configurations": [
                                {
                                  "config_type": "public_cert_configuration_ca_lets_encrypt",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "lets_encrypt_environment": "production",
                                  "name": "lets-encrypt-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                },
                                {
                                  "config_type": "public_cert_configuration_dns_cloud_internet_services",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "cloud-internet-services-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                },
                                {
                                  "config_type": "public_cert_configuration_dns_classic_infrastructure",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "classic-infrastructure-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                },
                                {
                                  "common_name": "ibm.com",
                                  "config_type": "private_cert_configuration_root_ca",
                                  "created_at": "2022-11-08T11:22:19Z",
                                  "created_by": "iam-ServiceId-1ba95813-1b0f-45c1-b46c-969a5fda08d1",
                                  "expiration_date": "2030-03-31T01:13:07Z",
                                  "key_bits": 2048,
                                  "key_type": "rsa",
                                  "name": "internal-root",
                                  "secret_type": "private_cert",
                                  "status": "configured",
                                  "updated_at": "2022-11-08T11:22:19Z"
                                },
                                {
                                  "common_name": "ibm.com",
                                  "config_type": "private_cert_configuration_intermediate_ca",
                                  "created_at": "2022-11-08T11:22:19Z",
                                  "created_by": "iam-ServiceId-1ba95813-1b0f-45c1-b46c-969a5fda08d1",
                                  "expiration_date": "2030-03-31T01:13:07Z",
                                  "issuer": "internal-root",
                                  "name": "example-intermediate-CA",
                                  "key_bits": 2048,
                                  "key_type": "rsa",
                                  "secret_type": "private_cert",
                                  "status": "configured",
                                  "updated_at": "2022-11-08T11:22:19Z"
                                },
                                {
                                  "certificate_authority": "inter-1",
                                  "config_type": "private_cert_configuration_template",
                                  "created_at": "2022-11-08T11:22:23Z",
                                  "created_by": "iam-ServiceId-8e54a866-476b-46cd-ba05-dbeae5f1d984",
                                  "name": "example-certificate-template",
                                  "secret_type": "private_cert",
                                  "updated_at": "2022-11-08T11:22:23Z"
                                }
                              ],
                              "total_count": 6
                            }
                          • Example of bad request error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 400,
                              "errors": [
                                {
                                  "code": "bad_request",
                                  "message": "required.name:property \"name\" is missing",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad request error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 400,
                              "errors": [
                                {
                                  "code": "bad_request",
                                  "message": "required.name:property \"name\" is missing",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of unauthorized error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 401,
                              "errors": [
                                {
                                  "code": "unauthorized",
                                  "message": "You provided no credentials or invalid credentials.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of unauthorized error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 401,
                              "errors": [
                                {
                                  "code": "unauthorized",
                                  "message": "You provided no credentials or invalid credentials.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of payment required error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 402,
                              "errors": [
                                {
                                  "code": "payment_required",
                                  "message": "Your Trial plan is now expired.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of payment required error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 402,
                              "errors": [
                                {
                                  "code": "payment_required",
                                  "message": "Your Trial plan is now expired.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of forbidden error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 403,
                              "errors": [
                                {
                                  "code": "access_forbidden",
                                  "message": "You are not allowed to access this resource.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of forbidden error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 403,
                              "errors": [
                                {
                                  "code": "access_forbidden",
                                  "message": "You are not allowed to access this resource.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of NotFound error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 404,
                              "errors": [
                                {
                                  "code": "not_found",
                                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of NotFound error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 404,
                              "errors": [
                                {
                                  "code": "not_found",
                                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of internal server error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 500,
                              "errors": [
                                {
                                  "code": "internal_server_error",
                                  "message": "Internal server error",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of internal server error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 500,
                              "errors": [
                                {
                                  "code": "internal_server_error",
                                  "message": "Internal server error",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad gateway error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 502,
                              "errors": [
                                {
                                  "code": "bad_gateway",
                                  "message": "Bad Gateway",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad gateway error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 502,
                              "errors": [
                                {
                                  "code": "bad_gateway",
                                  "message": "Bad Gateway",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of service unavailable error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 503,
                              "errors": [
                                {
                                  "code": "service_unavailable",
                                  "message": "Service Unavailable",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of service unavailable error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 503,
                              "errors": [
                                {
                                  "code": "service_unavailable",
                                  "message": "Service Unavailable",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }

                          Get a configuration

                          Get a configuration by specifying its name.

                          A successful request returns the details of your configuration.

                          Get a configuration by specifying its name.

                          A successful request returns the details of your configuration.

                          Get a configuration by specifying its name.

                          A successful request returns the details of your configuration.

                          Get a configuration by specifying its name.

                          A successful request returns the details of your configuration.

                          Get a configuration by specifying its name.

                          A successful request returns the details of your configuration.

                          GET /api/v2/configurations/{name}
                          ServiceCall<Configuration> getConfiguration(GetConfigurationOptions getConfigurationOptions)
                          getConfiguration(params)
                          get_configuration(
                                  self,
                                  name: str,
                                  *,
                                  x_sm_accept_configuration_type: Optional[str] = None,
                                  **kwargs,
                              ) -> DetailedResponse
                          (secretsManager *SecretsManagerV2) GetConfiguration(getConfigurationOptions *GetConfigurationOptions) (result ConfigurationIntf, response *core.DetailedResponse, err error)
                          (secretsManager *SecretsManagerV2) GetConfigurationWithContext(ctx context.Context, getConfigurationOptions *GetConfigurationOptions) (result ConfigurationIntf, response *core.DetailedResponse, err error)

                          Authorization

                          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                          • secrets-manager.configuration.read

                          Auditing

                          Calling this method generates the following auditing event.

                          • secrets-manager.configuration.read

                          Request

                          Use the GetConfigurationOptions.Builder to create a GetConfigurationOptions object that contains the parameter values for the getConfiguration method.

                          Instantiate the GetConfigurationOptions struct and set the fields to provide parameter values for the GetConfiguration method.

                          Custom Headers

                          • The configuration type of this configuration - use this header to resolve 300 error responses.

                            Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                            Example: public_cert_configuration_dns_cloud_internet_services

                          Path Parameters

                          • The name that uniquely identifies a configuration.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                            Example: configuration-name

                          The getConfiguration options.

                          parameters

                          • The name that uniquely identifies a configuration.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                            Examples:
                          • The configuration type of this configuration - use this header to resolve 300 error responses.

                            Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                            Examples:

                          parameters

                          • The name that uniquely identifies a configuration.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                            Examples:
                          • The configuration type of this configuration - use this header to resolve 300 error responses.

                            Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                            Examples:

                          WithContext method only

                          The GetConfiguration options.

                          • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/configurations/${name}"
                          • GetConfigurationOptions getConfigurationOptions = new GetConfigurationOptions.Builder()
                              .name(configurationNameForGetConfigurationLink)
                              .xSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                              .build();
                            
                            Response<Configuration> response = secretsManagerService.getConfiguration(getConfigurationOptions).execute();
                            Configuration configuration = response.getResult();
                            
                            System.out.println(configuration);
                          • const params = {
                              name: configurationNameForGetConfigurationLink,
                              xSmAcceptConfigurationType: 'public_cert_configuration_dns_cloud_internet_services',
                            };
                            
                            let res;
                            try {
                              res = await secretsManagerService.getConfiguration(params);
                              console.log(JSON.stringify(res.result, null, 2));
                            } catch (err) {
                              console.warn(err);
                            }
                          • response = secrets_manager_service.get_configuration(
                              name=configuration_name_for_get_configuration_link,
                              x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
                            )
                            configuration = response.get_result()
                            
                            print(json.dumps(configuration, indent=2))
                          • getConfigurationOptions := secretsManagerService.NewGetConfigurationOptions(
                              configurationNameForGetConfigurationLink,
                            )
                            getConfigurationOptions.SetXSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                            
                            configuration, response, err := secretsManagerService.GetConfiguration(getConfigurationOptions)
                            if err != nil {
                              panic(err)
                            }
                            b, _ := json.MarshalIndent(configuration, "", "  ")
                            fmt.Println(string(b))

                          Response

                          Your configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Properties that describe a Let's Encrypt CA configuration.

                          Status Code

                          • The configuration was successfully retrieved.

                          • MultipleChoices

                          • BadRequest

                          • Unauthorized

                          • PaymentRequired

                          • Forbidden

                          • The specified resource was not found

                          • InternalServerError

                          • BadGatewayError

                          • ServiceUnavailableError

                          Example responses
                          • Example Cloud Internet Services DNS configuration for public certificates

                            {
                              "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                              "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::",
                              "config_type": "public_cert_configuration_dns_cloud_internet_services",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "example-cloud-internet-services-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example Cloud Internet Services DNS configuration for public certificates

                            {
                              "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                              "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::",
                              "config_type": "public_cert_configuration_dns_cloud_internet_services",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "example-cloud-internet-services-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of IBM Cloud classic infrastructure (SoftLayer) DNS configuration for public certificates

                            {
                              "classic_infrastructure_password": "sRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0OD",
                              "classic_infrastructure_username": "1234567_JohnDoe@mail.com",
                              "config_type": "public_cert_configuration_dns_classic_infrastructure",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "classic-infrastructure-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of IBM Cloud classic infrastructure (SoftLayer) DNS configuration for public certificates

                            {
                              "classic_infrastructure_password": "sRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0OD",
                              "classic_infrastructure_username": "1234567_JohnDoe@mail.com",
                              "config_type": "public_cert_configuration_dns_classic_infrastructure",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "classic-infrastructure-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of the Let's Encrypt CA configuration for public certificates.

                            {
                              "config_type": "public_cert_configuration_ca_lets_encrypt",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "lets_encrypt_environment": "production",
                              "lets_encrypt_private_key": "-----BEGIN PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END PRIVATE KEY-----",
                              "name": "lets-encrypt-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of the Let's Encrypt CA configuration for public certificates.

                            {
                              "config_type": "public_cert_configuration_ca_lets_encrypt",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "lets_encrypt_environment": "production",
                              "lets_encrypt_private_key": "-----BEGIN PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END PRIVATE KEY-----",
                              "name": "lets-encrypt-config",
                              "secret_type": "public_cert",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • The request body of the root certificate authority for private certificates.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "data": {
                                "certificate": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBsQ9YmHmWDP4=\\n-----END CERTIFICATE-----",
                                "expiration": 1686689494,
                                "issuing_ca": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBAsQ9YmHmWDP4=\\n-----END CERTIFICATE-----"
                              },
                              "exclude_cn_from_sans": false,
                              "expiration_date": "2030-06-13T20:51:34.000Z",
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_path_length": -1,
                              "max_ttl_seconds": 157788000,
                              "name": "example-root-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "permitted_dns_domains": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "serial_number": "59:09:26:bd:32:5e:dd:29:1d:7f:36:48:9f:c1:79:9f:05:7a:f3:c1",
                              "status": "configured",
                              "street_address": [],
                              "ttl_seconds": 7884000,
                              "updated_at": "2030-03-14T14:51:32.802Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The request body of the root certificate authority for private certificates.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "data": {
                                "certificate": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBsQ9YmHmWDP4=\\n-----END CERTIFICATE-----",
                                "expiration": 1686689494,
                                "issuing_ca": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBAsQ9YmHmWDP4=\\n-----END CERTIFICATE-----"
                              },
                              "exclude_cn_from_sans": false,
                              "expiration_date": "2030-06-13T20:51:34.000Z",
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_path_length": -1,
                              "max_ttl_seconds": 157788000,
                              "name": "example-root-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "permitted_dns_domains": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "serial_number": "59:09:26:bd:32:5e:dd:29:1d:7f:36:48:9f:c1:79:9f:05:7a:f3:c1",
                              "status": "configured",
                              "street_address": [],
                              "ttl_seconds": 7884000,
                              "updated_at": "2030-03-14T14:51:32.802Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The intermediate certificate authority.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "serial_number": "4e:b8:52:7a:cd:4f:2c:96:31:37:9b:05:21:74:c6:81:91:7c:96:82",
                              "data": {
                                "ca_chain": [
                                  "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxNJYxN5sFIX\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----"
                                ],
                                "certificate": "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxN5h\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----",
                                "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                "expiration": 1982238414
                              },
                              "exclude_cn_from_sans": false,
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuer": "example-root-CA",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_ttl_seconds": 94680000,
                              "name": "example-intermediate-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "signing_method": "internal",
                              "status": "configured",
                              "street_address": [],
                              "updated_at": "2030-03-14T14:57:05.965Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The intermediate certificate authority.

                            {
                              "alt_names": [
                                "alt-name-1",
                                "alt-name-2"
                              ],
                              "common_name": "example.com",
                              "config_type": "private_cert_configuration_root_ca",
                              "country": [],
                              "created_at": "2030-03-14T14:51:32.802Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "crl_disable": false,
                              "crl_distribution_points_encoded": true,
                              "crl_expiry_seconds": 259200,
                              "serial_number": "4e:b8:52:7a:cd:4f:2c:96:31:37:9b:05:21:74:c6:81:91:7c:96:82",
                              "data": {
                                "ca_chain": [
                                  "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxNJYxN5sFIX\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----"
                                ],
                                "certificate": "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxN5h\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----",
                                "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                "expiration": 1982238414
                              },
                              "exclude_cn_from_sans": false,
                              "format": "pem",
                              "ip_sans": "127.0.0.1",
                              "issuer": "example-root-CA",
                              "issuing_certificates_urls_encoded": true,
                              "key_bits": 4096,
                              "key_type": "rsa",
                              "locality": [],
                              "max_ttl_seconds": 94680000,
                              "name": "example-intermediate-CA",
                              "organization": [],
                              "other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                              ],
                              "ou": [],
                              "postal_code": [],
                              "private_key_format": "der",
                              "province": [],
                              "secret_type": "private_cert",
                              "signing_method": "internal",
                              "status": "configured",
                              "street_address": [],
                              "updated_at": "2030-03-14T14:57:05.965Z",
                              "uri_sans": "https://www.example.com/test"
                            }
                          • The certificate template.

                            {
                              "allow_any_name": true,
                              "allow_bare_domains": true,
                              "allow_glob_domains": true,
                              "allow_ip_sans": true,
                              "allow_localhost": true,
                              "allow_subdomains": false,
                              "allowed_domains": [
                                "example.com",
                                "acme.com"
                              ],
                              "allowed_domains_template": true,
                              "allowed_other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com",
                                "1.3.6.1.4.1.201.10.5.5;UTF-8:*"
                              ],
                              "allowed_secret_groups": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
                              "allowed_uri_sans": [
                                "example.com",
                                "acme://*"
                              ],
                              "basic_constraints_valid_for_non_ca": false,
                              "certificate_authority": "example-intermediate-CA",
                              "client_flag": true,
                              "code_signing_flag": false,
                              "config_type": "private_cert_configuration_template",
                              "country": [],
                              "created_at": "2030-03-14T15:26:17.257Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "email_protection_flag": false,
                              "enforce_hostnames": false,
                              "ext_key_usage": [],
                              "ext_key_usage_oids": [],
                              "key_bits": 2048,
                              "key_type": "rsa",
                              "key_usage": [
                                "DigitalSignature",
                                "KeyAgreement",
                                "KeyEncipherment"
                              ],
                              "locality": [],
                              "max_ttl_seconds": 86400,
                              "name": "example-certificate-template",
                              "not_before_duration_seconds": 30,
                              "organization": [],
                              "ou": [],
                              "policy_identifiers": [],
                              "postal_code": [],
                              "province": [],
                              "require_cn": true,
                              "secret_type": "private_cert",
                              "server_flag": true,
                              "street_address": [],
                              "ttl_seconds": 28800,
                              "updated_at": "2030-03-14T15:26:17.257Z",
                              "use_csr_common_name": true,
                              "use_csr_sans": true
                            }
                          • The certificate template.

                            {
                              "allow_any_name": true,
                              "allow_bare_domains": true,
                              "allow_glob_domains": true,
                              "allow_ip_sans": true,
                              "allow_localhost": true,
                              "allow_subdomains": false,
                              "allowed_domains": [
                                "example.com",
                                "acme.com"
                              ],
                              "allowed_domains_template": true,
                              "allowed_other_sans": [
                                "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com",
                                "1.3.6.1.4.1.201.10.5.5;UTF-8:*"
                              ],
                              "allowed_secret_groups": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
                              "allowed_uri_sans": [
                                "example.com",
                                "acme://*"
                              ],
                              "basic_constraints_valid_for_non_ca": false,
                              "certificate_authority": "example-intermediate-CA",
                              "client_flag": true,
                              "code_signing_flag": false,
                              "config_type": "private_cert_configuration_template",
                              "country": [],
                              "created_at": "2030-03-14T15:26:17.257Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "email_protection_flag": false,
                              "enforce_hostnames": false,
                              "ext_key_usage": [],
                              "ext_key_usage_oids": [],
                              "key_bits": 2048,
                              "key_type": "rsa",
                              "key_usage": [
                                "DigitalSignature",
                                "KeyAgreement",
                                "KeyEncipherment"
                              ],
                              "locality": [],
                              "max_ttl_seconds": 86400,
                              "name": "example-certificate-template",
                              "not_before_duration_seconds": 30,
                              "organization": [],
                              "ou": [],
                              "policy_identifiers": [],
                              "postal_code": [],
                              "province": [],
                              "require_cn": true,
                              "secret_type": "private_cert",
                              "server_flag": true,
                              "street_address": [],
                              "ttl_seconds": 28800,
                              "updated_at": "2030-03-14T15:26:17.257Z",
                              "use_csr_common_name": true,
                              "use_csr_sans": true
                            }
                          • Example of the configuration of the IBM Cloud IAM credentials engine

                            {
                              "api_key": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                              "disabled": false,
                              "config_type": "iam_credentials_configuration",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "iam-configuration",
                              "secret_type": "iam_credentials",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example of the configuration of the IBM Cloud IAM credentials engine

                            {
                              "api_key": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                              "disabled": false,
                              "config_type": "iam_credentials_configuration",
                              "created_at": "2022-06-27T11:58:15Z",
                              "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                              "name": "iam-configuration",
                              "secret_type": "iam_credentials",
                              "updated_at": "2022-10-05T21:33:11Z"
                            }
                          • Example MultipleChoices error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 300,
                              "errors": [
                                {
                                  "code": "multiple_choices",
                                  "message": "The request has more than one possible responses",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example MultipleChoices error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 300,
                              "errors": [
                                {
                                  "code": "multiple_choices",
                                  "message": "The request has more than one possible responses",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad request error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 400,
                              "errors": [
                                {
                                  "code": "bad_request",
                                  "message": "required.name:property \"name\" is missing",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad request error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 400,
                              "errors": [
                                {
                                  "code": "bad_request",
                                  "message": "required.name:property \"name\" is missing",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of unauthorized error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 401,
                              "errors": [
                                {
                                  "code": "unauthorized",
                                  "message": "You provided no credentials or invalid credentials.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of unauthorized error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 401,
                              "errors": [
                                {
                                  "code": "unauthorized",
                                  "message": "You provided no credentials or invalid credentials.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of payment required error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 402,
                              "errors": [
                                {
                                  "code": "payment_required",
                                  "message": "Your Trial plan is now expired.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of payment required error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 402,
                              "errors": [
                                {
                                  "code": "payment_required",
                                  "message": "Your Trial plan is now expired.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of forbidden error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 403,
                              "errors": [
                                {
                                  "code": "access_forbidden",
                                  "message": "You are not allowed to access this resource.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of forbidden error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 403,
                              "errors": [
                                {
                                  "code": "access_forbidden",
                                  "message": "You are not allowed to access this resource.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of NotFound error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 404,
                              "errors": [
                                {
                                  "code": "not_found",
                                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of NotFound error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 404,
                              "errors": [
                                {
                                  "code": "not_found",
                                  "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of internal server error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 500,
                              "errors": [
                                {
                                  "code": "internal_server_error",
                                  "message": "Internal server error",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of internal server error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 500,
                              "errors": [
                                {
                                  "code": "internal_server_error",
                                  "message": "Internal server error",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad gateway error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 502,
                              "errors": [
                                {
                                  "code": "bad_gateway",
                                  "message": "Bad Gateway",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of bad gateway error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 502,
                              "errors": [
                                {
                                  "code": "bad_gateway",
                                  "message": "Bad Gateway",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of service unavailable error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 503,
                              "errors": [
                                {
                                  "code": "service_unavailable",
                                  "message": "Service Unavailable",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }
                          • Example of service unavailable error

                            {
                              "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                              "status_code": 503,
                              "errors": [
                                {
                                  "code": "service_unavailable",
                                  "message": "Service Unavailable",
                                  "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                }
                              ]
                            }

                          Update configuration

                          Update a configuration.

                          Update a configuration.

                          Update a configuration.

                          Update a configuration.

                          Update a configuration.

                          PATCH /api/v2/configurations/{name}
                          ServiceCall<Configuration> updateConfiguration(UpdateConfigurationOptions updateConfigurationOptions)
                          updateConfiguration(params)
                          update_configuration(
                                  self,
                                  name: str,
                                  configuration_patch: 'ConfigurationPatch',
                                  *,
                                  x_sm_accept_configuration_type: Optional[str] = None,
                                  **kwargs,
                              ) -> DetailedResponse
                          (secretsManager *SecretsManagerV2) UpdateConfiguration(updateConfigurationOptions *UpdateConfigurationOptions) (result ConfigurationIntf, response *core.DetailedResponse, err error)
                          (secretsManager *SecretsManagerV2) UpdateConfigurationWithContext(ctx context.Context, updateConfigurationOptions *UpdateConfigurationOptions) (result ConfigurationIntf, response *core.DetailedResponse, err error)

                          Authorization

                          To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                          • secrets-manager.configuration.update

                          Auditing

                          Calling this method generates the following auditing event.

                          • secrets-manager.configuration.update

                          Request

                          Use the UpdateConfigurationOptions.Builder to create a UpdateConfigurationOptions object that contains the parameter values for the updateConfiguration method.

                          Instantiate the UpdateConfigurationOptions struct and set the fields to provide parameter values for the UpdateConfiguration method.

                          Custom Headers

                          • The configuration type of this configuration - use this header to resolve 300 error responses.

                            Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                            Example: public_cert_configuration_dns_cloud_internet_services

                          Path Parameters

                          • The name that uniquely identifies a configuration.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                            Example: configuration-name

                          The configuration update of the IAM Credentials engine.

                          Example:

                          Example of the Cloud Internet Services DNS configuration update for public certificates

                          {
                            "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                            "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::"
                          }

                          The updateConfiguration options.

                          parameters

                          • The name that uniquely identifies a configuration.

                            Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                            Examples:
                          • The configuration update of the IAM Credentials engine.

                            • The configuration type of this configuration - use this header to resolve 300 error responses.

                              Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                              Examples:

                            parameters

                            • The name that uniquely identifies a configuration.

                              Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                              Examples:
                            • The configuration update of the IAM Credentials engine.

                              • The configuration type of this configuration - use this header to resolve 300 error responses.

                                Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                                Examples:

                              WithContext method only

                              The UpdateConfiguration options.

                              • curl -X PATCH --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/merge-patch+json"   --data '{"cloud_internet_services_apikey":"5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ","cloud_internet_services_crn":"crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::"}'   "${base_url}/api/v2/configurations/${name}"
                              • PublicCertificateConfigurationDNSCloudInternetServicesPatch configurationPatchModel = new PublicCertificateConfigurationDNSCloudInternetServicesPatch.Builder()
                                  .cloudInternetServicesApikey("5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ")
                                  .cloudInternetServicesCrn("crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::")
                                  .build();
                                Map<String, Object> configurationPatchModelAsPatch = configurationPatchModel.asPatch();
                                UpdateConfigurationOptions updateConfigurationOptions = new UpdateConfigurationOptions.Builder()
                                  .name(configurationNameForGetConfigurationLink)
                                  .configurationPatch(configurationPatchModelAsPatch)
                                  .xSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                                  .build();
                                
                                Response<Configuration> response = secretsManagerService.updateConfiguration(updateConfigurationOptions).execute();
                                Configuration configuration = response.getResult();
                                
                                System.out.println(configuration);
                              • // Request models needed by this operation.
                                
                                // PublicCertificateConfigurationDNSCloudInternetServicesPatch
                                const configurationPatchModel = {
                                  cloud_internet_services_apikey: '5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ',
                                  cloud_internet_services_crn: 'crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::',
                                };
                                
                                const params = {
                                  name: configurationNameForGetConfigurationLink,
                                  configurationPatch: configurationPatchModel,
                                  xSmAcceptConfigurationType: 'public_cert_configuration_dns_cloud_internet_services',
                                };
                                
                                let res;
                                try {
                                  res = await secretsManagerService.updateConfiguration(params);
                                  console.log(JSON.stringify(res.result, null, 2));
                                } catch (err) {
                                  console.warn(err);
                                }
                              • configuration_patch_model = {
                                  'cloud_internet_services_apikey': '5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ',
                                  'cloud_internet_services_crn': 'crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::',
                                }
                                
                                response = secrets_manager_service.update_configuration(
                                  name=configuration_name_for_get_configuration_link,
                                  configuration_patch=configuration_patch_model,
                                  x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
                                )
                                configuration = response.get_result()
                                
                                print(json.dumps(configuration, indent=2))
                              • configurationPatchModel := &secretsmanagerv2.PublicCertificateConfigurationDNSCloudInternetServicesPatch{
                                  CloudInternetServicesApikey: core.StringPtr("5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ"),
                                  CloudInternetServicesCrn: core.StringPtr("crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::"),
                                }
                                configurationPatchModelAsPatch, asPatchErr := configurationPatchModel.AsPatch()
                                Expect(asPatchErr).To(BeNil())
                                
                                updateConfigurationOptions := secretsManagerService.NewUpdateConfigurationOptions(
                                  configurationNameForGetConfigurationLink,
                                  configurationPatchModelAsPatch,
                                )
                                updateConfigurationOptions.SetXSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                                
                                configuration, response, err := secretsManagerService.UpdateConfiguration(updateConfigurationOptions)
                                if err != nil {
                                  panic(err)
                                }
                                b, _ := json.MarshalIndent(configuration, "", "  ")
                                fmt.Println(string(b))

                              Response

                              Your configuration.

                              Properties that describe a Let's Encrypt CA configuration.

                              Properties that describe a Let's Encrypt CA configuration.

                              Properties that describe a Let's Encrypt CA configuration.

                              Properties that describe a Let's Encrypt CA configuration.

                              Status Code

                              • The configuration was successfully updated.

                              • MultipleChoices

                              • BadRequest

                              • Unauthorized

                              • PaymentRequired

                              • Forbidden

                              • The specified resource was not found

                              • InternalServerError

                              • BadGatewayError

                              • ServiceUnavailableError

                              Example responses
                              • Example Cloud Internet Services DNS configuration for public certificates

                                {
                                  "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                                  "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::",
                                  "config_type": "public_cert_configuration_dns_cloud_internet_services",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "example-cloud-internet-services-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • Example Cloud Internet Services DNS configuration for public certificates

                                {
                                  "cloud_internet_services_apikey": "5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ",
                                  "cloud_internet_services_crn": "crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::",
                                  "config_type": "public_cert_configuration_dns_cloud_internet_services",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "example-cloud-internet-services-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • Example of IBM Cloud classic infrastructure (SoftLayer) DNS configuration for public certificates

                                {
                                  "classic_infrastructure_password": "sRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0OD",
                                  "classic_infrastructure_username": "1234567_JohnDoe@mail.com",
                                  "config_type": "public_cert_configuration_dns_classic_infrastructure",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "classic-infrastructure-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • Example of IBM Cloud classic infrastructure (SoftLayer) DNS configuration for public certificates

                                {
                                  "classic_infrastructure_password": "sRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0ODsRBm1jkHOH2kn9oBnK5R0OD",
                                  "classic_infrastructure_username": "1234567_JohnDoe@mail.com",
                                  "config_type": "public_cert_configuration_dns_classic_infrastructure",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "classic-infrastructure-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • Example of the Let's Encrypt CA configuration for public certificates.

                                {
                                  "config_type": "public_cert_configuration_ca_lets_encrypt",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "lets_encrypt_environment": "production",
                                  "lets_encrypt_private_key": "-----BEGIN PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END PRIVATE KEY-----",
                                  "name": "lets-encrypt-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • Example of the Let's Encrypt CA configuration for public certificates.

                                {
                                  "config_type": "public_cert_configuration_ca_lets_encrypt",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "lets_encrypt_environment": "production",
                                  "lets_encrypt_private_key": "-----BEGIN PRIVATE KEY-----\nMIIEowIBAAKCAQEAqcRbzV1wp0nVrPtEpMtnWMO6Js1q3rhREZluKZfu0Q8SY4H3\n-----END PRIVATE KEY-----",
                                  "name": "lets-encrypt-config",
                                  "secret_type": "public_cert",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • The request body of the root certificate authority for private certificates.

                                {
                                  "alt_names": [
                                    "alt-name-1",
                                    "alt-name-2"
                                  ],
                                  "common_name": "example.com",
                                  "config_type": "private_cert_configuration_root_ca",
                                  "country": [],
                                  "created_at": "2030-03-14T14:51:32.802Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "crl_disable": false,
                                  "crl_distribution_points_encoded": true,
                                  "crl_expiry_seconds": 259200,
                                  "data": {
                                    "certificate": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBsQ9YmHmWDP4=\\n-----END CERTIFICATE-----",
                                    "expiration": 1686689494,
                                    "issuing_ca": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBAsQ9YmHmWDP4=\\n-----END CERTIFICATE-----"
                                  },
                                  "exclude_cn_from_sans": false,
                                  "expiration_date": "2030-06-13T20:51:34.000Z",
                                  "format": "pem",
                                  "ip_sans": "127.0.0.1",
                                  "issuing_certificates_urls_encoded": true,
                                  "key_bits": 4096,
                                  "key_type": "rsa",
                                  "locality": [],
                                  "max_path_length": -1,
                                  "max_ttl_seconds": 157788000,
                                  "name": "example-root-CA",
                                  "organization": [],
                                  "other_sans": [
                                    "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                  ],
                                  "ou": [],
                                  "permitted_dns_domains": [],
                                  "postal_code": [],
                                  "private_key_format": "der",
                                  "province": [],
                                  "secret_type": "private_cert",
                                  "serial_number": "59:09:26:bd:32:5e:dd:29:1d:7f:36:48:9f:c1:79:9f:05:7a:f3:c1",
                                  "status": "configured",
                                  "street_address": [],
                                  "ttl_seconds": 7884000,
                                  "updated_at": "2030-03-14T14:51:32.802Z",
                                  "uri_sans": "https://www.example.com/test"
                                }
                              • The request body of the root certificate authority for private certificates.

                                {
                                  "alt_names": [
                                    "alt-name-1",
                                    "alt-name-2"
                                  ],
                                  "common_name": "example.com",
                                  "config_type": "private_cert_configuration_root_ca",
                                  "country": [],
                                  "created_at": "2030-03-14T14:51:32.802Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "crl_disable": false,
                                  "crl_distribution_points_encoded": true,
                                  "crl_expiry_seconds": 259200,
                                  "data": {
                                    "certificate": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBsQ9YmHmWDP4=\\n-----END CERTIFICATE-----",
                                    "expiration": 1686689494,
                                    "issuing_ca": "-----BEGIN CERTIFICATE-----\\nMIIIsDCCBpigAwIBAsQ9YmHmWDP4=\\n-----END CERTIFICATE-----"
                                  },
                                  "exclude_cn_from_sans": false,
                                  "expiration_date": "2030-06-13T20:51:34.000Z",
                                  "format": "pem",
                                  "ip_sans": "127.0.0.1",
                                  "issuing_certificates_urls_encoded": true,
                                  "key_bits": 4096,
                                  "key_type": "rsa",
                                  "locality": [],
                                  "max_path_length": -1,
                                  "max_ttl_seconds": 157788000,
                                  "name": "example-root-CA",
                                  "organization": [],
                                  "other_sans": [
                                    "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                  ],
                                  "ou": [],
                                  "permitted_dns_domains": [],
                                  "postal_code": [],
                                  "private_key_format": "der",
                                  "province": [],
                                  "secret_type": "private_cert",
                                  "serial_number": "59:09:26:bd:32:5e:dd:29:1d:7f:36:48:9f:c1:79:9f:05:7a:f3:c1",
                                  "status": "configured",
                                  "street_address": [],
                                  "ttl_seconds": 7884000,
                                  "updated_at": "2030-03-14T14:51:32.802Z",
                                  "uri_sans": "https://www.example.com/test"
                                }
                              • The intermediate certificate authority.

                                {
                                  "alt_names": [
                                    "alt-name-1",
                                    "alt-name-2"
                                  ],
                                  "common_name": "example.com",
                                  "config_type": "private_cert_configuration_root_ca",
                                  "country": [],
                                  "created_at": "2030-03-14T14:51:32.802Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "crl_disable": false,
                                  "crl_distribution_points_encoded": true,
                                  "crl_expiry_seconds": 259200,
                                  "serial_number": "4e:b8:52:7a:cd:4f:2c:96:31:37:9b:05:21:74:c6:81:91:7c:96:82",
                                  "data": {
                                    "ca_chain": [
                                      "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxNJYxN5sFIX\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----"
                                    ],
                                    "certificate": "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxN5h\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----",
                                    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                    "expiration": 1982238414
                                  },
                                  "exclude_cn_from_sans": false,
                                  "format": "pem",
                                  "ip_sans": "127.0.0.1",
                                  "issuer": "example-root-CA",
                                  "issuing_certificates_urls_encoded": true,
                                  "key_bits": 4096,
                                  "key_type": "rsa",
                                  "locality": [],
                                  "max_ttl_seconds": 94680000,
                                  "name": "example-intermediate-CA",
                                  "organization": [],
                                  "other_sans": [
                                    "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                  ],
                                  "ou": [],
                                  "postal_code": [],
                                  "private_key_format": "der",
                                  "province": [],
                                  "secret_type": "private_cert",
                                  "signing_method": "internal",
                                  "status": "configured",
                                  "street_address": [],
                                  "updated_at": "2030-03-14T14:57:05.965Z",
                                  "uri_sans": "https://www.example.com/test"
                                }
                              • The intermediate certificate authority.

                                {
                                  "alt_names": [
                                    "alt-name-1",
                                    "alt-name-2"
                                  ],
                                  "common_name": "example.com",
                                  "config_type": "private_cert_configuration_root_ca",
                                  "country": [],
                                  "created_at": "2030-03-14T14:51:32.802Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "crl_disable": false,
                                  "crl_distribution_points_encoded": true,
                                  "crl_expiry_seconds": 259200,
                                  "serial_number": "4e:b8:52:7a:cd:4f:2c:96:31:37:9b:05:21:74:c6:81:91:7c:96:82",
                                  "data": {
                                    "ca_chain": [
                                      "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxNJYxN5sFIX\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----"
                                    ],
                                    "certificate": "-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIUTrhSes1PLJYxN5h\ne+aEPpX6nlJMDfZn\n-----END CERTIFICATE-----",
                                    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                    "expiration": 1982238414
                                  },
                                  "exclude_cn_from_sans": false,
                                  "format": "pem",
                                  "ip_sans": "127.0.0.1",
                                  "issuer": "example-root-CA",
                                  "issuing_certificates_urls_encoded": true,
                                  "key_bits": 4096,
                                  "key_type": "rsa",
                                  "locality": [],
                                  "max_ttl_seconds": 94680000,
                                  "name": "example-intermediate-CA",
                                  "organization": [],
                                  "other_sans": [
                                    "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                  ],
                                  "ou": [],
                                  "postal_code": [],
                                  "private_key_format": "der",
                                  "province": [],
                                  "secret_type": "private_cert",
                                  "signing_method": "internal",
                                  "status": "configured",
                                  "street_address": [],
                                  "updated_at": "2030-03-14T14:57:05.965Z",
                                  "uri_sans": "https://www.example.com/test"
                                }
                              • The certificate template.

                                {
                                  "allow_any_name": true,
                                  "allow_bare_domains": true,
                                  "allow_glob_domains": true,
                                  "allow_ip_sans": true,
                                  "allow_localhost": true,
                                  "allow_subdomains": false,
                                  "allowed_domains": [
                                    "example.com",
                                    "acme.com"
                                  ],
                                  "allowed_domains_template": true,
                                  "allowed_other_sans": [
                                    "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com",
                                    "1.3.6.1.4.1.201.10.5.5;UTF-8:*"
                                  ],
                                  "allowed_secret_groups": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
                                  "allowed_uri_sans": [
                                    "example.com",
                                    "acme://*"
                                  ],
                                  "basic_constraints_valid_for_non_ca": false,
                                  "certificate_authority": "example-intermediate-CA",
                                  "client_flag": true,
                                  "code_signing_flag": false,
                                  "config_type": "private_cert_configuration_template",
                                  "country": [],
                                  "created_at": "2030-03-14T15:26:17.257Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "email_protection_flag": false,
                                  "enforce_hostnames": false,
                                  "ext_key_usage": [],
                                  "ext_key_usage_oids": [],
                                  "key_bits": 2048,
                                  "key_type": "rsa",
                                  "key_usage": [
                                    "DigitalSignature",
                                    "KeyAgreement",
                                    "KeyEncipherment"
                                  ],
                                  "locality": [],
                                  "max_ttl_seconds": 86400,
                                  "name": "example-certificate-template",
                                  "not_before_duration_seconds": 30,
                                  "organization": [],
                                  "ou": [],
                                  "policy_identifiers": [],
                                  "postal_code": [],
                                  "province": [],
                                  "require_cn": true,
                                  "secret_type": "private_cert",
                                  "server_flag": true,
                                  "street_address": [],
                                  "ttl_seconds": 28800,
                                  "updated_at": "2030-03-14T15:26:17.257Z",
                                  "use_csr_common_name": true,
                                  "use_csr_sans": true
                                }
                              • The certificate template.

                                {
                                  "allow_any_name": true,
                                  "allow_bare_domains": true,
                                  "allow_glob_domains": true,
                                  "allow_ip_sans": true,
                                  "allow_localhost": true,
                                  "allow_subdomains": false,
                                  "allowed_domains": [
                                    "example.com",
                                    "acme.com"
                                  ],
                                  "allowed_domains_template": true,
                                  "allowed_other_sans": [
                                    "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com",
                                    "1.3.6.1.4.1.201.10.5.5;UTF-8:*"
                                  ],
                                  "allowed_secret_groups": "d898bb90-82f6-4d61-b5cc-b079b66cfa76",
                                  "allowed_uri_sans": [
                                    "example.com",
                                    "acme://*"
                                  ],
                                  "basic_constraints_valid_for_non_ca": false,
                                  "certificate_authority": "example-intermediate-CA",
                                  "client_flag": true,
                                  "code_signing_flag": false,
                                  "config_type": "private_cert_configuration_template",
                                  "country": [],
                                  "created_at": "2030-03-14T15:26:17.257Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "email_protection_flag": false,
                                  "enforce_hostnames": false,
                                  "ext_key_usage": [],
                                  "ext_key_usage_oids": [],
                                  "key_bits": 2048,
                                  "key_type": "rsa",
                                  "key_usage": [
                                    "DigitalSignature",
                                    "KeyAgreement",
                                    "KeyEncipherment"
                                  ],
                                  "locality": [],
                                  "max_ttl_seconds": 86400,
                                  "name": "example-certificate-template",
                                  "not_before_duration_seconds": 30,
                                  "organization": [],
                                  "ou": [],
                                  "policy_identifiers": [],
                                  "postal_code": [],
                                  "province": [],
                                  "require_cn": true,
                                  "secret_type": "private_cert",
                                  "server_flag": true,
                                  "street_address": [],
                                  "ttl_seconds": 28800,
                                  "updated_at": "2030-03-14T15:26:17.257Z",
                                  "use_csr_common_name": true,
                                  "use_csr_sans": true
                                }
                              • Example of the configuration of the IBM Cloud IAM credentials engine

                                {
                                  "api_key": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                                  "disabled": false,
                                  "config_type": "iam_credentials_configuration",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "iam-configuration",
                                  "secret_type": "iam_credentials",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • Example of the configuration of the IBM Cloud IAM credentials engine

                                {
                                  "api_key": "2epu_ykv0PMp2MhxQmDMn7VzrkSlBwi6BOI8uthi_RCS",
                                  "disabled": false,
                                  "config_type": "iam_credentials_configuration",
                                  "created_at": "2022-06-27T11:58:15Z",
                                  "created_by": "iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21",
                                  "name": "iam-configuration",
                                  "secret_type": "iam_credentials",
                                  "updated_at": "2022-10-05T21:33:11Z"
                                }
                              • Example MultipleChoices error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 300,
                                  "errors": [
                                    {
                                      "code": "multiple_choices",
                                      "message": "The request has more than one possible responses",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example MultipleChoices error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 300,
                                  "errors": [
                                    {
                                      "code": "multiple_choices",
                                      "message": "The request has more than one possible responses",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad request error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 400,
                                  "errors": [
                                    {
                                      "code": "bad_request",
                                      "message": "required.name:property \"name\" is missing",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad request error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 400,
                                  "errors": [
                                    {
                                      "code": "bad_request",
                                      "message": "required.name:property \"name\" is missing",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of unauthorized error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 401,
                                  "errors": [
                                    {
                                      "code": "unauthorized",
                                      "message": "You provided no credentials or invalid credentials.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of unauthorized error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 401,
                                  "errors": [
                                    {
                                      "code": "unauthorized",
                                      "message": "You provided no credentials or invalid credentials.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of payment required error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 402,
                                  "errors": [
                                    {
                                      "code": "payment_required",
                                      "message": "Your Trial plan is now expired.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of payment required error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 402,
                                  "errors": [
                                    {
                                      "code": "payment_required",
                                      "message": "Your Trial plan is now expired.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of forbidden error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 403,
                                  "errors": [
                                    {
                                      "code": "access_forbidden",
                                      "message": "You are not allowed to access this resource.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of forbidden error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 403,
                                  "errors": [
                                    {
                                      "code": "access_forbidden",
                                      "message": "You are not allowed to access this resource.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of NotFound error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 404,
                                  "errors": [
                                    {
                                      "code": "not_found",
                                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of NotFound error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 404,
                                  "errors": [
                                    {
                                      "code": "not_found",
                                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of internal server error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 500,
                                  "errors": [
                                    {
                                      "code": "internal_server_error",
                                      "message": "Internal server error",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of internal server error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 500,
                                  "errors": [
                                    {
                                      "code": "internal_server_error",
                                      "message": "Internal server error",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad gateway error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 502,
                                  "errors": [
                                    {
                                      "code": "bad_gateway",
                                      "message": "Bad Gateway",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad gateway error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 502,
                                  "errors": [
                                    {
                                      "code": "bad_gateway",
                                      "message": "Bad Gateway",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of service unavailable error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 503,
                                  "errors": [
                                    {
                                      "code": "service_unavailable",
                                      "message": "Service Unavailable",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of service unavailable error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 503,
                                  "errors": [
                                    {
                                      "code": "service_unavailable",
                                      "message": "Service Unavailable",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }

                              Delete a configuration

                              Delete a configuration by specifying its name.

                              Delete a configuration by specifying its name.

                              Delete a configuration by specifying its name.

                              Delete a configuration by specifying its name.

                              Delete a configuration by specifying its name.

                              DELETE /api/v2/configurations/{name}
                              ServiceCall<Void> deleteConfiguration(DeleteConfigurationOptions deleteConfigurationOptions)
                              deleteConfiguration(params)
                              delete_configuration(
                                      self,
                                      name: str,
                                      *,
                                      x_sm_accept_configuration_type: Optional[str] = None,
                                      **kwargs,
                                  ) -> DetailedResponse
                              (secretsManager *SecretsManagerV2) DeleteConfiguration(deleteConfigurationOptions *DeleteConfigurationOptions) (response *core.DetailedResponse, err error)
                              (secretsManager *SecretsManagerV2) DeleteConfigurationWithContext(ctx context.Context, deleteConfigurationOptions *DeleteConfigurationOptions) (response *core.DetailedResponse, err error)

                              Authorization

                              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                              • secrets-manager.configuration.delete

                              Auditing

                              Calling this method generates the following auditing event.

                              • secrets-manager.configuration.delete

                              Request

                              Use the DeleteConfigurationOptions.Builder to create a DeleteConfigurationOptions object that contains the parameter values for the deleteConfiguration method.

                              Instantiate the DeleteConfigurationOptions struct and set the fields to provide parameter values for the DeleteConfiguration method.

                              Custom Headers

                              • The configuration type of this configuration - use this header to resolve 300 error responses.

                                Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                                Example: public_cert_configuration_dns_cloud_internet_services

                              Path Parameters

                              • The name that uniquely identifies a configuration.

                                Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                                Example: configuration-name

                              The deleteConfiguration options.

                              parameters

                              • The name that uniquely identifies a configuration.

                                Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                                Examples:
                              • The configuration type of this configuration - use this header to resolve 300 error responses.

                                Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                                Examples:

                              parameters

                              • The name that uniquely identifies a configuration.

                                Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                                Examples:
                              • The configuration type of this configuration - use this header to resolve 300 error responses.

                                Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                                Examples:

                              WithContext method only

                              The DeleteConfiguration options.

                              • curl -X DELETE --location --header "Authorization: Bearer ${iam_token}"   "${base_url}/api/v2/configurations/${name}"
                              • DeleteConfigurationOptions deleteConfigurationOptions = new DeleteConfigurationOptions.Builder()
                                  .name(configurationNameForGetConfigurationLink)
                                  .xSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                                  .build();
                                
                                Response<Void> response = secretsManagerService.deleteConfiguration(deleteConfigurationOptions).execute();
                              • const params = {
                                  name: configurationNameForGetConfigurationLink,
                                  xSmAcceptConfigurationType: 'public_cert_configuration_dns_cloud_internet_services',
                                };
                                
                                try {
                                  await secretsManagerService.deleteConfiguration(params);
                                } catch (err) {
                                  console.warn(err);
                                }
                              • response = secrets_manager_service.delete_configuration(
                                  name=configuration_name_for_get_configuration_link,
                                  x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
                                )
                              • deleteConfigurationOptions := secretsManagerService.NewDeleteConfigurationOptions(
                                  configurationNameForGetConfigurationLink,
                                )
                                deleteConfigurationOptions.SetXSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                                
                                response, err := secretsManagerService.DeleteConfiguration(deleteConfigurationOptions)
                                if err != nil {
                                  panic(err)
                                }
                                if response.StatusCode != 204 {
                                  fmt.Printf("\nUnexpected response status code received from DeleteConfiguration(): %d\n", response.StatusCode)
                                }

                              Response

                              Status Code

                              • The configuration was successfully deleted.

                              • MultipleChoices

                              • BadRequest

                              • Unauthorized

                              • PaymentRequired

                              • Forbidden

                              • The specified resource was not found

                              • Conflict

                              • InternalServerError

                              • BadGatewayError

                              • ServiceUnavailableError

                              Example responses
                              • Example MultipleChoices error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 300,
                                  "errors": [
                                    {
                                      "code": "multiple_choices",
                                      "message": "The request has more than one possible responses",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example MultipleChoices error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 300,
                                  "errors": [
                                    {
                                      "code": "multiple_choices",
                                      "message": "The request has more than one possible responses",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad request error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 400,
                                  "errors": [
                                    {
                                      "code": "bad_request",
                                      "message": "required.name:property \"name\" is missing",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad request error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 400,
                                  "errors": [
                                    {
                                      "code": "bad_request",
                                      "message": "required.name:property \"name\" is missing",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of unauthorized error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 401,
                                  "errors": [
                                    {
                                      "code": "unauthorized",
                                      "message": "You provided no credentials or invalid credentials.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of unauthorized error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 401,
                                  "errors": [
                                    {
                                      "code": "unauthorized",
                                      "message": "You provided no credentials or invalid credentials.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of payment required error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 402,
                                  "errors": [
                                    {
                                      "code": "payment_required",
                                      "message": "Your Trial plan is now expired.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of payment required error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 402,
                                  "errors": [
                                    {
                                      "code": "payment_required",
                                      "message": "Your Trial plan is now expired.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of forbidden error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 403,
                                  "errors": [
                                    {
                                      "code": "access_forbidden",
                                      "message": "You are not allowed to access this resource.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of forbidden error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 403,
                                  "errors": [
                                    {
                                      "code": "access_forbidden",
                                      "message": "You are not allowed to access this resource.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of NotFound error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 404,
                                  "errors": [
                                    {
                                      "code": "not_found",
                                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of NotFound error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 404,
                                  "errors": [
                                    {
                                      "code": "not_found",
                                      "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example Conflict error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 409,
                                  "errors": [
                                    {
                                      "code": "conflict",
                                      "message": "The request conflicts with the current state of the target resource",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example Conflict error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 409,
                                  "errors": [
                                    {
                                      "code": "conflict",
                                      "message": "The request conflicts with the current state of the target resource",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of internal server error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 500,
                                  "errors": [
                                    {
                                      "code": "internal_server_error",
                                      "message": "Internal server error",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of internal server error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 500,
                                  "errors": [
                                    {
                                      "code": "internal_server_error",
                                      "message": "Internal server error",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad gateway error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 502,
                                  "errors": [
                                    {
                                      "code": "bad_gateway",
                                      "message": "Bad Gateway",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of bad gateway error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 502,
                                  "errors": [
                                    {
                                      "code": "bad_gateway",
                                      "message": "Bad Gateway",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of service unavailable error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 503,
                                  "errors": [
                                    {
                                      "code": "service_unavailable",
                                      "message": "Service Unavailable",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }
                              • Example of service unavailable error

                                {
                                  "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                  "status_code": 503,
                                  "errors": [
                                    {
                                      "code": "service_unavailable",
                                      "message": "Service Unavailable",
                                      "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                    }
                                  ]
                                }

                              Create a configuration action

                              Create a configuration action. This operation supports the following actions:

                              • private_cert_configuration_action_sign_intermediate: Sign an intermediate certificate authority.
                              • private_cert_configuration_action_sign_csr: Sign a certificate signing request.
                              • private_cert_configuration_action_set_signed: Set a signed intermediate certificate authority.
                              • private_cert_configuration_action_revoke_ca_certificate: Revoke an internally signed intermediate certificate authority certificate.
                              • private_cert_configuration_action_rotate_crl: Rotate the certificate revocation list (CRL) of an intermediate certificate authority.
                              • private_cert_configuration_action_rotate_intermediate: Rotate an internally signed intermediate certificate authority certificate.

                              Create a configuration action. This operation supports the following actions:

                              • private_cert_configuration_action_sign_intermediate: Sign an intermediate certificate authority.
                              • private_cert_configuration_action_sign_csr: Sign a certificate signing request.
                              • private_cert_configuration_action_set_signed: Set a signed intermediate certificate authority.
                              • private_cert_configuration_action_revoke_ca_certificate: Revoke an internally signed intermediate certificate authority certificate.
                              • private_cert_configuration_action_rotate_crl: Rotate the certificate revocation list (CRL) of an intermediate certificate authority.
                              • private_cert_configuration_action_rotate_intermediate: Rotate an internally signed intermediate certificate authority certificate.

                              Create a configuration action. This operation supports the following actions:

                              • private_cert_configuration_action_sign_intermediate: Sign an intermediate certificate authority.
                              • private_cert_configuration_action_sign_csr: Sign a certificate signing request.
                              • private_cert_configuration_action_set_signed: Set a signed intermediate certificate authority.
                              • private_cert_configuration_action_revoke_ca_certificate: Revoke an internally signed intermediate certificate authority certificate.
                              • private_cert_configuration_action_rotate_crl: Rotate the certificate revocation list (CRL) of an intermediate certificate authority.
                              • private_cert_configuration_action_rotate_intermediate: Rotate an internally signed intermediate certificate authority certificate.

                              Create a configuration action. This operation supports the following actions:

                              • private_cert_configuration_action_sign_intermediate: Sign an intermediate certificate authority.
                              • private_cert_configuration_action_sign_csr: Sign a certificate signing request.
                              • private_cert_configuration_action_set_signed: Set a signed intermediate certificate authority.
                              • private_cert_configuration_action_revoke_ca_certificate: Revoke an internally signed intermediate certificate authority certificate.
                              • private_cert_configuration_action_rotate_crl: Rotate the certificate revocation list (CRL) of an intermediate certificate authority.
                              • private_cert_configuration_action_rotate_intermediate: Rotate an internally signed intermediate certificate authority certificate.

                              Create a configuration action. This operation supports the following actions:

                              • private_cert_configuration_action_sign_intermediate: Sign an intermediate certificate authority.
                              • private_cert_configuration_action_sign_csr: Sign a certificate signing request.
                              • private_cert_configuration_action_set_signed: Set a signed intermediate certificate authority.
                              • private_cert_configuration_action_revoke_ca_certificate: Revoke an internally signed intermediate certificate authority certificate.
                              • private_cert_configuration_action_rotate_crl: Rotate the certificate revocation list (CRL) of an intermediate certificate authority.
                              • private_cert_configuration_action_rotate_intermediate: Rotate an internally signed intermediate certificate authority certificate.
                              POST /api/v2/configurations/{name}/actions
                              ServiceCall<ConfigurationAction> createConfigurationAction(CreateConfigurationActionOptions createConfigurationActionOptions)
                              createConfigurationAction(params)
                              create_configuration_action(
                                      self,
                                      name: str,
                                      config_action_prototype: 'ConfigurationActionPrototype',
                                      *,
                                      x_sm_accept_configuration_type: Optional[str] = None,
                                      **kwargs,
                                  ) -> DetailedResponse
                              (secretsManager *SecretsManagerV2) CreateConfigurationAction(createConfigurationActionOptions *CreateConfigurationActionOptions) (result ConfigurationActionIntf, response *core.DetailedResponse, err error)
                              (secretsManager *SecretsManagerV2) CreateConfigurationActionWithContext(ctx context.Context, createConfigurationActionOptions *CreateConfigurationActionOptions) (result ConfigurationActionIntf, response *core.DetailedResponse, err error)

                              Authorization

                              To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                              • secrets-manager.configuration-action.create

                              Auditing

                              Calling this method generates the following auditing event.

                              • secrets-manager.configuration-action.create

                              Request

                              Use the CreateConfigurationActionOptions.Builder to create a CreateConfigurationActionOptions object that contains the parameter values for the createConfigurationAction method.

                              Instantiate the CreateConfigurationActionOptions struct and set the fields to provide parameter values for the CreateConfigurationAction method.

                              Custom Headers

                              • The configuration type of this configuration - use this header to resolve 300 error responses.

                                Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                                Example: public_cert_configuration_dns_cloud_internet_services

                              Path Parameters

                              • The name that uniquely identifies a configuration.

                                Possible values: 2 ≤ length ≤ 128, Value must match regular expression (.*?)

                                Example: configuration-name

                              The request body of the action to rotate the CRL of an intermediate certificate authority for the private certificate configuration.

                              Example:

                              Rotate CRL of an intermediate certificate CA

                              The request body of the action to rotate the CRL of the private certificate configuration.

                              {
                                "action_type": "private_cert_configuration_action_rotate_crl"
                              }

                              The createConfigurationAction options.

                              parameters

                              • The name that uniquely identifies a configuration.

                                Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                                Examples:
                              • The request body of the action to rotate the CRL of an intermediate certificate authority for the private certificate configuration.

                                • The configuration type of this configuration - use this header to resolve 300 error responses.

                                  Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                                  Examples:

                                parameters

                                • The name that uniquely identifies a configuration.

                                  Possible values: 2 ≤ length ≤ 128, Value must match regular expression /(.*?)/

                                  Examples:
                                • The request body of the action to rotate the CRL of an intermediate certificate authority for the private certificate configuration.

                                  • The configuration type of this configuration - use this header to resolve 300 error responses.

                                    Allowable values: [public_cert_configuration_dns_cloud_internet_services,public_cert_configuration_dns_classic_infrastructure,public_cert_configuration_ca_lets_encrypt,private_cert_configuration_root_ca,private_cert_configuration_intermediate_ca,private_cert_configuration_template,iam_credentials_configuration]

                                    Examples:

                                  WithContext method only

                                  The CreateConfigurationAction options.

                                  • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "action_type": "private_cert_configuration_action_rotate_crl" }'   "${base_url}/api/v2/configurations/${name}/actions"
                                  • PrivateCertificateConfigurationActionRotateCRLPrototype configurationActionPrototypeModel = new PrivateCertificateConfigurationActionRotateCRLPrototype.Builder()
                                      .actionType("private_cert_configuration_action_rotate_crl")
                                      .build();
                                    CreateConfigurationActionOptions createConfigurationActionOptions = new CreateConfigurationActionOptions.Builder()
                                      .name(configurationNameForGetConfigurationLink)
                                      .configActionPrototype(configurationActionPrototypeModel)
                                      .xSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                                      .build();
                                    
                                    Response<ConfigurationAction> response = secretsManagerService.createConfigurationAction(createConfigurationActionOptions).execute();
                                    ConfigurationAction configurationAction = response.getResult();
                                    
                                    System.out.println(configurationAction);
                                  • // Request models needed by this operation.
                                    
                                    // PrivateCertificateConfigurationActionRotateCRLPrototype
                                    const configurationActionPrototypeModel = {
                                      action_type: 'private_cert_configuration_action_rotate_crl',
                                    };
                                    
                                    const params = {
                                      name: configurationNameForGetConfigurationLink,
                                      configActionPrototype: configurationActionPrototypeModel,
                                      xSmAcceptConfigurationType: 'public_cert_configuration_dns_cloud_internet_services',
                                    };
                                    
                                    let res;
                                    try {
                                      res = await secretsManagerService.createConfigurationAction(params);
                                      console.log(JSON.stringify(res.result, null, 2));
                                    } catch (err) {
                                      console.warn(err);
                                    }
                                  • configuration_action_prototype_model = {
                                      'action_type': 'private_cert_configuration_action_rotate_crl',
                                    }
                                    
                                    response = secrets_manager_service.create_configuration_action(
                                      name=configuration_name_for_get_configuration_link,
                                      config_action_prototype=configuration_action_prototype_model,
                                      x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
                                    )
                                    configuration_action = response.get_result()
                                    
                                    print(json.dumps(configuration_action, indent=2))
                                  • configurationActionPrototypeModel := &secretsmanagerv2.PrivateCertificateConfigurationActionRotateCRLPrototype{
                                      ActionType: core.StringPtr("private_cert_configuration_action_rotate_crl"),
                                    }
                                    
                                    createConfigurationActionOptions := secretsManagerService.NewCreateConfigurationActionOptions(
                                      configurationNameForGetConfigurationLink,
                                      configurationActionPrototypeModel,
                                    )
                                    createConfigurationActionOptions.SetXSmAcceptConfigurationType("public_cert_configuration_dns_cloud_internet_services")
                                    
                                    configurationAction, response, err := secretsManagerService.CreateConfigurationAction(createConfigurationActionOptions)
                                    if err != nil {
                                      panic(err)
                                    }
                                    b, _ := json.MarshalIndent(configurationAction, "", "  ")
                                    fmt.Println(string(b))

                                  Response

                                  The response body to specify the properties of the action to create a configuration.

                                  The response body to specify the properties of the action to revoke the private certificate.

                                  The response body to specify the properties of the action to revoke the private certificate.

                                  The response body to specify the properties of the action to revoke the private certificate.

                                  The response body to specify the properties of the action to revoke the private certificate.

                                  Status Code

                                  • The version action was successfully created.

                                  • MultipleChoices

                                  • BadRequest

                                  • Unauthorized

                                  • PaymentRequired

                                  • Forbidden

                                  • The specified resource was not found

                                  • Conflict

                                  • InternalServerError

                                  • BadGatewayError

                                  • ServiceUnavailableError

                                  Example responses
                                  • The response body of the action to rotate the CRL of the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_rotate_crl",
                                      "success": true
                                    }
                                  • The response body of the action to rotate the CRL of the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_rotate_crl",
                                      "success": true
                                    }
                                  • The request body of the action to revoke a private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_revoke_ca_certificate",
                                      "revocation_time_seconds": 1667982994
                                    }
                                  • The request body of the action to revoke a private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_revoke_ca_certificate",
                                      "revocation_time_seconds": 1667982994
                                    }
                                  • The response body of the action to rotate a private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_rotate_intermediate",
                                      "name": "intermediateCA",
                                      "type": "intermediate_certificate_authority",
                                      "config": {
                                        "alt_names": [
                                          "alt-name-1",
                                          "alt-name-2"
                                        ],
                                        "common_name": "example.com",
                                        "country": [],
                                        "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                        "data": {
                                          "ca_chain": [
                                            "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                                          ],
                                          "certificate": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bva\n-----END CERTIFICATE-----",
                                          "expiration": 1825612535,
                                          "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bvad\n-----END CERTIFICATE-----",
                                          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd"
                                        },
                                        "format": "pem",
                                        "intermediate_certificate_authority": "intermediateCA",
                                        "ip_sans": "127.0.0.1",
                                        "locality": [],
                                        "max_path_length": -1,
                                        "organization": [],
                                        "other_sans": [
                                          "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                        ],
                                        "ou": [],
                                        "permitted_dns_domains": [],
                                        "postal_code": [],
                                        "province": [],
                                        "street_address": [],
                                        "ttl": 2190,
                                        "uri_sans": "https://www.example.com/test",
                                        "use_csr_values": false
                                      }
                                    }
                                  • The response body of the action to rotate a private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_rotate_intermediate",
                                      "name": "intermediateCA",
                                      "type": "intermediate_certificate_authority",
                                      "config": {
                                        "alt_names": [
                                          "alt-name-1",
                                          "alt-name-2"
                                        ],
                                        "common_name": "example.com",
                                        "country": [],
                                        "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                        "data": {
                                          "ca_chain": [
                                            "-----BEGIN CERTIFICATE-----\nMIIE3jCCBGSgAwIBAgIUZfTbf3adn87l5J2Q2Aw+6Vk/qhowCgYIKoZIzj0EAwIw\n-----END CERTIFICATE-----"
                                          ],
                                          "certificate": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bva\n-----END CERTIFICATE-----",
                                          "expiration": 1825612535,
                                          "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bvad\n-----END CERTIFICATE-----",
                                          "serial_number": "03:e2:c6:e4:0b:7d:30:e2:e2:78:1b:b9:13:fd:f0:fc:89:dd"
                                        },
                                        "format": "pem",
                                        "intermediate_certificate_authority": "intermediateCA",
                                        "ip_sans": "127.0.0.1",
                                        "locality": [],
                                        "max_path_length": -1,
                                        "organization": [],
                                        "other_sans": [
                                          "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                        ],
                                        "ou": [],
                                        "permitted_dns_domains": [],
                                        "postal_code": [],
                                        "province": [],
                                        "street_address": [],
                                        "ttl": 2190,
                                        "uri_sans": "https://www.example.com/test",
                                        "use_csr_values": false
                                      }
                                    }
                                  • The response body of the action to sign the CSR of the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_sign_csr",
                                      "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                      "common_name": "example.com",
                                      "alt_names": [
                                        "alt-name-1",
                                        "alt-name-2"
                                      ],
                                      "ip_sans": "127.0.0.1",
                                      "uri_sans": "https://www.example.com/test",
                                      "other_sans": [
                                        "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                      ],
                                      "ttl": "2190h",
                                      "data": {
                                        "certificate": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bva\n-----END CERTIFICATE-----",
                                        "expiration": 1825612535,
                                        "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bvad\n-----END CERTIFICATE-----"
                                      },
                                      "format": "pem",
                                      "max_path_length": -1,
                                      "use_csr_values": false
                                    }
                                  • The response body of the action to sign the CSR of the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_sign_csr",
                                      "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICiDCCAXACAQAwGDEWMBQGA1UEAxMNct5ANo8jybxCwNjHOA==\n-----END CERTIFICATE REQUEST-----",
                                      "common_name": "example.com",
                                      "alt_names": [
                                        "alt-name-1",
                                        "alt-name-2"
                                      ],
                                      "ip_sans": "127.0.0.1",
                                      "uri_sans": "https://www.example.com/test",
                                      "other_sans": [
                                        "1.2.3.5.4.3.201.10.4.3;utf8:test@example.com"
                                      ],
                                      "ttl": "2190h",
                                      "data": {
                                        "certificate": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bva\n-----END CERTIFICATE-----",
                                        "expiration": 1825612535,
                                        "issuing_ca": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bvad\n-----END CERTIFICATE-----"
                                      },
                                      "format": "pem",
                                      "max_path_length": -1,
                                      "use_csr_values": false
                                    }
                                  • The response body of the action to sign the intermediate certificate authority for the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_sign_intermediate",
                                      "common_name": "example.com",
                                      "intermediate_certificate_authority": "example-intermediate-CA"
                                    }
                                  • The response body of the action to sign the intermediate certificate authority for the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_sign_intermediate",
                                      "common_name": "example.com",
                                      "intermediate_certificate_authority": "example-intermediate-CA"
                                    }
                                  • The response body of the action to sign the set for the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_set_signed",
                                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bva\n-----END CERTIFICATE-----"
                                    }
                                  • The response body of the action to sign the set for the private certificate configuration.

                                    {
                                      "action_type": "private_cert_configuration_action_set_signed",
                                      "certificate": "-----BEGIN CERTIFICATE-----\nMIIGRjCCBS6gAwIBAgIUSKW6zI+E9JU4bva\n-----END CERTIFICATE-----"
                                    }
                                  • Example MultipleChoices error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 300,
                                      "errors": [
                                        {
                                          "code": "multiple_choices",
                                          "message": "The request has more than one possible responses",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example MultipleChoices error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 300,
                                      "errors": [
                                        {
                                          "code": "multiple_choices",
                                          "message": "The request has more than one possible responses",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example Conflict error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 409,
                                      "errors": [
                                        {
                                          "code": "conflict",
                                          "message": "The request conflicts with the current state of the target resource",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example Conflict error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 409,
                                      "errors": [
                                        {
                                          "code": "conflict",
                                          "message": "The request conflicts with the current state of the target resource",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }

                                  Register with Event Notifications instance

                                  Create a registration between a Secrets Manager instance and Event Notifications.

                                  A successful request adds Secrets Manager as a source that you can reference from your Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Create a registration between a Secrets Manager instance and Event Notifications.

                                  A successful request adds Secrets Manager as a source that you can reference from your Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Create a registration between a Secrets Manager instance and Event Notifications.

                                  A successful request adds Secrets Manager as a source that you can reference from your Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Create a registration between a Secrets Manager instance and Event Notifications.

                                  A successful request adds Secrets Manager as a source that you can reference from your Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Create a registration between a Secrets Manager instance and Event Notifications.

                                  A successful request adds Secrets Manager as a source that you can reference from your Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  POST /api/v2/notifications/registration
                                  ServiceCall<NotificationsRegistration> createNotificationsRegistration(CreateNotificationsRegistrationOptions createNotificationsRegistrationOptions)
                                  createNotificationsRegistration(params)
                                  create_notifications_registration(
                                          self,
                                          event_notifications_instance_crn: str,
                                          event_notifications_source_name: str,
                                          *,
                                          event_notifications_source_description: Optional[str] = None,
                                          **kwargs,
                                      ) -> DetailedResponse
                                  (secretsManager *SecretsManagerV2) CreateNotificationsRegistration(createNotificationsRegistrationOptions *CreateNotificationsRegistrationOptions) (result *NotificationsRegistration, response *core.DetailedResponse, err error)
                                  (secretsManager *SecretsManagerV2) CreateNotificationsRegistrationWithContext(ctx context.Context, createNotificationsRegistrationOptions *CreateNotificationsRegistrationOptions) (result *NotificationsRegistration, response *core.DetailedResponse, err error)

                                  Authorization

                                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                                  • secrets-manager.notifications-registration.create

                                  Auditing

                                  Calling this method generates the following auditing event.

                                  • secrets-manager.notifications-registration.create

                                  Request

                                  Use the CreateNotificationsRegistrationOptions.Builder to create a CreateNotificationsRegistrationOptions object that contains the parameter values for the createNotificationsRegistration method.

                                  Instantiate the CreateNotificationsRegistrationOptions struct and set the fields to provide parameter values for the CreateNotificationsRegistration method.

                                  The details of the Event Notifications registration request.

                                  Examples:

                                  Example Notifications registration configuration request body for Event Notifications.

                                  {
                                    "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::",
                                    "event_notifications_source_description": "Optional description of this source in an Event Notifications instance.",
                                    "event_notifications_source_name": "My Secrets Manager"
                                  }

                                  The createNotificationsRegistration options.

                                  parameters

                                  • A CRN that uniquely identifies an IBM Cloud resource.

                                    Possible values: 9 ≤ length ≤ 512, Value must match regular expression /^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/

                                    Examples:
                                  • The name that is displayed as a source that is in your Event Notifications instance.

                                    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /(.*?)/

                                    Examples:
                                  • An optional description for the source that is in your Event Notifications instance.

                                    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /(.*?)/

                                    Examples:

                                  parameters

                                  • A CRN that uniquely identifies an IBM Cloud resource.

                                    Possible values: 9 ≤ length ≤ 512, Value must match regular expression /^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}$/

                                    Examples:
                                  • The name that is displayed as a source that is in your Event Notifications instance.

                                    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /(.*?)/

                                    Examples:
                                  • An optional description for the source that is in your Event Notifications instance.

                                    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /(.*?)/

                                    Examples:

                                  WithContext method only

                                  The CreateNotificationsRegistration options.

                                  • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::", "event_notifications_source_description": "Optional description of this source in an Event Notifications instance.", "event_notifications_source_name": "My Secrets Manager" }'   "${base_url}/api/v2/notifications/registration"
                                  • CreateNotificationsRegistrationOptions createNotificationsRegistrationOptions = new CreateNotificationsRegistrationOptions.Builder()
                                      .eventNotificationsInstanceCrn("crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::")
                                      .eventNotificationsSourceName("My Secrets Manager")
                                      .eventNotificationsSourceDescription("Optional description of this source in an Event Notifications instance.")
                                      .build();
                                    
                                    Response<NotificationsRegistration> response = secretsManagerService.createNotificationsRegistration(createNotificationsRegistrationOptions).execute();
                                    NotificationsRegistration notificationsRegistration = response.getResult();
                                    
                                    System.out.println(notificationsRegistration);
                                  • const params = {
                                      eventNotificationsInstanceCrn: 'crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::',
                                      eventNotificationsSourceName: 'My Secrets Manager',
                                      eventNotificationsSourceDescription: 'Optional description of this source in an Event Notifications instance.',
                                    };
                                    
                                    let res;
                                    try {
                                      res = await secretsManagerService.createNotificationsRegistration(params);
                                      console.log(JSON.stringify(res.result, null, 2));
                                    } catch (err) {
                                      console.warn(err);
                                    }
                                  • response = secrets_manager_service.create_notifications_registration(
                                      event_notifications_instance_crn='crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::',
                                      event_notifications_source_name='My Secrets Manager',
                                      event_notifications_source_description='Optional description of this source in an Event Notifications instance.',
                                    )
                                    notifications_registration = response.get_result()
                                    
                                    print(json.dumps(notifications_registration, indent=2))
                                  • createNotificationsRegistrationOptions := secretsManagerService.NewCreateNotificationsRegistrationOptions(
                                      "crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::",
                                      "My Secrets Manager",
                                    )
                                    createNotificationsRegistrationOptions.SetEventNotificationsSourceDescription("Optional description of this source in an Event Notifications instance.")
                                    
                                    notificationsRegistration, response, err := secretsManagerService.CreateNotificationsRegistration(createNotificationsRegistrationOptions)
                                    if err != nil {
                                      panic(err)
                                    }
                                    b, _ := json.MarshalIndent(notificationsRegistration, "", "  ")
                                    fmt.Println(string(b))

                                  Response

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  Status Code

                                  • The notification registration was successfully created.

                                  • BadRequest

                                  • Unauthorized

                                  • PaymentRequired

                                  • Forbidden

                                  • The specified resource was not found

                                  • Conflict

                                  • InternalServerError

                                  • BadGatewayError

                                  • ServiceUnavailableError

                                  Example responses
                                  • Example Notifications registration configuration details for Event Notifications.

                                    {
                                      "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::"
                                    }
                                  • Example Notifications registration configuration details for Event Notifications.

                                    {
                                      "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::"
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example Conflict error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 409,
                                      "errors": [
                                        {
                                          "code": "conflict",
                                          "message": "The request conflicts with the current state of the target resource",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example Conflict error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 409,
                                      "errors": [
                                        {
                                          "code": "conflict",
                                          "message": "The request conflicts with the current state of the target resource",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }

                                  Get Event Notifications registration details

                                  Get the details of the registration between your Secrets Manager instance and Event Notifications.

                                  Get the details of the registration between your Secrets Manager instance and Event Notifications.

                                  Get the details of the registration between your Secrets Manager instance and Event Notifications.

                                  Get the details of the registration between your Secrets Manager instance and Event Notifications.

                                  Get the details of the registration between your Secrets Manager instance and Event Notifications.

                                  GET /api/v2/notifications/registration
                                  ServiceCall<NotificationsRegistration> getNotificationsRegistration()
                                  getNotificationsRegistration(params)
                                  get_notifications_registration(
                                          self,
                                          **kwargs,
                                      ) -> DetailedResponse
                                  (secretsManager *SecretsManagerV2) GetNotificationsRegistration(getNotificationsRegistrationOptions *GetNotificationsRegistrationOptions) (result *NotificationsRegistration, response *core.DetailedResponse, err error)
                                  (secretsManager *SecretsManagerV2) GetNotificationsRegistrationWithContext(ctx context.Context, getNotificationsRegistrationOptions *GetNotificationsRegistrationOptions) (result *NotificationsRegistration, response *core.DetailedResponse, err error)

                                  Authorization

                                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                                  • secrets-manager.notifications-registration.read

                                  Auditing

                                  Calling this method generates the following auditing event.

                                  • secrets-manager.notifications-registration.read

                                  Request

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  WithContext method only

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/api/v2/notifications/registration"
                                  • GetNotificationsRegistrationOptions getNotificationsRegistrationOptions = new GetNotificationsRegistrationOptions();
                                    
                                    Response<NotificationsRegistration> response = secretsManagerService.getNotificationsRegistration(getNotificationsRegistrationOptions).execute();
                                    NotificationsRegistration notificationsRegistration = response.getResult();
                                    
                                    System.out.println(notificationsRegistration);
                                  • let res;
                                    try {
                                      res = await secretsManagerService.getNotificationsRegistration({});
                                      console.log(JSON.stringify(res.result, null, 2));
                                    } catch (err) {
                                      console.warn(err);
                                    }
                                  • response = secrets_manager_service.get_notifications_registration()
                                    notifications_registration = response.get_result()
                                    
                                    print(json.dumps(notifications_registration, indent=2))
                                  • getNotificationsRegistrationOptions := secretsManagerService.NewGetNotificationsRegistrationOptions()
                                    
                                    notificationsRegistration, response, err := secretsManagerService.GetNotificationsRegistration(getNotificationsRegistrationOptions)
                                    if err != nil {
                                      panic(err)
                                    }
                                    b, _ := json.MarshalIndent(notificationsRegistration, "", "  ")
                                    fmt.Println(string(b))

                                  Response

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  The details of the Event Notifications registration.

                                  Status Code

                                  • The registration details were successfully retrieved.

                                  • BadRequest

                                  • Unauthorized

                                  • PaymentRequired

                                  • Forbidden

                                  • The specified resource was not found

                                  • InternalServerError

                                  • BadGatewayError

                                  • ServiceUnavailableError

                                  Example responses
                                  • Example Notifications registration configuration details for Event Notifications.

                                    {
                                      "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::"
                                    }
                                  • Example Notifications registration configuration details for Event Notifications.

                                    {
                                      "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/22018f3c34ff4ff193698d15ca316946:578ad1a4-2fd8-4e66-95d5-79a842ba91f8::"
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }

                                  Unregister from Event Notifications instance

                                  Delete the registration between your Secrets Manager instance and Event Notifications.

                                  A successful request removes your Secrets Manager instance as a source in Event Notifications.

                                  Delete the registration between your Secrets Manager instance and Event Notifications.

                                  A successful request removes your Secrets Manager instance as a source in Event Notifications.

                                  Delete the registration between your Secrets Manager instance and Event Notifications.

                                  A successful request removes your Secrets Manager instance as a source in Event Notifications.

                                  Delete the registration between your Secrets Manager instance and Event Notifications.

                                  A successful request removes your Secrets Manager instance as a source in Event Notifications.

                                  Delete the registration between your Secrets Manager instance and Event Notifications.

                                  A successful request removes your Secrets Manager instance as a source in Event Notifications.

                                  DELETE /api/v2/notifications/registration
                                  ServiceCall<Void> deleteNotificationsRegistration()
                                  deleteNotificationsRegistration(params)
                                  delete_notifications_registration(
                                          self,
                                          **kwargs,
                                      ) -> DetailedResponse
                                  (secretsManager *SecretsManagerV2) DeleteNotificationsRegistration(deleteNotificationsRegistrationOptions *DeleteNotificationsRegistrationOptions) (response *core.DetailedResponse, err error)
                                  (secretsManager *SecretsManagerV2) DeleteNotificationsRegistrationWithContext(ctx context.Context, deleteNotificationsRegistrationOptions *DeleteNotificationsRegistrationOptions) (response *core.DetailedResponse, err error)

                                  Authorization

                                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                                  • secrets-manager.notifications-registration.delete

                                  Auditing

                                  Calling this method generates the following auditing event.

                                  • secrets-manager.notifications-registration.delete

                                  Request

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  WithContext method only

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  • curl -X DELETE --location --header "Authorization: Bearer ${iam_token}"   "${base_url}/api/v2/notifications/registration"
                                  • DeleteNotificationsRegistrationOptions deleteNotificationsRegistrationOptions = new DeleteNotificationsRegistrationOptions();
                                    
                                    Response<Void> response = secretsManagerService.deleteNotificationsRegistration(deleteNotificationsRegistrationOptions).execute();
                                  • try {
                                      await secretsManagerService.deleteNotificationsRegistration({});
                                    } catch (err) {
                                      console.warn(err);
                                    }
                                  • response = secrets_manager_service.delete_notifications_registration()
                                  • deleteNotificationsRegistrationOptions := secretsManagerService.NewDeleteNotificationsRegistrationOptions()
                                    
                                    response, err := secretsManagerService.DeleteNotificationsRegistration(deleteNotificationsRegistrationOptions)
                                    if err != nil {
                                      panic(err)
                                    }
                                    if response.StatusCode != 204 {
                                      fmt.Printf("\nUnexpected response status code received from DeleteNotificationsRegistration(): %d\n", response.StatusCode)
                                    }

                                  Response

                                  Status Code

                                  • The registration was successfully deleted.

                                  • BadRequest

                                  • Unauthorized

                                  • PaymentRequired

                                  • Forbidden

                                  • The specified resource was not found

                                  • InternalServerError

                                  • BadGatewayError

                                  • ServiceUnavailableError

                                  Example responses
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }

                                  Send a test event for Event Notifications registrations

                                  Send a test event from a Secrets Manager instance to a configured Event Notifications instance.

                                  A successful request sends a test event to the Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Send a test event from a Secrets Manager instance to a configured Event Notifications instance.

                                  A successful request sends a test event to the Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Send a test event from a Secrets Manager instance to a configured Event Notifications instance.

                                  A successful request sends a test event to the Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Send a test event from a Secrets Manager instance to a configured Event Notifications instance.

                                  A successful request sends a test event to the Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  Send a test event from a Secrets Manager instance to a configured Event Notifications instance.

                                  A successful request sends a test event to the Event Notifications instance. For more information about enabling notifications for Secrets Manager, check out the docs.

                                  GET /api/v2/notifications/registration/test
                                  ServiceCall<Void> getNotificationsRegistrationTest()
                                  getNotificationsRegistrationTest(params)
                                  get_notifications_registration_test(
                                          self,
                                          **kwargs,
                                      ) -> DetailedResponse
                                  (secretsManager *SecretsManagerV2) GetNotificationsRegistrationTest(getNotificationsRegistrationTestOptions *GetNotificationsRegistrationTestOptions) (response *core.DetailedResponse, err error)
                                  (secretsManager *SecretsManagerV2) GetNotificationsRegistrationTestWithContext(ctx context.Context, getNotificationsRegistrationTestOptions *GetNotificationsRegistrationTestOptions) (response *core.DetailedResponse, err error)

                                  Authorization

                                  To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

                                  • secrets-manager.notifications-registration.test

                                  Auditing

                                  Calling this method generates the following auditing event.

                                  • secrets-manager.notifications-registration.test

                                  Request

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  WithContext method only

                                  No Request Parameters

                                  This method does not accept any request parameters.

                                  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   "${base_url}/api/v2/notifications/registration/test"
                                  • GetNotificationsRegistrationTestOptions getNotificationsRegistrationTestOptions = new GetNotificationsRegistrationTestOptions();
                                    
                                    Response<Void> response = secretsManagerService.getNotificationsRegistrationTest(getNotificationsRegistrationTestOptions).execute();
                                  • try {
                                      await secretsManagerService.getNotificationsRegistrationTest({});
                                    } catch (err) {
                                      console.warn(err);
                                    }
                                  • response = secrets_manager_service.get_notifications_registration_test()
                                  • getNotificationsRegistrationTestOptions := secretsManagerService.NewGetNotificationsRegistrationTestOptions()
                                    
                                    response, err := secretsManagerService.GetNotificationsRegistrationTest(getNotificationsRegistrationTestOptions)
                                    if err != nil {
                                      panic(err)
                                    }
                                    if response.StatusCode != 204 {
                                      fmt.Printf("\nUnexpected response status code received from GetNotificationsRegistrationTest(): %d\n", response.StatusCode)
                                    }

                                  Response

                                  Status Code

                                  • The test event was successfully sent to Event Notifications.

                                  • BadRequest

                                  • Unauthorized

                                  • PaymentRequired

                                  • Forbidden

                                  • The specified resource was not found

                                  • InternalServerError

                                  • BadGatewayError

                                  • ServiceUnavailableError

                                  Example responses
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad request error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 400,
                                      "errors": [
                                        {
                                          "code": "bad_request",
                                          "message": "required.name:property \"name\" is missing",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of unauthorized error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 401,
                                      "errors": [
                                        {
                                          "code": "unauthorized",
                                          "message": "You provided no credentials or invalid credentials.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of payment required error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 402,
                                      "errors": [
                                        {
                                          "code": "payment_required",
                                          "message": "Your Trial plan is now expired.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of forbidden error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 403,
                                      "errors": [
                                        {
                                          "code": "access_forbidden",
                                          "message": "You are not allowed to access this resource.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of NotFound error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 404,
                                      "errors": [
                                        {
                                          "code": "not_found",
                                          "message": "A resource with id: 19f88b9c-4f2f-405c-b877-a09338575c3f was not found.",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of internal server error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 500,
                                      "errors": [
                                        {
                                          "code": "internal_server_error",
                                          "message": "Internal server error",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of bad gateway error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 502,
                                      "errors": [
                                        {
                                          "code": "bad_gateway",
                                          "message": "Bad Gateway",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  • Example of service unavailable error

                                    {
                                      "trace": "f9d9d161-e087-4871-963b-88ea3fe72aca",
                                      "status_code": 503,
                                      "errors": [
                                        {
                                          "code": "service_unavailable",
                                          "message": "Service Unavailable",
                                          "more_info": "https://cloud.ibm.com/apidocs/secrets-manager"
                                        }
                                      ]
                                    }
                                  id=curlclassName=tab-item-selected