Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::ECS::AutoSnapshotPolicy

Última atualização: Jun 27, 2026

Consulta uma política de snapshot automático específica.

Sintaxe

{
  "Type": "DATASOURCE::ECS::AutoSnapshotPolicy",
  "Properties": {
    "AutoSnapshotPolicyId": String,
    "RefreshOptions": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

AutoSnapshotPolicyId

String

Sim

Sim

ID da política de snapshot automático.

Nenhuma.

RefreshOptions

String

Não

Sim

Política de atualização dos recursos de source ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos de source durante a atualização da pilha.

  • Always: atualiza os recursos de source durante a atualização da pilha.

Valores de retorno

Fn::GetAtt

  • TimePoints: horários de criação dos snapshots automáticos.

  • VolumeNums: quantidade de volumes estendidos aos quais a política de snapshot automático se aplica.

  • ResourceGroupId: ID do grupo de recursos.

  • CreateTime: data e hora de criação da política de snapshot automático.

  • RetentionDays: período de retenção dos snapshots automáticos.

  • RepeatWeekdays: dias da semana em que os snapshots automáticos são criados.

  • AutoSnapshotPolicyName: nome da política de snapshot automático.

  • DiskNums: quantidade de discos em nuvem aos quais a política de snapshot automático se aplica.

  • Tags: tags da política de snapshot automático.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AutoSnapshotPolicyId:
    Type: String
    Description:
      en: The name of the automatic snapshot policy.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ECS::AutoSnapshotPolicy
    Properties:
      AutoSnapshotPolicyId:
        Ref: AutoSnapshotPolicyId
Outputs:
  TimePoints:
    Description: The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TimePoints
  VolumeNums:
    Description: The number of extended volumes to which the automatic snapshot policy is applied.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VolumeNums
  TargetCopyRegions:
    Description: ''
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TargetCopyRegions
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  EnableCrossRegionCopy:
    Description: ''
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnableCrossRegionCopy
  CreateTime:
    Description: The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  RetentionDays:
    Description: |-
      The retention period of the automatic snapshot. Unit: days. Valid values:
      - -1: The automatic snapshot is retained until it is deleted.
      - 1 to 65536: The automatic snapshot is retained for the specified number of days.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RetentionDays
  RepeatWeekdays:
    Description: 'The days of the week on which to create automatic snapshots. Valid values: 1 to 7, which correspond to the days of the week. 1 indicates Monday. One or more days can be specified.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RepeatWeekdays
  AutoSnapshotPolicyName:
    Description: Name of the automatic snapshot policy.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AutoSnapshotPolicyName
  DiskNums:
    Description: Number of cloud disks with this policy enabled.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DiskNums
  Tags:
    Description: The tags of the automatic snapshot policy.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
  CopiedSnapshotsRetentionDays:
    Description: ''
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CopiedSnapshotsRetentionDays
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AutoSnapshotPolicyId": {
      "Type": "String",
      "Description": {
        "en": "The name of the automatic snapshot policy."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::AutoSnapshotPolicy",
      "Properties": {
        "AutoSnapshotPolicyId": {
          "Ref": "AutoSnapshotPolicyId"
        }
      }
    }
  },
  "Outputs": {
    "TimePoints": {
      "Description": "The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TimePoints"
        ]
      }
    },
    "VolumeNums": {
      "Description": "The number of extended volumes to which the automatic snapshot policy is applied.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VolumeNums"
        ]
      }
    },
    "TargetCopyRegions": {
      "Description": "",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TargetCopyRegions"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "EnableCrossRegionCopy": {
      "Description": "",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnableCrossRegionCopy"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "RetentionDays": {
      "Description": "The retention period of the automatic snapshot. Unit: days. Valid values:\n- -1: The automatic snapshot is retained until it is deleted.\n- 1 to 65536: The automatic snapshot is retained for the specified number of days.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RetentionDays"
        ]
      }
    },
    "RepeatWeekdays": {
      "Description": "The days of the week on which to create automatic snapshots. Valid values: 1 to 7, which correspond to the days of the week. 1 indicates Monday. One or more days can be specified.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RepeatWeekdays"
        ]
      }
    },
    "AutoSnapshotPolicyName": {
      "Description": "Name of the automatic snapshot policy.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AutoSnapshotPolicyName"
        ]
      }
    },
    "DiskNums": {
      "Description": "Number of cloud disks with this policy enabled.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DiskNums"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of the automatic snapshot policy.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    },
    "CopiedSnapshotsRetentionDays": {
      "Description": "",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CopiedSnapshotsRetentionDays"
        ]
      }
    }
  }
}