All Products
Search
Document Center

Microservices Engine:AddServiceSource

Last Updated:Jul 25, 2024

Adds a Nacos service source.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
mse:AddServiceSourcecreate
  • Gateway
    acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TypestringNo

The type of the service source.

  • K8s: Container Service for Kubernetes (ACK) cluster
  • NACOS: Nacos instance
The Ingress configuration.
SourcestringYes

The service source.

  • K8s: ACK cluster
  • NACOS: MSE Nacos instance
K8s,MSE
AddressstringNo

Specifies whether to monitor Ingress classes.

c9ad2a0717032427e920754e25b49e3b5
NamestringYes

The namespace whose resources you want to monitor.

istio
GatewayUniqueIdstringYes

Specifies whether to update the Ingress status.

gw-c70622ff52fe49beb29bea9a6f52****
IngressOptionsRequestobjectNo

The list of service groups.

EnableIngressbooleanNo

The group to which the service belongs.

true
IngressClassstringNo

An array of service root paths.

com.test.xxx
WatchNamespacestringNo

The root path of the service.

default
EnableStatusbooleanNo

The language of the response. Valid values:

  • zh-CN: Chinese. This is the default value.
  • en-US: English.
  • ja: Japanese.
true
ToAuthorizeSecurityGroupsarray<object>No

The list of security groups to be authorized. You can specify security groups to allow backend services to access data sources that you create.

objectNo
SecurityGroupIdstringNo

The ID of the security group.

sg-bp1acepclex0vmi1****
PortRangestringNo

The authorized port range of the security group. You can select multiple port ranges. Separate each port range with a comma (,).

8080/8080,9000/10000
DescriptionstringNo

The description of the authorization record.

rule for xxx
GroupListarrayNo

The data structure.

stringNo

The ID of the request.

NACOS
PathListarrayNo

The HTTP status code returned.

stringNo

The message returned.

/test
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh-CN (default): Chinese
  • en-US: English
  • ja: Japanese
zh-CN

Response parameters

ParameterTypeDescriptionExample
object

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
RequestIdstring

The response data.

D0DB055C-51F2-5BB2-82A6-CD8A3C6EE6BA
HttpStatusCodeinteger

code

200
Messagestring

mse-200-105

You are not authorized to perform this operation. Action: mse:AddServiceSource, Resource: acs:mse:cn-hangzhou:1105471854403716:instance/gw-082c943a8c304e48a37a7a29a5ddeda7
Codeinteger

duplicatedClusterAliasName

200
Successboolean

duplicated cluster alias name

true
Datalong

mse-100-007

63

Examples

Sample success responses

JSONformat

{
  "RequestId": "D0DB055C-51F2-5BB2-82A6-CD8A3C6EE6BA",
  "HttpStatusCode": 200,
  "Message": "You are not authorized to perform this operation. Action: mse:AddServiceSource, Resource: acs:mse:cn-hangzhou:1105471854403716:instance/gw-082c943a8c304e48a37a7a29a5ddeda7",
  "Code": 200,
  "Success": true,
  "Data": 63
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalRequestInvalid request:%sInvalid request: %s
400InvalidParameterParameter error:%sRequest parameter error: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404NotFoundNot found:%sThe resource does not exist:%s
500InternalErrorConsole error. Try again later:%sConsole error. Try again later: %s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-11The request parameters of the API has changedView Change Details
2022-08-09The request parameters of the API has changedView Change Details