Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::DBS::Download

Última atualização: Jun 27, 2026

Cria uma tarefa de download avançado no Database Backup (DBS).

Sintaxe

{
  "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
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

BakSetId

String

Não

Não

ID do conjunto de backup completo.

Chame a operação DescribeBackups para consultar o ID do conjunto de backup completo. Para obter mais informações sobre a operação, consulte Consultar os arquivos de backup de dados.

Nota

Especifique esta propriedade quando BakSetType estiver definido como full.

InstanceName

String

Sim

Não

ID da instância.

Nenhuma.

DownloadPointInTime

String

Não

Não

Momento em que o conjunto de backup é baixado.

Especifique um timestamp UNIX que represente o número de milissegundos decorridos desde a época 1º de janeiro de 1970, 00:00:00 UTC. O timestamp é do tipo Long. Exemplo: 1661331864000.

Nota

Especifique esta propriedade quando BakSetType estiver definido como pitr.

BakSetType

String

Não

Não

Tipo da tarefa de download.

Valores válidos:

  • full: baixa um conjunto de backup completo.

  • pitr: baixa um conjunto de backup em um ponto específico no tempo.

BakSetSize

String

Não

Não

Tamanho do conjunto de backup completo.

Chame a operação DescribeBackups para consultar o tamanho do conjunto de backup completo. Para obter mais informações sobre a operação, consulte Consultar os arquivos de backup de dados.

TargetPath

String

Não

Não

Caminho de destino para onde o conjunto de backup será baixado.

Especifique esta propriedade quando TargetType estiver definido como OSS.

TargetType

String

Não

Não

Tipo de destino para onde o conjunto de backup será baixado.

Valores válidos:

  • OSS

  • URL

TargetOssRegion

String

Não

Não

Região onde reside o bucket do Object Storage Service (OSS).

Especifique esta propriedade quando TargetType estiver definido como OSS.

DeleteBackupSetInOss

Boolean

Não

Sim

Define se o conjunto de backup deve ser excluído do OSS ao excluir a pilha.

Valores válidos:

  • true

  • false (padrão)

TargetBucket

String

Não

Não

Nome do bucket do OSS usado para armazenar o conjunto de backup.

Especifique esta propriedade quando TargetType estiver definido como OSS.

Certifique-se de que sua conta tenha a permissão AliyunDBSDefaultRole. Para obter mais informações sobre como adquirir essa permissão, consulte Usar o RAM para autorização de recursos. Você também pode conceder a permissão seguindo as instruções de operação no console do Resource Access Management (RAM).

FormatType

String

Sim

Não

Formato para o qual o conjunto de backup baixado é convertido.

Valores válidos:

  • CSV

  • SQL

  • Parquet

DownloadAddressDuration

Integer

Não

Não

Período de validade da URL de download quando TargetType está definido como URL.

Valores válidos: 300 a 86400. Unidade: segundos.

Valor padrão: 7200.

Valores de retorno

Fn::GetAtt

  • InstanceName: ID da instância.

  • BakSetId: ID do conjunto de backup.

  • DownloadAddressInfo: informações do endereço de download.

  • TaskId: ID da tarefa de download.

Exemplos

  • YAML formato

    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 formato

    {
      "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"
            ]
          }
        }
      }
    }