Class ManagedInstance
Provides a Spotinst AWS ManagedInstance resource.
Network Interface - (Optional) List of network interfaces in an EC2 instance.
device_index- (Optional) The position of the network interface in the attachment order. A primary network interface has a device index of 0. If you specify a network interface when launching an instance, you must specify the device index.associate_public_ip_address- (Optional) Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.associate_ipv6_address- (Optional) Indicates whether to assign an IPv6 address. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. Default: false
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="scheduled-task"></a>
Scheduled Tasks
Each scheduled_task supports the following:
is_enabled- (Optional) Describes whether the task is enabled. When true the task should run when false it should not run.frequency- (Optional) Set frequency for the task. Valid values: "hourly", "daily", "weekly", "continuous".start_time- (Optional) DATETIME in ISO-8601 format. Sets a start time for scheduled actions. If "frequency" or "cronExpression" are not used - the task will run only once at the start time and will then be deleted from the instance configuration. Example: 2019-05-23T10:55:09Zcron_expression- (Optional) A valid cron expression. For example : " * * * * * ". The cron is running in UTC time zone and is in Unix cron format Cron Expression Validator Script. Only one of ‘frequency’ or ‘cronExpression’ should be used at a time. Example: 0 1 * * *task_type- (Required) The task type to run. Valid Values: "pause", "resume", "recycle".
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="load-balancers"></a>
Load Balancers
loadBalancersConfig- (Optional) LB integration object.load_balancers- (Optional) List of load balancers configs. *name- The AWS resource name. Required for Classic Load Balancer. Optional for Application Load Balancer. *arn- The AWS resource ARN (Required only for ALB target groups). *balancer_id- The Multai load balancer ID. Default: lb-123456 *target_set_id- The Multai load target set ID. Default: ts-123456 *auto_weight- “Auto Weight” will automatically provide a higher weight for instances that are larger as appropriate. For example, if you have configured your Elastigroup with m4.large and m4.xlarge instances the m4.large will have half the weight of an m4.xlarge. This ensures that larger instances receive a higher number of MLB requests. *zone_awareness- “AZ Awareness” will ensure that instances within the same AZ are using the corresponding MLB runtime instance in the same AZ. This feature reduces multi-zone data transfer fees. *type- The resource type. Valid Values: CLASSIC, TARGET_GROUP, MULTAI_TARGET_SET.
Usage:
load_balancers {
arn = "arn"
type = "CLASSIC"
balancer_id = "lb-123"
target_set_id = "ts-123"
auto_weight = "true"
az_awareness = "true"
}
<a id="route53"></a>
Inherited Members
Namespace: Pulumi.SpotInst.Aws
Assembly: Pulumi.SpotInst.dll
Syntax
public class ManagedInstance : CustomResource
Constructors
View SourceManagedInstance(String, ManagedInstanceArgs, CustomResourceOptions)
Create a ManagedInstance resource with the given unique name, arguments, and options.
Declaration
public ManagedInstance(string name, ManagedInstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ManagedInstanceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAutoHealing
Enable the auto healing which auto replaces the instance in case the health check fails, default: “true”.
Declaration
public Output<bool?> AutoHealing { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
BlockDevicesMode
Determine the way we attach the data volumes to the data devices. Valid values: "reattach", "onLaunch".
Default: "onLaunch".
Declaration
public Output<string> BlockDevicesMode { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CpuCredits
cpuCredits can have one of two values: “unlimited”, “standard”. Default: unlimited
Declaration
public Output<string> CpuCredits { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The ManagedInstance description.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DrainingTimeout
The time in seconds to allow the instance be drained from incoming TCP connections and detached from ELB before terminating it, during a scale down operation.
Declaration
public Output<int?> DrainingTimeout { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
EbsOptimized
Enable EBS optimization for supported instance which is not enabled by default. Note - additional charges will be applied. Default: false
Declaration
public Output<bool> EbsOptimized { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
ElasticIp
Elastic IP Allocation Id to associate to the instance.
Declaration
public Output<string> ElasticIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableMonitoring
Describes whether instance Enhanced Monitoring is enabled. Default: false
Declaration
public Output<bool?> EnableMonitoring { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
FallBackToOd
Declaration
public Output<bool?> FallBackToOd { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
GracePeriod
The amount of time, in seconds, after the instance has launched to starts and check its health, default “120".
Declaration
public Output<int?> GracePeriod { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
HealthCheckType
The service to use for the health check. Valid values: “EC2”, “ELB”, “TARGET_GROUP”, “MULTAI_TARGET_SET”.
Default: “EC2”.
Declaration
public Output<string> HealthCheckType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IamInstanceProfile
Set IAM profile to instance. Set only one of ARN or Name.
Declaration
public Output<string> IamInstanceProfile { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ImageId
The ID of the image used to launch the instance.
Declaration
public Output<string> ImageId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceTypes
Comma separated list of available instance types for instance.
Declaration
public Output<ImmutableArray<string>> InstanceTypes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
IntegrationRoute53
Declaration
public Output<ManagedInstanceIntegrationRoute53> IntegrationRoute53 { get; }
Property Value
| Type | Description |
|---|---|
| Output<ManagedInstanceIntegrationRoute53> |
KeyPair
Specify a Key Pair to attach to the instances.
Declaration
public Output<string> KeyPair { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LifeCycle
Set lifecycle, valid values: “spot”, “on_demand”.
Default "spot".
Declaration
public Output<string> LifeCycle { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LoadBalancers
Declaration
public Output<ImmutableArray<ManagedInstanceLoadBalancer>> LoadBalancers { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ManagedInstanceLoadBalancer>> |
Name
The ManagedInstance name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NetworkInterfaces
Declaration
public Output<ImmutableArray<ManagedInstanceNetworkInterface>> NetworkInterfaces { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ManagedInstanceNetworkInterface>> |
OptimizationWindows
When performAt is 'timeWindow': must specify a list of 'timeWindows' with at least one time window Each string is in the format of - ddd:hh:mm-ddd:hh:mm ddd = day of week = Sun | Mon | Tue | Wed | Thu | Fri | Sat hh = hour 24 = 0 -23 mm = minute = 0 - 59.
Declaration
public Output<ImmutableArray<string>> OptimizationWindows { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Orientation
Select a prediction strategy. Valid values: "balanced", "costOriented", "availabilityOriented", "cheapest".
Default: "availabilityOriented".
Declaration
public Output<string> Orientation { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PersistBlockDevices
Should the instance maintain its Data volumes.
Declaration
public Output<bool> PersistBlockDevices { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
PersistPrivateIp
Should the instance maintain its private IP.
Declaration
public Output<bool?> PersistPrivateIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
PersistRootDevice
Should the instance maintain its root device volumes.
Declaration
public Output<bool?> PersistRootDevice { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
PlacementTenancy
Valid values: "default", "dedicated" Default: default
Declaration
public Output<string> PlacementTenancy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PreferredType
Preferred instance types for the instance. We will automatically select optional similar instance types to ensure optimized cost efficiency
Declaration
public Output<string> PreferredType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrivateIp
Private IP Allocation Id to associate to the instance.
Declaration
public Output<string> PrivateIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Product
Operation system type. Valid values: "Linux/UNIX", "SUSE Linux", "Windows", "Red Hat Enterprise Linux", "Linux/UNIX (Amazon VPC)", "SUSE Linux (Amazon VPC)", "Windows (Amazon VPC)", "Red Hat Enterprise Linux (Amazon VPC)".
Declaration
public Output<string> Product { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
The AWS region your group will be created in.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RevertToSpot
Declaration
public Output<ManagedInstanceRevertToSpot> RevertToSpot { get; }
Property Value
| Type | Description |
|---|---|
| Output<ManagedInstanceRevertToSpot> |
ScheduledTasks
Declaration
public Output<ImmutableArray<ManagedInstanceScheduledTask>> ScheduledTasks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ManagedInstanceScheduledTask>> |
SecurityGroupIds
One or more security group IDs.
Declaration
public Output<ImmutableArray<string>> SecurityGroupIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ShutdownScript
The Base64-encoded shutdown script to execute prior to instance termination.
Declaration
public Output<string> ShutdownScript { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SubnetIds
A comma-separated list of subnet identifiers for your instance.
Declaration
public Output<ImmutableArray<string>> SubnetIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Tags
Set tags for the instance. Items should be unique.
Declaration
public Output<ImmutableArray<ManagedInstanceTag>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ManagedInstanceTag>> |
UnhealthyDuration
The amount of time, in seconds, an existing instance should remain active after becoming unhealthy. After the set time out the instance will be replaced, default “120".
Declaration
public Output<int?> UnhealthyDuration { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
UserData
The Base64-encoded MIME user data to make available to the instances.
Declaration
public Output<string> UserData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UtilizeReservedInstances
In case of any available Reserved Instances, Managed Instance will utilize them before purchasing Spot instances.
Default: "false".
Declaration
public Output<bool?> UtilizeReservedInstances { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
VpcId
Declaration
public Output<string> VpcId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ManagedInstanceState, CustomResourceOptions)
Get an existing ManagedInstance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ManagedInstance Get(string name, Input<string> id, ManagedInstanceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ManagedInstanceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ManagedInstance |