Show / Hide Table of Contents

Class Fleet

Provides a resource to manage EC2 Fleets.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.Ec2.Fleet("example", new Aws.Ec2.FleetArgs
    {
        LaunchTemplateConfig = new Aws.Ec2.Inputs.FleetLaunchTemplateConfigArgs
        {
            LaunchTemplateSpecification = new Aws.Ec2.Inputs.FleetLaunchTemplateConfigLaunchTemplateSpecificationArgs
            {
                LaunchTemplateId = aws_launch_template.Example.Id,
                Version = aws_launch_template.Example.Latest_version,
            },
        },
        TargetCapacitySpecification = new Aws.Ec2.Inputs.FleetTargetCapacitySpecificationArgs
        {
            DefaultTargetCapacityType = "spot",
            TotalTargetCapacity = 5,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Fleet
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class Fleet : CustomResource

Constructors

View Source

Fleet(String, FleetArgs, CustomResourceOptions)

Create a Fleet resource with the given unique name, arguments, and options.

Declaration
public Fleet(string name, FleetArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

FleetArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ExcessCapacityTerminationPolicy

Whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2. Valid values: no-termination, termination. Defaults to termination.

Declaration
public Output<string> ExcessCapacityTerminationPolicy { get; }
Property Value
Type Description
Output<System.String>
View Source

LaunchTemplateConfig

Nested argument containing EC2 Launch Template configurations. Defined below.

Declaration
public Output<FleetLaunchTemplateConfig> LaunchTemplateConfig { get; }
Property Value
Type Description
Output<FleetLaunchTemplateConfig>
View Source

OnDemandOptions

Nested argument containing On-Demand configurations. Defined below.

Declaration
public Output<FleetOnDemandOptions> OnDemandOptions { get; }
Property Value
Type Description
Output<FleetOnDemandOptions>
View Source

ReplaceUnhealthyInstances

Whether EC2 Fleet should replace unhealthy instances. Defaults to false.

Declaration
public Output<bool?> ReplaceUnhealthyInstances { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

SpotOptions

Nested argument containing Spot configurations. Defined below.

Declaration
public Output<FleetSpotOptions> SpotOptions { get; }
Property Value
Type Description
Output<FleetSpotOptions>
View Source

Tags

Map of Fleet tags. To tag instances at launch, specify the tags in the Launch Template.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

TargetCapacitySpecification

Nested argument containing target capacity configurations. Defined below.

Declaration
public Output<FleetTargetCapacitySpecification> TargetCapacitySpecification { get; }
Property Value
Type Description
Output<FleetTargetCapacitySpecification>
View Source

TerminateInstances

Whether to terminate instances for an EC2 Fleet if it is deleted successfully. Defaults to false.

Declaration
public Output<bool?> TerminateInstances { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

TerminateInstancesWithExpiration

Whether running instances should be terminated when the EC2 Fleet expires. Defaults to false.

Declaration
public Output<bool?> TerminateInstancesWithExpiration { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Type

The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. Valid values: maintain, request. Defaults to maintain.

Declaration
public Output<string> Type { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, FleetState, CustomResourceOptions)

Get an existing Fleet resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Fleet Get(string name, Input<string> id, FleetState 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.

FleetState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Fleet
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.