Introduction

The IBM Cloud Databases v5 API is a supplemental layer that adds the capability to manage IBM Cloud Databases through a REST API. The API is designed to provide users and developers the ability to examine their database deployments, upgrade deployments, manage users, manage connections, monitor tasks, and work with backups.

Prior versions of the IBM Cloud Databases API documentation can be found at:

IBM Cloud Databases SDKs

The IBM Cloud Databases SDKs interact with the IBM Cloud Databases APIs. Current SDK availability:

Installing the IBM Cloud Databases Node.js SDK requires:

npm install ibm-cloud-databases

For general SDK usage information, refer to the Using the SDK section usage of the IBM Cloud SDK Common Readme file.

Installing the IBM Cloud Databases Go SDK requires:

If your application uses Go modules for dependency management (recommended), just add an import for each service that you will use in your application:

import (
	"github.com/IBM/cloud-databases-go-sdk/clouddatabasesv5"
)

Next, run go build or go mod tidy to download and install the new dependencies and update your application's go.mod file.

In the example shown, the clouddatabasesv5 part of the import path is the package name associated with the IBM Cloud Databases service.

Alternatively, you can use the go get command to download and install the appropriate packages needed by your application:

go get -u github.com/IBM/cloud-databases-go-sdk/clouddatabasesv5

Be sure to use the appropriate package name for the services used by your application.

For general SDK usage information, refer to the Using the SDK section usage of the IBM Cloud SDK Common Readme file.

Installing the IBM Cloud Databases Python SDK requires:

To install, use pip or easy_install:

pip install --upgrade "ibm-cloud-databases>=0.1.0"

or

easy_install --upgrade "ibm-cloud-databases>=0.1.0"

For general SDK usage information, refer to the Using the SDK section usage of the IBM Cloud SDK Common Readme file.

Authentication

Access to the API uses token authentication, by using the header Authorization: Bearer <token>. The token must be IAM-issued. You can send in an IAM API key directly as the token or use the API key to generate an IAM Bearer Token.

To call each method, you'll need to be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Managing access for IBM Cloud.

Event tracking

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 Certificate Manager activity, see Auditing events for IBM Cloud.

Deployment IDs and CRNs

Deployment IDs are CRNs on the IBM Cloud Databases v5 API platform. When you use the CRN, remember to URL encode the CRN value as it might include the forward-slash (/) %2F character. For example,

crn:v1:bluemix:public:databases-for-redis:us-south:a/274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::

becomes

crn:v1:bluemix:public:databases-for-redis:us-south:a%2F274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::

when URL encoded.

Error Handling

The IBM Cloud Databases API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response always indicates success. A 4xx type response is some sort of failure, and a 500 type response usually indicates an internal system error. Any of these responses might be accompanied by a JSON formatted body that contains more detailed error information.

Pagination

No endpoint currently returns paginated data.

Rate Limiting

No endpoint currently implements rate limiting.

This API does not support listing your deployments. You can retrieve a list of all service instances (including your database deployments) from the Resource Controller and the Resource Controller API.

