Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/clients/src/api/rdb/v1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export type {
UpdateUserRequest,
UpgradableVersion,
UpgradeInstanceRequest,
UpgradeInstanceRequestMajorUpgradeWorkflow,
User,
Volume,
VolumeType,
Expand Down
18 changes: 18 additions & 0 deletions packages/clients/src/api/rdb/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import type {
UpdateUserRequest,
UpgradableVersion,
UpgradeInstanceRequest,
UpgradeInstanceRequestMajorUpgradeWorkflow,
User,
Volume,
} from './types.gen'
Expand Down Expand Up @@ -935,6 +936,14 @@ const marshalReadReplicaEndpointSpec = (
]),
})

const marshalUpgradeInstanceRequestMajorUpgradeWorkflow = (
request: UpgradeInstanceRequestMajorUpgradeWorkflow,
defaults: DefaultValues,
): Record<string, unknown> => ({
upgradable_version_id: request.upgradableVersionId,
with_endpoints: request.withEndpoints,
})

export const marshalAddInstanceACLRulesRequest = (
request: AddInstanceACLRulesRequest,
defaults: DefaultValues,
Expand Down Expand Up @@ -1198,5 +1207,14 @@ export const marshalUpgradeInstanceRequest = (
param: 'upgradable_version_id',
value: request.upgradableVersionId,
},
{
param: 'major_upgrade_workflow',
value: request.majorUpgradeWorkflow
? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(
request.majorUpgradeWorkflow,
defaults,
)
: undefined,
},
]),
})
40 changes: 35 additions & 5 deletions packages/clients/src/api/rdb/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,22 @@ export interface UpgradableVersion {
minorVersion: string
}

/** Upgrade instance request. major upgrade workflow. */
export interface UpgradeInstanceRequestMajorUpgradeWorkflow {
/**
* Update your database engine to a newer version. This will create a new
* Database Instance with same specifications as the current one and perform a
* Database Engine upgrade.
*/
upgradableVersionId: string
/**
* Include endpoint during the migration. At the end of the migration
* procedure this option let you migrate all your database endpoint to the
* upgraded instance.
*/
withEndpoints: boolean
}

/** User. */
export interface User {
/**
Expand Down Expand Up @@ -909,29 +925,33 @@ export type UpgradeInstanceRequest = {
* Node type of the Database Instance you want to upgrade to.
*
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
* 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
* could be set.
*/
nodeType?: string
/**
* Defines whether or not high availability should be enabled on the Database
* Instance.
*
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
* 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
* could be set.
*/
enableHa?: boolean
/**
* Increase your block storage volume size.
*
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
* 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
* could be set.
*/
volumeSize?: number
/**
* Change your Database Instance storage type.
*
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
* 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
* could be set.
*/
volumeType?: VolumeType
/**
Expand All @@ -940,9 +960,19 @@ export type UpgradeInstanceRequest = {
* Database Engine upgrade.
*
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
* 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
* could be set.
*/
upgradableVersionId?: string
/**
* Upgrade your database engine to a new major version including instance
* endpoints.
*
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
* could be set.
*/
majorUpgradeWorkflow?: UpgradeInstanceRequestMajorUpgradeWorkflow
}

export type ListInstancesRequest = {
Expand Down