tencent cloud

Feedback

CreateDisasterRecoverGroup

Last updated: 2024-01-04 16:10:59

    1. API Description

    Domain name for API request: cvm.tencentcloudapi.com.

    This API is used to create a spread placement group. After you create one, you can specify it for an instance when you create the instance,

    A maximum of 10 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: CreateDisasterRecoverGroup.
    Version Yes String Common Params. The value used for this API: 2017-03-12.
    Region No String Common Params. This parameter is not required for this API.
    Name Yes String Name of the spread placement group. The name must be 1-60 characters long and can contain both Chinese characters and English letters.
    Type Yes String Type of the spread placement group. Valid values:
  • HOST: physical machine
  • SW: switch
  • RACK: rack
  • ClientToken No String A string used to ensure the idempotency of the request, which is generated by the user and must be unique to each request. The maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see 'How to ensure idempotency'.

    3. Output Parameters

    Parameter Name Type Description
    DisasterRecoverGroupId String List of spread placement group IDs.
    Type String Type of the spread placement group. Valid values:
  • HOST: physical machine
  • SW: switch
  • RACK: rack.
  • Name String Name of the spread placement group. The name must be 1-60 characters long and can contain both Chinese characters and English letters.
    CvmQuotaTotal Integer The maximum number of CVMs in a placement group.
    CurrentNum Integer The current number of CVMs in a placement group.
    CreateTime Timestamp Creation time of the placement group.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Creating a spread placement group

    This example shows you how to create a spread placement group.

    Input Example

    GET https://cvm.tencentcloudapi.com/?Action=CreateDisasterRecoverGroup
    &Name=Physical machine spread placement group
    &Type=HOST
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "Type": "HOST",
            "DisasterRecoverGroupId": "ps-qajfd25h",
            "Name": "Physical machine spread placement group",
            "CvmQuotaTotal": 50,
            "CurrentNum": 0,
            "CreateTime": "2020-09-22 00:00:00",
            "RequestId": "21387009-9b9c-4b57-8fa2-8228f702ff6c"
        }
    }
    

    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
    InvalidParameterValue.InvalidAppIdFormat Invalid AppID
    InvalidParameterValue.Range Invalid parameter value: invalid parameter value range.
    InvalidParameterValue.TooLong Invalid parameter value: parameter value is too long.
    ResourceInsufficient.InsufficientGroupQuota
    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