All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::MSE::ServiceSource

更新時間:Sep 13, 2023

ALIYUN::MSE::ServiceSource is used to create a Nacos service source.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

GatewayUniqueId

String

Yes

No

The unique ID of the gateway.

None.

IngressOptions

Map

No

No

The Ingress configurations.

For more information, see IngressOptions properties.

GroupList

List

No

No

The groups to which the service belongs.

You can specify up to 10 groups.

Address

String

No

No

The registration address. If you leave this property empty, the system automatically generates a registration address based on the selected instance.  

None.

PathList

List

No

No

An array of root paths of the service.

You can specify up to 10 root paths.

Source

String

Yes

No

The service source.

Valid values:

  • K8s: a Container Service for Kubernetes (ACK) cluster  

  • MSE: a Microservices Engine (MSE) Nacos instance

  • MSE_ZK: a ZooKeeper instance

  • EDAS: an Enterprise Distributed Application Service (EDAS) namespace

  • SAE: a Serverless App Engine (SAE) namespace

Name

String

Yes

No

The name.

  • When Source is set to K8s, Name specifies the name of the ACK cluster.

  • When Source is set to MSE, Name specifies the ID of the Nacos instance.  

  • When Source is set to MSE_ZK, Name specifies the ID of the ZooKeeper instance.  

  • When Source is set to EDAS, Name specifies the ID of the EDAS namespace.  

  • When Source is set to SAE, Name specifies the ID of the SAE namespace.

IngressOptions syntax

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

IngressOptions properties

Property

Type

Required

Editable

Description

Constraint

IngressClass

String

No

No

Specifies whether to monitor Ingress classes.

None.

EnableStatus

String

No

No

Specifies whether to update the Ingress status.

Valid values:

  • true

  • false

WatchNamespace

String

No

No

The namespace whose resources you want to monitor.

None.

EnableIngress

String

No

No

Specifies whether to enable Ingress.

Valid values:

  • true

  • false

Return values

Fn::GetAtt

  • GatewayUniqueId: the unique ID of the gateway.

  • Address: the registration address.

  • Id: the ID of the service source.

  • Name: the instance name.

Examples

  • YAML format

    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 format

    {
      "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"
            ]
          }
        }
      }
    }