Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ec2.kotlin
import com.pulumi.aws.ec2.CapacityReservationArgs.builder
import com.pulumi.aws.ec2.kotlin.enums.InstancePlatform
import com.pulumi.aws.ec2.kotlin.enums.InstanceType
import com.pulumi.aws.ec2.kotlin.enums.Tenancy
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides an EC2 Capacity Reservation. This allows you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const _default = new aws.ec2.CapacityReservation("default", {
* instanceType: aws.ec2.InstanceType.T2_Micro,
* instancePlatform: aws.ec2.InstancePlatform.LinuxUnix,
* availabilityZone: "eu-west-1a",
* instanceCount: 1,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* default = aws.ec2.CapacityReservation("default",
* instance_type=aws.ec2.InstanceType.T2_MICRO,
* instance_platform=aws.ec2.InstancePlatform.LINUX_UNIX,
* availability_zone="eu-west-1a",
* instance_count=1)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Aws.Ec2.CapacityReservation("default", new()
* {
* InstanceType = Aws.Ec2.InstanceType.T2_Micro,
* InstancePlatform = Aws.Ec2.InstancePlatform.LinuxUnix,
* AvailabilityZone = "eu-west-1a",
* InstanceCount = 1,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ec2.NewCapacityReservation(ctx, "default", &ec2.CapacityReservationArgs{
* InstanceType: pulumi.String(ec2.InstanceType_T2_Micro),
* InstancePlatform: pulumi.String(ec2.InstancePlatformLinuxUnix),
* AvailabilityZone: pulumi.String("eu-west-1a"),
* InstanceCount: pulumi.Int(1),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.ec2.CapacityReservation;
* import com.pulumi.aws.ec2.CapacityReservationArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var default_ = new CapacityReservation("default", CapacityReservationArgs.builder()
* .instanceType("t2.micro")
* .instancePlatform("Linux/UNIX")
* .availabilityZone("eu-west-1a")
* .instanceCount(1)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: aws:ec2:CapacityReservation
* properties:
* instanceType: t2.micro
* instancePlatform: Linux/UNIX
* availabilityZone: eu-west-1a
* instanceCount: 1
* ```
*
* ## Import
* Using `pulumi import`, import Capacity Reservations using the `id`. For example:
* ```sh
* $ pulumi import aws:ec2/capacityReservation:CapacityReservation web cr-0123456789abcdef0
* ```
* @property availabilityZone The Availability Zone in which to create the Capacity Reservation.
* @property ebsOptimized Indicates whether the Capacity Reservation supports EBS-optimized instances.
* @property endDate The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
* @property endDateType Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or `limited`.
* @property ephemeralStorage Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.
* @property instanceCount The number of instances for which to reserve capacity.
* @property instanceMatchCriteria Indicates the type of instance launches that the Capacity Reservation accepts. Specify either `open` or `targeted`.
* @property instancePlatform The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX`, `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`.
* @property instanceType The instance type for which to reserve capacity.
* @property outpostArn The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
* @property placementGroupArn The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation.
* @property tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
* @property tenancy Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated`.
*/
public data class CapacityReservationArgs(
public val availabilityZone: Output? = null,
public val ebsOptimized: Output? = null,
public val endDate: Output? = null,
public val endDateType: Output? = null,
public val ephemeralStorage: Output? = null,
public val instanceCount: Output? = null,
public val instanceMatchCriteria: Output? = null,
public val instancePlatform: Output>? = null,
public val instanceType: Output>? = null,
public val outpostArn: Output? = null,
public val placementGroupArn: Output? = null,
public val tags: Output