1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. CapacityReservationFleet

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi

aws-native.ec2.CapacityReservationFleet

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi

    Resource Type definition for AWS::EC2::CapacityReservationFleet

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var ec2CapacityReservationFleetCanary = new AwsNative.Ec2.CapacityReservationFleet("ec2CapacityReservationFleetCanary", new()
        {
            AllocationStrategy = "prioritized",
            InstanceTypeSpecifications = new[]
            {
                new AwsNative.Ec2.Inputs.CapacityReservationFleetInstanceTypeSpecificationArgs
                {
                    InstanceType = "c4.large",
                    InstancePlatform = "Linux/UNIX",
                    AvailabilityZone = "us-east-1a",
                    Weight = 1,
                    Priority = 1,
                },
                new AwsNative.Ec2.Inputs.CapacityReservationFleetInstanceTypeSpecificationArgs
                {
                    InstanceType = "c5.large",
                    InstancePlatform = "Linux/UNIX",
                    AvailabilityZone = "us-east-1a",
                    Weight = 1,
                    Priority = 2,
                },
            },
            Tenancy = AwsNative.Ec2.CapacityReservationFleetTenancy.Default,
            TotalTargetCapacity = 2,
            InstanceMatchCriteria = AwsNative.Ec2.CapacityReservationFleetInstanceMatchCriteria.Open,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewCapacityReservationFleet(ctx, "ec2CapacityReservationFleetCanary", &ec2.CapacityReservationFleetArgs{
    			AllocationStrategy: pulumi.String("prioritized"),
    			InstanceTypeSpecifications: ec2.CapacityReservationFleetInstanceTypeSpecificationArray{
    				&ec2.CapacityReservationFleetInstanceTypeSpecificationArgs{
    					InstanceType:     pulumi.String("c4.large"),
    					InstancePlatform: pulumi.String("Linux/UNIX"),
    					AvailabilityZone: pulumi.String("us-east-1a"),
    					Weight:           pulumi.Float64(1),
    					Priority:         pulumi.Int(1),
    				},
    				&ec2.CapacityReservationFleetInstanceTypeSpecificationArgs{
    					InstanceType:     pulumi.String("c5.large"),
    					InstancePlatform: pulumi.String("Linux/UNIX"),
    					AvailabilityZone: pulumi.String("us-east-1a"),
    					Weight:           pulumi.Float64(1),
    					Priority:         pulumi.Int(2),
    				},
    			},
    			Tenancy:               ec2.CapacityReservationFleetTenancyDefault,
    			TotalTargetCapacity:   pulumi.Int(2),
    			InstanceMatchCriteria: ec2.CapacityReservationFleetInstanceMatchCriteriaOpen,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    ec2_capacity_reservation_fleet_canary = aws_native.ec2.CapacityReservationFleet("ec2CapacityReservationFleetCanary",
        allocation_strategy="prioritized",
        instance_type_specifications=[
            aws_native.ec2.CapacityReservationFleetInstanceTypeSpecificationArgs(
                instance_type="c4.large",
                instance_platform="Linux/UNIX",
                availability_zone="us-east-1a",
                weight=1,
                priority=1,
            ),
            aws_native.ec2.CapacityReservationFleetInstanceTypeSpecificationArgs(
                instance_type="c5.large",
                instance_platform="Linux/UNIX",
                availability_zone="us-east-1a",
                weight=1,
                priority=2,
            ),
        ],
        tenancy=aws_native.ec2.CapacityReservationFleetTenancy.DEFAULT,
        total_target_capacity=2,
        instance_match_criteria=aws_native.ec2.CapacityReservationFleetInstanceMatchCriteria.OPEN)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const ec2CapacityReservationFleetCanary = new aws_native.ec2.CapacityReservationFleet("ec2CapacityReservationFleetCanary", {
        allocationStrategy: "prioritized",
        instanceTypeSpecifications: [
            {
                instanceType: "c4.large",
                instancePlatform: "Linux/UNIX",
                availabilityZone: "us-east-1a",
                weight: 1,
                priority: 1,
            },
            {
                instanceType: "c5.large",
                instancePlatform: "Linux/UNIX",
                availabilityZone: "us-east-1a",
                weight: 1,
                priority: 2,
            },
        ],
        tenancy: aws_native.ec2.CapacityReservationFleetTenancy.Default,
        totalTargetCapacity: 2,
        instanceMatchCriteria: aws_native.ec2.CapacityReservationFleetInstanceMatchCriteria.Open,
    });
    

    Coming soon!

    Create CapacityReservationFleet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CapacityReservationFleet(name: string, args?: CapacityReservationFleetArgs, opts?: CustomResourceOptions);
    @overload
    def CapacityReservationFleet(resource_name: str,
                                 args: Optional[CapacityReservationFleetArgs] = None,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def CapacityReservationFleet(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 allocation_strategy: Optional[str] = None,
                                 end_date: Optional[str] = None,
                                 instance_match_criteria: Optional[CapacityReservationFleetInstanceMatchCriteria] = None,
                                 instance_type_specifications: Optional[Sequence[CapacityReservationFleetInstanceTypeSpecificationArgs]] = None,
                                 no_remove_end_date: Optional[bool] = None,
                                 remove_end_date: Optional[bool] = None,
                                 tag_specifications: Optional[Sequence[CapacityReservationFleetTagSpecificationArgs]] = None,
                                 tenancy: Optional[CapacityReservationFleetTenancy] = None,
                                 total_target_capacity: Optional[int] = None)
    func NewCapacityReservationFleet(ctx *Context, name string, args *CapacityReservationFleetArgs, opts ...ResourceOption) (*CapacityReservationFleet, error)
    public CapacityReservationFleet(string name, CapacityReservationFleetArgs? args = null, CustomResourceOptions? opts = null)
    public CapacityReservationFleet(String name, CapacityReservationFleetArgs args)
    public CapacityReservationFleet(String name, CapacityReservationFleetArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:CapacityReservationFleet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CapacityReservationFleetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CapacityReservationFleetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CapacityReservationFleetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CapacityReservationFleetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CapacityReservationFleetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const capacityReservationFleetResource = new aws_native.ec2.CapacityReservationFleet("capacityReservationFleetResource", {
        allocationStrategy: "string",
        endDate: "string",
        instanceMatchCriteria: aws_native.ec2.CapacityReservationFleetInstanceMatchCriteria.Open,
        instanceTypeSpecifications: [{
            availabilityZone: "string",
            availabilityZoneId: "string",
            ebsOptimized: false,
            instancePlatform: "string",
            instanceType: "string",
            priority: 0,
            weight: 0,
        }],
        noRemoveEndDate: false,
        removeEndDate: false,
        tagSpecifications: [{
            resourceType: "string",
            tags: [{
                key: "string",
                value: "string",
            }],
        }],
        tenancy: aws_native.ec2.CapacityReservationFleetTenancy.Default,
        totalTargetCapacity: 0,
    });
    
    Coming soon!
    

    CapacityReservationFleet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The CapacityReservationFleet resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CapacityReservationFleet resource produces the following output properties:

    CapacityReservationFleetId string
    Id string
    The provider-assigned unique ID for this managed resource.
    CapacityReservationFleetId string
    Id string
    The provider-assigned unique ID for this managed resource.
    capacityReservationFleetId String
    id String
    The provider-assigned unique ID for this managed resource.
    capacityReservationFleetId string
    id string
    The provider-assigned unique ID for this managed resource.
    capacity_reservation_fleet_id str
    id str
    The provider-assigned unique ID for this managed resource.
    capacityReservationFleetId String
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    CapacityReservationFleetInstanceMatchCriteria, CapacityReservationFleetInstanceMatchCriteriaArgs

    Open
    open
    CapacityReservationFleetInstanceMatchCriteriaOpen
    open
    Open
    open
    Open
    open
    OPEN
    open
    "open"
    open

    CapacityReservationFleetInstanceTypeSpecification, CapacityReservationFleetInstanceTypeSpecificationArgs

    CapacityReservationFleetTag, CapacityReservationFleetTagArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    CapacityReservationFleetTagSpecification, CapacityReservationFleetTagSpecificationArgs

    CapacityReservationFleetTenancy, CapacityReservationFleetTenancyArgs

    Default
    default
    CapacityReservationFleetTenancyDefault
    default
    Default
    default
    Default
    default
    DEFAULT
    default
    "default"
    default

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi