文档

ALIYUN::MSE::ServiceSource

更新时间:

ALIYUN::MSE::ServiceSource类型用于创建Nacos服务来源。

语法

{
  "Type": "ALIYUN::MSE::ServiceSource",
  "Properties": {
    "GatewayUniqueId": String,
    "IngressOptions": Map,
    "GroupList": List,
    "Address": String,
    "PathList": List,
    "Source": String,
    "Name": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

GatewayUniqueId

String

网关唯一ID。

IngressOptions

Map

Ingress配置。

更多信息,请参见IngressOptions属性

GroupList

List

服务分组列表。

最多支持10个。

Address

String

注册地址。 如果没有指定,它将根据所选实例自动生成。 

PathList

List

服务根路径数组。

最多支持10个。

Source

String

服务来源。

取值:

  • K8s: ACK集群 。 

  • MSE: MSE Nacos实例 。

  • MSE_ZK:ZooKeeper实例。

  • EDAS:表示EDAS命名空间。

  • SAE:SAE命名空间。

Name

String

名字。

  • 当Source取值为K8s时,此参数表示ACK集群的名称。

  •  当Source取值为MSE时,此参数指定Nacos实例的ID。  

  • 当Source取值为MSE_ZK时,该参数表示ZooKeeper实例的ID。  

  • 当Source取值为EDAS时,该参数表示EDAS命名空间的ID。  

  • 当Source取值为SAE时,该参数表示SAE命名空间的ID。

IngressOptions语法

"IngressOptions": {
  "IngressClass": String,
  "EnableStatus": String,
  "WatchNamespace": String,
  "EnableIngress": String
}

IngressOptions属性

属性名称

类型

必须

允许更新

描述

约束

IngressClass

String

监听Ingress Class。

EnableStatus

String

是否更新Ingress Status。

取值:

  • true:更新Ingress Status。

  • false:不更新Ingress Status。

WatchNamespace

String

监听目标命名空间。

EnableIngress

String

是否开启Ingress。

取值:

  • true:开启Ingress。

  • false:不开启Ingress。

返回值

Fn::GetAtt

  • GatewayUniqueId:网关唯一ID。

  • Address:注册地址。

  • Id:业务源ID。

  • Name:实例名称

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      GatewayUniqueId:
        Description: The unique ID of the gateway.
        Type: String
      Name:
        Description: 'The name.
          If Source=K8s, this parameter specifies the name of the ACK cluster.
          If Source=MSE, this parameter specifies the ID of the Nacos instance.
          If Source=MSE_ZK, this parameter specifies the ID of the ZooKeeper instance.
          If Source=EDAS, this parameter specifies the ID of the EDAS namespace.
          If Source=SAE, this parameter specifies the ID of the SAE namespace.'
        Type: String
      Source:
        AllowedValues:
        - K8s
        - MSE
        - MSE_ZK
        - EDAS
        - SAE
        Description: 'The service source. Valid values:
          K8s: ACK cluster
          MSE: MSE Nacos instance'
        Type: String
    Resources:
      ServiceSource:
        Properties:
          GatewayUniqueId:
            Ref: GatewayUniqueId
          Name:
            Ref: Name
          Source:
            Ref: Source
        Type: ALIYUN::MSE::ServiceSource
    Outputs:
      Address:
        Description: Registration Address. If not specified, it will be automatically
          generated based on the selected instance.
        Value:
          Fn::GetAtt:
          - ServiceSource
          - Address
      GatewayUniqueId:
        Description: The unique ID of the gateway.
        Value:
          Fn::GetAtt:
          - ServiceSource
          - GatewayUniqueId
      Id:
        Description: The ID of service source.
        Value:
          Fn::GetAtt:
          - ServiceSource
          - Id
      Name:
        Description: 'The name.
          If Type is set to K8s, this parameter specifies the name of the ACK cluster.
          If Type is set to NACOS, this parameter specifies the ID of the Nacos instance.'
        Value:
          Fn::GetAtt:
          - ServiceSource
          - Name
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "GatewayUniqueId": {
          "Description": "The unique ID of the gateway.",
          "Type": "String"
        },
        "Name": {
          "Description": "The name. If Source=K8s, this parameter specifies the name of the ACK cluster. If Source=MSE, this parameter specifies the ID of the Nacos instance. If Source=MSE_ZK, this parameter specifies the ID of the ZooKeeper instance. If Source=EDAS, this parameter specifies the ID of the EDAS namespace. If Source=SAE, this parameter specifies the ID of the SAE namespace.",
          "Type": "String"
        },
        "Source": {
          "AllowedValues": [
            "K8s",
            "MSE",
            "MSE_ZK",
            "EDAS",
            "SAE"
          ],
          "Description": "The service source. Valid values: K8s: ACK cluster MSE: MSE Nacos instance",
          "Type": "String"
        }
      },
      "Resources": {
        "ServiceSource": {
          "Properties": {
            "GatewayUniqueId": {
              "Ref": "GatewayUniqueId"
            },
            "Name": {
              "Ref": "Name"
            },
            "Source": {
              "Ref": "Source"
            }
          },
          "Type": "ALIYUN::MSE::ServiceSource"
        }
      },
      "Outputs": {
        "Address": {
          "Description": "Registration Address. If not specified, it will be automatically generated based on the selected instance.",
          "Value": {
            "Fn::GetAtt": [
              "ServiceSource",
              "Address"
            ]
          }
        },
        "GatewayUniqueId": {
          "Description": "The unique ID of the gateway.",
          "Value": {
            "Fn::GetAtt": [
              "ServiceSource",
              "GatewayUniqueId"
            ]
          }
        },
        "Id": {
          "Description": "The ID of service source.",
          "Value": {
            "Fn::GetAtt": [
              "ServiceSource",
              "Id"
            ]
          }
        },
        "Name": {
          "Description": "The name. If Type is set to K8s, this parameter specifies the name of the ACK cluster. If Type is set to NACOS, this parameter specifies the ID of the Nacos instance.",
          "Value": {
            "Fn::GetAtt": [
              "ServiceSource",
              "Name"
            ]
          }
        }
      }
    }
  • 本页导读 (1)
文档反馈