全部产品
Search
文档中心

资源编排:DATASOURCE::CloudPhone::KeyPair

更新时间:Sep 18, 2024

DATASOURCE::CloudPhone::KeyPair类型用于查询指定密钥对信息。

语法

{
  "Type": "DATASOURCE::CloudPhone::KeyPair",
  "Properties": {
    "KeyPairName": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

KeyPairName

String

密钥对名称。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • KeyPairFingerPrint:密钥对的指纹。

  • KeyPairName:密钥对名称。

  • CreateTime:资源创建时间。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  KeyPairName:
    Description:
      en: The Key Name.
    Required: true
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      KeyPairName:
        Ref: KeyPairName
    Type: DATASOURCE::CloudPhone::KeyPair
Outputs:
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - CreateTime
  KeyPairFingerPrint:
    Description: The Private Key of the Fingerprint.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - KeyPairFingerPrint
  KeyPairName:
    Description: The Key Name.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - KeyPairName
                        

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "KeyPairName": {
      "Type": "String",
      "Description": {
        "en": "The Key Name."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::CloudPhone::KeyPair",
      "Properties": {
        "KeyPairName": {
          "Ref": "KeyPairName"
        }
      }
    }
  },
  "Outputs": {
    "KeyPairFingerPrint": {
      "Description": "The Private Key of the Fingerprint.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "KeyPairFingerPrint"
        ]
      }
    },
    "KeyPairName": {
      "Description": "The Key Name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "KeyPairName"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    }
  }
}