全部产品
Search
文档中心

资源编排:ALIYUN::POLARDB::Backup

更新时间:Dec 03, 2024

ALIYUN::POLARDB::Backup类型用于为PolarDB集群创建全量快照备份。

语法

{
  "Type": "ALIYUN::POLARDB::Backup",
  "Properties": {
    "DBClusterId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DBClusterId

String

集群 ID。

返回值

Fn::GetAtt

  • DBClusterId:集群 ID。

  • BackupJobId:备份集 ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DBClusterId:
    Type: String
    Description:
      en: The cluster ID.
    Required: true
    AssociationProperty: ALIYUN::POLARDB::DBCluster::DBClusterId
Resources:
  Backup:
    Type: ALIYUN::POLARDB::Backup
    Properties:
      DBClusterId:
        Ref: DBClusterId
Outputs:
  DBClusterId:
    Description: The ID of the cluster.
    Value:
      Fn::GetAtt:
        - Backup
        - DBClusterId
  BackupJobId:
    Description: The ID of the backup set.
    Value:
      Fn::GetAtt:
        - Backup
        - BackupJobId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DBClusterId": {
      "Type": "String",
      "Description": {
        "en": "The cluster ID."
      },
      "Required": true,
      "AssociationProperty": "ALIYUN::POLARDB::DBCluster::DBClusterId"
    }
  },
  "Resources": {
    "Backup": {
      "Type": "ALIYUN::POLARDB::Backup",
      "Properties": {
        "DBClusterId": {
          "Ref": "DBClusterId"
        }
      }
    }
  },
  "Outputs": {
    "DBClusterId": {
      "Description": "The ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "Backup",
          "DBClusterId"
        ]
      }
    },
    "BackupJobId": {
      "Description": "The ID of the backup set.",
      "Value": {
        "Fn::GetAtt": [
          "Backup",
          "BackupJobId"
        ]
      }
    }
  }
}