All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tencentcloudapi.cvm.v20170312.models.RunInstancesRequest Maven / Gradle / Ivy

/*
 * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.tencentcloudapi.cvm.v20170312.models;

import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;

public class RunInstancesRequest extends AbstractModel{

    /**
    * The instance [billing method](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1). Valid values: 
  • `POSTPAID_BY_HOUR`: hourly, pay-as-you-go
  • `CDHPAID`: you are only billed for CDH instances, not the CVMs running on the CDH instances.
    Default value: POSTPAID_BY_HOUR. */ @SerializedName("InstanceChargeType") @Expose private String InstanceChargeType; /** * Configuration of prepaid instances. You can use the parameter to specify the attributes of prepaid instances, such as the subscription period and the auto-renewal plan. This parameter is required for prepaid instances. */ @SerializedName("InstanceChargePrepaid") @Expose private InstanceChargePrepaid InstanceChargePrepaid; /** * Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH. You can specify a CDH for a CVM by creating the CVM on the CDH. */ @SerializedName("Placement") @Expose private Placement Placement; /** * The instance model. Different resource specifications are specified for different instance models.
  • To view specific values for `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, `S1.SMALL1` will be used by default.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, specify this parameter as `CDH_1C1G`. */ @SerializedName("InstanceType") @Expose private String InstanceType; /** * The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can retrieve available image IDs in the following ways:
  • For the IDs of `public images`, `custom images`, and `shared images`, log in to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information. For the IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • */ @SerializedName("ImageId") @Expose private String ImageId; /** * System disk configuration of the instance. If this parameter is not specified, the default value will be used. */ @SerializedName("SystemDisk") @Expose private SystemDisk SystemDisk; /** * The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC data disk or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC data disks, CLOUD_PREMIUM data disks, or CLOUD_SSD data disks. */ @SerializedName("DataDisks") @Expose private DataDisk [] DataDisks; /** * Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. */ @SerializedName("VirtualPrivateCloud") @Expose private VirtualPrivateCloud VirtualPrivateCloud; /** * Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. */ @SerializedName("InternetAccessible") @Expose private InternetAccessible InternetAccessible; /** * The number of instances to be purchased. Value range: [1, 100]; default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on the quota, see [CVM instance purchase limit](https://intl.cloud.tencent.com/document/product/213/2664). */ @SerializedName("InstanceCount") @Expose private Long InstanceCount; /** * Instance name to be displayed.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances at the same time and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string, `server_{R:3}`. If you only purchase 1 instance, the instance will be named `server_3`; if you purchase 2, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances at the same time and do not specify a pattern string, the instance names will be suffixed by `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase 2 instances and name them as `server_`, the instance names will be displayed as `server_1` and `server_2`.
  • The instance name contains up to 60 characters (including pattern strings). */ @SerializedName("InstanceName") @Expose private String InstanceName; /** * Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. */ @SerializedName("LoginSettings") @Expose private LoginSettings LoginSettings; /** * Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. */ @SerializedName("SecurityGroupIds") @Expose private String [] SecurityGroupIds; /** * Specifies whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. */ @SerializedName("EnhancedService") @Expose private EnhancedService EnhancedService; /** * 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'. */ @SerializedName("ClientToken") @Expose private String ClientToken; /** * Host name of the CVM.
  • Periods (.) or hyphens (-) cannot be the start or end of a host name or appear consecutively in a host name.
  • For Windows instances, the host name must be 2-15 characters long and can contain uppercase and lowercase letters, numbers, and hyphens (-). It cannot contain periods (.) or contain only numbers.
  • For other instances, such as Linux instances, the host name must be 2-60 characters long. It supports multiple periods (.) and allows uppercase and lowercase letters, numbers, and hyphens (-) between any two periods (.). */ @SerializedName("HostName") @Expose private String HostName; /** * Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. */ @SerializedName("ActionTimer") @Expose private ActionTimer ActionTimer; /** * Placement group ID. You can only specify one. */ @SerializedName("DisasterRecoverGroupIds") @Expose private String [] DisasterRecoverGroupIds; /** * The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. */ @SerializedName("TagSpecification") @Expose private TagSpecification [] TagSpecification; /** * The market options of the instance. */ @SerializedName("InstanceMarketOptions") @Expose private InstanceMarketOptionsRequest InstanceMarketOptions; /** * User data provided to the instance, which needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). */ @SerializedName("UserData") @Expose private String UserData; /** * Whether the request is a dry run only. true: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. If the dry run fails, the corresponding error code will be returned. If the dry run succeeds, the RequestId will be returned. false (default value): send a normal request and create instance(s) if all the requirements are met. */ @SerializedName("DryRun") @Expose private Boolean DryRun; /** * CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/13887?from_cn_redirect=1) API. */ @SerializedName("CamRoleName") @Expose private String CamRoleName; /** * HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. */ @SerializedName("HpcClusterId") @Expose private String HpcClusterId; /** * Get The instance [billing method](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1). Valid values:
  • `POSTPAID_BY_HOUR`: hourly, pay-as-you-go
  • `CDHPAID`: you are only billed for CDH instances, not the CVMs running on the CDH instances.
    Default value: POSTPAID_BY_HOUR. * @return InstanceChargeType The instance [billing method](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1). Valid values:
  • `POSTPAID_BY_HOUR`: hourly, pay-as-you-go
  • `CDHPAID`: you are only billed for CDH instances, not the CVMs running on the CDH instances.
    Default value: POSTPAID_BY_HOUR. */ public String getInstanceChargeType() { return this.InstanceChargeType; } /** * Set The instance [billing method](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1). Valid values:
  • `POSTPAID_BY_HOUR`: hourly, pay-as-you-go
  • `CDHPAID`: you are only billed for CDH instances, not the CVMs running on the CDH instances.
    Default value: POSTPAID_BY_HOUR. * @param InstanceChargeType The instance [billing method](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1). Valid values:
  • `POSTPAID_BY_HOUR`: hourly, pay-as-you-go
  • `CDHPAID`: you are only billed for CDH instances, not the CVMs running on the CDH instances.
    Default value: POSTPAID_BY_HOUR. */ public void setInstanceChargeType(String InstanceChargeType) { this.InstanceChargeType = InstanceChargeType; } /** * Get Configuration of prepaid instances. You can use the parameter to specify the attributes of prepaid instances, such as the subscription period and the auto-renewal plan. This parameter is required for prepaid instances. * @return InstanceChargePrepaid Configuration of prepaid instances. You can use the parameter to specify the attributes of prepaid instances, such as the subscription period and the auto-renewal plan. This parameter is required for prepaid instances. */ public InstanceChargePrepaid getInstanceChargePrepaid() { return this.InstanceChargePrepaid; } /** * Set Configuration of prepaid instances. You can use the parameter to specify the attributes of prepaid instances, such as the subscription period and the auto-renewal plan. This parameter is required for prepaid instances. * @param InstanceChargePrepaid Configuration of prepaid instances. You can use the parameter to specify the attributes of prepaid instances, such as the subscription period and the auto-renewal plan. This parameter is required for prepaid instances. */ public void setInstanceChargePrepaid(InstanceChargePrepaid InstanceChargePrepaid) { this.InstanceChargePrepaid = InstanceChargePrepaid; } /** * Get Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH. You can specify a CDH for a CVM by creating the CVM on the CDH. * @return Placement Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH. You can specify a CDH for a CVM by creating the CVM on the CDH. */ public Placement getPlacement() { return this.Placement; } /** * Set Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH. You can specify a CDH for a CVM by creating the CVM on the CDH. * @param Placement Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH. You can specify a CDH for a CVM by creating the CVM on the CDH. */ public void setPlacement(Placement Placement) { this.Placement = Placement; } /** * Get The instance model. Different resource specifications are specified for different instance models.
  • To view specific values for `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, `S1.SMALL1` will be used by default.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, specify this parameter as `CDH_1C1G`. * @return InstanceType The instance model. Different resource specifications are specified for different instance models.
  • To view specific values for `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, `S1.SMALL1` will be used by default.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, specify this parameter as `CDH_1C1G`. */ public String getInstanceType() { return this.InstanceType; } /** * Set The instance model. Different resource specifications are specified for different instance models.
  • To view specific values for `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, `S1.SMALL1` will be used by default.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, specify this parameter as `CDH_1C1G`. * @param InstanceType The instance model. Different resource specifications are specified for different instance models.
  • To view specific values for `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, `S1.SMALL1` will be used by default.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, specify this parameter as `CDH_1C1G`. */ public void setInstanceType(String InstanceType) { this.InstanceType = InstanceType; } /** * Get The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can retrieve available image IDs in the following ways:
  • For the IDs of `public images`, `custom images`, and `shared images`, log in to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information. For the IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • * @return ImageId The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can retrieve available image IDs in the following ways:
  • For the IDs of `public images`, `custom images`, and `shared images`, log in to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information. For the IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • */ public String getImageId() { return this.ImageId; } /** * Set The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can retrieve available image IDs in the following ways:
  • For the IDs of `public images`, `custom images`, and `shared images`, log in to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information. For the IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • * @param ImageId The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can retrieve available image IDs in the following ways:
  • For the IDs of `public images`, `custom images`, and `shared images`, log in to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information. For the IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • */ public void setImageId(String ImageId) { this.ImageId = ImageId; } /** * Get System disk configuration of the instance. If this parameter is not specified, the default value will be used. * @return SystemDisk System disk configuration of the instance. If this parameter is not specified, the default value will be used. */ public SystemDisk getSystemDisk() { return this.SystemDisk; } /** * Set System disk configuration of the instance. If this parameter is not specified, the default value will be used. * @param SystemDisk System disk configuration of the instance. If this parameter is not specified, the default value will be used. */ public void setSystemDisk(SystemDisk SystemDisk) { this.SystemDisk = SystemDisk; } /** * Get The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC data disk or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC data disks, CLOUD_PREMIUM data disks, or CLOUD_SSD data disks. * @return DataDisks The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC data disk or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC data disks, CLOUD_PREMIUM data disks, or CLOUD_SSD data disks. */ public DataDisk [] getDataDisks() { return this.DataDisks; } /** * Set The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC data disk or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC data disks, CLOUD_PREMIUM data disks, or CLOUD_SSD data disks. * @param DataDisks The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC data disk or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC data disks, CLOUD_PREMIUM data disks, or CLOUD_SSD data disks. */ public void setDataDisks(DataDisk [] DataDisks) { this.DataDisks = DataDisks; } /** * Get Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. * @return VirtualPrivateCloud Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. */ public VirtualPrivateCloud getVirtualPrivateCloud() { return this.VirtualPrivateCloud; } /** * Set Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. * @param VirtualPrivateCloud Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. */ public void setVirtualPrivateCloud(VirtualPrivateCloud VirtualPrivateCloud) { this.VirtualPrivateCloud = VirtualPrivateCloud; } /** * Get Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. * @return InternetAccessible Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. */ public InternetAccessible getInternetAccessible() { return this.InternetAccessible; } /** * Set Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. * @param InternetAccessible Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. */ public void setInternetAccessible(InternetAccessible InternetAccessible) { this.InternetAccessible = InternetAccessible; } /** * Get The number of instances to be purchased. Value range: [1, 100]; default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on the quota, see [CVM instance purchase limit](https://intl.cloud.tencent.com/document/product/213/2664). * @return InstanceCount The number of instances to be purchased. Value range: [1, 100]; default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on the quota, see [CVM instance purchase limit](https://intl.cloud.tencent.com/document/product/213/2664). */ public Long getInstanceCount() { return this.InstanceCount; } /** * Set The number of instances to be purchased. Value range: [1, 100]; default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on the quota, see [CVM instance purchase limit](https://intl.cloud.tencent.com/document/product/213/2664). * @param InstanceCount The number of instances to be purchased. Value range: [1, 100]; default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on the quota, see [CVM instance purchase limit](https://intl.cloud.tencent.com/document/product/213/2664). */ public void setInstanceCount(Long InstanceCount) { this.InstanceCount = InstanceCount; } /** * Get Instance name to be displayed.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances at the same time and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string, `server_{R:3}`. If you only purchase 1 instance, the instance will be named `server_3`; if you purchase 2, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances at the same time and do not specify a pattern string, the instance names will be suffixed by `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase 2 instances and name them as `server_`, the instance names will be displayed as `server_1` and `server_2`.
  • The instance name contains up to 60 characters (including pattern strings). * @return InstanceName Instance name to be displayed.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances at the same time and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string, `server_{R:3}`. If you only purchase 1 instance, the instance will be named `server_3`; if you purchase 2, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances at the same time and do not specify a pattern string, the instance names will be suffixed by `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase 2 instances and name them as `server_`, the instance names will be displayed as `server_1` and `server_2`.
  • The instance name contains up to 60 characters (including pattern strings). */ public String getInstanceName() { return this.InstanceName; } /** * Set Instance name to be displayed.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances at the same time and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string, `server_{R:3}`. If you only purchase 1 instance, the instance will be named `server_3`; if you purchase 2, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances at the same time and do not specify a pattern string, the instance names will be suffixed by `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase 2 instances and name them as `server_`, the instance names will be displayed as `server_1` and `server_2`.
  • The instance name contains up to 60 characters (including pattern strings). * @param InstanceName Instance name to be displayed.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances at the same time and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string, `server_{R:3}`. If you only purchase 1 instance, the instance will be named `server_3`; if you purchase 2, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances at the same time and do not specify a pattern string, the instance names will be suffixed by `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase 2 instances and name them as `server_`, the instance names will be displayed as `server_1` and `server_2`.
  • The instance name contains up to 60 characters (including pattern strings). */ public void setInstanceName(String InstanceName) { this.InstanceName = InstanceName; } /** * Get Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. * @return LoginSettings Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. */ public LoginSettings getLoginSettings() { return this.LoginSettings; } /** * Set Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. * @param LoginSettings Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. */ public void setLoginSettings(LoginSettings LoginSettings) { this.LoginSettings = LoginSettings; } /** * Get Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. * @return SecurityGroupIds Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. */ public String [] getSecurityGroupIds() { return this.SecurityGroupIds; } /** * Set Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. * @param SecurityGroupIds Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. */ public void setSecurityGroupIds(String [] SecurityGroupIds) { this.SecurityGroupIds = SecurityGroupIds; } /** * Get Specifies whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. * @return EnhancedService Specifies whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. */ public EnhancedService getEnhancedService() { return this.EnhancedService; } /** * Set Specifies whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. * @param EnhancedService Specifies whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. */ public void setEnhancedService(EnhancedService EnhancedService) { this.EnhancedService = EnhancedService; } /** * Get 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'. * @return ClientToken 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'. */ public String getClientToken() { return this.ClientToken; } /** * Set 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'. * @param ClientToken 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'. */ public void setClientToken(String ClientToken) { this.ClientToken = ClientToken; } /** * Get Host name of the CVM.
  • Periods (.) or hyphens (-) cannot be the start or end of a host name or appear consecutively in a host name.
  • For Windows instances, the host name must be 2-15 characters long and can contain uppercase and lowercase letters, numbers, and hyphens (-). It cannot contain periods (.) or contain only numbers.
  • For other instances, such as Linux instances, the host name must be 2-60 characters long. It supports multiple periods (.) and allows uppercase and lowercase letters, numbers, and hyphens (-) between any two periods (.). * @return HostName Host name of the CVM.
  • Periods (.) or hyphens (-) cannot be the start or end of a host name or appear consecutively in a host name.
  • For Windows instances, the host name must be 2-15 characters long and can contain uppercase and lowercase letters, numbers, and hyphens (-). It cannot contain periods (.) or contain only numbers.
  • For other instances, such as Linux instances, the host name must be 2-60 characters long. It supports multiple periods (.) and allows uppercase and lowercase letters, numbers, and hyphens (-) between any two periods (.). */ public String getHostName() { return this.HostName; } /** * Set Host name of the CVM.
  • Periods (.) or hyphens (-) cannot be the start or end of a host name or appear consecutively in a host name.
  • For Windows instances, the host name must be 2-15 characters long and can contain uppercase and lowercase letters, numbers, and hyphens (-). It cannot contain periods (.) or contain only numbers.
  • For other instances, such as Linux instances, the host name must be 2-60 characters long. It supports multiple periods (.) and allows uppercase and lowercase letters, numbers, and hyphens (-) between any two periods (.). * @param HostName Host name of the CVM.
  • Periods (.) or hyphens (-) cannot be the start or end of a host name or appear consecutively in a host name.
  • For Windows instances, the host name must be 2-15 characters long and can contain uppercase and lowercase letters, numbers, and hyphens (-). It cannot contain periods (.) or contain only numbers.
  • For other instances, such as Linux instances, the host name must be 2-60 characters long. It supports multiple periods (.) and allows uppercase and lowercase letters, numbers, and hyphens (-) between any two periods (.). */ public void setHostName(String HostName) { this.HostName = HostName; } /** * Get Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. * @return ActionTimer Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. */ public ActionTimer getActionTimer() { return this.ActionTimer; } /** * Set Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. * @param ActionTimer Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. */ public void setActionTimer(ActionTimer ActionTimer) { this.ActionTimer = ActionTimer; } /** * Get Placement group ID. You can only specify one. * @return DisasterRecoverGroupIds Placement group ID. You can only specify one. */ public String [] getDisasterRecoverGroupIds() { return this.DisasterRecoverGroupIds; } /** * Set Placement group ID. You can only specify one. * @param DisasterRecoverGroupIds Placement group ID. You can only specify one. */ public void setDisasterRecoverGroupIds(String [] DisasterRecoverGroupIds) { this.DisasterRecoverGroupIds = DisasterRecoverGroupIds; } /** * Get The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. * @return TagSpecification The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. */ public TagSpecification [] getTagSpecification() { return this.TagSpecification; } /** * Set The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. * @param TagSpecification The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. */ public void setTagSpecification(TagSpecification [] TagSpecification) { this.TagSpecification = TagSpecification; } /** * Get The market options of the instance. * @return InstanceMarketOptions The market options of the instance. */ public InstanceMarketOptionsRequest getInstanceMarketOptions() { return this.InstanceMarketOptions; } /** * Set The market options of the instance. * @param InstanceMarketOptions The market options of the instance. */ public void setInstanceMarketOptions(InstanceMarketOptionsRequest InstanceMarketOptions) { this.InstanceMarketOptions = InstanceMarketOptions; } /** * Get User data provided to the instance, which needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). * @return UserData User data provided to the instance, which needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). */ public String getUserData() { return this.UserData; } /** * Set User data provided to the instance, which needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). * @param UserData User data provided to the instance, which needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). */ public void setUserData(String UserData) { this.UserData = UserData; } /** * Get Whether the request is a dry run only. true: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. If the dry run fails, the corresponding error code will be returned. If the dry run succeeds, the RequestId will be returned. false (default value): send a normal request and create instance(s) if all the requirements are met. * @return DryRun Whether the request is a dry run only. true: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. If the dry run fails, the corresponding error code will be returned. If the dry run succeeds, the RequestId will be returned. false (default value): send a normal request and create instance(s) if all the requirements are met. */ public Boolean getDryRun() { return this.DryRun; } /** * Set Whether the request is a dry run only. true: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. If the dry run fails, the corresponding error code will be returned. If the dry run succeeds, the RequestId will be returned. false (default value): send a normal request and create instance(s) if all the requirements are met. * @param DryRun Whether the request is a dry run only. true: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. If the dry run fails, the corresponding error code will be returned. If the dry run succeeds, the RequestId will be returned. false (default value): send a normal request and create instance(s) if all the requirements are met. */ public void setDryRun(Boolean DryRun) { this.DryRun = DryRun; } /** * Get CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/13887?from_cn_redirect=1) API. * @return CamRoleName CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/13887?from_cn_redirect=1) API. */ public String getCamRoleName() { return this.CamRoleName; } /** * Set CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/13887?from_cn_redirect=1) API. * @param CamRoleName CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/13887?from_cn_redirect=1) API. */ public void setCamRoleName(String CamRoleName) { this.CamRoleName = CamRoleName; } /** * Get HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. * @return HpcClusterId HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. */ public String getHpcClusterId() { return this.HpcClusterId; } /** * Set HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. * @param HpcClusterId HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. */ public void setHpcClusterId(String HpcClusterId) { this.HpcClusterId = HpcClusterId; } public RunInstancesRequest() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public RunInstancesRequest(RunInstancesRequest source) { if (source.InstanceChargeType != null) { this.InstanceChargeType = new String(source.InstanceChargeType); } if (source.InstanceChargePrepaid != null) { this.InstanceChargePrepaid = new InstanceChargePrepaid(source.InstanceChargePrepaid); } if (source.Placement != null) { this.Placement = new Placement(source.Placement); } if (source.InstanceType != null) { this.InstanceType = new String(source.InstanceType); } if (source.ImageId != null) { this.ImageId = new String(source.ImageId); } if (source.SystemDisk != null) { this.SystemDisk = new SystemDisk(source.SystemDisk); } if (source.DataDisks != null) { this.DataDisks = new DataDisk[source.DataDisks.length]; for (int i = 0; i < source.DataDisks.length; i++) { this.DataDisks[i] = new DataDisk(source.DataDisks[i]); } } if (source.VirtualPrivateCloud != null) { this.VirtualPrivateCloud = new VirtualPrivateCloud(source.VirtualPrivateCloud); } if (source.InternetAccessible != null) { this.InternetAccessible = new InternetAccessible(source.InternetAccessible); } if (source.InstanceCount != null) { this.InstanceCount = new Long(source.InstanceCount); } if (source.InstanceName != null) { this.InstanceName = new String(source.InstanceName); } if (source.LoginSettings != null) { this.LoginSettings = new LoginSettings(source.LoginSettings); } if (source.SecurityGroupIds != null) { this.SecurityGroupIds = new String[source.SecurityGroupIds.length]; for (int i = 0; i < source.SecurityGroupIds.length; i++) { this.SecurityGroupIds[i] = new String(source.SecurityGroupIds[i]); } } if (source.EnhancedService != null) { this.EnhancedService = new EnhancedService(source.EnhancedService); } if (source.ClientToken != null) { this.ClientToken = new String(source.ClientToken); } if (source.HostName != null) { this.HostName = new String(source.HostName); } if (source.ActionTimer != null) { this.ActionTimer = new ActionTimer(source.ActionTimer); } if (source.DisasterRecoverGroupIds != null) { this.DisasterRecoverGroupIds = new String[source.DisasterRecoverGroupIds.length]; for (int i = 0; i < source.DisasterRecoverGroupIds.length; i++) { this.DisasterRecoverGroupIds[i] = new String(source.DisasterRecoverGroupIds[i]); } } if (source.TagSpecification != null) { this.TagSpecification = new TagSpecification[source.TagSpecification.length]; for (int i = 0; i < source.TagSpecification.length; i++) { this.TagSpecification[i] = new TagSpecification(source.TagSpecification[i]); } } if (source.InstanceMarketOptions != null) { this.InstanceMarketOptions = new InstanceMarketOptionsRequest(source.InstanceMarketOptions); } if (source.UserData != null) { this.UserData = new String(source.UserData); } if (source.DryRun != null) { this.DryRun = new Boolean(source.DryRun); } if (source.CamRoleName != null) { this.CamRoleName = new String(source.CamRoleName); } if (source.HpcClusterId != null) { this.HpcClusterId = new String(source.HpcClusterId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap map, String prefix) { this.setParamSimple(map, prefix + "InstanceChargeType", this.InstanceChargeType); this.setParamObj(map, prefix + "InstanceChargePrepaid.", this.InstanceChargePrepaid); this.setParamObj(map, prefix + "Placement.", this.Placement); this.setParamSimple(map, prefix + "InstanceType", this.InstanceType); this.setParamSimple(map, prefix + "ImageId", this.ImageId); this.setParamObj(map, prefix + "SystemDisk.", this.SystemDisk); this.setParamArrayObj(map, prefix + "DataDisks.", this.DataDisks); this.setParamObj(map, prefix + "VirtualPrivateCloud.", this.VirtualPrivateCloud); this.setParamObj(map, prefix + "InternetAccessible.", this.InternetAccessible); this.setParamSimple(map, prefix + "InstanceCount", this.InstanceCount); this.setParamSimple(map, prefix + "InstanceName", this.InstanceName); this.setParamObj(map, prefix + "LoginSettings.", this.LoginSettings); this.setParamArraySimple(map, prefix + "SecurityGroupIds.", this.SecurityGroupIds); this.setParamObj(map, prefix + "EnhancedService.", this.EnhancedService); this.setParamSimple(map, prefix + "ClientToken", this.ClientToken); this.setParamSimple(map, prefix + "HostName", this.HostName); this.setParamObj(map, prefix + "ActionTimer.", this.ActionTimer); this.setParamArraySimple(map, prefix + "DisasterRecoverGroupIds.", this.DisasterRecoverGroupIds); this.setParamArrayObj(map, prefix + "TagSpecification.", this.TagSpecification); this.setParamObj(map, prefix + "InstanceMarketOptions.", this.InstanceMarketOptions); this.setParamSimple(map, prefix + "UserData", this.UserData); this.setParamSimple(map, prefix + "DryRun", this.DryRun); this.setParamSimple(map, prefix + "CamRoleName", this.CamRoleName); this.setParamSimple(map, prefix + "HpcClusterId", this.HpcClusterId); } }




  • © 2015 - 2025 Weber Informatics LLC | Privacy Policy