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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin
import com.pulumi.awsnative.ec2.InstanceArgs.builder
import com.pulumi.awsnative.ec2.kotlin.enums.InstanceAffinity
import com.pulumi.awsnative.ec2.kotlin.inputs.CpuOptionsPropertiesArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.CpuOptionsPropertiesArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.CreditSpecificationPropertiesArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.CreditSpecificationPropertiesArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.EnclaveOptionsPropertiesArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.EnclaveOptionsPropertiesArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.HibernationOptionsPropertiesArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.HibernationOptionsPropertiesArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceBlockDeviceMappingArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceBlockDeviceMappingArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceElasticGpuSpecificationArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceElasticGpuSpecificationArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceElasticInferenceAcceleratorArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceElasticInferenceAcceleratorArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceIpv6AddressArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceIpv6AddressArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceLaunchTemplateSpecificationArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceLaunchTemplateSpecificationArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceLicenseSpecificationArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceLicenseSpecificationArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceNetworkInterfaceArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceNetworkInterfaceArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstancePrivateDnsNameOptionsArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstancePrivateDnsNameOptionsArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceSsmAssociationArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceSsmAssociationArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceVolumeArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.InstanceVolumeArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Resource Type definition for AWS::EC2::Instance
* @property additionalInfo This property is reserved for internal use. If you use it, the stack fails with this error: Bad property set: [Testing this property] (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 0XXXXXX-49c7-4b40-8bcc-76885dcXXXXX).
* @property affinity Indicates whether the instance is associated with a dedicated host. If you want the instance to always restart on the same host on which it was launched, specify host. If you want the instance to restart on any available host, but try to launch onto the last host it ran on (on a best-effort basis), specify default.
* @property availabilityZone The Availability Zone of the instance.
* @property blockDeviceMappings The block device mapping entries that defines the block devices to attach to the instance at launch.
* @property cpuOptions The CPU options for the instance.
* @property creditSpecification The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited.
* @property disableApiTermination If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.
* @property ebsOptimized Indicates whether the instance is optimized for Amazon EBS I/O.
* @property elasticGpuSpecifications An elastic GPU to associate with the instance.
* @property elasticInferenceAccelerators An elastic inference accelerator to associate with the instance.
* @property enclaveOptions Indicates whether the instance is enabled for AWS Nitro Enclaves.
* @property hibernationOptions Indicates whether an instance is enabled for hibernation.
* @property hostId If you specify host for the Affinity property, the ID of a dedicated host that the instance is associated with. If you don't specify an ID, Amazon EC2 launches the instance onto any available, compatible dedicated host in your account.
* @property hostResourceGroupArn The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.
* @property iamInstanceProfile The IAM instance profile.
* @property imageId The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
* @property instanceInitiatedShutdownBehavior Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
* @property instanceType The instance type.
* @property ipv6AddressCount [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
* @property ipv6Addresses [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
* @property kernelId The ID of the kernel.
* @property keyName The name of the key pair.
* @property launchTemplate The launch template to use to launch the instances.
* @property licenseSpecifications The license configurations.
* @property monitoring Specifies whether detailed monitoring is enabled for the instance.
* @property networkInterfaces The network interfaces to associate with the instance.
* @property placementGroupName The name of an existing placement group that you want to launch the instance into (cluster | partition | spread).
* @property privateDnsNameOptions The options for the instance hostname.
* @property privateIpAddress [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
* @property propagateTagsToVolumeOnCreation Indicates whether to assign the tags from the instance to all of the volumes attached to the instance at launch. If you specify true and you assign tags to the instance, those tags are automatically assigned to all of the volumes that you attach to the instance at launch. If you specify false, those tags are not assigned to the attached volumes.
* @property ramdiskId The ID of the RAM disk to select.
* @property securityGroupIds The IDs of the security groups.
* @property securityGroups the names of the security groups. For a nondefault VPC, you must use security group IDs instead.
* @property sourceDestCheck Specifies whether to enable an instance launched in a VPC to perform NAT.
* @property ssmAssociations The SSM document and parameter values in AWS Systems Manager to associate with this instance.
* @property subnetId [EC2-VPC] The ID of the subnet to launch the instance into.
* @property tags The tags to add to the instance.
* @property tenancy The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware.
* @property userData The user data to make available to the instance.
* @property volumes The volumes to attach to the instance.
*/
public data class InstanceArgs(
public val additionalInfo: Output? = null,
public val affinity: Output? = null,
public val availabilityZone: Output? = null,
public val blockDeviceMappings: Output>? = null,
public val cpuOptions: Output? = null,
public val creditSpecification: Output? = null,
public val disableApiTermination: Output? = null,
public val ebsOptimized: Output? = null,
public val elasticGpuSpecifications: Output>? = null,
public val elasticInferenceAccelerators: Output>? =
null,
public val enclaveOptions: Output? = null,
public val hibernationOptions: Output? = null,
public val hostId: Output? = null,
public val hostResourceGroupArn: Output? = null,
public val iamInstanceProfile: Output? = null,
public val imageId: Output? = null,
public val instanceInitiatedShutdownBehavior: Output? = null,
public val instanceType: Output? = null,
public val ipv6AddressCount: Output? = null,
public val ipv6Addresses: Output>? = null,
public val kernelId: Output? = null,
public val keyName: Output? = null,
public val launchTemplate: Output? = null,
public val licenseSpecifications: Output>? = null,
public val monitoring: Output? = null,
public val networkInterfaces: Output>? = null,
public val placementGroupName: Output? = null,
public val privateDnsNameOptions: Output? = null,
public val privateIpAddress: Output? = null,
public val propagateTagsToVolumeOnCreation: Output? = null,
public val ramdiskId: Output? = null,
public val securityGroupIds: Output>? = null,
public val securityGroups: Output>? = null,
public val sourceDestCheck: Output? = null,
public val ssmAssociations: Output>? = null,
public val subnetId: Output? = null,
public val tags: Output>? = null,
public val tenancy: Output? = null,
public val userData: Output? = null,
public val volumes: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.InstanceArgs =
com.pulumi.awsnative.ec2.InstanceArgs.builder()
.additionalInfo(additionalInfo?.applyValue({ args0 -> args0 }))
.affinity(affinity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
.blockDeviceMappings(
blockDeviceMappings?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.cpuOptions(cpuOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.creditSpecification(
creditSpecification?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.disableApiTermination(disableApiTermination?.applyValue({ args0 -> args0 }))
.ebsOptimized(ebsOptimized?.applyValue({ args0 -> args0 }))
.elasticGpuSpecifications(
elasticGpuSpecifications?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.elasticInferenceAccelerators(
elasticInferenceAccelerators?.applyValue({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.enclaveOptions(enclaveOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.hibernationOptions(
hibernationOptions?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.hostId(hostId?.applyValue({ args0 -> args0 }))
.hostResourceGroupArn(hostResourceGroupArn?.applyValue({ args0 -> args0 }))
.iamInstanceProfile(iamInstanceProfile?.applyValue({ args0 -> args0 }))
.imageId(imageId?.applyValue({ args0 -> args0 }))
.instanceInitiatedShutdownBehavior(
instanceInitiatedShutdownBehavior?.applyValue({ args0 ->
args0
}),
)
.instanceType(instanceType?.applyValue({ args0 -> args0 }))
.ipv6AddressCount(ipv6AddressCount?.applyValue({ args0 -> args0 }))
.ipv6Addresses(
ipv6Addresses?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.kernelId(kernelId?.applyValue({ args0 -> args0 }))
.keyName(keyName?.applyValue({ args0 -> args0 }))
.launchTemplate(launchTemplate?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.licenseSpecifications(
licenseSpecifications?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.monitoring(monitoring?.applyValue({ args0 -> args0 }))
.networkInterfaces(
networkInterfaces?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.placementGroupName(placementGroupName?.applyValue({ args0 -> args0 }))
.privateDnsNameOptions(
privateDnsNameOptions?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.privateIpAddress(privateIpAddress?.applyValue({ args0 -> args0 }))
.propagateTagsToVolumeOnCreation(propagateTagsToVolumeOnCreation?.applyValue({ args0 -> args0 }))
.ramdiskId(ramdiskId?.applyValue({ args0 -> args0 }))
.securityGroupIds(securityGroupIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.securityGroups(securityGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.sourceDestCheck(sourceDestCheck?.applyValue({ args0 -> args0 }))
.ssmAssociations(
ssmAssociations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.subnetId(subnetId?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.tenancy(tenancy?.applyValue({ args0 -> args0 }))
.userData(userData?.applyValue({ args0 -> args0 }))
.volumes(
volumes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [InstanceArgs].
*/
@PulumiTagMarker
public class InstanceArgsBuilder internal constructor() {
private var additionalInfo: Output? = null
private var affinity: Output? = null
private var availabilityZone: Output? = null
private var blockDeviceMappings: Output>? = null
private var cpuOptions: Output? = null
private var creditSpecification: Output? = null
private var disableApiTermination: Output? = null
private var ebsOptimized: Output? = null
private var elasticGpuSpecifications: Output>? = null
private var elasticInferenceAccelerators: Output>? =
null
private var enclaveOptions: Output? = null
private var hibernationOptions: Output? = null
private var hostId: Output? = null
private var hostResourceGroupArn: Output? = null
private var iamInstanceProfile: Output? = null
private var imageId: Output? = null
private var instanceInitiatedShutdownBehavior: Output? = null
private var instanceType: Output? = null
private var ipv6AddressCount: Output? = null
private var ipv6Addresses: Output>? = null
private var kernelId: Output? = null
private var keyName: Output? = null
private var launchTemplate: Output? = null
private var licenseSpecifications: Output>? = null
private var monitoring: Output? = null
private var networkInterfaces: Output>? = null
private var placementGroupName: Output? = null
private var privateDnsNameOptions: Output? = null
private var privateIpAddress: Output? = null
private var propagateTagsToVolumeOnCreation: Output? = null
private var ramdiskId: Output? = null
private var securityGroupIds: Output>? = null
private var securityGroups: Output>? = null
private var sourceDestCheck: Output? = null
private var ssmAssociations: Output>? = null
private var subnetId: Output? = null
private var tags: Output>? = null
private var tenancy: Output? = null
private var userData: Output? = null
private var volumes: Output>? = null
/**
* @param value This property is reserved for internal use. If you use it, the stack fails with this error: Bad property set: [Testing this property] (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 0XXXXXX-49c7-4b40-8bcc-76885dcXXXXX).
*/
@JvmName("veftiskvgporjecn")
public suspend fun additionalInfo(`value`: Output) {
this.additionalInfo = value
}
/**
* @param value Indicates whether the instance is associated with a dedicated host. If you want the instance to always restart on the same host on which it was launched, specify host. If you want the instance to restart on any available host, but try to launch onto the last host it ran on (on a best-effort basis), specify default.
*/
@JvmName("jjhelnjiauvlahvt")
public suspend fun affinity(`value`: Output) {
this.affinity = value
}
/**
* @param value The Availability Zone of the instance.
*/
@JvmName("fdiubirwbifxxwll")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value The block device mapping entries that defines the block devices to attach to the instance at launch.
*/
@JvmName("xkcxehuwnkqsielb")
public suspend fun blockDeviceMappings(`value`: Output>) {
this.blockDeviceMappings = value
}
@JvmName("qolydbhgkusudpdx")
public suspend fun blockDeviceMappings(vararg values: Output) {
this.blockDeviceMappings = Output.all(values.asList())
}
/**
* @param values The block device mapping entries that defines the block devices to attach to the instance at launch.
*/
@JvmName("mmdxfkkqneevdeuo")
public suspend fun blockDeviceMappings(values: List