aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
864 lines • 1.54 MB
TypeScript
import * as cdk from "../../core/lib";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
import { CapacityManagerDataExportReference, CapacityReservationFleetReference, CapacityReservationReference, CarrierGatewayReference, ClientVpnAuthorizationRuleReference, ClientVpnEndpointReference, ClientVpnRouteReference, ClientVpnTargetNetworkAssociationReference, CustomerGatewayReference, DHCPOptionsReference, EC2FleetReference, EgressOnlyInternetGatewayReference, EIPAssociationReference, EIPReference, EnclaveCertificateIamRoleAssociationReference, FlowLogReference, GatewayRouteTableAssociationReference, HostReference, ICapacityManagerDataExportRef, ICapacityReservationFleetRef, ICapacityReservationRef, ICarrierGatewayRef, IClientVpnAuthorizationRuleRef, IClientVpnEndpointRef, IClientVpnRouteRef, IClientVpnTargetNetworkAssociationRef, ICustomerGatewayRef, IDHCPOptionsRef, IEC2FleetRef, IEgressOnlyInternetGatewayRef, IEIPAssociationRef, IEIPRef, IEnclaveCertificateIamRoleAssociationRef, IFlowLogRef, IGatewayRouteTableAssociationRef, IHostRef, IInstanceConnectEndpointRef, IInstanceRef, IInternetGatewayRef, IIPAMAllocationRef, IIPAMPoolCidrRef, IIPAMPoolRef, IIPAMPrefixListResolverRef, IIPAMPrefixListResolverTargetRef, IIPAMRef, IIPAMResourceDiscoveryAssociationRef, IIPAMResourceDiscoveryRef, IIPAMScopeRef, IIpPoolRouteTableAssociationRef, IKeyPairRef, ILaunchTemplateRef, ILocalGatewayRouteRef, ILocalGatewayRouteTableRef, ILocalGatewayRouteTableVirtualInterfaceGroupAssociationRef, ILocalGatewayRouteTableVPCAssociationRef, ILocalGatewayVirtualInterfaceGroupRef, ILocalGatewayVirtualInterfaceRef, INatGatewayRef, INetworkAclEntryRef, INetworkAclRef, INetworkInsightsAccessScopeAnalysisRef, INetworkInsightsAccessScopeRef, INetworkInsightsAnalysisRef, INetworkInsightsPathRef, INetworkInterfaceAttachmentRef, INetworkInterfacePermissionRef, INetworkInterfaceRef, INetworkPerformanceMetricSubscriptionRef, InstanceConnectEndpointReference, InstanceReference, InternetGatewayReference, IPAMAllocationReference, IPAMPoolCidrReference, IPAMPoolReference, IPAMPrefixListResolverReference, IPAMPrefixListResolverTargetReference, IPAMReference, IPAMResourceDiscoveryAssociationReference, IPAMResourceDiscoveryReference, IPAMScopeReference, IPlacementGroupRef, IpPoolRouteTableAssociationReference, IPrefixListRef, IRouteRef, IRouteServerAssociationRef, IRouteServerEndpointRef, IRouteServerPeerRef, IRouteServerPropagationRef, IRouteServerRef, IRouteTableRef, ISecurityGroupEgressRef, ISecurityGroupIngressRef, ISecurityGroupRef, ISecurityGroupVpcAssociationRef, ISnapshotBlockPublicAccessRef, ISpotFleetRef, ISqlHaStandbyDetectedInstanceRef, ISubnetCidrBlockRef, ISubnetNetworkAclAssociationRef, ISubnetRef, ISubnetRouteTableAssociationRef, ITrafficMirrorFilterRef, ITrafficMirrorFilterRuleRef, ITrafficMirrorSessionRef, ITrafficMirrorTargetRef, ITransitGatewayAttachmentRef, ITransitGatewayConnectPeerRef, ITransitGatewayConnectRef, ITransitGatewayMeteringPolicyEntryRef, ITransitGatewayMeteringPolicyRef, ITransitGatewayMulticastDomainAssociationRef, ITransitGatewayMulticastDomainRef, ITransitGatewayMulticastGroupMemberRef, ITransitGatewayMulticastGroupSourceRef, ITransitGatewayPeeringAttachmentRef, ITransitGatewayRef, ITransitGatewayRouteRef, ITransitGatewayRouteTableAssociationRef, ITransitGatewayRouteTablePropagationRef, ITransitGatewayRouteTableRef, ITransitGatewayVpcAttachmentRef, IVerifiedAccessEndpointRef, IVerifiedAccessGroupRef, IVerifiedAccessInstanceRef, IVerifiedAccessTrustProviderRef, IVolumeAttachmentRef, IVolumeRef, IVPCBlockPublicAccessExclusionRef, IVPCBlockPublicAccessOptionsRef, IVPCCidrBlockRef, IVPCDHCPOptionsAssociationRef, IVPCEncryptionControlRef, IVPCEndpointConnectionNotificationRef, IVPCEndpointRef, IVPCEndpointServicePermissionsRef, IVPCEndpointServiceRef, IVPCGatewayAttachmentRef, IVPCPeeringConnectionRef, IVPCRef, IVPNConcentratorRef, IVPNConnectionRef, IVPNConnectionRouteRef, IVPNGatewayRef, IVPNGatewayRoutePropagationRef, KeyPairReference, LaunchTemplateReference, LocalGatewayRouteReference, LocalGatewayRouteTableReference, LocalGatewayRouteTableVirtualInterfaceGroupAssociationReference, LocalGatewayRouteTableVPCAssociationReference, LocalGatewayVirtualInterfaceGroupReference, LocalGatewayVirtualInterfaceReference, NatGatewayReference, NetworkAclEntryReference, NetworkAclReference, NetworkInsightsAccessScopeAnalysisReference, NetworkInsightsAccessScopeReference, NetworkInsightsAnalysisReference, NetworkInsightsPathReference, NetworkInterfaceAttachmentReference, NetworkInterfacePermissionReference, NetworkInterfaceReference, NetworkPerformanceMetricSubscriptionReference, PlacementGroupReference, PrefixListReference, RouteReference, RouteServerAssociationReference, RouteServerEndpointReference, RouteServerPeerReference, RouteServerPropagationReference, RouteServerReference, RouteTableReference, SecurityGroupEgressReference, SecurityGroupIngressReference, SecurityGroupReference, SecurityGroupVpcAssociationReference, SnapshotBlockPublicAccessReference, SpotFleetReference, SqlHaStandbyDetectedInstanceReference, SubnetCidrBlockReference, SubnetNetworkAclAssociationReference, SubnetReference, SubnetRouteTableAssociationReference, TrafficMirrorFilterReference, TrafficMirrorFilterRuleReference, TrafficMirrorSessionReference, TrafficMirrorTargetReference, TransitGatewayAttachmentReference, TransitGatewayConnectPeerReference, TransitGatewayConnectReference, TransitGatewayMeteringPolicyEntryReference, TransitGatewayMeteringPolicyReference, TransitGatewayMulticastDomainAssociationReference, TransitGatewayMulticastDomainReference, TransitGatewayMulticastGroupMemberReference, TransitGatewayMulticastGroupSourceReference, TransitGatewayPeeringAttachmentReference, TransitGatewayReference, TransitGatewayRouteReference, TransitGatewayRouteTableAssociationReference, TransitGatewayRouteTablePropagationReference, TransitGatewayRouteTableReference, TransitGatewayVpcAttachmentReference, VerifiedAccessEndpointReference, VerifiedAccessGroupReference, VerifiedAccessInstanceReference, VerifiedAccessTrustProviderReference, VolumeAttachmentReference, VolumeReference, VPCBlockPublicAccessExclusionReference, VPCBlockPublicAccessOptionsReference, VPCCidrBlockReference, VPCDHCPOptionsAssociationReference, VPCEncryptionControlReference, VPCEndpointConnectionNotificationReference, VPCEndpointReference, VPCEndpointServicePermissionsReference, VPCEndpointServiceReference, VPCGatewayAttachmentReference, VPCPeeringConnectionReference, VPCReference, VPNConcentratorReference, VPNConnectionReference, VPNConnectionRouteReference, VPNGatewayReference, VPNGatewayRoutePropagationReference } from "../../interfaces/generated/aws-ec2-interfaces.generated";
import { aws_ec2 as ec2Refs, aws_elasticloadbalancingv2 as elasticLoadBalancingV2Refs, aws_iam as iamRefs, aws_logs as logsRefs, aws_s3 as s3Refs, aws_sns as snsRefs } from "../../interfaces";
/**
* Creates a new Capacity Reservation with the specified attributes.
*
* For more information, see [Capacity Reservations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) in the *Amazon EC2 User Guide* .
*
* @cloudformationResource AWS::EC2::CapacityReservation
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html
*/
export declare class CfnCapacityReservation extends cdk.CfnResource implements cdk.IInspectable, ICapacityReservationRef {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnCapacityReservation from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnCapacityReservation;
/**
* Checks whether the given object is a CfnCapacityReservation
*/
static isCfnCapacityReservation(x: any): x is CfnCapacityReservation;
/**
* Creates a new ICapacityReservationRef from an ARN
*/
static fromCapacityReservationArn(scope: constructs.Construct, id: string, arn: string): ICapacityReservationRef;
/**
* Creates a new ICapacityReservationRef from a capacityReservationId
*/
static fromCapacityReservationId(scope: constructs.Construct, id: string, capacityReservationId: string): ICapacityReservationRef;
static arnForCapacityReservation(resource: ICapacityReservationRef): string;
/**
* The Availability Zone in which to create the Capacity Reservation.
*/
private _availabilityZone?;
/**
* The ID of the Availability Zone in which the capacity is reserved.
*/
private _availabilityZoneId?;
/**
* Indicates whether the Capacity Reservation supports EBS-optimized instances.
*/
private _ebsOptimized?;
/**
* The date and time at which the Capacity Reservation expires.
*/
private _endDate?;
/**
* Indicates the way in which the Capacity Reservation ends.
*/
private _endDateType?;
/**
* *Deprecated.*.
*/
private _ephemeralStorage?;
/**
* The number of instances for which to reserve capacity.
*/
private _instanceCount;
/**
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include:.
*/
private _instanceMatchCriteria?;
/**
* The type of operating system for which to reserve capacity.
*/
private _instancePlatform;
/**
* The instance type for which to reserve capacity.
*/
private _instanceType;
/**
* > Not supported for future-dated Capacity Reservations.
*/
private _outPostArn?;
/**
* > Not supported for future-dated Capacity Reservations.
*/
private _placementGroupArn?;
/**
* The tags to apply to the Capacity Reservation during launch.
*/
private _tagSpecifications?;
/**
* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:.
*/
private _tenancy?;
/**
* The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
*/
private _unusedReservationBillingOwnerId?;
/**
* Create a new `AWS::EC2::CapacityReservation`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnCapacityReservationProps);
get capacityReservationRef(): CapacityReservationReference;
/**
* The Availability Zone in which to create the Capacity Reservation.
*/
get availabilityZone(): string | undefined;
/**
* The Availability Zone in which to create the Capacity Reservation.
*/
set availabilityZone(value: string | undefined);
/**
* The ID of the Availability Zone in which the capacity is reserved.
*/
get availabilityZoneId(): string | undefined;
/**
* The ID of the Availability Zone in which the capacity is reserved.
*/
set availabilityZoneId(value: string | undefined);
/**
* Indicates whether the Capacity Reservation supports EBS-optimized instances.
*/
get ebsOptimized(): boolean | cdk.IResolvable | undefined;
/**
* Indicates whether the Capacity Reservation supports EBS-optimized instances.
*/
set ebsOptimized(value: boolean | cdk.IResolvable | undefined);
/**
* The date and time at which the Capacity Reservation expires.
*/
get endDate(): string | undefined;
/**
* The date and time at which the Capacity Reservation expires.
*/
set endDate(value: string | undefined);
/**
* Indicates the way in which the Capacity Reservation ends.
*/
get endDateType(): string | undefined;
/**
* Indicates the way in which the Capacity Reservation ends.
*/
set endDateType(value: string | undefined);
/**
* *Deprecated.*.
*/
get ephemeralStorage(): boolean | cdk.IResolvable | undefined;
/**
* *Deprecated.*.
*/
set ephemeralStorage(value: boolean | cdk.IResolvable | undefined);
/**
* The number of instances for which to reserve capacity.
*/
get instanceCount(): number;
/**
* The number of instances for which to reserve capacity.
*/
set instanceCount(value: number);
/**
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include:.
*/
get instanceMatchCriteria(): string | undefined;
/**
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include:.
*/
set instanceMatchCriteria(value: string | undefined);
/**
* The type of operating system for which to reserve capacity.
*/
get instancePlatform(): string;
/**
* The type of operating system for which to reserve capacity.
*/
set instancePlatform(value: string);
/**
* The instance type for which to reserve capacity.
*/
get instanceType(): string;
/**
* The instance type for which to reserve capacity.
*/
set instanceType(value: string);
/**
* > Not supported for future-dated Capacity Reservations.
*/
get outPostArn(): string | undefined;
/**
* > Not supported for future-dated Capacity Reservations.
*/
set outPostArn(value: string | undefined);
/**
* > Not supported for future-dated Capacity Reservations.
*/
get placementGroupArn(): string | undefined;
/**
* > Not supported for future-dated Capacity Reservations.
*/
set placementGroupArn(value: string | undefined);
/**
* The tags to apply to the Capacity Reservation during launch.
*/
get tagSpecifications(): Array<cdk.IResolvable | CfnCapacityReservation.TagSpecificationProperty> | cdk.IResolvable | undefined;
/**
* The tags to apply to the Capacity Reservation during launch.
*/
set tagSpecifications(value: Array<cdk.IResolvable | CfnCapacityReservation.TagSpecificationProperty> | cdk.IResolvable | undefined);
/**
* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:.
*/
get tenancy(): string | undefined;
/**
* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:.
*/
set tenancy(value: string | undefined);
/**
* The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
*/
get unusedReservationBillingOwnerId(): string | undefined;
/**
* The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
*/
set unusedReservationBillingOwnerId(value: string | undefined);
/**
* Returns the Availability Zone in which the capacity is reserved. For example: `us-east-1a` .
*
* @cloudformationAttribute AvailabilityZone
*/
get attrAvailabilityZone(): string;
/**
* Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example: `9` .
*
* @cloudformationAttribute AvailableInstanceCount
*/
get attrAvailableInstanceCount(): number;
/**
* @cloudformationAttribute CapacityAllocationSet
*/
get attrCapacityAllocationSet(): cdk.IResolvable;
/**
* The Amazon Resource Name (ARN) of the Capacity Reservation.
*
* @cloudformationAttribute CapacityReservationArn
*/
get attrCapacityReservationArn(): string;
/**
* The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
*
* @cloudformationAttribute CapacityReservationFleetId
*/
get attrCapacityReservationFleetId(): string;
/**
* @cloudformationAttribute CommitmentInfo
*/
get attrCommitmentInfo(): cdk.IResolvable;
/**
* The date and time the Capacity Reservation was created.
*
* @cloudformationAttribute CreateDate
*/
get attrCreateDate(): string;
/**
* The delivery method for a future-dated Capacity Reservation. `incremental` indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time.
*
* @cloudformationAttribute DeliveryPreference
*/
get attrDeliveryPreference(): string;
/**
* The ID of the Capacity Reservation.
*
* @cloudformationAttribute Id
*/
get attrId(): string;
/**
* Returns the type of instance for which the capacity is reserved. For example: `m4.large` .
*
* @cloudformationAttribute InstanceType
*/
get attrInstanceType(): string;
/**
* The ID of the AWS account that owns the Capacity Reservation.
*
* @cloudformationAttribute OwnerId
*/
get attrOwnerId(): string;
/**
* The type of Capacity Reservation.
*
* @cloudformationAttribute ReservationType
*/
get attrReservationType(): string;
/**
* The date and time the Capacity Reservation was started.
*
* @cloudformationAttribute StartDate
*/
get attrStartDate(): string;
/**
* The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
*
* - `active` - The capacity is available for use.
* - `expired` - The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use.
* - `cancelled` - The Capacity Reservation was canceled. The reserved capacity is no longer available for your use.
* - `pending` - The Capacity Reservation request was successful but the capacity provisioning is still pending.
* - `failed` - The Capacity Reservation request has failed. A request can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes.
* - `scheduled` - ( *Future-dated Capacity Reservations* ) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date.
* - `payment-pending` - ( *Capacity Blocks* ) The upfront payment has not been processed yet.
* - `payment-failed` - ( *Capacity Blocks* ) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released.
* - `assessing` - ( *Future-dated Capacity Reservations* ) Amazon EC2 is assessing your request for a future-dated Capacity Reservation.
* - `delayed` - ( *Future-dated Capacity Reservations* ) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time.
* - `unsupported` - ( *Future-dated Capacity Reservations* ) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered.
*
* @cloudformationAttribute State
*/
get attrState(): string;
/**
* Returns the tenancy of the Capacity Reservation. For example: `dedicated` .
*
* @cloudformationAttribute Tenancy
*/
get attrTenancy(): string;
/**
* Returns the total number of instances for which the Capacity Reservation reserves capacity. For example: `15` .
*
* @cloudformationAttribute TotalInstanceCount
*/
get attrTotalInstanceCount(): number;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnCapacityReservation {
/**
* An array of key-value pairs to apply to this resource.
*
* For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html
*/
interface TagSpecificationProperty {
/**
* The type of resource to tag.
*
* Specify `capacity-reservation` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html#cfn-ec2-capacityreservation-tagspecification-resourcetype
*/
readonly resourceType?: string;
/**
* The tags to apply to the resource.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html#cfn-ec2-capacityreservation-tagspecification-tags
*/
readonly tags?: Array<cdk.CfnTag>;
}
/**
* Information about instance capacity usage for a Capacity Reservation.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-capacityallocation.html
*/
interface CapacityAllocationProperty {
/**
* The usage type.
*
* `used` indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-capacityallocation.html#cfn-ec2-capacityreservation-capacityallocation-allocationtype
*/
readonly allocationType?: string;
/**
* The amount of instance capacity associated with the usage.
*
* For example a value of `4` indicates that instance capacity for 4 instances is currently in use.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-capacityallocation.html#cfn-ec2-capacityreservation-capacityallocation-count
*/
readonly count?: number;
}
/**
* Information about your commitment for a future-dated Capacity Reservation.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html
*/
interface CommitmentInfoProperty {
/**
* The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone ( `YYYY-MM-DDThh:mm:ss.sssZ` ). You can't decrease the instance count or cancel the Capacity Reservation before this date and time.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html#cfn-ec2-capacityreservation-commitmentinfo-commitmentenddate
*/
readonly commitmentEndDate?: string;
/**
* The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html#cfn-ec2-capacityreservation-commitmentinfo-committedinstancecount
*/
readonly committedInstanceCount?: number;
}
}
/**
* Properties for defining a `CfnCapacityReservation`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html
*/
export interface CfnCapacityReservationProps {
/**
* The Availability Zone in which to create the Capacity Reservation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-availabilityzone
*/
readonly availabilityZone?: string;
/**
* The ID of the Availability Zone in which the capacity is reserved.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-availabilityzoneid
*/
readonly availabilityZoneId?: string;
/**
* Indicates whether the Capacity Reservation supports EBS-optimized instances.
*
* This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-ebsoptimized
*/
readonly ebsOptimized?: boolean | cdk.IResolvable;
/**
* 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. The Capacity Reservation's state changes to `expired` when it reaches its end date and time.
*
* You must provide an `EndDate` value if `EndDateType` is `limited` . Omit `EndDate` if `EndDateType` is `unlimited` .
*
* If the `EndDateType` is `limited` , the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
*
* If you are requesting a future-dated Capacity Reservation, you can't specify an end date and time that is within the commitment duration.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-enddate
*/
readonly endDate?: string;
/**
* Indicates the way in which the Capacity Reservation ends.
*
* A Capacity Reservation can have one of the following end types:
*
* - `unlimited` - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an `EndDate` if the `EndDateType` is `unlimited` .
* - `limited` - The Capacity Reservation expires automatically at a specified date and time. You must provide an `EndDate` value if the `EndDateType` value is `limited` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-enddatetype
*/
readonly endDateType?: string;
/**
* *Deprecated.*.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-ephemeralstorage
*/
readonly ephemeralStorage?: boolean | cdk.IResolvable;
/**
* The number of instances for which to reserve capacity.
*
* > You can request future-dated Capacity Reservations for an instance count with a minimum of 32 vCPUs. For example, if you request a future-dated Capacity Reservation for `m5.xlarge` instances, you must request at least 8 instances ( *8 * m5.xlarge = 32 vCPUs* ).
*
* Valid range: 1 - 1000
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-instancecount
*/
readonly instanceCount: number;
/**
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include:.
*
* - `open` - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters.
* - `targeted` - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
*
* > If you are requesting a future-dated Capacity Reservation, you must specify `targeted` .
*
* Default: `open`
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-instancematchcriteria
*/
readonly instanceMatchCriteria?: string;
/**
* The type of operating system for which to reserve capacity.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-instanceplatform
*/
readonly instancePlatform: string;
/**
* The instance type for which to reserve capacity.
*
* > You can request future-dated Capacity Reservations for instance types in the C, M, R, I, T, and G instance families only.
*
* For more information, see [Instance types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the *Amazon EC2 User Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-instancetype
*/
readonly instanceType: string;
/**
* > Not supported for future-dated Capacity Reservations.
*
* The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-outpostarn
*/
readonly outPostArn?: string;
/**
* > Not supported for future-dated Capacity Reservations.
*
* The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see [Capacity Reservations for cluster placement groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html) in the *Amazon EC2 User Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-placementgrouparn
*/
readonly placementGroupArn?: string;
/**
* The tags to apply to the Capacity Reservation during launch.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-tagspecifications
*/
readonly tagSpecifications?: Array<cdk.IResolvable | CfnCapacityReservation.TagSpecificationProperty> | cdk.IResolvable;
/**
* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:.
*
* - `default` - The Capacity Reservation is created on hardware that is shared with other AWS accounts .
* - `dedicated` - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-tenancy
*/
readonly tenancy?: string;
/**
* The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
*
* A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see [Billing assignment for shared Amazon EC2 Capacity Reservations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html) .
*
* You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see [AWS::RAM::ResourceShare](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html#cfn-ec2-capacityreservation-unusedreservationbillingownerid
*/
readonly unusedReservationBillingOwnerId?: string;
}
/**
* Creates a new Capacity Reservation Fleet with the specified attributes.
*
* For more information, see [Capacity Reservation Fleets](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-fleets.html) in the *Amazon EC2 User Guide* .
*
* @cloudformationResource AWS::EC2::CapacityReservationFleet
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html
*/
export declare class CfnCapacityReservationFleet extends cdk.CfnResource implements cdk.IInspectable, ICapacityReservationFleetRef {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnCapacityReservationFleet from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnCapacityReservationFleet;
/**
* Checks whether the given object is a CfnCapacityReservationFleet
*/
static isCfnCapacityReservationFleet(x: any): x is CfnCapacityReservationFleet;
/**
* Creates a new ICapacityReservationFleetRef from a capacityReservationFleetId
*/
static fromCapacityReservationFleetId(scope: constructs.Construct, id: string, capacityReservationFleetId: string): ICapacityReservationFleetRef;
static arnForCapacityReservationFleet(resource: ICapacityReservationFleetRef): string;
/**
* The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
*/
private _allocationStrategy?;
/**
* The date and time at which the Capacity Reservation Fleet expires.
*/
private _endDate?;
/**
* Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
*/
private _instanceMatchCriteria?;
/**
* Information about the instance types for which to reserve the capacity.
*/
private _instanceTypeSpecifications?;
/**
* Used to add an end date to a Capacity Reservation Fleet that has no end date and time.
*/
private _noRemoveEndDate?;
/**
* Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time.
*/
private _removeEndDate?;
/**
* The tags to assign to the Capacity Reservation Fleet.
*/
private _tagSpecifications?;
/**
* Indicates the tenancy of the Capacity Reservation Fleet.
*/
private _tenancy?;
/**
* The total number of capacity units to be reserved by the Capacity Reservation Fleet.
*/
private _totalTargetCapacity?;
/**
* Create a new `AWS::EC2::CapacityReservationFleet`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props?: CfnCapacityReservationFleetProps);
get capacityReservationFleetRef(): CapacityReservationFleetReference;
/**
* The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
*/
get allocationStrategy(): string | undefined;
/**
* The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
*/
set allocationStrategy(value: string | undefined);
/**
* The date and time at which the Capacity Reservation Fleet expires.
*/
get endDate(): string | undefined;
/**
* The date and time at which the Capacity Reservation Fleet expires.
*/
set endDate(value: string | undefined);
/**
* Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
*/
get instanceMatchCriteria(): string | undefined;
/**
* Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
*/
set instanceMatchCriteria(value: string | undefined);
/**
* Information about the instance types for which to reserve the capacity.
*/
get instanceTypeSpecifications(): Array<CfnCapacityReservationFleet.InstanceTypeSpecificationProperty | cdk.IResolvable> | cdk.IResolvable | undefined;
/**
* Information about the instance types for which to reserve the capacity.
*/
set instanceTypeSpecifications(value: Array<CfnCapacityReservationFleet.InstanceTypeSpecificationProperty | cdk.IResolvable> | cdk.IResolvable | undefined);
/**
* Used to add an end date to a Capacity Reservation Fleet that has no end date and time.
*/
get noRemoveEndDate(): boolean | cdk.IResolvable | undefined;
/**
* Used to add an end date to a Capacity Reservation Fleet that has no end date and time.
*/
set noRemoveEndDate(value: boolean | cdk.IResolvable | undefined);
/**
* Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time.
*/
get removeEndDate(): boolean | cdk.IResolvable | undefined;
/**
* Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time.
*/
set removeEndDate(value: boolean | cdk.IResolvable | undefined);
/**
* The tags to assign to the Capacity Reservation Fleet.
*/
get tagSpecifications(): Array<cdk.IResolvable | CfnCapacityReservationFleet.TagSpecificationProperty> | cdk.IResolvable | undefined;
/**
* The tags to assign to the Capacity Reservation Fleet.
*/
set tagSpecifications(value: Array<cdk.IResolvable | CfnCapacityReservationFleet.TagSpecificationProperty> | cdk.IResolvable | undefined);
/**
* Indicates the tenancy of the Capacity Reservation Fleet.
*/
get tenancy(): string | undefined;
/**
* Indicates the tenancy of the Capacity Reservation Fleet.
*/
set tenancy(value: string | undefined);
/**
* The total number of capacity units to be reserved by the Capacity Reservation Fleet.
*/
get totalTargetCapacity(): number | undefined;
/**
* The total number of capacity units to be reserved by the Capacity Reservation Fleet.
*/
set totalTargetCapacity(value: number | undefined);
/**
* The ID of the Capacity Reservation Fleet.
*
* @cloudformationAttribute CapacityReservationFleetId
*/
get attrCapacityReservationFleetId(): string;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnCapacityReservationFleet {
/**
* The tags to apply to a resource when the resource is being created.
*
* When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.
*
* > The `Valid Values` lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-tagspecification.html
*/
interface TagSpecificationProperty {
/**
* The type of resource to tag on creation. Specify `capacity-reservation-fleet` .
*
* To tag a resource after it has been created, see [CreateTags](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-tagspecification.html#cfn-ec2-capacityreservationfleet-tagspecification-resourcetype
*/
readonly resourceType?: string;
/**
* The tags to apply to the resource.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-tagspecification.html#cfn-ec2-capacityreservationfleet-tagspecification-tags
*/
readonly tags?: Array<cdk.CfnTag>;
}
/**
* Specifies information about an instance type to use in a Capacity Reservation Fleet.
*
* `InstanceTypeSpecification` is a property of the [AWS::EC2::CapacityReservationFleet](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html) resource.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html
*/
interface InstanceTypeSpecificationProperty {
/**
* The Availability Zone in which the Capacity Reservation Fleet reserves the capacity.
*
* A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-availabilityzone
*/
readonly availabilityZone?: string;
/**
* The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity.
*
* A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-availabilityzoneid
*/
readonly availabilityZoneId?: string;
/**
* Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types.
*
* This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using EBS-optimized instance types.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-ebsoptimized
*/
readonly ebsOptimized?: boolean | cdk.IResolvable;
/**
* The type of operating system for which the Capacity Reservation Fleet reserves capacity.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-instanceplatform
*/
readonly instancePlatform?: string;
/**
* The instance type for which the Capacity Reservation Fleet reserves capacity.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-instancetype
*/
readonly instanceType?: string;
/**
* The priority to assign to the instance type.
*
* This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see [Instance type priority](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority) in the *Amazon EC2 User Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-priority
*/
readonly priority?: number;
/**
* The number of capacity units provided by the specified instance type.
*
* This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see [Total target capacity](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) in the Amazon EC2 User Guide.
*
* Valid Range: Minimum value of `0.001` . Maximum value of `99.999` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-weight
*/
readonly weight?: number;
}
}
/**
* Properties for defining a `CfnCapacityReservationFleet`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html
*/
export interface CfnCapacityReservationFleetProps {
/**
* The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
*
* Currently, only the `prioritized` allocation strategy is supported. For more information, see [Allocation strategy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy) in the *Amazon EC2 User Guide* .
*
* Valid values: `prioritized`
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-allocationstrategy
*/
readonly allocationStrategy?: string;
/**
* The date and time at which the Capacity Reservation Fleet expires.
*
* When the Capacity Reservation Fleet expires, its state changes to `expired` and all of the Capacity Reservations in the Fleet expire.
*
* The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify `5/31/2019` , `13:30:55` , the Capacity Reservation Fleet is guaranteed to expire between `13:30:55` and `14:30:55` on `5/31/2019` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-enddate
*/
readonly endDate?: string;
/**
* Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
*
* All Capacity Reservations in the Fleet inherit this instance matching criteria.
*
* Currently, Capacity Reservation Fleets support `open` instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-instancematchcriteria
*/
readonly instanceMatchCriteria?: string;
/**
* Information about the instance types for which to reserve the capacity.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-instancetypespecifications
*/
readonly instanceTypeSpecifications?: Array<CfnCapacityReservationFleet.InstanceTypeSpecificationProperty | cdk.IResolvable> | cdk.IResolvable;
/**
* Used to add an end date to a Capacity Reservation Fleet that has no end date and time.
*
* To add an end date to a Capacity Reservation