The ALIYUN::APIG::Source resource creates a source.
Syntax
{
"Type": "ALIYUN::APIG::Source",
"Properties": {
"GatewayId": String,
"K8sSourceConfig": Map,
"NacosSourceConfig": Map,
"ResourceGroupId": String,
"Type": String
}
}Properties
Property name | Type | Required | Update allowed | Description | Constraints |
GatewayId | String | No | No | The gateway ID. | None |
K8sSourceConfig | Map | No | No | The configuration of the Container Service source. | For more information, see K8sSourceConfig properties. |
NacosSourceConfig | Map | No | No | The configuration of the MSE Nacos source. | For more information, see NacosSourceConfig properties. |
ResourceGroupId | String | No | No | The resource group ID. | None |
Type | String | No | No | The source type. | Valid values:
|
NacosSourceConfig syntax
"NacosSourceConfig": {
"InstanceId": String
}NacosSourceConfig properties
Property name | Type | Required | Update allowed | Description | Constraints |
InstanceId | String | Yes | No | The Nacos instance ID. | None |
K8sSourceConfig syntax
"K8sSourceConfig": {
"ClusterId": String,
"AuthorizeSecurityGroupRules": List
}K8sSourceConfig properties
Property name | Type | Required | Update allowed | Description | Constraints |
ClusterId | String | Yes | No | The ID of the Container Service cluster. | None |
AuthorizeSecurityGroupRules | List | No | No | The list of authorization rules for the gateway security group. | For more information, see AuthorizeSecurityGroupRules properties. |
AuthorizeSecurityGroupRules syntax
"AuthorizeSecurityGroupRules": [
{
"Description": String,
"PortRanges": List,
"SecurityGroupId": String
}
]AuthorizeSecurityGroupRules properties
Property name | Type | Required | Update allowed | Description | Constraints |
Description | String | No | No | The description of the rule. | None |
PortRanges | List | No | No | The list of port ranges. | None |
SecurityGroupId | String | No | No | The security group ID. | None |
Return value
Fn::GetAtt
SourceId: The ID of the source.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
K8sSourceConfig:
AssociationPropertyMetadata:
Parameters:
ClusterId:
Type: String
Description:
en: The cluster ID of the container service source.
Required: true
AuthorizeSecurityGroupRules:
AssociationPropertyMetadata:
Parameter:
AssociationPropertyMetadata:
Parameters:
Description:
AssociationProperty: TextArea
Type: String
Description:
en: The description of the security group rule.
Required: false
PortRanges:
AssociationPropertyMetadata:
Parameter:
Type: String
Description:
en: The port range string.
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: The port ranges for the security group rule.
Required: false
MaxLength: 100
SecurityGroupId:
AssociationPropertyMetadata:
VpcId: ${VpcId}
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
Type: String
Description:
en: The ID of the security group.
Required: false
Type: Json
Description:
en: Security group rule configuration.
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: The security group rules for authorization.
Required: false
MaxLength: 100
Type: Json
Description:
en: The K8s source configuration.
Required: false
Type:
Type: String
Description:
en: |-
The source type:
- MSE_NACOS: MSE Nacos.
- K8S: Container service.
AllowedValues:
- MSE_NACOS
- K8S
Required: false
GatewayId:
Type: String
Description:
en: The gateway ID.
Required: false
Resources:
Source:
Type: ALIYUN::APIG::Source
Properties:
K8sSourceConfig:
Ref: K8sSourceConfig
Type:
Ref: Type
GatewayId:
Ref: GatewayId
Outputs:
SourceId:
Description: The ID of the source.
Value:
Fn::GetAtt:
- Source
- SourceId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"K8sSourceConfig": {
"AssociationPropertyMetadata": {
"Parameters": {
"ClusterId": {
"Type": "String",
"Description": {
"en": "The cluster ID of the container service source."
},
"Required": true
},
"AuthorizeSecurityGroupRules": {
"AssociationPropertyMetadata": {
"Parameter": {
"AssociationPropertyMetadata": {
"Parameters": {
"Description": {
"AssociationProperty": "TextArea",
"Type": "String",
"Description": {
"en": "The description of the security group rule."
},
"Required": false
},
"PortRanges": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Description": {
"en": "The port range string."
},
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The port ranges for the security group rule."
},
"Required": false,
"MaxLength": 100
},
"SecurityGroupId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
},
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"Type": "String",
"Description": {
"en": "The ID of the security group."
},
"Required": false
}
}
},
"Type": "Json",
"Description": {
"en": "Security group rule configuration."
},
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The security group rules for authorization."
},
"Required": false,
"MaxLength": 100
}
}
},
"Type": "Json",
"Description": {
"en": "The K8s source configuration."
},
"Required": false
},
"Type": {
"Type": "String",
"Description": {
"en": "The source type:\n- MSE_NACOS: MSE Nacos.\n- K8S: Container service."
},
"AllowedValues": [
"MSE_NACOS",
"K8S"
],
"Required": false
},
"GatewayId": {
"Type": "String",
"Description": {
"en": "The gateway ID."
},
"Required": false
}
},
"Resources": {
"Source": {
"Type": "ALIYUN::APIG::Source",
"Properties": {
"K8sSourceConfig": {
"Ref": "K8sSourceConfig"
},
"Type": {
"Ref": "Type"
},
"GatewayId": {
"Ref": "GatewayId"
}
}
}
},
"Outputs": {
"SourceId": {
"Description": "The ID of the source.",
"Value": {
"Fn::GetAtt": [
"Source",
"SourceId"
]
}
}
}
}