Specifically, the [`GET /resource_instances endpoint](https://cloud.ibm.com/apidocs/resource-controller#get-a-list-of-all-resource-instances) either with no query parameters or with a `resource_plan_id` can be used to list your deployments.

This API does not support provisioning and decommissioning of database deployments. Those functions are the responsibility of the Resource Controller and the Resource Controller API.

Specifically the POST /resource_instances endpoint with appropriate resource_plan_id (such as databases-for-postgresql-standard or databases-for-redis-standard) can be used to create a new database instance. Consult the Cloud Databases provisioning documentation page for details of plan ids and other settings.

Methods

List all deployable databases

Returns a list of all the types and associated major versions of database deployments that can be provisioned.

Returns a list of all the types and associated major versions of database deployments that can be provisioned.

Returns a list of all the types and associated major versions of database deployments that can be provisioned.

Returns a list of all the types and associated major versions of database deployments that can be provisioned.

GET /deployables
(cloudDatabases *CloudDatabasesV5) ListDeployables(listDeployablesOptions *ListDeployablesOptions) (result *ListDeployablesResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) ListDeployablesWithContext(ctx context.Context, listDeployablesOptions *ListDeployablesOptions) (result *ListDeployablesResponse, response *core.DetailedResponse, err error)
listDeployables(params)
list_deployables(self,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/deployables

Request

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.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployables   -H 'Authorization: Bearer <>' \
  • listDeployablesOptions := cloudDatabasesService.NewListDeployablesOptions()
    
    listDeployablesResponse, response, err := cloudDatabasesService.ListDeployables(listDeployablesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(listDeployablesResponse, "", "  ")
    fmt.Println(string(b))
  • cloudDatabasesService.listDeployables({})
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • list_deployables_response = cloud_databases_service.list_deployables().get_result()
    
    print(json.dumps(list_deployables_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • Deployable database objects

  • Invalid token

Example responses
  • {
      "deployables": [
        {
          "type": "elasticsearch",
          "versions": [
            {
              "version": "6.7",
              "status": "stable",
              "is_preferred": true,
              "transitions": []
            },
            {
              "version": "5.6",
              "status": "stable",
              "is_preferred": false,
              "transitions": [
                {
                  "application": "elasticsearch",
                  "method": "restore",
                  "from_version": "5.6",
                  "to_version": "6.7"
                }
              ]
            }
          ]
        }
      ]
    }
  • {
      "deployables": [
        {
          "type": "elasticsearch",
          "versions": [
            {
              "version": "6.7",
              "status": "stable",
              "is_preferred": true,
              "transitions": []
            },
            {
              "version": "5.6",
              "status": "stable",
              "is_preferred": false,
              "transitions": [
                {
                  "application": "elasticsearch",
                  "method": "restore",
                  "from_version": "5.6",
                  "to_version": "6.7"
                }
              ]
            }
          ]
        }
      ]
    }

List all deployable regions

Returns a list of all the regions that deployments can be provisioned into from the current region. Used to determine region availability for read-only replicas

Returns a list of all the regions that deployments can be provisioned into from the current region. Used to determine region availability for read-only replicas.

Returns a list of all the regions that deployments can be provisioned into from the current region. Used to determine region availability for read-only replicas.

Returns a list of all the regions that deployments can be provisioned into from the current region. Used to determine region availability for read-only replicas.

GET /regions
(cloudDatabases *CloudDatabasesV5) ListRegions(listRegionsOptions *ListRegionsOptions) (result *ListRegionsResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) ListRegionsWithContext(ctx context.Context, listRegionsOptions *ListRegionsOptions) (result *ListRegionsResponse, response *core.DetailedResponse, err error)
listRegions(params)
list_regions(self,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/regions

Request

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.

No Request Parameters

This method does not accept any request parameters.

No Request Parameters

This method does not accept any request parameters.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/regions   -H 'Authorization: Bearer <>' \
  • listRegionsOptions := cloudDatabasesService.NewListRegionsOptions()
    
    listRegionsResponse, response, err := cloudDatabasesService.ListRegions(listRegionsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(listRegionsResponse, "", "  ")
    fmt.Println(string(b))
  • cloudDatabasesService.listRegions({})
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • list_regions_response = cloud_databases_service.list_regions().get_result()
    
    print(json.dumps(list_regions_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A regions object

  • Invalid token

Example responses
  • {
      "regions": [
        "eu-gb",
        "us-south"
      ]
    }
  • {
      "regions": [
        "eu-gb",
        "us-south"
      ]
    }

Get deployment information

Gets the full data that is associated with a deployment. This data includes the ID, name, database type, and version.

Gets the full data that is associated with a deployment. This data includes the ID, name, database type, and version.

Gets the full data that is associated with a deployment. This data includes the ID, name, database type, and version.

Gets the full data that is associated with a deployment. This data includes the ID, name, database type, and version.

GET /deployments/{id}
(cloudDatabases *CloudDatabasesV5) GetDeploymentInfo(getDeploymentInfoOptions *GetDeploymentInfoOptions) (result *GetDeploymentInfoResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) GetDeploymentInfoWithContext(ctx context.Context, getDeploymentInfoOptions *GetDeploymentInfoOptions) (result *GetDeploymentInfoResponse, response *core.DetailedResponse, err error)
getDeploymentInfo(params)
get_deployment_info(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/deployments/:deployment_id

Request

Instantiate the GetDeploymentInfoOptions struct and set the fields to provide parameter values for the GetDeploymentInfo method.

Path Parameters

  • Deployment ID

WithContext method only

The GetDeploymentInfo options.

parameters

  • Deployment ID.

parameters

  • Deployment ID.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}   -H 'Authorization: Bearer <>' \
  • getDeploymentInfoOptions := cloudDatabasesService.NewGetDeploymentInfoOptions(
      deploymentID,
    )
    
    getDeploymentInfoResponse, response, err := cloudDatabasesService.GetDeploymentInfo(getDeploymentInfoOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(getDeploymentInfoResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
    };
    
    cloudDatabasesService.getDeploymentInfo(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • get_deployment_info_response = cloud_databases_service.get_deployment_info(
      id=deployment_id,
    ).get_result()
    
    print(json.dumps(get_deployment_info_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A deployment response

  • Invalid token

Example responses
  • {
      "deployment": {
        "id": "crn:v1:staging:public:databases-for-enterprisedb:us-south:a/b9552134280015ebfde430a819fa4bb3:5589ecbf-de5f-4eac-9917-df0dd7e706c8::",
        "name": "crn:v1:staging:public:databases-for-enterprisedb:us-south:a/b9552134280015ebfde430a819fa4bb3:5589ecbf-de5f-4eac-9917-df0dd7e706c8::",
        "type": "enterprisedb",
        "platform": "classic",
        "platform_options": {
          "disk_encryption_key_crn": "",
          "backup_encryption_key_crn": ""
        },
        "version": "12",
        "admin_usernames": {
          "database": "admin"
        },
        "enable_private_endpoints": false,
        "enable_public_endpoints": true,
        "disablements": []
      }
    }
  • {
      "deployment": {
        "id": "crn:v1:staging:public:databases-for-enterprisedb:us-south:a/b9552134280015ebfde430a819fa4bb3:5589ecbf-de5f-4eac-9917-df0dd7e706c8::",
        "name": "crn:v1:staging:public:databases-for-enterprisedb:us-south:a/b9552134280015ebfde430a819fa4bb3:5589ecbf-de5f-4eac-9917-df0dd7e706c8::",
        "type": "enterprisedb",
        "platform": "classic",
        "platform_options": {
          "disk_encryption_key_crn": "",
          "backup_encryption_key_crn": ""
        },
        "version": "12",
        "admin_usernames": {
          "database": "admin"
        },
        "enable_private_endpoints": false,
        "enable_public_endpoints": true,
        "disablements": []
      }
    }

Creates a user based on user type

Creates a user in the database that can access the database through a connection.

Creates a user in the database that can access the database through a connection.

Creates a user in the database that can access the database through a connection.

Creates a user in the database that can access the database through a connection.

POST /deployments/{id}/users/{user_type}
(cloudDatabases *CloudDatabasesV5) CreateDatabaseUser(createDatabaseUserOptions *CreateDatabaseUserOptions) (result *CreateDatabaseUserResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) CreateDatabaseUserWithContext(ctx context.Context, createDatabaseUserOptions *CreateDatabaseUserOptions) (result *CreateDatabaseUserResponse, response *core.DetailedResponse, err error)
createDatabaseUser(params)
create_database_user(self,
        id: str,
        user_type: str,
        *,
        user: 'CreateDatabaseUserRequestUser' = None,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • POST /v5/ibm/deployments/:deployment_id/users/:user_type

Auditing

Calling this method generates the following auditing event.

  • <service_id>.user.create

Request

Instantiate the CreateDatabaseUserOptions struct and set the fields to provide parameter values for the CreateDatabaseUser method.

Path Parameters

  • Deployment ID

  • User type

    Examples:
    database
    ops_manager
    read_only_replica

Parameters for creating the user

Examples:
View

WithContext method only

The CreateDatabaseUser options.

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html
  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/users/{user_type}   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"user": {"username": "user", "password": "password123"}}' \
  • createDatabaseUserRequestUserModel := &clouddatabasesv5.CreateDatabaseUserRequestUser{
      Username: &username,
      Password: &password,
    }
    
    createDatabaseUserOptions := cloudDatabasesService.NewCreateDatabaseUserOptions(
      deploymentID,
      userType,
    )
    createDatabaseUserOptions.SetUser(createDatabaseUserRequestUserModel)
    
    createDatabaseUserResponse, response, err := cloudDatabasesService.CreateDatabaseUser(createDatabaseUserOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(createDatabaseUserResponse, "", "  ")
    fmt.Println(string(b))
  • const createDatabaseUserRequestUserModel = {
      username: username,
      password: password,
    };
    
    const params = {
      id: deploymentId,
      userType: userType,
      user: createDatabaseUserRequestUserModel,
    };
    
    cloudDatabasesService.createDatabaseUser(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • create_database_user_request_user_model = CreateDatabaseUserRequestUser(
      username=username,
      password=password,
    )
    
    create_database_user_response = cloud_databases_service.create_database_user(
      id=deployment_id,
      user_type=user_type,
      user=create_database_user_request_user_model,
    ).get_result()
    
    print(json.dumps(create_database_user_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task which is being run to create the user

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393b",
        "description": "Creating user for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:21:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393b",
        "description": "Creating user for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:21:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Set specified user's password

Sets the password of a specified user.

Sets the password of a specified user.

Sets the password of a specified user.

Sets the password of a specified user.

PATCH /deployments/{id}/users/{user_type}/{username}
(cloudDatabases *CloudDatabasesV5) ChangeUserPassword(changeUserPasswordOptions *ChangeUserPasswordOptions) (result *ChangeUserPasswordResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) ChangeUserPasswordWithContext(ctx context.Context, changeUserPasswordOptions *ChangeUserPasswordOptions) (result *ChangeUserPasswordResponse, response *core.DetailedResponse, err error)
changeUserPassword(params)
change_user_password(self,
        id: str,
        user_type: str,
        username: str,
        *,
        user: 'APasswordSettingUser' = None,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • PATCH /v5/ibm/deployments/:deployment_id/users/:user_type/:user_id

Auditing

Calling this method generates the following auditing event.

  • <service_id>.user-password.update

Request

Instantiate the ChangeUserPasswordOptions struct and set the fields to provide parameter values for the ChangeUserPassword method.

Path Parameters

  • Deployment ID

  • User type

    Example: database

  • User ID

    Example: user

New Password Details

Examples:
View

WithContext method only

The ChangeUserPassword options.

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html
  • User ID.

    Examples:
    value
    _source
    _lines
    _html

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html
  • User ID.

    Examples:
    value
    _source
    _lines
    _html
  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/users/{user_type}/{username}   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"user": {"password": "xyzzy"}}' \
  • aPasswordSettingUserModel := &clouddatabasesv5.APasswordSettingUser{
      Password: &newPassword,
    }
    
    changeUserPasswordOptions := cloudDatabasesService.NewChangeUserPasswordOptions(
      deploymentID,
      userType,
      username,
    )
    changeUserPasswordOptions.SetUser(aPasswordSettingUserModel)
    
    changeUserPasswordResponse, response, err := cloudDatabasesService.ChangeUserPassword(changeUserPasswordOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(changeUserPasswordResponse, "", "  ")
    fmt.Println(string(b))
  • const aPasswordSettingUserModel = {
      password: newPassowrd,
    };
    
    const params = {
      id: deploymentId,
      userType: userType,
      username: username,
      user: aPasswordSettingUserModel,
    };
    
    cloudDatabasesService.changeUserPassword(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • a_password_setting_user_model = APasswordSettingUser(
      password=new_password,
    )
    
    change_user_password_response = cloud_databases_service.change_user_password(
      id=deployment_id,
      user_type=user_type,
      username=username,
      user=a_password_setting_user_model,
    ).get_result()
    
    print(json.dumps(change_user_password_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task which is being run to set the user password

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393b",
        "description": "Setting user password for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:22:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393b",
        "description": "Setting user password for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:22:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Deletes a user based on user type

Removes a user from the deployment.

Removes a user from the deployment.

Removes a user from the deployment.

Removes a user from the deployment.

DELETE /deployments/{id}/users/{user_type}/{username}
(cloudDatabases *CloudDatabasesV5) DeleteDatabaseUser(deleteDatabaseUserOptions *DeleteDatabaseUserOptions) (result *DeleteDatabaseUserResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) DeleteDatabaseUserWithContext(ctx context.Context, deleteDatabaseUserOptions *DeleteDatabaseUserOptions) (result *DeleteDatabaseUserResponse, response *core.DetailedResponse, err error)
deleteDatabaseUser(params)
delete_database_user(self,
        id: str,
        user_type: str,
        username: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • DELETE /v5/ibm/deployments/:deployment_id/users/:user_type/:user_id

Auditing

Calling this method generates the following auditing event.

  • <service_id>.user.delete

Request

Instantiate the DeleteDatabaseUserOptions struct and set the fields to provide parameter values for the DeleteDatabaseUser method.

Path Parameters

  • Deployment ID

  • User type

    Example: database

  • Username

    Example: user

WithContext method only

The DeleteDatabaseUser options.

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html
  • Username.

    Examples:
    value
    _source
    _lines
    _html

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html
  • Username.

    Examples:
    value
    _source
    _lines
    _html
  • curl -X DELETE   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/users/{user_type}/{username}   -H 'Authorization: Bearer <>' \
  • deleteDatabaseUserOptions := cloudDatabasesService.NewDeleteDatabaseUserOptions(
      deploymentID,
      userType,
      username,
    )
    
    deleteDatabaseUserResponse, response, err := cloudDatabasesService.DeleteDatabaseUser(deleteDatabaseUserOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(deleteDatabaseUserResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
      userType: userType,
      username: username,
    };
    
    cloudDatabasesService.deleteDatabaseUser(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • delete_database_user_response = cloud_databases_service.delete_database_user(
      id=deployment_id,
      user_type=user_type,
      username=username,
    ).get_result()
    
    print(json.dumps(delete_database_user_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task which is being run to delete the user

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96555393b",
        "description": "Deleting user from database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-99bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 10,
        "created_at": "2018-03-28T10:23:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96555393b",
        "description": "Deleting user from database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-99bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 10,
        "created_at": "2018-03-28T10:23:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Discover user name and password information for a deployment for a user with an endpoint type.

Only for Redis v5 and prior: Discover connection information for a deployment for a user with an endpoint type.

GET /deployments/{id}/users/{user_id}/

Request

Path Parameters

  • Deployment ID

  • User ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/users/{user_id}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • User

  • Not Found

Example responses
  • {
      "connection": {
        "rediss": {
          "user": {
            "username": "admin",
            "password": "supersecure3"
          }
        }
      }
    }

Change your database configuration

Change your database configuration. Available for PostgreSQL, EnterpriseDB, MySQL, and Redis ONLY.

Change your database configuration. Available for PostgreSQL, EnterpriseDB, and Redis ONLY.

Change your database configuration. Available for PostgreSQL, EnterpriseDB, and Redis ONLY.

Change your database configuration. Available for PostgreSQL, EnterpriseDB, and Redis ONLY.

PATCH /deployments/{id}/configuration
(cloudDatabases *CloudDatabasesV5) UpdateDatabaseConfiguration(updateDatabaseConfigurationOptions *UpdateDatabaseConfigurationOptions) (result *UpdateDatabaseConfigurationResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) UpdateDatabaseConfigurationWithContext(ctx context.Context, updateDatabaseConfigurationOptions *UpdateDatabaseConfigurationOptions) (result *UpdateDatabaseConfigurationResponse, response *core.DetailedResponse, err error)
updateDatabaseConfiguration(params)
update_database_configuration(self,
        id: str,
        configuration: 'SetConfigurationConfiguration',
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • PATCH /v5/ibm/deployments/:deployment_id/configuration

Request

Instantiate the UpdateDatabaseConfigurationOptions struct and set the fields to provide parameter values for the UpdateDatabaseConfiguration method.

Path Parameters

  • Deployment ID

Database configuration

Examples:
View

WithContext method only

The UpdateDatabaseConfiguration options.

parameters

  • Deployment ID.

  • PostgreSQL and EnterpriseDB Configuration.

parameters

  • Deployment ID.

  • PostgreSQL and EnterpriseDB Configuration.

  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/configuration   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"configuration": {"": 200}}' \
  • setConfigurationConfigurationModel := &clouddatabasesv5.SetConfigurationConfigurationPgConfiguration{
      MaxConnections:          core.Int64Ptr(int64(200)),
      MaxPreparedTransactions: core.Int64Ptr(int64(0)),
      DeadlockTimeout:         core.Int64Ptr(int64(100)),
      EffectiveIoConcurrency:  core.Int64Ptr(int64(1)),
      MaxReplicationSlots:     core.Int64Ptr(int64(10)),
      MaxWalSenders:           core.Int64Ptr(int64(12)),
      SharedBuffers:           core.Int64Ptr(int64(16)),
      SynchronousCommit:       core.StringPtr("local"),
      WalLevel:                core.StringPtr("hot_standby"),
      ArchiveTimeout:          core.Int64Ptr(int64(300)),
      LogMinDurationStatement: core.Int64Ptr(int64(100)),
    }
    
    updateDatabaseConfigurationOptions := cloudDatabasesService.NewUpdateDatabaseConfigurationOptions(
      deploymentID,
      setConfigurationConfigurationModel,
    )
    
    updateDatabaseConfigurationResponse, response, err := cloudDatabasesService.UpdateDatabaseConfiguration(updateDatabaseConfigurationOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(updateDatabaseConfigurationResponse, "", "  ")
    fmt.Println(string(b))
  • const setConfigurationConfigurationModel = {
      max_connections: 200,
      max_prepared_transactions: 0,
      deadlock_timeout: 100,
      effective_io_concurrency: 1,
      max_replication_slots: 10,
      max_wal_senders: 12,
      shared_buffers: 16,
      synchronous_commit: 'local',
      wal_level: 'hot_standby',
      archive_timeout: 300,
      log_min_duration_statement: 100,
    };
    
    const params = {
      id: deploymentId,
      configuration: setConfigurationConfigurationModel,
    };
    
    cloudDatabasesService.updateDatabaseConfiguration(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • set_configuration_configuration_model = SetConfigurationConfigurationPGConfiguration(
      max_connections=200,
      max_prepared_transactions=0,
      deadlock_timeout=100,
      effective_io_concurrency=1,
      max_replication_slots=10,
      max_wal_senders=12,
      shared_buffers=16,
      synchronous_commit='local',
      wal_level='hot_standby',
      archive_timeout=300,
      log_min_duration_statement=100,
    )
    
    update_database_configuration_response = cloud_databases_service.update_database_configuration(
      id=deployment_id,
      configuration=set_configuration_configuration_model,
    ).get_result()
    
    print(json.dumps(update_database_configuration_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393a",
        "description": "Applying new configuration",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393a",
        "description": "Applying new configuration",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Get the schema of the database configuration

Get the schema of the database configuration. Available for PostgreSQL and Redis ONLY.

GET /deployments/{id}/configuration/schema

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 > name > Access policies.

  • GET /v5/ibm/deployments/:deployment_id/configuration/schema

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/configuration/schema   -H 'Authorization: Bearer <>' \

Response

Database Configuration Schema

Status Code

  • A database configuration schema

  • Invalid token

  • not found

Example responses
  • {
      "schema": {
        "max_connections": {
          "default": 115,
          "default_description": "This property has no documentation for its default value.",
          "description": "Maximum Connections allowed.",
          "kind": "integer",
          "requires_restart": true,
          "min": 115,
          "max": 30000,
          "step": null
        },
        "max_prepared_transactions": {
          "default": 0,
          "default_description": "This property has no documentation for its default value.",
          "description": "Max number of transactions that can be in the \"prepared\" state simultaneously.",
          "kind": "integer",
          "max": null,
          "min": 0,
          "requires_restart": true,
          "step": null
        }
      }
    }

List read-only replica information

Get the read-only replicas associated with a deployment. Available for PostgreSQL and EnterpriseDB ONLY.

Get the read-only replicas associated with a deployment. Available for PostgreSQL and EnterpriseDB ONLY.

Get the read-only replicas associated with a deployment. Available for PostgreSQL and EnterpriseDB ONLY.

Get the read-only replicas associated with a deployment. Available for PostgreSQL and EnterpriseDB ONLY.

GET /deployments/{id}/remotes
(cloudDatabases *CloudDatabasesV5) ListRemotes(listRemotesOptions *ListRemotesOptions) (result *ListRemotesResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) ListRemotesWithContext(ctx context.Context, listRemotesOptions *ListRemotesOptions) (result *ListRemotesResponse, response *core.DetailedResponse, err error)
listRemotes(params)
list_remotes(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/deployments/:deployment_id/remotes

Request

Instantiate the ListRemotesOptions struct and set the fields to provide parameter values for the ListRemotes method.

Path Parameters

  • Deployment ID

WithContext method only

The ListRemotes options.

parameters

  • Deployment ID.

parameters

  • Deployment ID.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/remotes   -H 'Authorization: Bearer <>' \
  • listRemotesOptions := cloudDatabasesService.NewListRemotesOptions(
      deploymentID,
    )
    
    listRemotesResponse, response, err := cloudDatabasesService.ListRemotes(listRemotesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(listRemotesResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
    };
    
    cloudDatabasesService.listRemotes(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • list_remotes_response = cloud_databases_service.list_remotes(
      id=deployment_id,
    ).get_result()
    
    print(json.dumps(list_remotes_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A remotes object

  • Invalid token

  • not found

Example responses
  • {
      "remotes": {
        "leader": "",
        "replicas": [
          "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/389574dce64e9c423ffc238516c755e1:0e399ae3-4a1a-476d-b85b-755c7af54788::"
        ]
      }
    }
  • {
      "remotes": {
        "leader": "",
        "replicas": [
          "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/389574dce64e9c423ffc238516c755e1:0e399ae3-4a1a-476d-b85b-755c7af54788::"
        ]
      }
    }

Modify read-only replication on a deployment

Promote a read-only remote replica to leader by calling with leader set to an empty string. Available for PostgreSQL and EnterpriseDB ONLY.

PATCH /deployments/{id}/remotes

Request

Path Parameters

  • Deployment ID

Parameters for promoting a read-only replica

  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/remotes   -H 'Authorization: Bearer <>'   -H 'Content-Type: application/json'  -d '{"remotes": {"leader": ""}}' \

Response

Status Code

  • A task

  • Invalid token

  • not found

  • promotion is the only feature supported and must be requested as an empty string

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Promoting read-only replica to standalone instance.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Resync read-only replica

Reinitialize a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

Reinitialize a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

Reinitialize a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

Reinitialize a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

POST /deployments/{id}/remotes/resync
(cloudDatabases *CloudDatabasesV5) ResyncReplica(resyncReplicaOptions *ResyncReplicaOptions) (result *ResyncReplicaResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) ResyncReplicaWithContext(ctx context.Context, resyncReplicaOptions *ResyncReplicaOptions) (result *ResyncReplicaResponse, response *core.DetailedResponse, err error)
resyncReplica(params)
resync_replica(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • POST /v5/ibm/deployments/:deployment_id/remotes/resync

Request

Instantiate the ResyncReplicaOptions struct and set the fields to provide parameter values for the ResyncReplica method.

Path Parameters

  • Deployment ID of the read-only replica

WithContext method only

The ResyncReplica options.

parameters

  • Deployment ID of the read-only replica.

parameters

  • Deployment ID of the read-only replica.

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/remotes/resync   -H 'Authorization: Bearer <>' \
  • resyncReplicaOptions := cloudDatabasesService.NewResyncReplicaOptions(
      replicaID,
    )
    
    resyncReplicaResponse, response, err := cloudDatabasesService.ResyncReplica(resyncReplicaOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(resyncReplicaResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: replicaId,
    };
    
    cloudDatabasesService.resyncReplica(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • resync_replica_response = cloud_databases_service.resync_replica(
      id=replica_id,
    ).get_result()
    
    print(json.dumps(resync_replica_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Reinitializing read-only replica.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Reinitializing read-only replica.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Promote read-only replica to a full deployment

Promote a read-only replica or upgrade and promote a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

Promote a read-only replica or upgrade and promote a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

Promote a read-only replica or upgrade and promote a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

Promote a read-only replica or upgrade and promote a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

POST /deployments/{id}/remotes/promotion
(cloudDatabases *CloudDatabasesV5) SetPromotion(setPromotionOptions *SetPromotionOptions) (result *SetPromotionResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) SetPromotionWithContext(ctx context.Context, setPromotionOptions *SetPromotionOptions) (result *SetPromotionResponse, response *core.DetailedResponse, err error)
setPromotion(params)
set_promotion(self,
        id: str,
        promotion: 'SetPromotionPromotion',
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • POST /v5/ibm/deployments/:deployment_id/remotes/promotion

Request

Instantiate the SetPromotionOptions struct and set the fields to provide parameter values for the SetPromotion method.

Path Parameters

  • Deployment ID of the read-only replica to promote

Parameters for promoting a read-only replica

Examples:
View

WithContext method only

The SetPromotion options.

parameters

  • Deployment ID of the read-only replica to promote.

  • Promotes a read-only replica to a full deployment.

parameters

  • Deployment ID of the read-only replica to promote.

  • Promotes a read-only replica to a full deployment.

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/remotes/promotion   -H 'Authorization: Bearer <>'   -H 'Content-Type: application/json'  -d '{"promotion": {"skip_initial_backup": false}}' \
  • promotion := map[string]interface{}{
      "skip_initial_backup": false,
    }
    
    setPromotionPromotionModel := &clouddatabasesv5.SetPromotionPromotionPromote{
      Promotion: promotion,
    }
    
    setPromotionOptions := cloudDatabasesService.NewSetPromotionOptions(
      replicaID,
      setPromotionPromotionModel,
    )
    
    setPromotionResponse, response, err := cloudDatabasesService.SetPromotion(setPromotionOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(setPromotionResponse, "", "  ")
    fmt.Println(string(b))
  • const promotion = {
      skip_initial_backup: true,
    };
    
    const setPromotionPromotionModel = {
      promotion: promotion,
    };
    
    const params = {
      id: replicaId,
      promotion: setPromotionPromotionModel,
    };
    
    cloudDatabasesService.setPromotion(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • promotion = {
      'skip_initial_backup': True,
    }
    
    set_promotion_model = SetPromotionPromotionPromote(
      promotion=promotion,
    )
    
    set_promotion_response = cloud_databases_service.set_promotion(
      id=replica_id,
      promotion=set_promotion_model,
    ).get_result()
    
    print(json.dumps(set_promotion_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task

  • Invalid token

  • not found

  • An error message response from sending invalid body parameters.

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Promoting read-only replica to standalone instance.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Promoting read-only replica to standalone instance.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

List currently running tasks on a deployment

Obtain a list of tasks currently running or recently run on a deployment. Tasks are ephemeral. Records of successful tasks are shown for 24-48 hours, and unsuccessful tasks are shown for 7-8 days.

Obtain a list of tasks currently running or recently run on a deployment. Tasks are ephemeral. Records of successful tasks are shown for 24-48 hours, and unsuccessful tasks are shown for 7-8 days.

Obtain a list of tasks currently running or recently run on a deployment. Tasks are ephemeral. Records of successful tasks are shown for 24-48 hours, and unsuccessful tasks are shown for 7-8 days.

Obtain a list of tasks currently running or recently run on a deployment. Tasks are ephemeral. Records of successful tasks are shown for 24-48 hours, and unsuccessful tasks are shown for 7-8 days.

GET /deployments/{id}/tasks
(cloudDatabases *CloudDatabasesV5) ListDeploymentTasks(listDeploymentTasksOptions *ListDeploymentTasksOptions) (result *Tasks, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) ListDeploymentTasksWithContext(ctx context.Context, listDeploymentTasksOptions *ListDeploymentTasksOptions) (result *Tasks, response *core.DetailedResponse, err error)
listDeploymentTasks(params)
list_deployment_tasks(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/deployments/:deployment_id/tasks

Request

Instantiate the ListDeploymentTasksOptions struct and set the fields to provide parameter values for the ListDeploymentTasks method.

Path Parameters

  • Deployment ID

WithContext method only

The ListDeploymentTasks options.

parameters

  • Deployment ID.

parameters

  • Deployment ID.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/tasks   -H 'Authorization: Bearer <>' \
  • listDeploymentTasksOptions := cloudDatabasesService.NewListDeploymentTasksOptions(
      deploymentID,
    )
    
    tasks, response, err := cloudDatabasesService.ListDeploymentTasks(listDeploymentTasksOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(tasks, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
    };
    
    cloudDatabasesService.listDeploymentTasks(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • tasks = cloud_databases_service.list_deployment_tasks(
      id=deployment_id,
    ).get_result()
    
    print(json.dumps(tasks, indent=2))

Response

Status Code

  • An array of tasks

  • Invalid token

No Sample Response

This method does not specify any sample responses.

Get information about a task

Get information about a task and its status. Tasks themselves are persistent so old tasks can be consulted as well as running tasks.

Get information about a task and its status. Tasks themselves are persistent so old tasks can be consulted as well as running tasks.

Get information about a task and its status. Tasks themselves are persistent so old tasks can be consulted as well as running tasks.

Get information about a task and its status. Tasks themselves are persistent so old tasks can be consulted as well as running tasks.

GET /tasks/{id}
(cloudDatabases *CloudDatabasesV5) GetTask(getTaskOptions *GetTaskOptions) (result *GetTaskResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) GetTaskWithContext(ctx context.Context, getTaskOptions *GetTaskOptions) (result *GetTaskResponse, response *core.DetailedResponse, err error)
getTask(params)
get_task(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/tasks/:task_id

Request

Instantiate the GetTaskOptions struct and set the fields to provide parameter values for the GetTask method.

Path Parameters

  • Task ID

WithContext method only

The GetTask options.

parameters

  • Task ID.

parameters

  • Task ID.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/tasks/{id}   -H 'Authorization: Bearer <>' \
  • getTaskOptions := cloudDatabasesService.NewGetTaskOptions(
      taskIDLink,
    )
    
    getTaskResponse, response, err := cloudDatabasesService.GetTask(getTaskOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(getTaskResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: taskIdLink,
    };
    
    cloudDatabasesService.getTask(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • get_task_response = cloud_databases_service.get_task(
      id=task_id_link,
    ).get_result()
    
    print(json.dumps(get_task_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task

  • A completed task redirects to the associated resource.

  • Invalid token

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "completed",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 100,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "completed",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 100,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Get information about a backup

Get information about a backup, such as creation date.

Get information about a backup, such as creation date.

Get information about a backup, such as creation date.

Get information about a backup, such as creation date.

GET /backups/{backup_id}
(cloudDatabases *CloudDatabasesV5) GetBackupInfo(getBackupInfoOptions *GetBackupInfoOptions) (result *GetBackupInfoResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) GetBackupInfoWithContext(ctx context.Context, getBackupInfoOptions *GetBackupInfoOptions) (result *GetBackupInfoResponse, response *core.DetailedResponse, err error)
getBackupInfo(params)
get_backup_info(self,
        backup_id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/backups/:backup_id

Request

Instantiate the GetBackupInfoOptions struct and set the fields to provide parameter values for the GetBackupInfo method.

Path Parameters

  • Backup ID

WithContext method only

The GetBackupInfo options.

parameters

  • Backup ID.

parameters

  • Backup ID.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/backups/{backup_id}   -H 'Authorization: Bearer <>' \
  • getBackupInfoOptions := cloudDatabasesService.NewGetBackupInfoOptions(
      backupIDLink,
    )
    
    getBackupInfoResponse, response, err := cloudDatabasesService.GetBackupInfo(getBackupInfoOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(getBackupInfoResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      backupId: backupIdLink,
    };
    
    cloudDatabasesService.getBackupInfo(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • get_backup_info_response = cloud_databases_service.get_backup_info(
      backup_id=backup_id_link,
    ).get_result()
    
    print(json.dumps(get_backup_info_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A backup response

  • Invalid token

Example responses
  • {
      "backup": {
        "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:87635880-b11c-4359-9d06-41fd9f90feaf",
        "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
        "type": "scheduled",
        "status": "completed",
        "is_downloadable": false,
        "is_restorable": true,
        "created_at": "2019-06-10T14:31:40.000Z"
      }
    }
  • {
      "backup": {
        "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:87635880-b11c-4359-9d06-41fd9f90feaf",
        "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
        "type": "scheduled",
        "status": "completed",
        "is_downloadable": false,
        "is_restorable": true,
        "created_at": "2019-06-10T14:31:40.000Z"
      }
    }

List currently available backups from a deployment

Get details of all currently available backups from a deployment.

Get details of all currently available backups from a deployment.

Get details of all currently available backups from a deployment.

Get details of all currently available backups from a deployment.

GET /deployments/{id}/backups
(cloudDatabases *CloudDatabasesV5) ListDeploymentBackups(listDeploymentBackupsOptions *ListDeploymentBackupsOptions) (result *Backups, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) ListDeploymentBackupsWithContext(ctx context.Context, listDeploymentBackupsOptions *ListDeploymentBackupsOptions) (result *Backups, response *core.DetailedResponse, err error)
listDeploymentBackups(params)
list_deployment_backups(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/deployments/:deployment_id/backups

Request

Instantiate the ListDeploymentBackupsOptions struct and set the fields to provide parameter values for the ListDeploymentBackups method.

Path Parameters

  • Deployment ID

WithContext method only

The ListDeploymentBackups options.

parameters

  • Deployment ID.

parameters

  • Deployment ID.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/backups   -H 'Authorization: Bearer <>' \
  • listDeploymentBackupsOptions := cloudDatabasesService.NewListDeploymentBackupsOptions(
      deploymentID,
    )
    
    backups, response, err := cloudDatabasesService.ListDeploymentBackups(listDeploymentBackupsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(backups, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
    };
    
    cloudDatabasesService.listDeploymentBackups(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • backups = cloud_databases_service.list_deployment_backups(
      id=deployment_id,
    ).get_result()
    
    print(json.dumps(backups, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • An array of backups

  • Invalid token

Example responses
  • {
      "backups": [
        {
          "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:e47213d6-4a13-47f4-a511-9ef459670192",
          "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
          "type": "scheduled",
          "status": "completed",
          "is_downloadable": false,
          "is_restorable": true,
          "created_at": "2019-05-29T14:30:46.000Z"
        },
        {
          "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:ec07e9be-9ad8-48ad-a22e-bc93abe66339",
          "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
          "type": "scheduled",
          "status": "completed",
          "is_downloadable": false,
          "is_restorable": true,
          "created_at": "2019-05-18T14:30:39.000Z"
        }
      ]
    }
  • {
      "backups": [
        {
          "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:e47213d6-4a13-47f4-a511-9ef459670192",
          "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
          "type": "scheduled",
          "status": "completed",
          "is_downloadable": false,
          "is_restorable": true,
          "created_at": "2019-05-29T14:30:46.000Z"
        },
        {
          "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:ec07e9be-9ad8-48ad-a22e-bc93abe66339",
          "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
          "type": "scheduled",
          "status": "completed",
          "is_downloadable": false,
          "is_restorable": true,
          "created_at": "2019-05-18T14:30:39.000Z"
        }
      ]
    }

Initiate an on-demand backup

Signal the platform to create an on-demand backup for the specified deployment. The returned task can be polled to track progress of the backup as it takes place.

Signal the platform to create an on-demand backup for the specified deployment. The returned task can be polled to track progress of the backup as it takes place.

Signal the platform to create an on-demand backup for the specified deployment. The returned task can be polled to track progress of the backup as it takes place.

Signal the platform to create an on-demand backup for the specified deployment. The returned task can be polled to track progress of the backup as it takes place.

POST /deployments/{id}/backups
(cloudDatabases *CloudDatabasesV5) StartOndemandBackup(startOndemandBackupOptions *StartOndemandBackupOptions) (result *StartOndemandBackupResponse, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) StartOndemandBackupWithContext(ctx context.Context, startOndemandBackupOptions *StartOndemandBackupOptions) (result *StartOndemandBackupResponse, response *core.DetailedResponse, err error)
startOndemandBackup(params)
start_ondemand_backup(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • POST /v5/ibm/deployments/:deployment_id/backups

Auditing

Calling this method generates the following auditing event.

  • <service_id>.backup-ondemand.create

Request

Instantiate the StartOndemandBackupOptions struct and set the fields to provide parameter values for the StartOndemandBackup method.

Path Parameters

  • Deployment ID

WithContext method only

The StartOndemandBackup options.

parameters

  • Deployment ID.

parameters

  • Deployment ID.

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/backups   -H 'Authorization: Bearer <>' \
  • startOndemandBackupOptions := cloudDatabasesService.NewStartOndemandBackupOptions(
      deploymentID,
    )
    
    startOndemandBackupResponse, response, err := cloudDatabasesService.StartOndemandBackup(startOndemandBackupOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(startOndemandBackupResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
    };
    
    cloudDatabasesService.startOndemandBackup(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • start_ondemand_backup_response = cloud_databases_service.start_ondemand_backup(
      id=deployment_id,
    ).get_result()
    
    print(json.dumps(start_ondemand_backup_response, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • A task

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:30:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:30:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Get earliest point-in-time-recovery timestamp

Returns the earliest available time for point-in-time-recovery in ISO8601 UTC format. PostgreSQL and EnterpriseDB only.

Returns the earliest available time for point-in-time-recovery in ISO8601 UTC format. PostgreSQL and EnterpriseDB only.

Returns the earliest available time for point-in-time-recovery in ISO8601 UTC format. PostgreSQL and EnterpriseDB only.

Returns the earliest available time for point-in-time-recovery in ISO8601 UTC format. PostgreSQL and EnterpriseDB only.

GET /deployments/{id}/point_in_time_recovery_data
(cloudDatabases *CloudDatabasesV5) GetPitRdata(getPitRdataOptions *GetPitRdataOptions) (result *PointInTimeRecoveryData, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) GetPitRdataWithContext(ctx context.Context, getPitRdataOptions *GetPitRdataOptions) (result *PointInTimeRecoveryData, response *core.DetailedResponse, err error)
getPitRdata(params)
get_pit_rdata(self,
        id: str,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/deployments/:deployment_id/point_in_time_recovery_data

Request

Instantiate the GetPitRdataOptions struct and set the fields to provide parameter values for the GetPitRdata method.

Path Parameters

  • Deployment ID

WithContext method only

The GetPitRdata options.

parameters

  • Deployment ID.

parameters

  • Deployment ID.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/point_in_time_recovery_data   -H 'Authorization: Bearer <>' \
  • getPitRdataOptions := cloudDatabasesService.NewGetPitRdataOptions(
      deploymentID,
    )
    
    pointInTimeRecoveryData, response, err := cloudDatabasesService.GetPitRdata(getPitRdataOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(pointInTimeRecoveryData, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
    };
    
    cloudDatabasesService.getPitRdata(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • point_in_time_recovery_data = cloud_databases_service.get_pit_rdata(
      id=deployment_id,
    ).get_result()
    
    print(json.dumps(point_in_time_recovery_data, indent=2))

Response

Examples:
View
Examples:
View
Examples:
View

Status Code

  • The earliest point-in-time-recovery time

  • Invalid token

  • not found

Example responses
  • {
      "point_in_time_recovery_data": {
        "earliest_point_in_time_recovery_time": "2019-09-09T23:16:00Z"
      }
    }
  • {
      "point_in_time_recovery_data": {
        "earliest_point_in_time_recovery_time": "2019-09-09T23:16:00Z"
      }
    }

Discover connection information for a deployment for a user with an endpoint type.

Discover connection information for a deployment for a user with an endpoint type.

Discover connection information for a deployment for a user with an endpoint type.

Discover connection information for a deployment for a user with an endpoint type.

Discover connection information for a deployment for a user with an endpoint type.

GET /deployments/{id}/users/{user_type}/{user_id}/connections/{endpoint_type}
(cloudDatabases *CloudDatabasesV5) GetConnection(getConnectionOptions *GetConnectionOptions) (result *Connection, response *core.DetailedResponse, err error)
(cloudDatabases *CloudDatabasesV5) GetConnectionWithContext(ctx context.Context, getConnectionOptions *GetConnectionOptions) (result *Connection, response *core.DetailedResponse, err error)
getConnection(params)
get_connection(self,
        id: str,
        user_type: str,
        user_id: str,
        endpoint_type: str,
        *,
        certificate_root: str = None,
        **kwargs
    ) -> DetailedResponse

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 > name > Access policies.

  • GET /v5/ibm/deployments/:deployment_id/users/:user_type/:user_id/connections/:endpoint_type

Request

Instantiate the GetConnectionOptions struct and set the fields to provide parameter values for the GetConnection method.

Path Parameters

  • Deployment ID

  • User type

    Example: database

  • User ID

  • Endpoint Type. The endpoint must be enabled on the deployment before its connection information can be fetched.

    Allowable values: [public,private]

Query Parameters

  • Optional certificate root path to prepend certificate names. Certificates would be stored in this directory for use by other commands.

WithContext method only

The GetConnection options.

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html
  • User ID.

  • Endpoint Type. The endpoint must be enabled on the deployment before its connection information can be fetched.

    Allowable values: [public,private]

  • Optional certificate root path to prepend certificate names. Certificates would be stored in this directory for use by other commands.

parameters

  • Deployment ID.

  • User type.

    Examples:
    value
    _source
    _lines
    _html
  • User ID.

  • Endpoint Type. The endpoint must be enabled on the deployment before its connection information can be fetched.

    Allowable values: [public,private]

  • Optional certificate root path to prepend certificate names. Certificates would be stored in this directory for use by other commands.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/users/{user_type}/{user_id}/connections/{endpoint_type}   -H 'Authorization: Bearer <>' \
  • getConnectionOptions := cloudDatabasesService.NewGetConnectionOptions(
      deploymentID,
      userType,
      "exampleUserID",
      "public",
    )
    getConnectionOptions.SetCertificateRoot("exampleCertRoot")
    
    connection, response, err := cloudDatabasesService.GetConnection(getConnectionOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(connection, "", "  ")
    fmt.Println(string(b))
  • const params = {
      id: deploymentId,
      userType: userType,
      userId: 'exampleUserID',
      endpointType: 'public',
      certificateRoot: 'exampleCertRoot'
    };
    
    cloudDatabasesService.getConnection(params)
      .then(res => {
        console.log(JSON.stringify(res.result, null, 2));
      })
      .catch(err => {
        console.warn(err)
      });
  • connection = cloud_databases_service.get_connection(
      id=deployment_id,
      user_type=user_type,
      user_id='exampleUserID',
      endpoint_type='public',
      certificate_root='exampleCertRoot',
    ).get_result()
    
    print(json.dumps(connection, indent=2))

Response