ALIYUN::CS::App 型は、ALIYUN::CS::Cluster アプリケーションの作成時に使用します。
構文
{ “Type” : “ALIYUN::CS::App”, “Properties” : { “Name” : String, “Ca” : String, “ClusterId” : String, “Environment” : Map, “Cert” : String, “Version” : String, “MasterUrl” : String, “Key” : String, “Template” : String, “Description” : String }}
プロパティ
名前 | データ型 | 必須/省略可能 | 説明 | 制約 |
Name | String | 必須 | アプリケーション名 | なし |
ClusterId | String | 必須 | クラスター ID | なし |
MasterUrl | String | 必須 | クラスターのマスター URL | なし |
Ca | String | 省略可能 | クラスターの CA 証明書 | なし |
Environment | Map | 省略可能 | 環境変数 | なし |
Cert | String | 省略可能 | クラスターのクライアント証明書 | なし |
Version | String | 省略可能 | アプリケーションのバージョン | なし |
Key | String | 省略可能 | クライアント側のクラスターのプライマリキー | クライアント側のクラスターのプライマリキー |
Template | String | 省略可能 | Docker アプリケーションのデプロイに使用するテンプレート | なし |
Description | String | 省略可能 | アプリケーションの説明 | 説明は 2 - 256 文字の文字列です。 デフォルト値は NULL です。 |
レスポンス値
Fn::GetAtt
エンドポイント : アプリケーションへのアクセスに使用されるドメイン
コーディング例
{ “ROSTemplateFormatVersion”: “2015-09-01”, “Resources”: { “App”: { “Properties”: { “Ca”: { “Fn::GetAtt”: [ “MyCluster”, “Ca” ] }, “Cert”: { “Fn::GetAtt”: [ “MyCluster”, “Cert” ] }, “ClusterId”: { “Fn::GetAtt”: [ “MyCluster”, “ClusterId” ] }, “Key”: { “Fn::GetAtt”: [ “MyCluster”, “Key” ] }, “MasterUrl”: { “Fn::GetAtt”: [ “MyCluster”, “MasterUrl” ] }, “Name”: “ngix”, “Template”: {“Fn::Join”: [“\n”, [ “mysql:”, “ environment:”, “ - MYSQL_MAJOR=5.6”, “ - MYSQL_ROOT_PASSWORD=password”, “ expose:”, “ - 3306/tcp”, “ image: ‘registry.aliyuncs.com/acs-sample/mysql:5.6’”, “ labels:”, “ aliyun.routing.port_3306: nnn;http://nn.abc.com“, “ aliyun.scale: ‘3’”, “ restart: always”, “ volumes:”, “ - /var/lib/mysql” ]]} }, “Type”: “ALIYUN::CS::App” }, “MyCluster”: { “Properties”: { “InstanceType”: “ecs.s1.small”, “Name”: “mysqlcluster”, “Password”: “Test1234”, “Size”: 3 }, “Type”: “ALIYUN::CS::Cluster” } }, “Outputs”: { “Endpoints”: { “Description”: “Endpoints of the app.”, “Value”: { “Fn::GetAtt”: [ “App”, “Endpoints” ] } } }}
</article>
</main>