ALIYUN::MSE::NacosService类型用于创建Nacos服务。

语法

{
  "Type": "ALIYUN::MSE::NacosService",
  "Properties": {
    "GroupName": String,
    "InstanceId": String,
    "ServiceName": String,
    "ProtectThreshold": String,
    "Ephemeral": Boolean,
    "NamespaceId": String
  }
}

属性

属性名称类型必须允许更新描述约束
GroupNameString分组名称。
InstanceIdString实例ID。
ServiceNameString服务名称。
ProtectThresholdString保护阈值。
EphemeralBoolean是否临时节点标志。取值:
  • true:是临时节点标志。
  • false:不是临时节点标志。
NamespaceIdString命名空间ID。

返回值

Fn::GetAtt

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      InstanceId:
        Type: String
        Description: The ID of the instance.
      ServiceName:
        Type: String
        Description: The name of the service.
    Resources:
      NacosService:
        Type: ALIYUN::MSE::NacosService
        Properties:
          InstanceId:
            Ref: InstanceId
          ServiceName:
            Ref: ServiceName
          Ephemeral: false
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceId": {
          "Type": "String",
          "Description": "The ID of the instance."
        },
        "ServiceName": {
          "Type": "String",
          "Description": "The name of the service."
        }
      },
      "Resources": {
        "NacosService": {
          "Type": "ALIYUN::MSE::NacosService",
          "Properties": {
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "ServiceName": {
              "Ref": "ServiceName"
            },
            "Ephemeral": false
          }
        }
      }
    }