RestoreTask
- Implements: IRestoreTask
This class encapsulates and extends the ROS resource type ALIYUN::DBS::RestoreTask.
Initializers
import ros_cdk_dbs
ros_cdk_dbs.RestoreTask(
scope: Construct,
id: str,
backup_plan_id: typing.Union[str, IResolvable],
destination_endpoint_instance_type: typing.Union[str, IResolvable],
restore_task_name: typing.Union[str, IResolvable],
backup_gateway_id: typing.Union[typing.Union[int, float], IResolvable] = None,
backup_set_id: typing.Union[str, IResolvable] = None,
destination_endpoint_database_name: typing.Union[str, IResolvable] = None,
destination_endpoint_instance_id: typing.Union[str, IResolvable] = None,
destination_endpoint_ip: typing.Union[str, IResolvable] = None,
destination_endpoint_oracle_sid: typing.Union[str, IResolvable] = None,
destination_endpoint_password: typing.Union[str, IResolvable] = None,
destination_endpoint_port: typing.Union[typing.Union[int, float], IResolvable] = None,
destination_endpoint_region: typing.Union[str, IResolvable] = None,
destination_endpoint_user_name: typing.Union[str, IResolvable] = None,
duplicate_conflict: typing.Union[str, IResolvable] = None,
restore_dir: typing.Union[str, IResolvable] = None,
restore_home: typing.Union[str, IResolvable] = None,
restore_objects: typing.Union[str, IResolvable] = None,
restore_time: typing.Union[typing.Union[int, float], IResolvable] = None,
start_task: typing.Union[bool, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope | ros_cdk_core.Construct | No description. |
id | str | No description. |
backup_plan_id | typing.Union[str, ros_cdk_core.IResolvable] | Property backupPlanId: The ID of the backup plan. |
destination_endpoint_instance_type | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointInstanceType: The type of the destination endpoint. |
restore_task_name | typing.Union[str, ros_cdk_core.IResolvable] | Property restoreTaskName: The name of the restoration task. |
backup_gateway_id | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property backupGatewayId: The ID of the backup gateway. |
backup_set_id | typing.Union[str, ros_cdk_core.IResolvable] | Property backupSetId: The ID of the full backup set used for restoration, which is mutually exclusive to RestoreTime. |
destination_endpoint_database_name | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointDatabaseName: The name of the RDS database. |
destination_endpoint_instance_id | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointInstanceId: The ID of the ApsaraDB RDS instance to query. |
destination_endpoint_ip | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointIp: The endpoint used to connect to the database. |
destination_endpoint_oracle_sid | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointOracleSid: The SID of the Oracle instance. |
destination_endpoint_password | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointPassword: The password for the destination database account. |
destination_endpoint_port | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property destinationEndpointPort: The port that is used to access the database of the primary MySQL server. |
destination_endpoint_region | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointRegion: The region of the database. |
destination_endpoint_user_name | typing.Union[str, ros_cdk_core.IResolvable] | Property destinationEndpointUserName: The username for the destination database account. |
duplicate_conflict | typing.Union[str, ros_cdk_core.IResolvable] | Property duplicateConflict: The handling method for conflicts between objects with the same name. |
restore_dir | typing.Union[str, ros_cdk_core.IResolvable] | Property restoreDir: The restore directory. |
restore_home | typing.Union[str, ros_cdk_core.IResolvable] | Property restoreHome: Database Program Directory. |
restore_objects | typing.Union[str, ros_cdk_core.IResolvable] | Property restoreObjects: The objects to restore. |
restore_time | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property restoreTime: The point-in-time for the restore, specified as a UNIX timestamp in milliseconds. |
start_task | typing.Union[bool, ros_cdk_core.IResolvable] | Property startTask: Start restore task after creating a recovery task. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
backup_plan_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property backupPlanId: The ID of the backup plan.
destination_endpoint_instance_typeRequired
- Type: typing.Union[str, 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.
restore_task_nameRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property restoreTaskName: The name of the restoration task.
backup_gateway_idOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property backupGatewayId: The ID of the backup gateway.
NoteDestinationEndpointInstanceType if you set this parameter to agent, this parameter is required.
backup_set_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property backupSetId: The ID of the full backup set used for restoration, which is mutually exclusive to RestoreTime.
destination_endpoint_database_nameOptional
- Type: typing.Union[str, 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.
destination_endpoint_instance_idOptional
- Type: typing.Union[str, 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.
destination_endpoint_ipOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property destinationEndpointIp: The endpoint used to connect to the database.
NoteDestinationEndpointInstanceType is express, agent, or other. This parameter is required.
destination_endpoint_oracle_sidOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property destinationEndpointOracleSid: The SID of the Oracle instance.
Note This parameter is required if the database type is Oracle.
destination_endpoint_passwordOptional
- Type: typing.Union[str, 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
DestinationEndpointInstanceTypeis set toAgentand the database engine is MSSQL. In other scenarios, this parameter is required.
destination_endpoint_portOptional
- Type: typing.Union[typing.Union[int, float], 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.
destination_endpoint_regionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property destinationEndpointRegion: The region of the database.
NoteDestinationEndpointInstanceType for RDS, ECS, DDS, Express, or Agent, this parameter is required.
destination_endpoint_user_nameOptional
- Type: typing.Union[str, 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
DestinationEndpointInstanceTypeis set toAgentand the database engine is MSSQL. In other scenarios, this parameter is required.
duplicate_conflictOptional
- Type: typing.Union[str, 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.
restore_dirOptional
- Type: typing.Union[str, 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.
restore_homeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property restoreHome: Database Program Directory.
restore_objectsOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property restoreObjects: The objects to restore.
- This parameter is optional if
DestinationEndpointInstanceTypeis set toAgent. 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.
restore_timeOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property restoreTime: The point-in-time for the restore, specified as a UNIX timestamp in milliseconds.
start_taskOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property startTask: Start restore task after creating a recovery task.
enable_resource_property_constraintOptional
- Type: bool
Methods
| Name | Description |
|---|---|
to_string | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition | No description. |
add_count | No description. |
add_dependency | No description. |
add_resource_desc | No description. |
apply_removal_policy | No description. |
fetch_condition | No description. |
fetch_dependency | No description. |
fetch_resource_desc | No description. |
get_att | No description. |
set_metadata | No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
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.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
fetch_condition
def fetch_condition() -> RosCondition
fetch_dependency
def fetch_dependency() -> typing.List[str]
fetch_resource_desc
def fetch_resource_desc() -> str
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
| Name | Description |
|---|---|
is_construct | Return whether the given object is a Construct. |
is_construct
import ros_cdk_dbs
ros_cdk_dbs.RestoreTask.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
| Name | Type | Description |
|---|---|---|
node | ros_cdk_core.ConstructNode | The construct tree node associated with this construct. |
env | ros_cdk_core.IResourceEnvironment | The environment this resource belongs to. |
ref | str | No description. |
stack | ros_cdk_core.Stack | The stack in which this resource is defined. |
resource | ros_cdk_core.RosResource | No description. |
attr_restore_task_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute RestoreTaskId: The ID of the restoration task. |
props | RestoreTaskProps | No description. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
envRequired
env: IResourceEnvironment
- Type: 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
ref: str
- Type: str
stackRequired
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resourceOptional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_restore_task_idRequired
attr_restore_task_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute RestoreTaskId: The ID of the restoration task.
propsRequired
props: RestoreTaskProps
- Type: RestoreTaskProps