Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::KMS::Secret

Última atualização: Jun 27, 2026

Consulta os detalhes de um segredo do Key Management Service (KMS).

Sintaxe

{
  "Type": "DATASOURCE::KMS::Secret",
  "Properties": {
    "SecretName": String,
    "RefreshOptions": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

SecretName

String

Sim

Sim

Nome do segredo.

Nenhuma.

RefreshOptions

String

Não

Sim

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

Valores válidos:

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

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

Valores de retorno

Fn::GetAtt

  • Description: descrição do segredo.

  • RotationInterval: intervalo de rotação automática do segredo.

  • LastRotationDate: data e hora da última rotação.

  • SecretType: tipo do segredo.

  • CreateTime: data e hora de criação do segredo.

  • DKMSInstanceId: ID da instância dedicada do KMS.

  • AutomaticRotation: indica se a rotação automática está ativada.

  • SecretName: nome do segredo.

  • NextRotationDate: data e hora da próxima rotação.

  • UpdateTime: data e hora da última atualização do segredo.

  • PlannedDeleteTime: data e hora agendada para exclusão do segredo.

  • ExtendedConfig: configuração estendida do segredo.

  • Arn: Alibaba Cloud Resource Name (ARN) do segredo.

  • EncryptionKeyId: ID da chave do KMS usada para criptografar o valor do segredo.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SecretName:
    Type: String
    Description:
      en: The name of the secret.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::KMS::Secret
    Properties:
      SecretName:
        Ref: SecretName
Outputs:
  Description:
    Description: The description of the secret.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Description
  RotationInterval:
    Description: 'The interval for automatic rotation. The value is in the integer[unit] format. integer indicates the length of time. unit: indicates the time unit. The value of unit is fixed as s. For example, if the value is 604800s, automatic rotation is performed at a 7-day interval.The value is in the integer[unit] format. integer indicates the length of time. unit: indicates the time unit. The value of unit is fixed as s. For example, if the value is 604800s, automatic rotation is performed at a 7-day interval.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RotationInterval
  LastRotationDate:
    Description: The time when the last rotation was performed.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LastRotationDate
  SecretType:
    Description: 'The type of the secret. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecretType
  CreateTime:
    Description: The time when the secret was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  DKMSInstanceId:
    Description: The ID of the dedicated KMS instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DKMSInstanceId
  AutomaticRotation:
    Description: 'Indicates whether automatic rotation is enabled. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AutomaticRotation
  SecretName:
    Description: The name of the secret.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecretName
  NextRotationDate:
    Description: The time when the next rotation will be performed.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - NextRotationDate
  UpdateTime:
    Description: The time when the secret was updated.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UpdateTime
  PlannedDeleteTime:
    Description: The time when the secret is scheduled to be deleted.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PlannedDeleteTime
  ExtendedConfig:
    Description: The extended configuration of the secret.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ExtendedConfig
  Arn:
    Description: The Alibaba Cloud Resource Name (ARN) of the secret.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Arn
  EncryptionKeyId:
    Description: The ID of the customer master key (CMK) that is used to encrypt the secret value.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EncryptionKeyId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SecretName": {
      "Type": "String",
      "Description": {
        "en": "The name of the secret."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::KMS::Secret",
      "Properties": {
        "SecretName": {
          "Ref": "SecretName"
        }
      }
    }
  },
  "Outputs": {
    "Description": {
      "Description": "The description of the secret.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "RotationInterval": {
      "Description": "The interval for automatic rotation. The value is in the integer[unit] format. integer indicates the length of time. unit: indicates the time unit. The value of unit is fixed as s. For example, if the value is 604800s, automatic rotation is performed at a 7-day interval.The value is in the integer[unit] format. integer indicates the length of time. unit: indicates the time unit. The value of unit is fixed as s. For example, if the value is 604800s, automatic rotation is performed at a 7-day interval.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RotationInterval"
        ]
      }
    },
    "LastRotationDate": {
      "Description": "The time when the last rotation was performed.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LastRotationDate"
        ]
      }
    },
    "SecretType": {
      "Description": "The type of the secret. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecretType"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the secret was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "DKMSInstanceId": {
      "Description": "The ID of the dedicated KMS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DKMSInstanceId"
        ]
      }
    },
    "AutomaticRotation": {
      "Description": "Indicates whether automatic rotation is enabled. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AutomaticRotation"
        ]
      }
    },
    "SecretName": {
      "Description": "The name of the secret.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecretName"
        ]
      }
    },
    "NextRotationDate": {
      "Description": "The time when the next rotation will be performed.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NextRotationDate"
        ]
      }
    },
    "UpdateTime": {
      "Description": "The time when the secret was updated.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UpdateTime"
        ]
      }
    },
    "PlannedDeleteTime": {
      "Description": "The time when the secret is scheduled to be deleted.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PlannedDeleteTime"
        ]
      }
    },
    "ExtendedConfig": {
      "Description": "The extended configuration of the secret.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ExtendedConfig"
        ]
      }
    },
    "Arn": {
      "Description": "The Alibaba Cloud Resource Name (ARN) of the secret.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Arn"
        ]
      }
    },
    "EncryptionKeyId": {
      "Description": "The ID of the customer master key (CMK) that is used to encrypt the secret value.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EncryptionKeyId"
        ]
      }
    }
  }
}