Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.alicloud.ens.InstanceArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing AliCloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.alicloud.ens;
import com.pulumi.alicloud.ens.inputs.InstanceDataDiskArgs;
import com.pulumi.alicloud.ens.inputs.InstanceSystemDiskArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class InstanceArgs extends com.pulumi.resources.ResourceArgs {
public static final InstanceArgs Empty = new InstanceArgs();
/**
* The number of instances created, with a minimum of 1 and a maximum of 100
*
*/
@Import(name="amount")
private @Nullable Output amount;
/**
* @return The number of instances created, with a minimum of 1 and a maximum of 100
*
*/
public Optional> amount() {
return Optional.ofNullable(this.amount);
}
/**
* The automatic release time of the pay-as-you-go instance. According to the [ISO 8601] standard, UTC +0 time is used. The format is: 'yyyy-MM-ddTHH:mm:ssZ '.
* - If the second ('ss') value is not '00', it is automatically taken as the start of the current minute ('mm').
* - The minimum release time is one hour after the current time.
*
*/
@Import(name="autoReleaseTime")
private @Nullable Output autoReleaseTime;
/**
* @return The automatic release time of the pay-as-you-go instance. According to the [ISO 8601] standard, UTC +0 time is used. The format is: 'yyyy-MM-ddTHH:mm:ssZ '.
* - If the second ('ss') value is not '00', it is automatically taken as the start of the current minute ('mm').
* - The minimum release time is one hour after the current time.
*
*/
public Optional> autoReleaseTime() {
return Optional.ofNullable(this.autoReleaseTime);
}
/**
* Whether to automatically renew the logo. The default value is false. This parameter is invalid when you pay by volume.
*
*/
@Import(name="autoRenew")
private @Nullable Output autoRenew;
/**
* @return Whether to automatically renew the logo. The default value is false. This parameter is invalid when you pay by volume.
*
*/
public Optional> autoRenew() {
return Optional.ofNullable(this.autoRenew);
}
/**
* Whether to use vouchers. The default is to use. Value:
* - true (used)
* - false (not used)
*
*/
@Import(name="autoUseCoupon")
private @Nullable Output autoUseCoupon;
/**
* @return Whether to use vouchers. The default is to use. Value:
* - true (used)
* - false (not used)
*
*/
public Optional> autoUseCoupon() {
return Optional.ofNullable(this.autoUseCoupon);
}
/**
* The billing cycle for instance computing resources. Only instance-level pay-as-you-go is supported. Value
* - Hour: hourly billing
* - Day: Daily billing
* - Month: monthly billing
*
*/
@Import(name="billingCycle")
private @Nullable Output billingCycle;
/**
* @return The billing cycle for instance computing resources. Only instance-level pay-as-you-go is supported. Value
* - Hour: hourly billing
* - Day: Daily billing
* - Month: monthly billing
*
*/
public Optional> billingCycle() {
return Optional.ofNullable(this.billingCycle);
}
/**
* Operator, required for regional scheduling. Optional values:
* - cmcc (mobile)
* - unicom
* - telecom
*
*/
@Import(name="carrier")
private @Nullable Output carrier;
/**
* @return Operator, required for regional scheduling. Optional values:
* - cmcc (mobile)
* - unicom
* - telecom
*
*/
public Optional> carrier() {
return Optional.ofNullable(this.carrier);
}
/**
* Data disk specifications See `data_disk` below.
*
*/
@Import(name="dataDisks")
private @Nullable Output> dataDisks;
/**
* @return Data disk specifications See `data_disk` below.
*
*/
public Optional>> dataDisks() {
return Optional.ofNullable(this.dataDisks);
}
/**
* The node ID. When ScheduleAreaLevel is Region, EnsRegionId is required. When ScheduleAreaLevel is Big,Middle,Small, EnsRegionId is invalid.
*
*/
@Import(name="ensRegionId")
private @Nullable Output ensRegionId;
/**
* @return The node ID. When ScheduleAreaLevel is Region, EnsRegionId is required. When ScheduleAreaLevel is Big,Middle,Small, EnsRegionId is invalid.
*
*/
public Optional> ensRegionId() {
return Optional.ofNullable(this.ensRegionId);
}
/**
* Whether to force the identity when operating the instance. Optional values:
* - true: Force
* - false (default): non-mandatory
*
*/
@Import(name="forceStop")
private @Nullable Output forceStop;
/**
* @return Whether to force the identity when operating the instance. Optional values:
* - true: Force
* - false (default): non-mandatory
*
*/
public Optional> forceStop() {
return Optional.ofNullable(this.forceStop);
}
/**
* The host name of the instance. Example value: test-HostName
*
*/
@Import(name="hostName")
private @Nullable Output hostName;
/**
* @return The host name of the instance. Example value: test-HostName
*
*/
public Optional> hostName() {
return Optional.ofNullable(this.hostName);
}
/**
* The image ID of the instance. The arm version card cannot be filled in. Other specifications are required. Example value: m-5si16wo6simkt267p8b7h * * * *
*
*/
@Import(name="imageId")
private @Nullable Output imageId;
/**
* @return The image ID of the instance. The arm version card cannot be filled in. Other specifications are required. Example value: m-5si16wo6simkt267p8b7h * * * *
*
*/
public Optional> imageId() {
return Optional.ofNullable(this.imageId);
}
/**
* Whether the Payment type of the disk created with the instance is converted.
*
*/
@Import(name="includeDataDisks")
private @Nullable Output includeDataDisks;
/**
* @return Whether the Payment type of the disk created with the instance is converted.
*
*/
public Optional> includeDataDisks() {
return Optional.ofNullable(this.includeDataDisks);
}
/**
* The instance billing policy. Optional values:
* - instance: instance granularity (the subscription method does not support instance)
* - user: user Dimension (user is not transmitted or supported in the prepaid mode)
*
*/
@Import(name="instanceChargeStrategy")
private @Nullable Output instanceChargeStrategy;
/**
* @return The instance billing policy. Optional values:
* - instance: instance granularity (the subscription method does not support instance)
* - user: user Dimension (user is not transmitted or supported in the prepaid mode)
*
*/
public Optional> instanceChargeStrategy() {
return Optional.ofNullable(this.instanceChargeStrategy);
}
/**
* The instance name. Example value: test-InstanceName. It must be 2 to 128 characters in length and must start with an uppercase or lowercase letter or a Chinese character. It cannot start with http:// or https. Can contain Chinese, English, numbers, half-width colons (:), underscores (_), periods (.), or hyphens (-)
*
* The default value is the InstanceId of the instance.
*
*/
@Import(name="instanceName")
private @Nullable Output instanceName;
/**
* @return The instance name. Example value: test-InstanceName. It must be 2 to 128 characters in length and must start with an uppercase or lowercase letter or a Chinese character. It cannot start with http:// or https. Can contain Chinese, English, numbers, half-width colons (:), underscores (_), periods (.), or hyphens (-)
*
* The default value is the InstanceId of the instance.
*
*/
public Optional> instanceName() {
return Optional.ofNullable(this.instanceName);
}
/**
* The specification of the instance. Example value: ens.sn1.small
*
*/
@Import(name="instanceType", required=true)
private Output instanceType;
/**
* @return The specification of the instance. Example value: ens.sn1.small
*
*/
public Output instanceType() {
return this.instanceType;
}
/**
* Instance bandwidth billing method. If the billing method can be selected for the first purchase, the subsequent value of this field will be processed by default according to the billing method selected for the first time. Optional values:
* - BandwidthByDay: Daily peak bandwidth
* - 95bandwidthbymonth: 95 peak bandwidth
*
*/
@Import(name="internetChargeType")
private @Nullable Output internetChargeType;
/**
* @return Instance bandwidth billing method. If the billing method can be selected for the first purchase, the subsequent value of this field will be processed by default according to the billing method selected for the first time. Optional values:
* - BandwidthByDay: Daily peak bandwidth
* - 95bandwidthbymonth: 95 peak bandwidth
*
*/
public Optional> internetChargeType() {
return Optional.ofNullable(this.internetChargeType);
}
/**
* Maximum public network bandwidth. The field type is Long, and the precision may be lost during serialization/deserialization. Please note that the value must not be greater than 9007199254740991
*
*/
@Import(name="internetMaxBandwidthOut")
private @Nullable Output internetMaxBandwidthOut;
/**
* @return Maximum public network bandwidth. The field type is Long, and the precision may be lost during serialization/deserialization. Please note that the value must not be greater than 9007199254740991
*
*/
public Optional> internetMaxBandwidthOut() {
return Optional.ofNullable(this.internetMaxBandwidthOut);
}
/**
* The IP type. Value:
* - ipv4 (default):IPv4
* - ipv6:IPv6
* - ipv4Andipv6:IPv4 and IPv6
*
*/
@Import(name="ipType")
private @Nullable Output ipType;
/**
* @return The IP type. Value:
* - ipv4 (default):IPv4
* - ipv6:IPv6
* - ipv4Andipv6:IPv4 and IPv6
*
*/
public Optional> ipType() {
return Optional.ofNullable(this.ipType);
}
/**
* The key pair name.
*
* > **NOTE:** At least one of `Password`, `KeyPairName`, and **PasswordInherit.
*
*/
@Import(name="keyPairName")
private @Nullable Output keyPairName;
/**
* @return The key pair name.
*
* > **NOTE:** At least one of `Password`, `KeyPairName`, and **PasswordInherit.
*
*/
public Optional> keyPairName() {
return Optional.ofNullable(this.keyPairName);
}
/**
* The area code. Example value: 350000. Required for regional-level scheduling, invalid for node-level scheduling
*
*/
@Import(name="netDistrictCode")
private @Nullable Output netDistrictCode;
/**
* @return The area code. Example value: 350000. Required for regional-level scheduling, invalid for node-level scheduling
*
*/
public Optional> netDistrictCode() {
return Optional.ofNullable(this.netDistrictCode);
}
/**
* The network ID of the instance. Can only be used in node-level scheduling
*
*/
@Import(name="netWorkId")
private @Nullable Output netWorkId;
/**
* @return The network ID of the instance. Can only be used in node-level scheduling
*
*/
public Optional> netWorkId() {
return Optional.ofNullable(this.netWorkId);
}
/**
* The instance password. At least one of Password, KeyPairName, and PasswordInherit
*
*/
@Import(name="password")
private @Nullable Output password;
/**
* @return The instance password. At least one of Password, KeyPairName, and PasswordInherit
*
*/
public Optional> password() {
return Optional.ofNullable(this.password);
}
/**
* Whether to use image preset password prompt: Password and KeyPairNamePasswordInherit must be passed
*
*/
@Import(name="passwordInherit")
private @Nullable Output passwordInherit;
/**
* @return Whether to use image preset password prompt: Password and KeyPairNamePasswordInherit must be passed
*
*/
public Optional> passwordInherit() {
return Optional.ofNullable(this.passwordInherit);
}
/**
* Instance payment method. Since v1.230.0, you can modify payment_type. Optional values:
* - Subscription: prepaid, annual and monthly
* - PayAsYouGo: Pay by volume
*
*/
@Import(name="paymentType", required=true)
private Output paymentType;
/**
* @return Instance payment method. Since v1.230.0, you can modify payment_type. Optional values:
* - Subscription: prepaid, annual and monthly
* - PayAsYouGo: Pay by volume
*
*/
public Output paymentType() {
return this.paymentType;
}
/**
* The duration of the resource purchase. Value method:
* - If PeriodUnit is set to Day, Period can only be set to 3.
* - If PeriodUnit is set to Month, Period can be set to 1-9,12.
*
*/
@Import(name="period")
private @Nullable Output period;
/**
* @return The duration of the resource purchase. Value method:
* - If PeriodUnit is set to Day, Period can only be set to 3.
* - If PeriodUnit is set to Month, Period can be set to 1-9,12.
*
*/
public Optional> period() {
return Optional.ofNullable(this.period);
}
/**
* The unit of time for purchasing resources. Value:
* - Month (default): purchase by Month
* - Day: buy by Day
*
*/
@Import(name="periodUnit")
private @Nullable Output periodUnit;
/**
* @return The unit of time for purchasing resources. Value:
* - Month (default): purchase by Month
* - Day: buy by Day
*
*/
public Optional> periodUnit() {
return Optional.ofNullable(this.periodUnit);
}
/**
* The private IP address. Can only be used for node-level scheduling. If a private IP address is specified, the number of instances can only be one, and both the private IP address and the vSwitch ID are not empty, the private IP address takes effect.
*
*/
@Import(name="privateIpAddress")
private @Nullable Output privateIpAddress;
/**
* @return The private IP address. Can only be used for node-level scheduling. If a private IP address is specified, the number of instances can only be one, and both the private IP address and the vSwitch ID are not empty, the private IP address takes effect.
*
*/
public Optional> privateIpAddress() {
return Optional.ofNullable(this.privateIpAddress);
}
/**
* Whether to assign a public IP identifier. Value:
* - true (default): Assign
* - false: do not assign
*
*/
@Import(name="publicIpIdentification")
private @Nullable Output publicIpIdentification;
/**
* @return Whether to assign a public IP identifier. Value:
* - true (default): Assign
* - false: do not assign
*
*/
public Optional> publicIpIdentification() {
return Optional.ofNullable(this.publicIpIdentification);
}
/**
* Scheduling level, through which node-level scheduling or area scheduling is performed. Optional values:
* - Node-level scheduling: Region
* - Regional scheduling: Big (region),Middle (province),Small (city)
*
*/
@Import(name="scheduleAreaLevel", required=true)
private Output scheduleAreaLevel;
/**
* @return Scheduling level, through which node-level scheduling or area scheduling is performed. Optional values:
* - Node-level scheduling: Region
* - Regional scheduling: Big (region),Middle (province),Small (city)
*
*/
public Output scheduleAreaLevel() {
return this.scheduleAreaLevel;
}
/**
* Scheduling price policy. If it is not filled in, the default priority is low price. Value:
* - PriceLowPriority
* - PriceLowPriority (priority low price)
*
*/
@Import(name="schedulingPriceStrategy")
private @Nullable Output schedulingPriceStrategy;
/**
* @return Scheduling price policy. If it is not filled in, the default priority is low price. Value:
* - PriceLowPriority
* - PriceLowPriority (priority low price)
*
*/
public Optional> schedulingPriceStrategy() {
return Optional.ofNullable(this.schedulingPriceStrategy);
}
/**
* Scheduling policy. Optional values:
* - Concentrate for node-level scheduling
* - For regional scheduling, Concentrate, Disperse
*
*/
@Import(name="schedulingStrategy")
private @Nullable Output schedulingStrategy;
/**
* @return Scheduling policy. Optional values:
* - Concentrate for node-level scheduling
* - For regional scheduling, Concentrate, Disperse
*
*/
public Optional> schedulingStrategy() {
return Optional.ofNullable(this.schedulingStrategy);
}
/**
* ID of the security group to which the instance belongs.
*
*/
@Import(name="securityId")
private @Nullable Output securityId;
/**
* @return ID of the security group to which the instance belongs.
*
*/
public Optional> securityId() {
return Optional.ofNullable(this.securityId);
}
/**
* The bidding strategy for pay-as-you-go instances. It takes effect when the value of the 'InstanceChargeType' parameter is set to 'PostPaid. Value range:
* - NoSpot: normal pay-as-you-go instance (default)
* - SpotAsPriceGo: The system automatically bids, following the actual price in the current market.
*
*/
@Import(name="spotStrategy")
private @Nullable Output spotStrategy;
/**
* @return The bidding strategy for pay-as-you-go instances. It takes effect when the value of the 'InstanceChargeType' parameter is set to 'PostPaid. Value range:
* - NoSpot: normal pay-as-you-go instance (default)
* - SpotAsPriceGo: The system automatically bids, following the actual price in the current market.
*
*/
public Optional> spotStrategy() {
return Optional.ofNullable(this.spotStrategy);
}
/**
* Status of the instance
*
*/
@Import(name="status")
private @Nullable Output status;
/**
* @return Status of the instance
*
*/
public Optional> status() {
return Optional.ofNullable(this.status);
}
/**
* System Disk Specification. SystemDisk is a non-required parameter when InstanceType is x86_pm,x86_bmi,x86_bm,pc_bmi, or arm_bmi. SystemDisk is a required parameter when instanceType is other specification families. See `system_disk` below.
*
*/
@Import(name="systemDisk")
private @Nullable Output systemDisk;
/**
* @return System Disk Specification. SystemDisk is a non-required parameter when InstanceType is x86_pm,x86_bmi,x86_bm,pc_bmi, or arm_bmi. SystemDisk is a required parameter when instanceType is other specification families. See `system_disk` below.
*
*/
public Optional> systemDisk() {
return Optional.ofNullable(this.systemDisk);
}
/**
* The tag bound to the instance
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return The tag bound to the instance
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* Indicates whether to add an ordered suffix to HostName and InstanceName. The ordered suffix starts from 001 and cannot exceed 999.
*
*/
@Import(name="uniqueSuffix")
private @Nullable Output uniqueSuffix;
/**
* @return Indicates whether to add an ordered suffix to HostName and InstanceName. The ordered suffix starts from 001 and cannot exceed 999.
*
*/
public Optional> uniqueSuffix() {
return Optional.ofNullable(this.uniqueSuffix);
}
/**
* User-defined data, maximum support 16KB. You can pass in the UserData information. The UserData is encoded in Base64 format.
*
*/
@Import(name="userData")
private @Nullable Output userData;
/**
* @return User-defined data, maximum support 16KB. You can pass in the UserData information. The UserData is encoded in Base64 format.
*
*/
public Optional> userData() {
return Optional.ofNullable(this.userData);
}
/**
* The ID of the vSwitch to which the instance belongs. Can only be used in node-level scheduling
*
*/
@Import(name="vswitchId")
private @Nullable Output vswitchId;
/**
* @return The ID of the vSwitch to which the instance belongs. Can only be used in node-level scheduling
*
*/
public Optional> vswitchId() {
return Optional.ofNullable(this.vswitchId);
}
private InstanceArgs() {}
private InstanceArgs(InstanceArgs $) {
this.amount = $.amount;
this.autoReleaseTime = $.autoReleaseTime;
this.autoRenew = $.autoRenew;
this.autoUseCoupon = $.autoUseCoupon;
this.billingCycle = $.billingCycle;
this.carrier = $.carrier;
this.dataDisks = $.dataDisks;
this.ensRegionId = $.ensRegionId;
this.forceStop = $.forceStop;
this.hostName = $.hostName;
this.imageId = $.imageId;
this.includeDataDisks = $.includeDataDisks;
this.instanceChargeStrategy = $.instanceChargeStrategy;
this.instanceName = $.instanceName;
this.instanceType = $.instanceType;
this.internetChargeType = $.internetChargeType;
this.internetMaxBandwidthOut = $.internetMaxBandwidthOut;
this.ipType = $.ipType;
this.keyPairName = $.keyPairName;
this.netDistrictCode = $.netDistrictCode;
this.netWorkId = $.netWorkId;
this.password = $.password;
this.passwordInherit = $.passwordInherit;
this.paymentType = $.paymentType;
this.period = $.period;
this.periodUnit = $.periodUnit;
this.privateIpAddress = $.privateIpAddress;
this.publicIpIdentification = $.publicIpIdentification;
this.scheduleAreaLevel = $.scheduleAreaLevel;
this.schedulingPriceStrategy = $.schedulingPriceStrategy;
this.schedulingStrategy = $.schedulingStrategy;
this.securityId = $.securityId;
this.spotStrategy = $.spotStrategy;
this.status = $.status;
this.systemDisk = $.systemDisk;
this.tags = $.tags;
this.uniqueSuffix = $.uniqueSuffix;
this.userData = $.userData;
this.vswitchId = $.vswitchId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(InstanceArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private InstanceArgs $;
public Builder() {
$ = new InstanceArgs();
}
public Builder(InstanceArgs defaults) {
$ = new InstanceArgs(Objects.requireNonNull(defaults));
}
/**
* @param amount The number of instances created, with a minimum of 1 and a maximum of 100
*
* @return builder
*
*/
public Builder amount(@Nullable Output amount) {
$.amount = amount;
return this;
}
/**
* @param amount The number of instances created, with a minimum of 1 and a maximum of 100
*
* @return builder
*
*/
public Builder amount(Integer amount) {
return amount(Output.of(amount));
}
/**
* @param autoReleaseTime The automatic release time of the pay-as-you-go instance. According to the [ISO 8601] standard, UTC +0 time is used. The format is: 'yyyy-MM-ddTHH:mm:ssZ '.
* - If the second ('ss') value is not '00', it is automatically taken as the start of the current minute ('mm').
* - The minimum release time is one hour after the current time.
*
* @return builder
*
*/
public Builder autoReleaseTime(@Nullable Output autoReleaseTime) {
$.autoReleaseTime = autoReleaseTime;
return this;
}
/**
* @param autoReleaseTime The automatic release time of the pay-as-you-go instance. According to the [ISO 8601] standard, UTC +0 time is used. The format is: 'yyyy-MM-ddTHH:mm:ssZ '.
* - If the second ('ss') value is not '00', it is automatically taken as the start of the current minute ('mm').
* - The minimum release time is one hour after the current time.
*
* @return builder
*
*/
public Builder autoReleaseTime(String autoReleaseTime) {
return autoReleaseTime(Output.of(autoReleaseTime));
}
/**
* @param autoRenew Whether to automatically renew the logo. The default value is false. This parameter is invalid when you pay by volume.
*
* @return builder
*
*/
public Builder autoRenew(@Nullable Output autoRenew) {
$.autoRenew = autoRenew;
return this;
}
/**
* @param autoRenew Whether to automatically renew the logo. The default value is false. This parameter is invalid when you pay by volume.
*
* @return builder
*
*/
public Builder autoRenew(Boolean autoRenew) {
return autoRenew(Output.of(autoRenew));
}
/**
* @param autoUseCoupon Whether to use vouchers. The default is to use. Value:
* - true (used)
* - false (not used)
*
* @return builder
*
*/
public Builder autoUseCoupon(@Nullable Output autoUseCoupon) {
$.autoUseCoupon = autoUseCoupon;
return this;
}
/**
* @param autoUseCoupon Whether to use vouchers. The default is to use. Value:
* - true (used)
* - false (not used)
*
* @return builder
*
*/
public Builder autoUseCoupon(String autoUseCoupon) {
return autoUseCoupon(Output.of(autoUseCoupon));
}
/**
* @param billingCycle The billing cycle for instance computing resources. Only instance-level pay-as-you-go is supported. Value
* - Hour: hourly billing
* - Day: Daily billing
* - Month: monthly billing
*
* @return builder
*
*/
public Builder billingCycle(@Nullable Output billingCycle) {
$.billingCycle = billingCycle;
return this;
}
/**
* @param billingCycle The billing cycle for instance computing resources. Only instance-level pay-as-you-go is supported. Value
* - Hour: hourly billing
* - Day: Daily billing
* - Month: monthly billing
*
* @return builder
*
*/
public Builder billingCycle(String billingCycle) {
return billingCycle(Output.of(billingCycle));
}
/**
* @param carrier Operator, required for regional scheduling. Optional values:
* - cmcc (mobile)
* - unicom
* - telecom
*
* @return builder
*
*/
public Builder carrier(@Nullable Output carrier) {
$.carrier = carrier;
return this;
}
/**
* @param carrier Operator, required for regional scheduling. Optional values:
* - cmcc (mobile)
* - unicom
* - telecom
*
* @return builder
*
*/
public Builder carrier(String carrier) {
return carrier(Output.of(carrier));
}
/**
* @param dataDisks Data disk specifications See `data_disk` below.
*
* @return builder
*
*/
public Builder dataDisks(@Nullable Output> dataDisks) {
$.dataDisks = dataDisks;
return this;
}
/**
* @param dataDisks Data disk specifications See `data_disk` below.
*
* @return builder
*
*/
public Builder dataDisks(List dataDisks) {
return dataDisks(Output.of(dataDisks));
}
/**
* @param dataDisks Data disk specifications See `data_disk` below.
*
* @return builder
*
*/
public Builder dataDisks(InstanceDataDiskArgs... dataDisks) {
return dataDisks(List.of(dataDisks));
}
/**
* @param ensRegionId The node ID. When ScheduleAreaLevel is Region, EnsRegionId is required. When ScheduleAreaLevel is Big,Middle,Small, EnsRegionId is invalid.
*
* @return builder
*
*/
public Builder ensRegionId(@Nullable Output ensRegionId) {
$.ensRegionId = ensRegionId;
return this;
}
/**
* @param ensRegionId The node ID. When ScheduleAreaLevel is Region, EnsRegionId is required. When ScheduleAreaLevel is Big,Middle,Small, EnsRegionId is invalid.
*
* @return builder
*
*/
public Builder ensRegionId(String ensRegionId) {
return ensRegionId(Output.of(ensRegionId));
}
/**
* @param forceStop Whether to force the identity when operating the instance. Optional values:
* - true: Force
* - false (default): non-mandatory
*
* @return builder
*
*/
public Builder forceStop(@Nullable Output forceStop) {
$.forceStop = forceStop;
return this;
}
/**
* @param forceStop Whether to force the identity when operating the instance. Optional values:
* - true: Force
* - false (default): non-mandatory
*
* @return builder
*
*/
public Builder forceStop(String forceStop) {
return forceStop(Output.of(forceStop));
}
/**
* @param hostName The host name of the instance. Example value: test-HostName
*
* @return builder
*
*/
public Builder hostName(@Nullable Output hostName) {
$.hostName = hostName;
return this;
}
/**
* @param hostName The host name of the instance. Example value: test-HostName
*
* @return builder
*
*/
public Builder hostName(String hostName) {
return hostName(Output.of(hostName));
}
/**
* @param imageId The image ID of the instance. The arm version card cannot be filled in. Other specifications are required. Example value: m-5si16wo6simkt267p8b7h * * * *
*
* @return builder
*
*/
public Builder imageId(@Nullable Output imageId) {
$.imageId = imageId;
return this;
}
/**
* @param imageId The image ID of the instance. The arm version card cannot be filled in. Other specifications are required. Example value: m-5si16wo6simkt267p8b7h * * * *
*
* @return builder
*
*/
public Builder imageId(String imageId) {
return imageId(Output.of(imageId));
}
/**
* @param includeDataDisks Whether the Payment type of the disk created with the instance is converted.
*
* @return builder
*
*/
public Builder includeDataDisks(@Nullable Output includeDataDisks) {
$.includeDataDisks = includeDataDisks;
return this;
}
/**
* @param includeDataDisks Whether the Payment type of the disk created with the instance is converted.
*
* @return builder
*
*/
public Builder includeDataDisks(Boolean includeDataDisks) {
return includeDataDisks(Output.of(includeDataDisks));
}
/**
* @param instanceChargeStrategy The instance billing policy. Optional values:
* - instance: instance granularity (the subscription method does not support instance)
* - user: user Dimension (user is not transmitted or supported in the prepaid mode)
*
* @return builder
*
*/
public Builder instanceChargeStrategy(@Nullable Output instanceChargeStrategy) {
$.instanceChargeStrategy = instanceChargeStrategy;
return this;
}
/**
* @param instanceChargeStrategy The instance billing policy. Optional values:
* - instance: instance granularity (the subscription method does not support instance)
* - user: user Dimension (user is not transmitted or supported in the prepaid mode)
*
* @return builder
*
*/
public Builder instanceChargeStrategy(String instanceChargeStrategy) {
return instanceChargeStrategy(Output.of(instanceChargeStrategy));
}
/**
* @param instanceName The instance name. Example value: test-InstanceName. It must be 2 to 128 characters in length and must start with an uppercase or lowercase letter or a Chinese character. It cannot start with http:// or https. Can contain Chinese, English, numbers, half-width colons (:), underscores (_), periods (.), or hyphens (-)
*
* The default value is the InstanceId of the instance.
*
* @return builder
*
*/
public Builder instanceName(@Nullable Output instanceName) {
$.instanceName = instanceName;
return this;
}
/**
* @param instanceName The instance name. Example value: test-InstanceName. It must be 2 to 128 characters in length and must start with an uppercase or lowercase letter or a Chinese character. It cannot start with http:// or https. Can contain Chinese, English, numbers, half-width colons (:), underscores (_), periods (.), or hyphens (-)
*
* The default value is the InstanceId of the instance.
*
* @return builder
*
*/
public Builder instanceName(String instanceName) {
return instanceName(Output.of(instanceName));
}
/**
* @param instanceType The specification of the instance. Example value: ens.sn1.small
*
* @return builder
*
*/
public Builder instanceType(Output instanceType) {
$.instanceType = instanceType;
return this;
}
/**
* @param instanceType The specification of the instance. Example value: ens.sn1.small
*
* @return builder
*
*/
public Builder instanceType(String instanceType) {
return instanceType(Output.of(instanceType));
}
/**
* @param internetChargeType Instance bandwidth billing method. If the billing method can be selected for the first purchase, the subsequent value of this field will be processed by default according to the billing method selected for the first time. Optional values:
* - BandwidthByDay: Daily peak bandwidth
* - 95bandwidthbymonth: 95 peak bandwidth
*
* @return builder
*
*/
public Builder internetChargeType(@Nullable Output internetChargeType) {
$.internetChargeType = internetChargeType;
return this;
}
/**
* @param internetChargeType Instance bandwidth billing method. If the billing method can be selected for the first purchase, the subsequent value of this field will be processed by default according to the billing method selected for the first time. Optional values:
* - BandwidthByDay: Daily peak bandwidth
* - 95bandwidthbymonth: 95 peak bandwidth
*
* @return builder
*
*/
public Builder internetChargeType(String internetChargeType) {
return internetChargeType(Output.of(internetChargeType));
}
/**
* @param internetMaxBandwidthOut Maximum public network bandwidth. The field type is Long, and the precision may be lost during serialization/deserialization. Please note that the value must not be greater than 9007199254740991
*
* @return builder
*
*/
public Builder internetMaxBandwidthOut(@Nullable Output internetMaxBandwidthOut) {
$.internetMaxBandwidthOut = internetMaxBandwidthOut;
return this;
}
/**
* @param internetMaxBandwidthOut Maximum public network bandwidth. The field type is Long, and the precision may be lost during serialization/deserialization. Please note that the value must not be greater than 9007199254740991
*
* @return builder
*
*/
public Builder internetMaxBandwidthOut(Integer internetMaxBandwidthOut) {
return internetMaxBandwidthOut(Output.of(internetMaxBandwidthOut));
}
/**
* @param ipType The IP type. Value:
* - ipv4 (default):IPv4
* - ipv6:IPv6
* - ipv4Andipv6:IPv4 and IPv6
*
* @return builder
*
*/
public Builder ipType(@Nullable Output ipType) {
$.ipType = ipType;
return this;
}
/**
* @param ipType The IP type. Value:
* - ipv4 (default):IPv4
* - ipv6:IPv6
* - ipv4Andipv6:IPv4 and IPv6
*
* @return builder
*
*/
public Builder ipType(String ipType) {
return ipType(Output.of(ipType));
}
/**
* @param keyPairName The key pair name.
*
* > **NOTE:** At least one of `Password`, `KeyPairName`, and **PasswordInherit.
*
* @return builder
*
*/
public Builder keyPairName(@Nullable Output keyPairName) {
$.keyPairName = keyPairName;
return this;
}
/**
* @param keyPairName The key pair name.
*
* > **NOTE:** At least one of `Password`, `KeyPairName`, and **PasswordInherit.
*
* @return builder
*
*/
public Builder keyPairName(String keyPairName) {
return keyPairName(Output.of(keyPairName));
}
/**
* @param netDistrictCode The area code. Example value: 350000. Required for regional-level scheduling, invalid for node-level scheduling
*
* @return builder
*
*/
public Builder netDistrictCode(@Nullable Output netDistrictCode) {
$.netDistrictCode = netDistrictCode;
return this;
}
/**
* @param netDistrictCode The area code. Example value: 350000. Required for regional-level scheduling, invalid for node-level scheduling
*
* @return builder
*
*/
public Builder netDistrictCode(String netDistrictCode) {
return netDistrictCode(Output.of(netDistrictCode));
}
/**
* @param netWorkId The network ID of the instance. Can only be used in node-level scheduling
*
* @return builder
*
*/
public Builder netWorkId(@Nullable Output netWorkId) {
$.netWorkId = netWorkId;
return this;
}
/**
* @param netWorkId The network ID of the instance. Can only be used in node-level scheduling
*
* @return builder
*
*/
public Builder netWorkId(String netWorkId) {
return netWorkId(Output.of(netWorkId));
}
/**
* @param password The instance password. At least one of Password, KeyPairName, and PasswordInherit
*
* @return builder
*
*/
public Builder password(@Nullable Output password) {
$.password = password;
return this;
}
/**
* @param password The instance password. At least one of Password, KeyPairName, and PasswordInherit
*
* @return builder
*
*/
public Builder password(String password) {
return password(Output.of(password));
}
/**
* @param passwordInherit Whether to use image preset password prompt: Password and KeyPairNamePasswordInherit must be passed
*
* @return builder
*
*/
public Builder passwordInherit(@Nullable Output passwordInherit) {
$.passwordInherit = passwordInherit;
return this;
}
/**
* @param passwordInherit Whether to use image preset password prompt: Password and KeyPairNamePasswordInherit must be passed
*
* @return builder
*
*/
public Builder passwordInherit(Boolean passwordInherit) {
return passwordInherit(Output.of(passwordInherit));
}
/**
* @param paymentType Instance payment method. Since v1.230.0, you can modify payment_type. Optional values:
* - Subscription: prepaid, annual and monthly
* - PayAsYouGo: Pay by volume
*
* @return builder
*
*/
public Builder paymentType(Output paymentType) {
$.paymentType = paymentType;
return this;
}
/**
* @param paymentType Instance payment method. Since v1.230.0, you can modify payment_type. Optional values:
* - Subscription: prepaid, annual and monthly
* - PayAsYouGo: Pay by volume
*
* @return builder
*
*/
public Builder paymentType(String paymentType) {
return paymentType(Output.of(paymentType));
}
/**
* @param period The duration of the resource purchase. Value method:
* - If PeriodUnit is set to Day, Period can only be set to 3.
* - If PeriodUnit is set to Month, Period can be set to 1-9,12.
*
* @return builder
*
*/
public Builder period(@Nullable Output period) {
$.period = period;
return this;
}
/**
* @param period The duration of the resource purchase. Value method:
* - If PeriodUnit is set to Day, Period can only be set to 3.
* - If PeriodUnit is set to Month, Period can be set to 1-9,12.
*
* @return builder
*
*/
public Builder period(Integer period) {
return period(Output.of(period));
}
/**
* @param periodUnit The unit of time for purchasing resources. Value:
* - Month (default): purchase by Month
* - Day: buy by Day
*
* @return builder
*
*/
public Builder periodUnit(@Nullable Output periodUnit) {
$.periodUnit = periodUnit;
return this;
}
/**
* @param periodUnit The unit of time for purchasing resources. Value:
* - Month (default): purchase by Month
* - Day: buy by Day
*
* @return builder
*
*/
public Builder periodUnit(String periodUnit) {
return periodUnit(Output.of(periodUnit));
}
/**
* @param privateIpAddress The private IP address. Can only be used for node-level scheduling. If a private IP address is specified, the number of instances can only be one, and both the private IP address and the vSwitch ID are not empty, the private IP address takes effect.
*
* @return builder
*
*/
public Builder privateIpAddress(@Nullable Output privateIpAddress) {
$.privateIpAddress = privateIpAddress;
return this;
}
/**
* @param privateIpAddress The private IP address. Can only be used for node-level scheduling. If a private IP address is specified, the number of instances can only be one, and both the private IP address and the vSwitch ID are not empty, the private IP address takes effect.
*
* @return builder
*
*/
public Builder privateIpAddress(String privateIpAddress) {
return privateIpAddress(Output.of(privateIpAddress));
}
/**
* @param publicIpIdentification Whether to assign a public IP identifier. Value:
* - true (default): Assign
* - false: do not assign
*
* @return builder
*
*/
public Builder publicIpIdentification(@Nullable Output publicIpIdentification) {
$.publicIpIdentification = publicIpIdentification;
return this;
}
/**
* @param publicIpIdentification Whether to assign a public IP identifier. Value:
* - true (default): Assign
* - false: do not assign
*
* @return builder
*
*/
public Builder publicIpIdentification(Boolean publicIpIdentification) {
return publicIpIdentification(Output.of(publicIpIdentification));
}
/**
* @param scheduleAreaLevel Scheduling level, through which node-level scheduling or area scheduling is performed. Optional values:
* - Node-level scheduling: Region
* - Regional scheduling: Big (region),Middle (province),Small (city)
*
* @return builder
*
*/
public Builder scheduleAreaLevel(Output scheduleAreaLevel) {
$.scheduleAreaLevel = scheduleAreaLevel;
return this;
}
/**
* @param scheduleAreaLevel Scheduling level, through which node-level scheduling or area scheduling is performed. Optional values:
* - Node-level scheduling: Region
* - Regional scheduling: Big (region),Middle (province),Small (city)
*
* @return builder
*
*/
public Builder scheduleAreaLevel(String scheduleAreaLevel) {
return scheduleAreaLevel(Output.of(scheduleAreaLevel));
}
/**
* @param schedulingPriceStrategy Scheduling price policy. If it is not filled in, the default priority is low price. Value:
* - PriceLowPriority
* - PriceLowPriority (priority low price)
*
* @return builder
*
*/
public Builder schedulingPriceStrategy(@Nullable Output schedulingPriceStrategy) {
$.schedulingPriceStrategy = schedulingPriceStrategy;
return this;
}
/**
* @param schedulingPriceStrategy Scheduling price policy. If it is not filled in, the default priority is low price. Value:
* - PriceLowPriority
* - PriceLowPriority (priority low price)
*
* @return builder
*
*/
public Builder schedulingPriceStrategy(String schedulingPriceStrategy) {
return schedulingPriceStrategy(Output.of(schedulingPriceStrategy));
}
/**
* @param schedulingStrategy Scheduling policy. Optional values:
* - Concentrate for node-level scheduling
* - For regional scheduling, Concentrate, Disperse
*
* @return builder
*
*/
public Builder schedulingStrategy(@Nullable Output schedulingStrategy) {
$.schedulingStrategy = schedulingStrategy;
return this;
}
/**
* @param schedulingStrategy Scheduling policy. Optional values:
* - Concentrate for node-level scheduling
* - For regional scheduling, Concentrate, Disperse
*
* @return builder
*
*/
public Builder schedulingStrategy(String schedulingStrategy) {
return schedulingStrategy(Output.of(schedulingStrategy));
}
/**
* @param securityId ID of the security group to which the instance belongs.
*
* @return builder
*
*/
public Builder securityId(@Nullable Output securityId) {
$.securityId = securityId;
return this;
}
/**
* @param securityId ID of the security group to which the instance belongs.
*
* @return builder
*
*/
public Builder securityId(String securityId) {
return securityId(Output.of(securityId));
}
/**
* @param spotStrategy The bidding strategy for pay-as-you-go instances. It takes effect when the value of the 'InstanceChargeType' parameter is set to 'PostPaid. Value range:
* - NoSpot: normal pay-as-you-go instance (default)
* - SpotAsPriceGo: The system automatically bids, following the actual price in the current market.
*
* @return builder
*
*/
public Builder spotStrategy(@Nullable Output spotStrategy) {
$.spotStrategy = spotStrategy;
return this;
}
/**
* @param spotStrategy The bidding strategy for pay-as-you-go instances. It takes effect when the value of the 'InstanceChargeType' parameter is set to 'PostPaid. Value range:
* - NoSpot: normal pay-as-you-go instance (default)
* - SpotAsPriceGo: The system automatically bids, following the actual price in the current market.
*
* @return builder
*
*/
public Builder spotStrategy(String spotStrategy) {
return spotStrategy(Output.of(spotStrategy));
}
/**
* @param status Status of the instance
*
* @return builder
*
*/
public Builder status(@Nullable Output status) {
$.status = status;
return this;
}
/**
* @param status Status of the instance
*
* @return builder
*
*/
public Builder status(String status) {
return status(Output.of(status));
}
/**
* @param systemDisk System Disk Specification. SystemDisk is a non-required parameter when InstanceType is x86_pm,x86_bmi,x86_bm,pc_bmi, or arm_bmi. SystemDisk is a required parameter when instanceType is other specification families. See `system_disk` below.
*
* @return builder
*
*/
public Builder systemDisk(@Nullable Output systemDisk) {
$.systemDisk = systemDisk;
return this;
}
/**
* @param systemDisk System Disk Specification. SystemDisk is a non-required parameter when InstanceType is x86_pm,x86_bmi,x86_bm,pc_bmi, or arm_bmi. SystemDisk is a required parameter when instanceType is other specification families. See `system_disk` below.
*
* @return builder
*
*/
public Builder systemDisk(InstanceSystemDiskArgs systemDisk) {
return systemDisk(Output.of(systemDisk));
}
/**
* @param tags The tag bound to the instance
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags The tag bound to the instance
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param uniqueSuffix Indicates whether to add an ordered suffix to HostName and InstanceName. The ordered suffix starts from 001 and cannot exceed 999.
*
* @return builder
*
*/
public Builder uniqueSuffix(@Nullable Output uniqueSuffix) {
$.uniqueSuffix = uniqueSuffix;
return this;
}
/**
* @param uniqueSuffix Indicates whether to add an ordered suffix to HostName and InstanceName. The ordered suffix starts from 001 and cannot exceed 999.
*
* @return builder
*
*/
public Builder uniqueSuffix(Boolean uniqueSuffix) {
return uniqueSuffix(Output.of(uniqueSuffix));
}
/**
* @param userData User-defined data, maximum support 16KB. You can pass in the UserData information. The UserData is encoded in Base64 format.
*
* @return builder
*
*/
public Builder userData(@Nullable Output userData) {
$.userData = userData;
return this;
}
/**
* @param userData User-defined data, maximum support 16KB. You can pass in the UserData information. The UserData is encoded in Base64 format.
*
* @return builder
*
*/
public Builder userData(String userData) {
return userData(Output.of(userData));
}
/**
* @param vswitchId The ID of the vSwitch to which the instance belongs. Can only be used in node-level scheduling
*
* @return builder
*
*/
public Builder vswitchId(@Nullable Output vswitchId) {
$.vswitchId = vswitchId;
return this;
}
/**
* @param vswitchId The ID of the vSwitch to which the instance belongs. Can only be used in node-level scheduling
*
* @return builder
*
*/
public Builder vswitchId(String vswitchId) {
return vswitchId(Output.of(vswitchId));
}
public InstanceArgs build() {
if ($.instanceType == null) {
throw new MissingRequiredPropertyException("InstanceArgs", "instanceType");
}
if ($.paymentType == null) {
throw new MissingRequiredPropertyException("InstanceArgs", "paymentType");
}
if ($.scheduleAreaLevel == null) {
throw new MissingRequiredPropertyException("InstanceArgs", "scheduleAreaLevel");
}
return $;
}
}
}