ALIYUN::APIG::Service は、サービスを作成するために使用されます。
構文
{
"Type": "ALIYUN::APIG::Service",
"Properties": {
"Addresses": List,
"GatewayId": String,
"ServiceName": String,
"SourceType": String
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Addresses | List | はい | はい | アドレスに関する情報。 | 最大 10 個の IP アドレスまたはドメイン名を指定できます。 |
GatewayId | String | はい | いいえ | クラウドネイティブ API Gateway インスタンスの ID。 | なし。 |
ServiceName | String | はい | いいえ | サービスの名前。 | なし。 |
SourceType | String | はい | いいえ | サービスソースのタイプ。 | 値を DNS に設定します。 |
戻り値
Fn::GetAtt
Addresses: アドレスに関する情報。
ServiceName: サービスの名前。
SourceType: サービスソースのタイプ。
GatewayId: クラウドネイティブ API Gateway インスタンスの ID。
ServiceId: サービスの ID。
例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
GatewayId:
Type: String
Description:
en: The ID of the Cloud Native API Gateway.
Required: true
AssociationProperty: ALIYUN::APIG::Gateway::GatewayId
Resources:
ExtensionResource:
Type: ALIYUN::APIG::Service
Properties:
GatewayId:
Ref: GatewayId
SourceType: DNS
ServiceName: test1
Addresses:
- ros.test:80
- ros.test:801
Outputs:
Addresses:
Description: Service Address List.
Value:
Fn::GetAtt:
- ExtensionResource
- Addresses
ServiceName:
Description: The name of the service.
Value:
Fn::GetAtt:
- ExtensionResource
- ServiceName
SourceType:
Description: Service source type.
Value:
Fn::GetAtt:
- ExtensionResource
- SourceType
GatewayId:
Description: The ID of the Cloud Native API Gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- GatewayId
ServiceId:
Description: The ID of the service.
Value:
Fn::GetAtt:
- ExtensionResource
- ServiceId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"GatewayId": {
"Type": "String",
"Description": {
"en": "The ID of the Cloud Native API Gateway."
},
"Required": true,
"AssociationProperty":"ALIYUN::APIG::Gateway::GatewayId"
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::APIG::Service",
"Properties": {
"GatewayId": {
"Ref": "GatewayId"
},
"SourceType": "DNS",
"ServiceName": "test1",
"Addresses": [
"ros.test:80",
"ros.test:801"
]
}
}
},
"Outputs": {
"Addresses": {
"Description": "サービスアドレスリスト。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Addresses"
]
}
},
"ServiceName": {
"Description": "サービスの名前。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ServiceName"
]
}
},
"SourceType": {
"Description": "サービスソースタイプ。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SourceType"
]
}
},
"GatewayId": {
"Description": "クラウドネイティブ API Gateway の ID。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GatewayId"
]
}
},
"ServiceId": {
"Description": "サービスの ID。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ServiceId"
]
}
}
}
}