InstanceState class
Input properties used for looking up and filtering Instance resources.
Constructors
-
InstanceState({Input<
String?> ? ami, Input<String?> ? arn, Input<bool?> ? associatePublicIpAddress, Input<String?> ? availabilityZone, Input<InstanceCapacityReservationSpecification?> ? capacityReservationSpecification, Input<InstanceCpuOptions?> ? cpuOptions, Input<InstanceCreditSpecification?> ? creditSpecification, Input<bool?> ? disableApiStop, Input<bool?> ? disableApiTermination, Input<List< ? ebsBlockDevices, Input<InstanceEbsBlockDevice> ?>bool?> ? ebsOptimized, Input<bool?> ? enablePrimaryIpv6, Input<InstanceEnclaveOptions?> ? enclaveOptions, Input<List< ? ephemeralBlockDevices, Input<InstanceEphemeralBlockDevice> ?>bool?> ? forceDestroy, Input<bool?> ? getPasswordData, Input<bool?> ? hibernation, Input<String?> ? hostId, Input<String?> ? hostResourceGroupArn, Input? iamInstanceProfile, Input<String?> ? instanceInitiatedShutdownBehavior, Input<String?> ? instanceLifecycle, Input<InstanceInstanceMarketOptions?> ? instanceMarketOptions, Input<String?> ? instanceState, Input? instanceType, Input<int?> ? ipv6AddressCount, Input<List< ? ipv6Addresses, Input<String> ?>String?> ? keyName, Input<InstanceLaunchTemplate?> ? launchTemplate, Input<InstanceMaintenanceOptions?> ? maintenanceOptions, Input<InstanceMetadataOptions?> ? metadataOptions, Input<bool?> ? monitoring, Input<List< ? networkInterfaces, Input<InstanceNetworkInterface> ?>String?> ? outpostArn, Input<String?> ? passwordData, Input<String?> ? placementGroup, Input<String?> ? placementGroupId, Input<int?> ? placementPartitionNumber, Input<InstancePrimaryNetworkInterface?> ? primaryNetworkInterface, Input<String?> ? primaryNetworkInterfaceId, Input<String?> ? privateDns, Input<InstancePrivateDnsNameOptions?> ? privateDnsNameOptions, Input<String?> ? privateIp, Input<String?> ? publicDns, Input<String?> ? publicIp, Input<String?> ? region, Input<InstanceRootBlockDevice?> ? rootBlockDevice, Input<List< ? secondaryNetworkInterfaces, Input<InstanceSecondaryNetworkInterface> ?>List< ? secondaryPrivateIps, Input<String> ?>List< ? securityGroups, Input<String> ?>bool?> ? sourceDestCheck, Input<String?> ? spotInstanceRequestId, Input<String?> ? subnetId, Input<Map< ? tags, Input<String, String> ?>Map< ? tagsAll, Input? tenancy, Input<String, String> ?>String?> ? userData, Input<String?> ? userDataBase64, Input<bool?> ? userDataReplaceOnChange, Input<Map< ? volumeTags, Input<String, String> ?>List< ? vpcSecurityGroupIds})String> ?> -
Creates a new InstanceState.
amiAMI to use for the instance. Required unlesslaunchTemplateis specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, settingamiwill override the AMI specified in the Launch Template.arnARN of the instance.associatePublicIpAddressWhether to associate a public IP address with an instance in a VPC.availabilityZoneAZ to start the instance in.capacityReservationSpecificationDescribes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.cpuOptionsThe CPU options for the instance. See CPU Options below for more details.creditSpecificationConfiguration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.disableApiStopIf true, enables EC2 Instance Stop Protection.disableApiTerminationIf true, enables EC2 Instance Termination Protection.ebsBlockDevicesOne or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.ebsOptimizedIf true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.enablePrimaryIpv6Whether to assign a primary IPv6 Global Unicast Address (GUA) to the instance when launched in a dual-stack or IPv6-only subnet. A primary IPv6 address ensures a consistent IPv6 address for the instance and is automatically assigned by AWS to the ENI. Once enabled, the first IPv6 GUA becomes the primary IPv6 address and cannot be disabled. The primary IPv6 address remains until the instance is terminated or the ENI is detached. DisablingenablePrimaryIpv6after it has been enabled forces recreation of the instance.enclaveOptionsEnable Nitro Enclaves on launched instances. See Enclave Options below for more details.ephemeralBlockDevicesOne or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.forceDestroyDestroys instance even ifdisableApiTerminationordisableApiStopis set totrue. Defaults tofalse. Once this parameter is set totrue, a successfulpulumi uprun before a destroy is required to update this value in the resource state. Without a successfulpulumi upafter this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the instance or destroying the instance, this flag will not work. Additionally when importing an instance, a successfulpulumi upis required to set this value in state before it will take effect on a destroy operation.getPasswordDataIf true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to thepasswordDataattribute. See GetPasswordData for more information.hibernationIf true, the launched EC2 instance will support hibernation.hostIdID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.hostResourceGroupArnARN of the host resource group in which to launch the instances. If you specify an ARN, omit thetenancyparameter or set it tohost.iamInstanceProfileIAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notablyiam:PassRole.instanceInitiatedShutdownBehaviorShutdown behavior for the instance. Amazon defaults this tostopfor EBS-backed instances andterminatefor instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.instanceLifecycleIndicates whether this is a Spot Instance or a Scheduled Instance.instanceMarketOptionsDescribes the market (purchasing) option for the instances. See Market Options below for details on attributes.instanceStateState of the instance. One of:pending,running,shutting-down,terminated,stopping,stopped. See Instance Lifecycle for more information.instanceTypeInstance type to use for the instance. Required unlesslaunchTemplateis specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, settinginstanceTypewill override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.ipv6AddressCountNumber of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.ipv6AddressesSpecify one or more IPv6 addresses from the range of the subnet to associate with the primary network interfacekeyNameKey name of the Key Pair to use for the instance; which can be managed using theaws.ec2.KeyPairresource.launchTemplateSpecifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.maintenanceOptionsMaintenance and recovery options for the instance. See Maintenance Options below for more details.metadataOptionsCustomize the metadata options of the instance. See Metadata Options below for more details.monitoringIf true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)networkInterfacesCustomize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.outpostArnARN of the Outpost the instance is assigned to.passwordDataBase-64 encoded encrypted password data for the instance. Useful for getting the administrator password for instances running Microsoft Windows. This attribute is only exported ifgetPasswordDatais true. Note that this encrypted value will be stored in the state file, as with all exported attributes. See GetPasswordData for more information.placementGroupPlacement Group to start the instance in. Conflicts withplacementGroupId.placementGroupIdPlacement Group ID to start the instance in. Conflicts withplacementGroup.placementPartitionNumberNumber of the partition the instance is in. Valid only if theaws.ec2.PlacementGroupresource'sstrategyargument is set to"partition".primaryNetworkInterfaceThe primary network interface. See Primary Network Interface below.primaryNetworkInterfaceIdID of the instance's primary network interface.privateDnsPrivate DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.privateDnsNameOptionsOptions for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.privateIpPrivate IP address to associate with the instance in a VPC.publicDnsPublic DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.publicIpPublic IP address assigned to the instance, if applicable. NOTE: If you are using anaws.ec2.Eipwith your instance, you should refer to the EIP's address directly and not usepublicIpas this field will change after the EIP is attached.regionRegion where this resource will be managed. Defaults to the Region set in the provider configuration.rootBlockDeviceConfiguration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.secondaryNetworkInterfacesOne or more secondary network interfaces to attach to the instance at launch time. See Secondary Network Interface below for more details.secondaryPrivateIpsList of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in anetworkInterfaceblock. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.securityGroupsList of security group names to associate with.sourceDestCheckControls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.spotInstanceRequestIdIf the request is a Spot Instance request, the ID of the request.subnetIdVPC Subnet ID to launch in.tagsMap of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a providerdefaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.tagsAllMap of tags assigned to the resource, including those inherited from the providerdefaultTagsconfiguration block.tenancyTenancy of the instance (if the instance is running in a VPC). An instance with a tenancy ofdedicatedruns on single-tenant hardware. Thehosttenancy is not supported for the import-instance command. Valid values aredefault,dedicated, andhost.userDataUser data to provide when launching the instance. Do not pass gzip-compressed data via this argument; seeuserDataBase64instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If theuserDataReplaceOnChangeis set then updates to this field will trigger a destroy and recreate of the EC2 instance.userDataBase64Can be used instead ofuserDatato pass base64-encoded binary data directly. Use this instead ofuserDatawhenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If theuserDataReplaceOnChangeis set then updates to this field will trigger a destroy and recreate of the EC2 instance.userDataReplaceOnChangeWhen used in combination withuserDataoruserDataBase64will trigger a destroy and recreate of the EC2 instance when set totrue. Defaults tofalseif not set.volumeTagsMap of tags to assign, at instance-creation time, to root and EBS volumes.vpcSecurityGroupIdsList of security group IDs to associate with.const -
InstanceState.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
ami
→ Input<
String?> ? -
AMI to use for the instance. Required unless
launchTemplateis specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, settingamiwill override the AMI specified in the Launch Template.final -
arn
→ Input<
String?> ? -
ARN of the instance.
final
-
associatePublicIpAddress
→ Input<
bool?> ? -
Whether to associate a public IP address with an instance in a VPC.
final
-
availabilityZone
→ Input<
String?> ? -
AZ to start the instance in.
final
-
capacityReservationSpecification
→ Input<
InstanceCapacityReservationSpecification?> ? -
Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
final
-
cpuOptions
→ Input<
InstanceCpuOptions?> ? -
The CPU options for the instance. See CPU Options below for more details.
final
-
creditSpecification
→ Input<
InstanceCreditSpecification?> ? -
Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
final
-
disableApiStop
→ Input<
bool?> ? -
If true, enables EC2 Instance Stop Protection.
final
-
disableApiTermination
→ Input<
bool?> ? -
If true, enables EC2 Instance Termination Protection.
final
-
ebsBlockDevices
→ Input<
List< ?InstanceEbsBlockDevice> ?> -
One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
final
-
ebsOptimized
→ Input<
bool?> ? -
If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
final
-
enablePrimaryIpv6
→ Input<
bool?> ? -
Whether to assign a primary IPv6 Global Unicast Address (GUA) to the instance when launched in a dual-stack or IPv6-only subnet. A primary IPv6 address ensures a consistent IPv6 address for the instance and is automatically assigned by AWS to the ENI. Once enabled, the first IPv6 GUA becomes the primary IPv6 address and cannot be disabled. The primary IPv6 address remains until the instance is terminated or the ENI is detached. Disabling
enablePrimaryIpv6after it has been enabled forces recreation of the instance.final -
enclaveOptions
→ Input<
InstanceEnclaveOptions?> ? -
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
final
-
ephemeralBlockDevices
→ Input<
List< ?InstanceEphemeralBlockDevice> ?> -
One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
final
-
forceDestroy
→ Input<
bool?> ? -
Destroys instance even if
disableApiTerminationordisableApiStopis set totrue. Defaults tofalse. Once this parameter is set totrue, a successfulpulumi uprun before a destroy is required to update this value in the resource state. Without a successfulpulumi upafter this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the instance or destroying the instance, this flag will not work. Additionally when importing an instance, a successfulpulumi upis required to set this value in state before it will take effect on a destroy operation.final -
getPasswordData
→ Input<
bool?> ? -
If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the
passwordDataattribute. See GetPasswordData for more information.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
hibernation
→ Input<
bool?> ? -
If true, the launched EC2 instance will support hibernation.
final
-
hostId
→ Input<
String?> ? -
ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
final
-
hostResourceGroupArn
→ Input<
String?> ? -
ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancyparameter or set it tohost.final - iamInstanceProfile → Input?
-
IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably
iam:PassRole.final -
instanceInitiatedShutdownBehavior
→ Input<
String?> ? -
Shutdown behavior for the instance. Amazon defaults this to
stopfor EBS-backed instances andterminatefor instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.final -
instanceLifecycle
→ Input<
String?> ? -
Indicates whether this is a Spot Instance or a Scheduled Instance.
final
-
instanceMarketOptions
→ Input<
InstanceInstanceMarketOptions?> ? -
Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
final
-
instanceState
→ Input<
String?> ? -
State of the instance. One of:
pending,running,shutting-down,terminated,stopping,stopped. See Instance Lifecycle for more information.final - instanceType → Input?
-
Instance type to use for the instance. Required unless
launchTemplateis specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, settinginstanceTypewill override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.final -
ipv6AddressCount
→ Input<
int?> ? -
Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
final
-
ipv6Addresses
→ Input<
List< ?String> ?> -
Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
final
-
keyName
→ Input<
String?> ? -
Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPairresource.final -
launchTemplate
→ Input<
InstanceLaunchTemplate?> ? -
Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
final
-
maintenanceOptions
→ Input<
InstanceMaintenanceOptions?> ? -
Maintenance and recovery options for the instance. See Maintenance Options below for more details.
final
-
metadataOptions
→ Input<
InstanceMetadataOptions?> ? -
Customize the metadata options of the instance. See Metadata Options below for more details.
final
-
monitoring
→ Input<
bool?> ? -
If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
final
-
networkInterfaces
→ Input<
List< ?InstanceNetworkInterface> ?> -
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
final
-
outpostArn
→ Input<
String?> ? -
ARN of the Outpost the instance is assigned to.
final
-
passwordData
→ Input<
String?> ? -
Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password for instances running Microsoft Windows. This attribute is only exported if
getPasswordDatais true. Note that this encrypted value will be stored in the state file, as with all exported attributes. See GetPasswordData for more information.final -
placementGroup
→ Input<
String?> ? -
Placement Group to start the instance in. Conflicts with
placementGroupId.final -
placementGroupId
→ Input<
String?> ? -
Placement Group ID to start the instance in. Conflicts with
placementGroup.final -
placementPartitionNumber
→ Input<
int?> ? -
Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroupresource'sstrategyargument is set to"partition".final -
primaryNetworkInterface
→ Input<
InstancePrimaryNetworkInterface?> ? -
The primary network interface. See Primary Network Interface below.
final
-
primaryNetworkInterfaceId
→ Input<
String?> ? -
ID of the instance's primary network interface.
final
-
privateDns
→ Input<
String?> ? -
Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
final
-
privateDnsNameOptions
→ Input<
InstancePrivateDnsNameOptions?> ? -
Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
final
-
privateIp
→ Input<
String?> ? -
Private IP address to associate with the instance in a VPC.
final
-
publicDns
→ Input<
String?> ? -
Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
final
-
publicIp
→ Input<
String?> ? -
Public IP address assigned to the instance, if applicable. NOTE: If you are using an
aws.ec2.Eipwith your instance, you should refer to the EIP's address directly and not usepublicIpas this field will change after the EIP is attached.final -
region
→ Input<
String?> ? -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
final
-
rootBlockDevice
→ Input<
InstanceRootBlockDevice?> ? -
Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secondaryNetworkInterfaces
→ Input<
List< ?InstanceSecondaryNetworkInterface> ?> -
One or more secondary network interfaces to attach to the instance at launch time. See Secondary Network Interface below for more details.
final
-
secondaryPrivateIps
→ Input<
List< ?String> ?> -
List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a
networkInterfaceblock. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.final -
securityGroups
→ Input<
List< ?String> ?> -
List of security group names to associate with.
final
-
sourceDestCheck
→ Input<
bool?> ? -
Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
final
-
spotInstanceRequestId
→ Input<
String?> ? -
If the request is a Spot Instance request, the ID of the request.
final
-
subnetId
→ Input<
String?> ? -
VPC Subnet ID to launch in.
final
-
Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.final -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.final - tenancy → Input?
-
Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of
dedicatedruns on single-tenant hardware. Thehosttenancy is not supported for the import-instance command. Valid values aredefault,dedicated, andhost.final -
userData
→ Input<
String?> ? -
User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see
userDataBase64instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If theuserDataReplaceOnChangeis set then updates to this field will trigger a destroy and recreate of the EC2 instance.final -
userDataBase64
→ Input<
String?> ? -
Can be used instead of
userDatato pass base64-encoded binary data directly. Use this instead ofuserDatawhenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If theuserDataReplaceOnChangeis set then updates to this field will trigger a destroy and recreate of the EC2 instance.final -
userDataReplaceOnChange
→ Input<
bool?> ? -
When used in combination with
userDataoruserDataBase64will trigger a destroy and recreate of the EC2 instance when set totrue. Defaults tofalseif not set.final -
volumeTags
→ Input<
Map< ?String, String> ?> -
Map of tags to assign, at instance-creation time, to root and EBS volumes.
final
-
vpcSecurityGroupIds
→ Input<
List< ?String> ?> -
List of security group IDs to associate with.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited