ALIYUN::DBS::Download类型用于创建高级下载任务。
语法
{
"Type": "ALIYUN::DBS::Download",
"Properties": {
"BakSetId": String,
"InstanceName": String,
"DownloadPointInTime": String,
"BakSetType": String,
"BakSetSize": String,
"TargetPath": String,
"TargetType": String,
"TargetOssRegion": String,
"DeleteBackupSetInOss": Boolean,
"TargetBucket": String,
"FormatType": String,
"DownloadAddressDuration": Integer
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
BakSetId | String | 否 | 否 | 全量备份集ID。 | 您可调用查看备份列表接口获取该参数值。 说明 当BakSetType为 full时,该参数必填。 |
InstanceName | String | 是 | 否 | 实例ID。 | 无 |
DownloadPointInTime | String | 否 | 否 | 下载任意时间点。 | Long类型时间戳形式,单位为毫秒(ms)。示例值:1661331864000。 说明 当BakSetType为pitr时,该参数必填。 |
BakSetType | String | 否 | 否 | 下载任务类型。 | 取值:
|
BakSetSize | String | 否 | 否 | 全量备份集大小。 | 您可调用查看备份列表接口查询,单位为字节(Byte)。 |
TargetPath | String | 否 | 否 | 数据下载目标路径。 | 当TargetType为OSS时,该参数必填。 |
TargetType | String | 否 | 否 | 下载目标类型。 | 取值:
|
TargetOssRegion | String | 否 | 否 | OSS Bucket所在地域。 | 当TargetType为OSS时,该参数必填。 |
DeleteBackupSetInOss | Boolean | 否 | 是 | 删除资源栈时,是否在OSS中删除备份集。 | 取值:
|
TargetBucket | String | 否 | 否 | OSS Bucket名称。 | 当TargetType为OSS时,该参数必填。 请确认您的账号已拥有AliyunDBSDefaultRole权限。如何授权,请参见RAM资源授权。您也可访问控制台根据操作指引去授权。 |
FormatType | String | 是 | 否 | 下载转换的目标格式 | 取值:
|
DownloadAddressDuration | Integer | 否 | 否 | 当下载目标为URL时,设置链接的有效期。 | 取值范围:300 ~ 86400。单位:秒。 默认值为:7200秒。 |
返回值
Fn::GetAtt
InstanceName:实例ID。
BakSetId:备份集ID。
DownloadAddressInfo:下载地址信息。
TaskId:下载任务ID。
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: BakSetId: Type: String Description: en: |- The ID of the backup set. You can call the DescribeBackups operation to query the ID of the backup set. This parameter is required if the BakSetType parameter is set to full. Default: 146005**** InstanceName: Type: String Description: en: The ID of the instance. Default: rm-wz994c1t1**** DownloadPointInTime: Type: String Description: en: |- The point in time at which the backup set is downloaded. Specify a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. This parameter is required if the BakSetType parameter is set to pitr. Default: '1661331864000' BakSetType: Type: String Description: en: |- The type of the download task. Valid values: full: downloads a full backup set pitr: downloads a backup set at a specific point in time. Default: full BakSetSize: Type: String Description: en: |- The size of the full backup set. Unit: bytes. You can call the DescribeBackups operation to query the size of the full backup set. Default: 216**** TargetPath: Type: String Description: en: |- The destination path to which the backup set is downloaded. This parameter is required if the TargetType parameter is set to OSS. Default: test_db/path TargetType: Type: String Description: en: |- The type of the destination to which the backup set is downloaded. Valid values: OSS|URL Default: OSS TargetOssRegion: Type: String Description: en: |- The region in which the OSS bucket resides. This parameter is required if the TargetType parameter is set to OSS. Default: cn-beijing DeleteBackupSetInOss: Type: Boolean Description: en: |- Whether to delete the backup set in OSS when deleting the stack. Valid values: true|false, default is true. Default: true TargetBucket: Type: String Description: en: |- The name of the OSS bucket that is used to store the backup set. This parameter is required if the TargetType parameter is set to OSS. Make sure that your account is granted the AliyunDBSDefaultRole permission. For more information, see Use RAM for resource authorization. You can also grant permissions based on the operation instructions in the Resource Access Management (RAM) console. Default: test123 FormatType: Type: String Description: en: |- The format to which the downloaded backup set is converted. Valid values: CSV|SQL|Parquet Default: CSV DownloadAddressDuration: Type: Number Description: en: |- When the download target is a URL, set the link validity period. The default URL validity period is 7200 seconds. The effective duration range can be set from 300 seconds to 86400 seconds MinValue: 300 MaxValue: 86400 Default: 2700 Resources: Download: Type: ALIYUN::DBS::Download Properties: BakSetId: Ref: BakSetId InstanceName: Ref: InstanceName DownloadPointInTime: Ref: DownloadPointInTime BakSetType: Ref: BakSetType BakSetSize: Ref: BakSetSize TargetPath: Ref: TargetPath TargetType: Ref: TargetType TargetOssRegion: Ref: TargetOssRegion DeleteBackupSetInOss: Ref: DeleteBackupSetInOss TargetBucket: Ref: TargetBucket FormatType: Ref: FormatType DownloadAddressDuration: Ref: DownloadAddressDuration Outputs: InstanceName: Description: The ID of the instance. Value: Fn::GetAtt: - Download - InstanceName BakSetId: Description: The ID of the backup set. Value: Fn::GetAtt: - Download - BakSetId DownloadAddressInfo: Description: The download address information. Value: Fn::GetAtt: - Download - DownloadAddressInfo TaskId: Description: The ID of the download task. Value: Fn::GetAtt: - Download - TaskId
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "BakSetId": { "Type": "String", "Description": { "en": "The ID of the backup set. You can call the DescribeBackups operation to query the ID of the backup set.\nThis parameter is required if the BakSetType parameter is set to full." }, "Default": "146005****" }, "InstanceName": { "Type": "String", "Description": { "en": "The ID of the instance." }, "Default": "rm-wz994c1t1****" }, "DownloadPointInTime": { "Type": "String", "Description": { "en": "The point in time at which the backup set is downloaded. \nSpecify a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.\nThis parameter is required if the BakSetType parameter is set to pitr." }, "Default": "1661331864000" }, "BakSetType": { "Type": "String", "Description": { "en": "The type of the download task. Valid values:\nfull: downloads a full backup set\npitr: downloads a backup set at a specific point in time." }, "Default": "full" }, "BakSetSize": { "Type": "String", "Description": { "en": "The size of the full backup set. Unit: bytes. \nYou can call the DescribeBackups operation to query the size of the full backup set." }, "Default": "216****" }, "TargetPath": { "Type": "String", "Description": { "en": "The destination path to which the backup set is downloaded.\nThis parameter is required if the TargetType parameter is set to OSS." }, "Default": "test_db/path" }, "TargetType": { "Type": "String", "Description": { "en": "The type of the destination to which the backup set is downloaded. \nValid values: OSS|URL" }, "Default": "OSS" }, "TargetOssRegion": { "Type": "String", "Description": { "en": "The region in which the OSS bucket resides.\nThis parameter is required if the TargetType parameter is set to OSS." }, "Default": "cn-beijing" }, "DeleteBackupSetInOss": { "Type": "Boolean", "Description": { "en": "Whether to delete the backup set in OSS when deleting the stack.\nValid values: true|false, default is true." }, "Default": true }, "TargetBucket": { "Type": "String", "Description": { "en": "The name of the OSS bucket that is used to store the backup set.\nThis parameter is required if the TargetType parameter is set to OSS.\nMake sure that your account is granted the AliyunDBSDefaultRole permission. \nFor more information, see Use RAM for resource authorization. \nYou can also grant permissions based on the operation instructions in the Resource Access Management (RAM) console." }, "Default": "test123" }, "FormatType": { "Type": "String", "Description": { "en": "The format to which the downloaded backup set is converted. \nValid values: CSV|SQL|Parquet" }, "Default": "CSV" }, "DownloadAddressDuration": { "Type": "Number", "Description": { "en": "When the download target is a URL, set the link validity period. \nThe default URL validity period is 7200 seconds. \nThe effective duration range can be set from 300 seconds to 86400 seconds" }, "MinValue": 300, "MaxValue": 86400, "Default": 2700 } }, "Resources": { "Download": { "Type": "ALIYUN::DBS::Download", "Properties": { "BakSetId": { "Ref": "BakSetId" }, "InstanceName": { "Ref": "InstanceName" }, "DownloadPointInTime": { "Ref": "DownloadPointInTime" }, "BakSetType": { "Ref": "BakSetType" }, "BakSetSize": { "Ref": "BakSetSize" }, "TargetPath": { "Ref": "TargetPath" }, "TargetType": { "Ref": "TargetType" }, "TargetOssRegion": { "Ref": "TargetOssRegion" }, "DeleteBackupSetInOss": { "Ref": "DeleteBackupSetInOss" }, "TargetBucket": { "Ref": "TargetBucket" }, "FormatType": { "Ref": "FormatType" }, "DownloadAddressDuration": { "Ref": "DownloadAddressDuration" } } } }, "Outputs": { "InstanceName": { "Description": "The ID of the instance.", "Value": { "Fn::GetAtt": [ "Download", "InstanceName" ] } }, "BakSetId": { "Description": "The ID of the backup set.", "Value": { "Fn::GetAtt": [ "Download", "BakSetId" ] } }, "DownloadAddressInfo": { "Description": "The download address information.", "Value": { "Fn::GetAtt": [ "Download", "DownloadAddressInfo" ] } }, "TaskId": { "Description": "The ID of the download task.", "Value": { "Fn::GetAtt": [ "Download", "TaskId" ] } } } }