tencent cloud

All product documents
APIs
ModifyUpstream
Last updated: 2025-01-13 11:24:14
ModifyUpstream
Last updated: 2025-01-13 11:24:14

1. API Description

Domain name for API request: apigateway.intl.tencentcloudapi.com.

This API is used to modify an upstream.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyUpstream.
Version Yes String Common Params. The value used for this API: 2018-08-08.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
UpstreamId Yes String Unique upstream ID
UpstreamName No String Upstream name
UpstreamDescription No String Upstream description
Scheme No String Backend protocol. Valid values: HTTP, HTTPS
UpstreamType No String Upstream access type. Valid values: IP_PORT, K8S
Algorithm No String Load balancing algorithm. Valid value: ROUND_ROBIN
UniqVpcId No String Unique VPC ID.
Retries No Integer Retry attempts. It defaults to 3.
UpstreamHost No String Gateway forwarding to the upstream Host request header
Nodes.N No Array of UpstreamNode List of backend nodes
HealthChecker No UpstreamHealthChecker Health check configuration
K8sService.N No Array of K8sService Configuration of TKE service

3. Output Parameters

Parameter Name Type Description
Result ModifyUpstreamResultInfo Return modified upstream information
Note: This field may return NULL, indicating that no valid value was found.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Modifying an upstream

This example shows you how to modify attributes of an upstream.

Input Example

https://apigateway.intl.tencentcloudapi.com/?Action=ModifyUpstream
&UpstreamId=upstream-0c96l2bo
&Retries=4
&UpstreamName=test
&UpstreamHost=www.a.com
&UpstreamDescription=test
&<Common Request Parameters>

Output Example

{
    "Response": {
        "Result": {
            "UpstreamId": "abc",
            "UpstreamName": "abc",
            "UpstreamDescription": "abc",
            "Scheme": "abc",
            "Algorithm": "abc",
            "UniqVpcId": "abc",
            "Retries": 1,
            "Nodes": [
                {
                    "VmInstanceId": "abc",
                    "Host": "abc",
                    "Port": 1,
                    "Weight": 1,
                    "Tags": [
                        "abc"
                    ],
                    "Healthy": "abc",
                    "ServiceName": "abc",
                    "NameSpace": "abc",
                    "ClusterId": "abc",
                    "Source": "abc",
                    "UniqueServiceName": "abc"
                }
            ],
            "CreatedTime": "2020-09-22T00:00:00+00:00",
            "HealthChecker": {
                "EnableActiveCheck": true,
                "EnablePassiveCheck": true,
                "ActiveCheckHttpPath": "abc",
                "ActiveCheckTimeout": 1,
                "ActiveCheckInterval": 1,
                "ActiveRequestHeader": [
                    {}
                ],
                "UnhealthyTimeout": 1,
                "HealthyHttpStatus": "abc",
                "UnhealthyHttpStatus": "abc",
                "TcpFailureThreshold": 1,
                "TimeoutThreshold": 1,
                "HttpFailureThreshold": 1
            },
            "UpstreamType": "abc",
            "K8sServices": [
                {
                    "Name": "abc",
                    "Weight": 0,
                    "ClusterId": "abc",
                    "Namespace": "abc",
                    "ServiceName": "abc",
                    "Port": 0,
                    "ExtraLabels": [
                        {
                            "Key": "abc",
                            "Value": "abc"
                        }
                    ]
                }
            ],
            "UpstreamHost": "abc"
        },
        "RequestId": "abc"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure Error with CAM signature/authentication.
DryRunOperation DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used.
FailedOperation Operation failed.
FailedOperation.OperateUpstream Backend error
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameter.FormatError Incorrect parameter format.
InvalidParameterValue.InvalidUpstream The backend channel does not exist or is invalid.
InvalidParameterValue.InvalidVpcConfig Invalid VPC information
InvalidParameterValue.NotInOptions The parameter value is incorrect, as it is not an available option.
InvalidParameterValue.RangeExceeded The parameter value is incorrect, as it is not within the valid value range.
LimitExceeded The quota limit is exceeded.
MissingParameter Missing parameter.
ResourceNotFound The resource does not exist.
UnauthorizedOperation The operation is unauthorized.
UnsupportedOperation Unsupported operation.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon