CreatePaiInstance

Last updated: 2020-07-24 17:46:00

    1. API Description

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

    This API (CreatePaiInstance) is used to create a PAI instance.

    A maximum of 20 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: as.ap-shanghai-fsi.tencentcloudapi.com

    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: CreatePaiInstance.
    Version Yes String Common parameter. The value used for this API: 2018-04-19.
    Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
    DomainName Yes String PAI instance domain name.
    InternetAccessible Yes InternetAccessible Information of the public network bandwidth configuration.
    InitScript No String Base64-encoded string of the launch script.
    Zones.N No Array of String List of availability zones.
    VpcId No String VpcId.
    SubnetIds.N No Array of String List of subnets.
    InstanceName No String Instance display name.
    InstanceTypes.N No Array of String List of instance models.
    LoginSettings No LoginSettings Instance login settings.
    InstanceChargeType No String Instance billing type.
    InstanceChargePrepaid No InstanceChargePrepaid Relevant parameter settings for the prepaid mode (i.e., monthly subscription). This parameter can specify the purchased usage period, whether to set automatic renewal, and other attributes of the instance purchased on a prepaid basis. If the billing method of the specified instance is prepaid, this parameter is required.

    3. Output Parameters

    Parameter Name Type Description
    InstanceIdSet Array of String This parameter is returned when an instance is created via this API, representing one or more instance IDs. The return of the instance ID list does not mean that the instance is created successfully. You can find out whether the instance is created by checking the status of the instance ID in the InstancesSet returned by the DescribeInstances API. If the status of the instance changes from "pending" to "running", the instance is created successfully.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Creating one public address instance

    This example shows you how to create a public address instance with specified parameters such as domain name.

    Input Example

    https://as.tencentcloudapi.com/?Action=CreatePaiInstance
    &DomainName=apple-gz012345.pai.tcloudbase.com
    &InitScript=IyEvYmluL2Jhc2gKZWNobyAiaGVsbG8iCg==
    &Zones.0=ap-guangzhou-2
    &InstanceChargeType=POSTPAID_BY_HOUR
    &InstanceTypes.0=S4.SMALL2
    &SystemDisk.DiskType=CLOUD_BASIC
    &SystemDisk.DiskSize=50
    &InternetAccessible.InternetChargeType=TRAFFIC_POSTPAID_BY_HOUR
    &InternetAccessible.InternetMaxBandwidthOut=10
    &InstanceName=PAI-TEST
    &LoginSettings.Password=PAI@Test123
    &<common request parameters>

    Output Example

    {
      "Response": {
        "InstanceIdSet": [
          "ins-bmmk7d75"
        ],
        "RequestId": "843518b0-43bb-4066-a00b-d95b338b3142"
      }
    }

    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.

    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

    There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

    Was this page helpful?

    Was this page helpful?

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