Skip to content

RestoreTask

This class encapsulates and extends the ROS resource type ALIYUN::DBS::RestoreTask.

Initializers

import com.aliyun.ros.cdk.dbs.RestoreTask;
RestoreTask.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .backupPlanId(java.lang.String)
    .backupPlanId(IResolvable)
    .destinationEndpointInstanceType(java.lang.String)
    .destinationEndpointInstanceType(IResolvable)
    .restoreTaskName(java.lang.String)
    .restoreTaskName(IResolvable)
//  .backupGatewayId(java.lang.Number)
//  .backupGatewayId(IResolvable)
//  .backupSetId(java.lang.String)
//  .backupSetId(IResolvable)
//  .destinationEndpointDatabaseName(java.lang.String)
//  .destinationEndpointDatabaseName(IResolvable)
//  .destinationEndpointInstanceId(java.lang.String)
//  .destinationEndpointInstanceId(IResolvable)
//  .destinationEndpointIp(java.lang.String)
//  .destinationEndpointIp(IResolvable)
//  .destinationEndpointOracleSid(java.lang.String)
//  .destinationEndpointOracleSid(IResolvable)
//  .destinationEndpointPassword(java.lang.String)
//  .destinationEndpointPassword(IResolvable)
//  .destinationEndpointPort(java.lang.Number)
//  .destinationEndpointPort(IResolvable)
//  .destinationEndpointRegion(java.lang.String)
//  .destinationEndpointRegion(IResolvable)
//  .destinationEndpointUserName(java.lang.String)
//  .destinationEndpointUserName(IResolvable)
//  .duplicateConflict(java.lang.String)
//  .duplicateConflict(IResolvable)
//  .restoreDir(java.lang.String)
//  .restoreDir(IResolvable)
//  .restoreHome(java.lang.String)
//  .restoreHome(IResolvable)
//  .restoreObjects(java.lang.String)
//  .restoreObjects(IResolvable)
//  .restoreTime(java.lang.Number)
//  .restoreTime(IResolvable)
//  .startTask(java.lang.Boolean)
//  .startTask(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
backupPlanId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property backupPlanId: The ID of the backup plan.
destinationEndpointInstanceType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointInstanceType: The type of the destination endpoint.
restoreTaskName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property restoreTaskName: The name of the restoration task.
backupGatewayId java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property backupGatewayId: The ID of the backup gateway.
backupSetId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property backupSetId: The ID of the full backup set used for restoration, which is mutually exclusive to RestoreTime.
destinationEndpointDatabaseName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointDatabaseName: The name of the RDS database.
destinationEndpointInstanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointInstanceId: The ID of the ApsaraDB RDS instance to query.
destinationEndpointIp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointIp: The endpoint used to connect to the database.
destinationEndpointOracleSid java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointOracleSid: The SID of the Oracle instance.
destinationEndpointPassword java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointPassword: The password for the destination database account.
destinationEndpointPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointPort: The port that is used to access the database of the primary MySQL server.
destinationEndpointRegion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointRegion: The region of the database.
destinationEndpointUserName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destinationEndpointUserName: The username for the destination database account.
duplicateConflict java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property duplicateConflict: The handling method for conflicts between objects with the same name.
restoreDir java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property restoreDir: The restore directory.
restoreHome java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property restoreHome: Database Program Directory.
restoreObjects java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property restoreObjects: The objects to restore.
restoreTime java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property restoreTime: The point-in-time for the restore, specified as a UNIX timestamp in milliseconds.
startTask java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property startTask: Start restore task after creating a recovery task.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

backupPlanIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property backupPlanId: The ID of the backup plan.


destinationEndpointInstanceTypeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointInstanceType: The type of the destination endpoint.

Valid values:

  • RDS: an ApsaraDB RDS instance.
  • ECS: a self-managed database hosted on an ECS instance.
  • Express: a database connected over a leased line, VPN Gateway, or Smart Access Gateway.
  • Agent: a database connected via a backup gateway.
  • DDS: an ApsaraDB for MongoDB (DDS) instance.
  • Other: a database connected over the internet by using a public IP address and port.
  • dg: a self-managed database without a public endpoint, connected via Database Gateway.

restoreTaskNameRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property restoreTaskName: The name of the restoration task.


backupGatewayIdOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property backupGatewayId: The ID of the backup gateway.

NoteDestinationEndpointInstanceType if you set this parameter to agent, this parameter is required.


backupSetIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property backupSetId: The ID of the full backup set used for restoration, which is mutually exclusive to RestoreTime.


destinationEndpointDatabaseNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointDatabaseName: The name of the RDS database.

Note When the database type is PostgreSQL or MongoDB, this parameter is required.


destinationEndpointInstanceIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointInstanceId: The ID of the ApsaraDB RDS instance to query.

NoteDestinationEndpointInstanceType if the value is RDS, ECS, DDS, or Express, this parameter is required.


destinationEndpointIpOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointIp: The endpoint used to connect to the database.

NoteDestinationEndpointInstanceType is express, agent, or other. This parameter is required.


destinationEndpointOracleSidOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointOracleSid: The SID of the Oracle instance.

Note This parameter is required if the database type is Oracle.


destinationEndpointPasswordOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointPassword: The password for the destination database account.

This parameter is optional if the database engine is Redis, or if DestinationEndpointInstanceType is set to Agent and the database engine is MSSQL. In other scenarios, this parameter is required.


destinationEndpointPortOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointPort: The port that is used to access the database of the primary MySQL server.

NoteDestinationEndpointInstanceType is in the format of express, agent, other, or ECS. This parameter is required.


destinationEndpointRegionOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointRegion: The region of the database.

NoteDestinationEndpointInstanceType for RDS, ECS, DDS, Express, or Agent, this parameter is required.


destinationEndpointUserNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destinationEndpointUserName: The username for the destination database account.

This parameter is optional if the database engine is Redis, or if DestinationEndpointInstanceType is set to Agent and the database engine is MSSQL. In other scenarios, this parameter is required.


duplicateConflictOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property duplicateConflict: The handling method for conflicts between objects with the same name.

Valid values: failure: The object with the same name fails (default). renamenew: renames an object with the same name.


restoreDirOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property restoreDir: The restore directory.

This parameter is required if DestinationEndpointInstanceType is set to Agent and the database type is MySQL.


restoreHomeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property restoreHome: Database Program Directory.


restoreObjectsOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property restoreObjects: The objects to restore.

  • This parameter is optional if DestinationEndpointInstanceType is set to Agent. In other scenarios, this parameter is required.
  • The value must be a JSON string in the following format: [{ "DBName": "source_database_name", "NewDBName": "destination_database_name" }]

You can use this API operation to restore data only at the database level. To restore data at the table level, log on to the console.


restoreTimeOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property restoreTime: The point-in-time for the restore, specified as a UNIX timestamp in milliseconds.


startTaskOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property startTask: Start restore task after creating a recovery task.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

fetchCondition

public RosCondition fetchCondition()

fetchDependency

public java.util.List<java.lang.String> fetchDependency()

fetchResourceDesc

public java.lang.String fetchResourceDesc()

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.dbs.RestoreTask;
RestoreTask.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
env com.aliyun.ros.cdk.core.IResourceEnvironment The environment this resource belongs to.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrRestoreTaskId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute RestoreTaskId: The ID of the restoration task.
props RestoreTaskProps No description.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


envRequired

public IResourceEnvironment getEnv();
  • Type: com.aliyun.ros.cdk.core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrRestoreTaskIdRequired

public java.lang.Object getAttrRestoreTaskId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute RestoreTaskId: The ID of the restoration task.


propsRequired

public RestoreTaskProps getProps();