UNPKG

ibm-cloud-databases

Version:
1,160 lines 68.7 kB
/** * (C) Copyright IBM Corp. 2021. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /// <reference types="node" /> import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'; import { BaseService, UserOptions } from 'ibm-cloud-sdk-core'; /** * The IBM Cloud Databases API enables interaction between applications and Cloud Databases database deployments. * * Access to the API requires an IAM Bearer Token or an IAM API Key to be presented through bearer authentication. * * Deployment IDs are CRNs on the IBM Cloud Databases v5 API platform. No lookup or translation the Compose style UUIDs * is needed. The Deployment ID is a traditional UUID on the Compose v5 API platform. * * When you use CRNs, remember to URL escape the CRN value as they can include the forward-slash (/) character. */ declare class CloudDatabasesV5 extends BaseService { static DEFAULT_SERVICE_NAME: string; /************************* * Factory method ************************/ /** * Constructs an instance of CloudDatabasesV5 with passed in options and external configuration. * * @param {UserOptions} [options] - The parameters to send to the service. * @param {string} [options.serviceName] - The name of the service to configure * @param {Authenticator} [options.authenticator] - The Authenticator object used to authenticate requests to the service * @param {string} [options.serviceUrl] - The URL for the service * @returns {CloudDatabasesV5} */ static newInstance(options: UserOptions): CloudDatabasesV5; /** * Construct a CloudDatabasesV5 object. * * @param {Object} options - Options for the service. * @param {string} [options.serviceUrl] - The base url to use when contacting the service. The base url may differ between IBM Cloud regions. * @param {OutgoingHttpHeaders} [options.headers] - Default headers that shall be included with every request to the service. * @param {Authenticator} options.authenticator - The Authenticator object used to authenticate requests to the service * @constructor * @returns {CloudDatabasesV5} */ constructor(options: UserOptions); /************************* * deployments ************************/ /** * List all deployable databases. * * Returns a list of all the types and associated major versions of database deployments that can be provisioned. * * @param {Object} [params] - The parameters to send to the service. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ListDeployablesResponse>>} */ listDeployables(params?: CloudDatabasesV5.ListDeployablesParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ListDeployablesResponse>>; /** * 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. * * @param {Object} [params] - The parameters to send to the service. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ListRegionsResponse>>} */ listRegions(params?: CloudDatabasesV5.ListRegionsParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ListRegionsResponse>>; /** * Get deployment information. * * Gets the full data that is associated with a deployment. This data includes the ID, name, database type, and * version. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.GetDeploymentInfoResponse>>} */ getDeploymentInfo(params: CloudDatabasesV5.GetDeploymentInfoParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.GetDeploymentInfoResponse>>; /************************* * databaseUsers ************************/ /** * Creates a user based on user type. * * Creates a user in the database that can access the database through a connection. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.userType - User type. * @param {CreateDatabaseUserRequestUser} [params.user] - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.CreateDatabaseUserResponse>>} */ createDatabaseUser(params: CloudDatabasesV5.CreateDatabaseUserParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.CreateDatabaseUserResponse>>; /** * Set specified user's password. * * Sets the password of a specified user. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.userType - User type. * @param {string} params.username - User ID. * @param {APasswordSettingUser} [params.user] - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ChangeUserPasswordResponse>>} */ changeUserPassword(params: CloudDatabasesV5.ChangeUserPasswordParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ChangeUserPasswordResponse>>; /** * Deletes a user based on user type. * * Removes a user from the deployment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.userType - User type. * @param {string} params.username - Username. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.DeleteDatabaseUserResponse>>} */ deleteDatabaseUser(params: CloudDatabasesV5.DeleteDatabaseUserParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.DeleteDatabaseUserResponse>>; /************************* * databaseConfiguration ************************/ /** * Change your database configuration. * * Change your database configuration. Available for PostgreSQL, EnterpriseDB, and Redis ONLY. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {SetConfigurationConfiguration} params.configuration - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.UpdateDatabaseConfigurationResponse>>} */ updateDatabaseConfiguration(params: CloudDatabasesV5.UpdateDatabaseConfigurationParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.UpdateDatabaseConfigurationResponse>>; /************************* * remotes ************************/ /** * List read-only replica information. * * Get the read-only replicas associated with a deployment. Available for PostgreSQL and EnterpriseDB ONLY. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ListRemotesResponse>>} */ listRemotes(params: CloudDatabasesV5.ListRemotesParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ListRemotesResponse>>; /** * Resync read-only replica. * * Reinitialize a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID of the read-only replica. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ResyncReplicaResponse>>} */ resyncReplica(params: CloudDatabasesV5.ResyncReplicaParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.ResyncReplicaResponse>>; /** * 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. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID of the read-only replica to promote. * @param {SetPromotionPromotion} params.promotion - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetPromotionResponse>>} */ setPromotion(params: CloudDatabasesV5.SetPromotionParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetPromotionResponse>>; /************************* * tasks ************************/ /** * 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. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Tasks>>} */ listDeploymentTasks(params: CloudDatabasesV5.ListDeploymentTasksParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Tasks>>; /** * 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. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Task ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.GetTaskResponse>>} */ getTask(params: CloudDatabasesV5.GetTaskParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.GetTaskResponse>>; /************************* * backups ************************/ /** * Get information about a backup. * * Get information about a backup, such as creation date. * * @param {Object} params - The parameters to send to the service. * @param {string} params.backupId - Backup ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.GetBackupInfoResponse>>} */ getBackupInfo(params: CloudDatabasesV5.GetBackupInfoParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.GetBackupInfoResponse>>; /** * List currently available backups from a deployment. * * Get details of all currently available backups from a deployment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Backups>>} */ listDeploymentBackups(params: CloudDatabasesV5.ListDeploymentBackupsParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Backups>>; /** * 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. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.StartOndemandBackupResponse>>} */ startOndemandBackup(params: CloudDatabasesV5.StartOndemandBackupParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.StartOndemandBackupResponse>>; /** * 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. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.PointInTimeRecoveryData>>} */ getPitRdata(params: CloudDatabasesV5.GetPitRdataParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.PointInTimeRecoveryData>>; /************************* * connections ************************/ /** * 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. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.userType - User type. * @param {string} params.userId - User ID. * @param {string} params.endpointType - Endpoint Type. The endpoint must be enabled on the deployment before its * connection information can be fetched. * @param {string} [params.certificateRoot] - Optional certificate root path to prepend certificate names. * Certificates would be stored in this directory for use by other commands. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Connection>>} */ getConnection(params: CloudDatabasesV5.GetConnectionParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Connection>>; /** * Discover connection information for a deployment for a user with substitutions and an endpoint type. * * Discover connection information for a deployment for a user. Behaves the same as the GET method but substitutes the * provided password parameter into the returned connection information. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.userType - User type of `database` is the only currently supported value. * @param {string} params.userId - User ID. * @param {string} params.endpointType - Endpoint Type. The select endpoint must be enabled on the deployment before * its connection information can be fetched. * @param {string} [params.password] - Password to be substituted into the response. * @param {string} [params.certificateRoot] - Optional certificate root path to prepend certificate names. * Certificates would be stored in this directory for use by other commands. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Connection>>} */ completeConnection(params: CloudDatabasesV5.CompleteConnectionParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Connection>>; /************************* * scaling ************************/ /** * List currently available scaling groups from a deployment. * * Scaling groups represent the various resources that are allocated to a deployment. This command allows for the * retrieval of all of the groups for a particular deployment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Groups>>} */ listDeploymentScalingGroups(params: CloudDatabasesV5.ListDeploymentScalingGroupsParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Groups>>; /** * Get default scaling groups for a new deployment. * * Scaling groups represent the various resources allocated to a deployment. When a new deployment is created, there * are a set of defaults for each database type. This endpoint returns them for a particular database. * * @param {Object} params - The parameters to send to the service. * @param {string} params.type - Database type name. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Groups>>} */ getDefaultScalingGroups(params: CloudDatabasesV5.GetDefaultScalingGroupsParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Groups>>; /** * Set scaling values on a specified group. * * Set scaling value on a specified group. Can only be performed on is_adjustable=true groups. Values set are for the * group as a whole and resources are distributed amongst the group. Values must be greater than or equal to the * minimum size and must be a multiple of the step size. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.groupId - Group Id. * @param {SetDeploymentScalingGroupRequest} params.setDeploymentScalingGroupRequest - Scaling group settings. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetDeploymentScalingGroupResponse>>} */ setDeploymentScalingGroup(params: CloudDatabasesV5.SetDeploymentScalingGroupParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetDeploymentScalingGroupResponse>>; /************************* * autoscaling ************************/ /** * Get the autoscaling configuration from a deployment. * * The Autoscaling configuration represents the various conditions that control autoscaling for a deployment. This * command allows for the retrieval of all autoscaling conditions for a particular deployment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.groupId - Group ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.AutoscalingGroup>>} */ getAutoscalingConditions(params: CloudDatabasesV5.GetAutoscalingConditionsParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.AutoscalingGroup>>; /** * Set the autoscaling configuration from a deployment. * * Enable, disable, or set the conditions for autoscaling on your deployment. Memory, disk, and CPU (if available) can * be set separately and are not all required. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.groupId - Group ID. * @param {AutoscalingSetGroupAutoscaling} params.autoscaling - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetAutoscalingConditionsResponse>>} */ setAutoscalingConditions(params: CloudDatabasesV5.SetAutoscalingConditionsParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetAutoscalingConditionsResponse>>; /************************* * management ************************/ /** * Kill connections to a PostgreSQL or EnterpriseDB deployment. * * Closes all the connections on a deployment. Available for PostgreSQL and EnterpriseDB ONLY. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.KillConnectionsResponse>>} */ killConnections(params: CloudDatabasesV5.KillConnectionsParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.KillConnectionsResponse>>; /************************* * security ************************/ /** * Retrieve the allowlisted addresses and ranges for a deployment. * * Retrieve the allowlisted addresses and ranges for a deployment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Allowlist>>} */ getAllowlist(params: CloudDatabasesV5.GetAllowlistParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.Allowlist>>; /** * Set the allowlist for a deployment. * * Set the allowlist for a deployment. This action overwrites all existing entries, so when you modify the allowlist * via a GET/update/PUT, provide the GET response's ETag header value in this endpoint's If-Match header to ensure * that changes that are made by other clients are not accidentally overwritten. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {AllowlistEntry[]} [params.ipAddresses] - An array of allowlist entries. * @param {string} [params.ifMatch] - Verify that the current allowlist matches a provided ETag value. Use in * conjunction with the GET operation's ETag header to ensure synchronicity between clients. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetAllowlistResponse>>} */ setAllowlist(params: CloudDatabasesV5.SetAllowlistParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.SetAllowlistResponse>>; /** * Add an address or range to the allowlist for a deployment. * * Add an address or range to the allowlist for a deployment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {AllowlistEntry} [params.ipAddress] - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.AddAllowlistEntryResponse>>} */ addAllowlistEntry(params: CloudDatabasesV5.AddAllowlistEntryParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.AddAllowlistEntryResponse>>; /** * Delete an address or range from the allowlist of a deployment. * * Delete an address or range from the allowlist of a deployment. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - Deployment ID. * @param {string} params.ipaddress - An IPv4 address or a CIDR range (netmasked IPv4 address). * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise<CloudDatabasesV5.Response<CloudDatabasesV5.DeleteAllowlistEntryResponse>>} */ deleteAllowlistEntry(params: CloudDatabasesV5.DeleteAllowlistEntryParams): Promise<CloudDatabasesV5.Response<CloudDatabasesV5.DeleteAllowlistEntryResponse>>; } /************************* * interfaces ************************/ declare namespace CloudDatabasesV5 { /** An operation response. */ interface Response<T = any> { result: T; status: number; statusText: string; headers: IncomingHttpHeaders; } /** The callback for a service request. */ type Callback<T> = (error: any, response?: Response<T>) => void; /** The body of a service request that returns no response data. */ interface Empty { } /** A standard JS object, defined to avoid the limitations of `Object` and `object` */ interface JsonObject { [key: string]: any; } /************************* * request interfaces ************************/ /** Parameters for the `listDeployables` operation. */ interface ListDeployablesParams { headers?: OutgoingHttpHeaders; } /** Parameters for the `listRegions` operation. */ interface ListRegionsParams { headers?: OutgoingHttpHeaders; } /** Parameters for the `getDeploymentInfo` operation. */ interface GetDeploymentInfoParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `createDatabaseUser` operation. */ interface CreateDatabaseUserParams { /** Deployment ID. */ id: string; /** User type. */ userType: string; user?: CreateDatabaseUserRequestUser; headers?: OutgoingHttpHeaders; } /** Parameters for the `changeUserPassword` operation. */ interface ChangeUserPasswordParams { /** Deployment ID. */ id: string; /** User type. */ userType: string; /** User ID. */ username: string; user?: APasswordSettingUser; headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteDatabaseUser` operation. */ interface DeleteDatabaseUserParams { /** Deployment ID. */ id: string; /** User type. */ userType: string; /** Username. */ username: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `updateDatabaseConfiguration` operation. */ interface UpdateDatabaseConfigurationParams { /** Deployment ID. */ id: string; configuration: SetConfigurationConfiguration; headers?: OutgoingHttpHeaders; } /** Parameters for the `listRemotes` operation. */ interface ListRemotesParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `resyncReplica` operation. */ interface ResyncReplicaParams { /** Deployment ID of the read-only replica. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `setPromotion` operation. */ interface SetPromotionParams { /** Deployment ID of the read-only replica to promote. */ id: string; promotion: SetPromotionPromotion; headers?: OutgoingHttpHeaders; } /** Parameters for the `listDeploymentTasks` operation. */ interface ListDeploymentTasksParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getTask` operation. */ interface GetTaskParams { /** Task ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getBackupInfo` operation. */ interface GetBackupInfoParams { /** Backup ID. */ backupId: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `listDeploymentBackups` operation. */ interface ListDeploymentBackupsParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `startOndemandBackup` operation. */ interface StartOndemandBackupParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getPitRdata` operation. */ interface GetPitRdataParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getConnection` operation. */ interface GetConnectionParams { /** Deployment ID. */ id: string; /** User type. */ userType: string; /** User ID. */ userId: string; /** Endpoint Type. The endpoint must be enabled on the deployment before its connection information can be * fetched. */ endpointType: GetConnectionConstants.EndpointType | string; /** Optional certificate root path to prepend certificate names. Certificates would be stored in this directory * for use by other commands. */ certificateRoot?: string; headers?: OutgoingHttpHeaders; } /** Constants for the `getConnection` operation. */ namespace GetConnectionConstants { /** Endpoint Type. The endpoint must be enabled on the deployment before its connection information can be fetched. */ enum EndpointType { PUBLIC = "public", PRIVATE = "private" } } /** Parameters for the `completeConnection` operation. */ interface CompleteConnectionParams { /** Deployment ID. */ id: string; /** User type of `database` is the only currently supported value. */ userType: string; /** User ID. */ userId: string; /** Endpoint Type. The select endpoint must be enabled on the deployment before its connection information can * be fetched. */ endpointType: CompleteConnectionConstants.EndpointType | string; /** Password to be substituted into the response. */ password?: string; /** Optional certificate root path to prepend certificate names. Certificates would be stored in this directory * for use by other commands. */ certificateRoot?: string; headers?: OutgoingHttpHeaders; } /** Constants for the `completeConnection` operation. */ namespace CompleteConnectionConstants { /** Endpoint Type. The select endpoint must be enabled on the deployment before its connection information can be fetched. */ enum EndpointType { PUBLIC = "public", PRIVATE = "private" } } /** Parameters for the `listDeploymentScalingGroups` operation. */ interface ListDeploymentScalingGroupsParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getDefaultScalingGroups` operation. */ interface GetDefaultScalingGroupsParams { /** Database type name. */ type: GetDefaultScalingGroupsConstants.Type | string; headers?: OutgoingHttpHeaders; } /** Constants for the `getDefaultScalingGroups` operation. */ namespace GetDefaultScalingGroupsConstants { /** Database type name. */ enum Type { POSTGRESQL = "postgresql", ETCD = "etcd" } } /** Parameters for the `setDeploymentScalingGroup` operation. */ interface SetDeploymentScalingGroupParams { /** Deployment ID. */ id: string; /** Group Id. */ groupId: string; /** Scaling group settings. */ setDeploymentScalingGroupRequest: SetDeploymentScalingGroupRequest; headers?: OutgoingHttpHeaders; } /** Parameters for the `getAutoscalingConditions` operation. */ interface GetAutoscalingConditionsParams { /** Deployment ID. */ id: string; /** Group ID. */ groupId: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `setAutoscalingConditions` operation. */ interface SetAutoscalingConditionsParams { /** Deployment ID. */ id: string; /** Group ID. */ groupId: string; autoscaling: AutoscalingSetGroupAutoscaling; headers?: OutgoingHttpHeaders; } /** Parameters for the `killConnections` operation. */ interface KillConnectionsParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `getAllowlist` operation. */ interface GetAllowlistParams { /** Deployment ID. */ id: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `setAllowlist` operation. */ interface SetAllowlistParams { /** Deployment ID. */ id: string; /** An array of allowlist entries. */ ipAddresses?: AllowlistEntry[]; /** Verify that the current allowlist matches a provided ETag value. Use in conjunction with the GET operation's * ETag header to ensure synchronicity between clients. */ ifMatch?: string; headers?: OutgoingHttpHeaders; } /** Parameters for the `addAllowlistEntry` operation. */ interface AddAllowlistEntryParams { /** Deployment ID. */ id: string; ipAddress?: AllowlistEntry; headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteAllowlistEntry` operation. */ interface DeleteAllowlistEntryParams { /** Deployment ID. */ id: string; /** An IPv4 address or a CIDR range (netmasked IPv4 address). */ ipaddress: string; headers?: OutgoingHttpHeaders; } /************************* * model interfaces ************************/ /** APasswordSettingUser. */ interface APasswordSettingUser { password?: string; } /** AddAllowlistEntryResponse. */ interface AddAllowlistEntryResponse { task?: Task; } /** Allowlist. */ interface Allowlist { /** An array of allowlist entries. */ ip_addresses?: AllowlistEntry[]; } /** AllowlistEntry. */ interface AllowlistEntry { /** An IPv4 address or a CIDR range (netmasked IPv4 address). */ address?: string; /** A human readable description of the address or range for identification purposes. */ description?: string; } /** AutoscalingCPUGroupCPU. */ interface AutoscalingCPUGroupCPU { scalers?: JsonObject; rate?: AutoscalingCPUGroupCPURate; } /** AutoscalingCPUGroupCPURate. */ interface AutoscalingCPUGroupCPURate { increase_percent?: number; period_seconds?: number; limit_count_per_member?: number; units?: string; } /** AutoscalingDiskGroupDisk. */ interface AutoscalingDiskGroupDisk { scalers?: AutoscalingDiskGroupDiskScalers; rate?: AutoscalingDiskGroupDiskRate; } /** AutoscalingDiskGroupDiskRate. */ interface AutoscalingDiskGroupDiskRate { increase_percent?: number; period_seconds?: number; limit_mb_per_member?: number; units?: string; } /** AutoscalingDiskGroupDiskScalers. */ interface AutoscalingDiskGroupDiskScalers { capacity?: AutoscalingDiskGroupDiskScalersCapacity; io_utilization?: AutoscalingDiskGroupDiskScalersIoUtilization; } /** AutoscalingDiskGroupDiskScalersCapacity. */ interface AutoscalingDiskGroupDiskScalersCapacity { enabled?: boolean; free_space_less_than_percent?: number; } /** AutoscalingDiskGroupDiskScalersIoUtilization. */ interface AutoscalingDiskGroupDiskScalersIoUtilization { enabled?: boolean; over_period?: string; above_percent?: number; } /** AutoscalingGroup. */ interface AutoscalingGroup { autoscaling: AutoscalingGroupAutoscaling; } /** AutoscalingGroupAutoscaling. */ interface AutoscalingGroupAutoscaling { disk?: AutoscalingDiskGroupDisk; memory?: AutoscalingMemoryGroupMemory; cpu?: AutoscalingCPUGroupCPU; } /** AutoscalingMemoryGroupMemory. */ interface AutoscalingMemoryGroupMemory { scalers?: AutoscalingMemoryGroupMemoryScalers; rate?: AutoscalingMemoryGroupMemoryRate; } /** AutoscalingMemoryGroupMemoryRate. */ interface AutoscalingMemoryGroupMemoryRate { increase_percent?: number; period_seconds?: number; limit_mb_per_member?: number; units?: string; } /** AutoscalingMemoryGroupMemoryScalers. */ interface AutoscalingMemoryGroupMemoryScalers { io_utilization?: AutoscalingMemoryGroupMemoryScalersIoUtilization; } /** AutoscalingMemoryGroupMemoryScalersIoUtilization. */ interface AutoscalingMemoryGroupMemoryScalersIoUtilization { enabled?: boolean; over_period?: string; above_percent?: number; } /** AutoscalingSetGroupAutoscaling. */ interface AutoscalingSetGroupAutoscaling { } /** Backup. */ interface Backup { /** ID of this backup. */ id?: string; /** ID of the deployment this backup relates to. */ deployment_id?: string; /** The type of backup. */ type?: string; /** The status of this backup. */ status?: string; /** Is this backup available to download?. */ is_downloadable?: boolean; /** Can this backup be used to restore an instance?. */ is_restorable?: boolean; /** Date and time when this backup was created. */ created_at?: string; } /** Backups. */ interface Backups { backups?: Backup[]; } /** ChangeUserPasswordResponse. */ interface ChangeUserPasswordResponse { task?: Task; } /** Connection. */ interface Connection { connection: ConnectionConnection; } /** CLI Connection. */ interface ConnectionCLI { /** Type of connection being described. */ type?: string; composed?: string[]; /** A map of environment variables for a CLI connection. */ environment?: JsonObject; /** The name of the executable the CLI should run. */ bin?: string; /** Sets of arguments to call the executable with. The outer array corresponds to a possible way to call the * CLI; the inner array is the set of arguments to use with that call. */ arguments?: string[][]; certificate?: ConnectionCLICertificate; } /** ConnectionCLICertificate. */ interface ConnectionCLICertificate { /** Name associated with the certificate. */ name?: string; /** Base64 encoded version of the certificate. */ certificate_base64?: string; } /** ConnectionConnection. */ interface ConnectionConnection { } /** CreateDatabaseUserRequestUser. */ interface CreateDatabaseUserRequestUser { /** User type for new user. */ user_type?: string; /** Username for new user. */ username?: string; /** Password for new user. */ password?: string; } /** CreateDatabaseUserResponse. */ interface CreateDatabaseUserResponse { task?: Task; } /** DeleteAllowlistEntryResponse. */ interface DeleteAllowlistEntryResponse { task?: Task; } /** DeleteDatabaseUserResponse. */ interface DeleteDatabaseUserResponse { task?: Task; } /** Deployable databases with their version information. */ interface Deployables { /** Deployment type - typically the name of the database. */ type?: string; /** An array of versions of the database, their status, preferedness, and transitions. */ versions?: DeployablesVersionsItem[]; } /** DeployablesVersionsItem. */ interface DeployablesVersionsItem { /** The version number. */ version?: string; /** The status of this version: To be finalized. */ status?: string; /** Should this version be preferred over others?. */ is_preferred?: boolean; /** versions that this version can be upgraded to. */ transitions?: DeployablesVersionsItemTransitionsItem[]; } /** DeployablesVersionsItemTransitionsItem. */ interface DeployablesVersionsItemTransitionsItem { /** The database type. */ application?: string; /** method of going from from_version to to_version. */ method?: string; /** The version the transition in from. */ from_version?: string; /** The version the transition is to. */ to_version?: string; } /** Deployment. */ interface Deployment { /** ID of this deployment. */ id?: string; /** Readable name of this deployment. */ name?: string; /** Database type within this deployment. */ type?: string; /** Platform-specific options for this deployment. */ platform_options?: JsonObject; /** Version number of the database. */ version?: string; /** Login name of administration level user. */ admin_usernames?: JsonObject; /** Whether access to this deployment is enabled from the public internet. This property can be modified by * updating this service instance through the Resource Controller API. */ enable_public_endpoints?: boolean; /** Whether access to this deployment is enabled from IBM Cloud via the IBM Cloud backbone network. This * property can be modified by updating this service instance through the Resource Controller API. */ enable_private_endpoints?: boolean; } /** ElasticsearchConnectionHTTPS. */ interface ElasticsearchConnectionHTTPS { /** Type of connection being described. */ type?: string; composed?: string[]; /** Scheme/protocol for URI connection. */ scheme?: string; hosts?: ElasticsearchConnectionHTTPSHostsItem[]; /** Path for URI connection. */ path?: string; /** Query options to add to the URI connection. */ query_options?: JsonObject; authentication?: ElasticsearchConnectionHTTPSAuthentication; certificate?: ElasticsearchConnectionHTTPSCertificate; } /** ElasticsearchConnectionHTTPSAuthentication. */ interface ElasticsearchConnectionHTTPSAuthentication { /** Authentication method for this credential. */ method?: string; /** Username part of credential. */ username?: string; /** Password part of credential. */ password?: string; } /** ElasticsearchConnectionHTTPSCertificate. */ interface ElasticsearchConnectionHTTPSCertificate { /** Name associated with the certificate. */ name?: string; /** Base64 encoded version of the certificate. */ certificate_base64?: string; } /** ElasticsearchConnectionHTTPSHostsItem. */ interface ElasticsearchConnectionHTTPSHostsItem { /** Hostname for connection. */ hostname?: string; /** Port number for connection. */ port?: number; } /** GRPCConnectionURI. */ interface GRPCConnectionURI { /** Type of connection being described. */ type?: string; composed?: string[]; /** Scheme/protocol for URI connection. */ scheme?: string; hosts?: GRPCConnectionURIHostsItem[]; /** Path for URI connection. */ path?: string; /** Query options to add to the URI connection. */ query_options?: JsonObject; authentication?: GRPCConnectionURIAuthentication; certificate?: GRPCConnectionURICertificate; } /** GRPCConnectionURIAuthentication. */ interface GRPCConnectionURIAuthentication { /** Authentication method for this credential. */ method?: string; /** Username part of credential. */ username?: string; /** Password part of credential. */ password?: string; } /** GRPCConnectionURICertificate. */ interface GRPCConnectionURICertificate { /** Name associated with the certificate. */ name?: string; /** Base64 encoded version of the certificate. */ certificate_base64?: string; } /** GRPCConnectionURIHostsItem. */ interface GRPCConnectionURIHostsItem { /** Hostname for connection. */ hostname?: string; /** Port number for connection. */ port?: number; } /** GetBackupInfoResponse. */ interface GetBackupInfoResponse { backup?: Backup; } /** GetDeploymentInfoResponse. */ interface GetDeploymentInfoResponse { deployment?: Deployment; } /** GetTaskResponse. */ interface GetTaskResponse { task?: Task; } /** Group. */ interface Group { /** Id/name for group. */ id?: string; /** Number of entities in the group. */ count?: number; members?: GroupMembers; memory?: GroupMemory; cpu?: GroupCpu; disk?: GroupDisk; } /** GroupCpu. */ interface GroupCpu { /** Units used for scaling cpu - count means the value is the number of the unit(s) available. */ units?: string; /** Number of allocated CPUs. */ allocation_count?: number; /** Minimum number of CPUs. */ minimum_count?: number; /** Maximum number of CPUs. */ maximum_count?: number; /** Step size CPUs can be adjusted. */ step_size_count?: number; /** Is this group's CPU count adjustable. */ is_adjustable?: boolean; /** Is this group's CPU optional?. */ is_optional?: boolean; /** Can this group's CPU scale down?. */ can_scale_down?: boolean; } /** GroupDisk. */ interface GroupDisk { /** Units used for scaling storage. */ units?: string; /** Allocated storage in MB. */ allocation_mb?: number; /** Minimum allocated storage. */ minimum_mb?: number; /** Maximum allocated storage. */ maximum_mb?: number; /** Step size storage can be adjusted. */ step_size_mb?: number; /** Is this group's storage adjustable?. */ is_adjustable?: boolean; /** Is this group's storage optional?. */ is_optional?: boolean; /** Can this group's storage scale down?. */ can_scale_down?: boolean; } /** GroupMembers. */ interface GroupMembers { /** Units used for scaling number of members. */ units?: string; /** Allocated number of members. */ allocation_count?: number; /** Minimum number of members. */ minimum_count?: number; /** Maximum number of members. */ maximum_count?: number; /** Step size for number of members. */ step_size_count?: number; /** Is this deployment's number of members adjustable?. */ is_adjustable?: boolean; /** Is this deployments's number of members optional?. */ is_optional?: boolean; /** Can this deployment's number of members scale down?. */ can_scale_down?: boolean; } /** GroupMemory. */ interface GroupMemory { /** Units used for scaling memory. */ units?: string; /** Allocated memory in MB. */ allocation_mb?: number; /** Minimum memory in MB. */ minimum_mb?: number; /** Maximum memory in MB. */ maximum_mb?: number; /** Step size memory can be adjusted by in MB. */ step_size_mb?: number; /** Is this group's memory adjustable?. */ is_adjustable?: boolean; /** Is this group's memory optional?. */ is_optional?: boolean; /** Can this group's memory scale down?. */ can_scale_down?: boolean; } /** Groups. */ interface Groups { groups?: Group[]; } /** KillConnectionsResponse. */ interface KillConnectionsResponse { task?: Task; } /** ListDeployablesResponse. */ interface ListDeployablesResponse { deployables?: Deployables[]; } /** ListRegionsResponse. */ interface ListRegionsResponse { /** An array of region ids. */ regions?: string[]; } /** ListRemotesResponse. */ interface ListRemotesResponse { /** Remotes. */ remotes?: Remotes; } /** MongoDBConnectionURI. */ interface MongoDBConnectionURI { /** Type of connection being described. */ type?: string; composed?: string[]; /** Scheme/protocol for URI connection. */ scheme?: string; hosts?: MongoDBConnectionURIHostsItem[]; /** Path for URI connection. */ path?: string; /** Query options to add to the URI connection. */ query_options?: JsonObject; authentication?: MongoDBConnectionURIAuthentication; certificate?: MongoDBConnectionURICertificate; /** Name of the database to use in the URI connection. */ database?: string; /** Name of the replica set to use in the URI connection. */ replica_set?: string; } /** MongoDBConnectionURIAuthentication. */ interface MongoDBConnectionURIAuthentication { /** Authentication method for this credential. */ method?: string; /** Username part of credential. */ username?: string; /** Password part of credential. */ password?: