AWS Native

Pulumi Official
Package maintained by Pulumi
v0.19.0 published on Wednesday, Jun 8, 2022 by Pulumi

CapacityReservationFleet

Resource Type definition for AWS::EC2::CapacityReservationFleet

Example Usage

Example

using Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var ec2CapacityReservationFleetCanary = new AwsNative.EC2.CapacityReservationFleet("ec2CapacityReservationFleetCanary", new AwsNative.EC2.CapacityReservationFleetArgs
        {
            AllocationStrategy = "prioritized",
            InstanceTypeSpecifications = 
            {
                new AwsNative.EC2.Inputs.CapacityReservationFleetInstanceTypeSpecificationArgs
                {
                    InstanceTypeSpecification = 
                    {
                        { "instanceType", "c4.large" },
                        { "instancePlatform", "Linux/UNIX" },
                        { "availabilityZone", "us-east-1a" },
                        { "weight", 1 },
                        { "priority", 1 },
                    },
                },
                new AwsNative.EC2.Inputs.CapacityReservationFleetInstanceTypeSpecificationArgs
                {
                    InstanceTypeSpecification = 
                    {
                        { "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.CapacityReservationFleetInstanceTypeSpecificationArgs{
				&ec2.CapacityReservationFleetInstanceTypeSpecificationArgs{
					InstanceTypeSpecification: map[string]interface{}{
						"instanceType":     "c4.large",
						"instancePlatform": "Linux/UNIX",
						"availabilityZone": "us-east-1a",
						"weight":           1,
						"priority":         1,
					},
				},
				&ec2.CapacityReservationFleetInstanceTypeSpecificationArgs{
					InstanceTypeSpecification: map[string]interface{}{
						"instanceType":     "c5.large",
						"instancePlatform": "Linux/UNIX",
						"availabilityZone": "us-east-1a",
						"weight":           1,
						"priority":         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_specification={
                "instanceType": "c4.large",
                "instancePlatform": "Linux/UNIX",
                "availabilityZone": "us-east-1a",
                "weight": 1,
                "priority": 1,
            },
        ),
        aws_native.ec2.CapacityReservationFleetInstanceTypeSpecificationArgs(
            instance_type_specification={
                "instanceType": "c5.large",
                "instancePlatform": "Linux/UNIX",
                "availabilityZone": "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: [
        {
            instanceTypeSpecification: {
                instanceType: "c4.large",
                instancePlatform: "Linux/UNIX",
                availabilityZone: "us-east-1a",
                weight: 1,
                priority: 1,
            },
        },
        {
            instanceTypeSpecification: {
                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 a CapacityReservationFleet Resource

new CapacityReservationFleet(name: string, args?: CapacityReservationFleetArgs, opts?: CustomResourceOptions);
@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)
@overload
def CapacityReservationFleet(resource_name: str,
                             args: Optional[CapacityReservationFleetArgs] = None,
                             opts: Optional[ResourceOptions] = 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.

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.

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

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

CapacityReservationFleetInstanceTypeSpecification

CapacityReservationFleetTag

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

CapacityReservationFleetTenancy

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws-native
License
Apache-2.0