すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:データソース::ECS::キーペア

最終更新日:Mar 17, 2025

DATASOURCE::ECS::KeyPair は、キーペアに関する情報をクエリするために使用されます。

構文

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

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

KeyPairName

String

はい

はい

キーペアの名前。

なし。

RefreshOptions

String

いいえ

はい

スタックの更新時のデータソースリソースのリフレッシュポリシー。

有効な値:

  • Never (デフォルト): スタックの更新時にデータソースリソースをリフレッシュしません。

  • Always: スタックの更新時にデータソースリソースをリフレッシュします。

戻り値

Fn::GetAtt

  • KeyPairName: キーペアの名前。

  • ResourceGroupId: リソースグループ ID。

  • CreateTime: キーペアが作成された時刻。

  • FingerPrint: キーペアのフィンガープリント。

  • Tags: キーペアに追加されたタグ。

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  KeyPairName:
    Type: String
    Description:
      en: |-
        The name of the key pair. You can use the asterisk (*) symbol as a wildcard in regular expressions to perform a fuzzy search for key pairs. Sample patterns:
        - *SshKey: queries key pairs whose names end with SshKey, including the key pair named SshKey.
        - SshKey*: queries key pairs whose names start with SshKey, including the key pair named SshKey.
        - *SshKey*: queries key pairs whose names include SshKey, including the key pair named SshKey.
        - SshKey: queries the key pair named SshKey.
    Required: true
    AssociationProperty: ALIYUN::ECS::KeyPair::KeyPairName
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ECS::KeyPair
    Properties:
      KeyPairName:
        Ref: KeyPairName
Outputs:
  KeyPairName:
    Description: The name of the key pair.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - KeyPairName
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  CreateTime:
    Description: The time when the key pair was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  FingerPrint:
    Description: The fingerprint of the key pair.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - FingerPrint
  Tags:
    Description: The tags of the key pair.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "KeyPairName": {
      "Type": "String",
      "Description": {
        "en": "The name of the key pair. You can use the asterisk (*) symbol as a wildcard in regular expressions to perform a fuzzy search for key pairs. Sample patterns:\n- *SshKey: queries key pairs whose names end with SshKey, including the key pair named SshKey.\n- SshKey*: queries key pairs whose names start with SshKey, including the key pair named SshKey.\n- *SshKey*: queries key pairs whose names include SshKey, including the key pair named SshKey.\n- SshKey: queries the key pair named SshKey."
      },
      "Required": true,
      "AssociationProperty": "ALIYUN::ECS::KeyPair::KeyPairName"
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::KeyPair",
      "Properties": {
        "KeyPairName": {
          "Ref": "KeyPairName"
        }
      }
    }
  },
  "Outputs": {
    "KeyPairName": {
      "Description": "キーペアの名前。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "KeyPairName"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "リソースグループ ID。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "CreateTime": {
      "Description": "キーペアが作成された時刻。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "FingerPrint": {
      "Description": "キーペアのフィンガープリント。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "FingerPrint"
        ]
      }
    },
    "Tags": {
      "Description": "キーペアのタグ。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    }
  }
}