Last updated: 2020-09-17 17:54:23

1. API Description

Domain name for API request:

This API is used to modify the attributes of a CDH instance, such as instance name and renewal flag. One of the two parameters, HostName and RenewFlag, must be set, but you cannot set both of them at the same time.

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example:

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 parameter. The value used for this API: ModifyHostsAttribute.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
HostIds.N Yes Array of String CDH instance ID(s).
HostName No String CDH instance name to be displayed. You can specify any name you like, but its length cannot exceed 60 characters.
RenewFlag No String Auto renewal flag. Valid values:
  • NOTIFY_AND_AUTO_RENEW: notify upon expiration and renew automatically
  • NOTIFY_AND_MANUAL_RENEW: notify upon expiration but do not renew automatically
  • DISABLE_NOTIFY_AND_MANUAL_RENEW: neither notify upon expiration nor renew automatically

    If this parameter is specified as NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis if the account balance is sufficient.
  • ProjectId No Integer Project ID. You can create a project by using the AddProject API and obtain its ID from the response parameter projectId of the DescribeProject API. Subsequently, the project ID can be used to filter results when you query instances by calling the DescribeHosts API.

    3. Output Parameters

    Parameter Name Type Description
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Modifying the attributes of a CDH instance

    This example shows you how to modify the HostName attribute of a specified CDH instance.

    Input Example

    &<Common request parameters>

    Output Example

      "Response": {
        "RequestID": "3c140219-cfe9-470e-b241-907877d6fb03"

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.


    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
    InvalidHost.NotSupported The specified operation on this CDH instance is not support .
    InvalidHostId.Malformed Invalid CDH ID. The specified CDH ID has an invalid format. For example, host-1122 has an invalid ID length.
    InvalidHostId.NotFound The specified HostId does not exist, or does not belong to your account.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback