ServiceConfig
Describes the parameters of the ServiceConfig node for backend service configuration.
Node
ServiceConfig
Subnode
|
Parameter |
Type |
Required |
Description |
Example |
|
ServiceProtocol |
String |
Yes |
Backend service type. Valid values: HTTP: Backend service uses HTTP or VPC. FunctionCompute: Backend service is Function Compute. OSS: Backend service is OSS. EventBridge: Backend service is EventBridge. UN_SPECIFIED: Mixed backend type. |
HTTP |
|
ServiceAddress |
String |
No |
Backend service URL. |
http://www.customerdomain.com |
|
ServicePath |
String |
No |
Backend service path. |
/v3/getUserTest/[userId] |
|
ServiceHttpMethod |
String |
No |
HTTP method for calling the backend service. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS. |
GET |
|
ServiceTimeout |
String |
Yes |
Backend service timeout, in milliseconds. |
1000 |
|
ContentTypeCatagory |
String |
No |
ContentType header policy when ServiceProtocol is HTTP. Valid values: DEFAULT (API Gateway default), CUSTOM (user-defined value), and CLIENT (uses the ContentType header from the client request). |
DEFAULT |
|
ContentTypeValue |
String |
No |
ContentType header value when ServiceProtocol is HTTP and ContentTypeCatagory is DEFAULT or CUSTOM. |
application/json |
|
Mock |
String |
No |
Whether to enable Mock mode. Valid values: TRUE and FALSE. |
FALSE |
|
MockResult |
String |
No |
Result returned when Mock is set to TRUE. |
{"name":"xiaoming"} |
|
ServiceVpcEnable |
Boolean |
No |
Whether to enable VPC access. Valid values: TRUE (VPC access enabled) and FALSE (requires VPC access authorization). |
TRUE |
|
VpcConfig |
String |
No |
VPC access configuration when VPC access is enabled. VpcConfig. |
{"VpcId":"vpc-uf657qec7lx42paw3qxxx","InstanceId":"i-uf6bzcg1pr4oh5jjmxxx","Port":80,"Name":"test"} |
|
FunctionComputeConfig |
String |
No |
Function Compute configuration when ServiceProtocol is FunctionCompute. FunctionComputeConfig. |
{"Path": "/test/api","ContentTypeValue": "application/x-www-form-urlencoded; charset=UTF-8", "FcVersion": "2.0","FcType": "HttpTrigger","Method": "GET","OnlyBusinessPath": false,"FcRegionId": "cn-hangzhou","RoleArn": "acs:ram::12274XXXXX:role/aliyunserviceroleforapigateway","FcBaseUrl": "https://122746XXXX.cn-hangzhou-internal.fc.aliyuncs.com/2016-08-15/proxy/testService2.LATEST/testHttpTrigger/","ContentTypeCatagory": "DEFAULT"} |