ALIYUN::CloudStorageGateway::Gateway类型用于创建网关。
语法
{
"Type": "ALIYUN::CloudStorageGateway::Gateway",
"Properties": {
"Category": String,
"Location": String,
"Name": String,
"Type": String,
"Description": String,
"GatewayClass": String,
"PublicNetworkBandwidth": Integer,
"PostPaid": Boolean,
"ResourceRegionId": String,
"ReleaseAfterExpiration": Boolean,
"StorageBundleId": String,
"SecondaryVSwitchId": String,
"UntrustedEnvId": String,
"UntrustedEnvInstanceType": String,
"VSwitchId": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Category |
String |
是 |
否 |
网关的类别。 |
无 |
|
Location |
String |
是 |
否 |
网关的位置。 |
允许值:
|
|
Name |
String |
是 |
否 |
网关的名称。 |
无 |
|
Type |
String |
是 |
否 |
网关的类型。 |
允许值:
|
|
Description |
String |
否 |
否 |
网关的描述。 |
长度限制:最小0,最大255 |
|
GatewayClass |
String |
否 |
否 |
网关的规格。 |
无 |
|
PostPaid |
Boolean |
否 |
否 |
网关是否按量付费。 |
无 |
|
PublicNetworkBandwidth |
Integer |
否 |
否 |
网关的公网带宽。 |
范围限制:最小5,最大200 |
|
ReleaseAfterExpiration |
Boolean |
否 |
否 |
到期后是否释放网关。 |
无 |
|
ResourceRegionId |
String |
否 |
否 |
资源的地域ID。 |
无 |
|
SecondaryVSwitchId |
String |
否 |
否 |
None 辅助交换机的ID。 |
无 |
|
StorageBundleId |
String |
否 |
否 |
存储包的ID。 |
无 |
|
UntrustedEnvId |
String |
否 |
否 |
非受信环境的ID。 |
无 |
|
UntrustedEnvInstanceType |
String |
否 |
否 |
非受信环境的实例类型。 |
无 |
|
VSwitchId |
String |
否 |
否 |
交换机的ID。 |
无 |
返回值
Fn::GetAtt
GatewayId:网关的ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Category:
Type: String
Description:
en: The category of the gateway.
zh: 网关的类别。
Required: true
Name:
Type: String
Description:
en: The name of the gateway.
zh: 网关的名称。
Required: true
Type:
Type: String
Description:
en: The type of the gateway.
zh: 网关的类型。
AllowedValues:
- File
- Iscsi
Required: true
Location:
Type: String
Description:
en: The location of the gateway.
zh: 网关的位置。
AllowedValues:
- Cloud
- On_Premise
Required: true
Resources:
Gateway:
Type: ALIYUN::CloudStorageGateway::Gateway
Properties:
Category:
Ref: Category
Name:
Ref: Name
Type:
Ref: Type
Location:
Ref: Location
Outputs:
GatewayId:
Description:
en: The ID of the gateway.
zh: 网关的ID。
Value:
Fn::GetAtt:
- Gateway
- GatewayId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Category": {
"Type": "String",
"Description": {
"en": "The category of the gateway.",
"zh": "网关的类别。"
},
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "The name of the gateway.",
"zh": "网关的名称。"
},
"Required": true
},
"Type": {
"Type": "String",
"Description": {
"en": "The type of the gateway.",
"zh": "网关的类型。"
},
"AllowedValues": [
"File",
"Iscsi"
],
"Required": true
},
"Location": {
"Type": "String",
"Description": {
"en": "The location of the gateway.",
"zh": "网关的位置。"
},
"AllowedValues": [
"Cloud",
"On_Premise"
],
"Required": true
}
},
"Resources": {
"Gateway": {
"Type": "ALIYUN::CloudStorageGateway::Gateway",
"Properties": {
"Category": {
"Ref": "Category"
},
"Name": {
"Ref": "Name"
},
"Type": {
"Ref": "Type"
},
"Location": {
"Ref": "Location"
}
}
}
},
"Outputs": {
"GatewayId": {
"Description": {
"en": "The ID of the gateway.",
"zh": "网关的ID。"
},
"Value": {
"Fn::GetAtt": [
"Gateway",
"GatewayId"
]
}
}
}
}
该文章对您有帮助吗?