全部產品
Search
文件中心

:ALIYUN::HBR::DbVault

更新時間:Sep 19, 2024

ALIYUN::HBR::DbVault類型用於建立鏡像備份倉庫。

文法

{
  "Type": "ALIYUN::HBR::DbVault",
  "Properties": {
    "Description": String,
    "VaultName": String,
    "RetentionDays": Integer,
    "VaultRegionId": String,
    "Tags": List
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

Description

String

倉庫描述。

VaultName

String

倉庫名稱。

RetentionDays

Integer

備份保留天數。

VaultRegionId

String

倉庫所屬地區ID。

倉庫所屬地區必須與支援Cloud Backup的地區一致。

更多資訊,請參見開服地區

Tags

List

標籤。

更多資訊,請參見Tags屬性

Tags文法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags屬性

屬性名稱

類型

必須

允許更新

描述

約束

Key

String

標籤鍵。

長度為1~128個字元,不能以aliyunacs:開頭,不能包含http://或者https://

Value

String

標籤值。

長度為1~128個字元,不能以aliyunacs:開頭,不能包含http://或者https://

傳回值

Fn::GetAtt

  • Description:倉庫描述。

  • VaultName:倉庫名稱。

  • RetentionDays:備份保留天數。

  • VaultId:倉庫ID。

  • VaultRegionId:倉庫所屬地區ID。

樣本

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VaultName:
    Type: String
    Description: Display name of the vault.
    Default: test
  RetentionDays:
    Type: Number
    Description: Data retention days of the vault. Data will be deleted when it's older than this time.
    Default: 1
  VaultRegionId:
    Type: String
    Description: The region ID to create the vault.
    Default: cn-hangzhou
Resources:
  HBRDbVault:
    Type: ALIYUN::HBR::DbVault
    Properties:
      VaultName:
        Ref: VaultName
      RetentionDays:
        Ref: RetentionDays
      VaultRegionId:
        Ref: VaultRegionId
Outputs:
  Description:
    Description: Description of the vault.
    Value:
      Fn::GetAtt:
        - HBRDbVault
        - Description
  VaultName:
    Description: Display name of the vault.
    Value:
      Fn::GetAtt:
        - HBRDbVault
        - VaultName
  RetentionDays:
    Description: Data retention days of the vault. Data will be deleted when it's older than this time.
    Value:
      Fn::GetAtt:
        - HBRDbVault
        - RetentionDays
  VaultId:
    Description: Vault ID.
    Value:
      Fn::GetAtt:
        - HBRDbVault
        - VaultId
  VaultRegionId:
    Description: The region ID to create the vault.
    Value:
      Fn::GetAtt:
        - HBRDbVault
        - VaultRegionId

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VaultName": {
      "Type": "String",
      "Description": "Display name of the vault.",
      "Default": "test"
    },
    "RetentionDays": {
      "Type": "Number",
      "Description": "Data retention days of the vault. Data will be deleted when it's older than this time.",
      "Default": 1
    },
    "VaultRegionId": {
      "Type": "String",
      "Description": "The region ID to create the vault.",
      "Default": "cn-hangzhou"
    }
  },
  "Resources": {
    "HBRDbVault": {
      "Type": "ALIYUN::HBR::DbVault",
      "Properties": {
        "VaultName": {
          "Ref": "VaultName"
        },
        "RetentionDays": {
          "Ref": "RetentionDays"
        },
        "VaultRegionId": {
          "Ref": "VaultRegionId"
        }
      }
    }
  },
  "Outputs": {
    "Description": {
      "Description": "Description of the vault.",
      "Value": {
        "Fn::GetAtt": [
          "HBRDbVault",
          "Description"
        ]
      }
    },
    "VaultName": {
      "Description": "Display name of the vault.",
      "Value": {
        "Fn::GetAtt": [
          "HBRDbVault",
          "VaultName"
        ]
      }
    },
    "RetentionDays": {
      "Description": "Data retention days of the vault. Data will be deleted when it's older than this time.",
      "Value": {
        "Fn::GetAtt": [
          "HBRDbVault",
          "RetentionDays"
        ]
      }
    },
    "VaultId": {
      "Description": "Vault ID.",
      "Value": {
        "Fn::GetAtt": [
          "HBRDbVault",
          "VaultId"
        ]
      }
    },
    "VaultRegionId": {
      "Description": "The region ID to create the vault.",
      "Value": {
        "Fn::GetAtt": [
          "HBRDbVault",
          "VaultRegionId"
        ]
      }
    }
  }
}