Class CfnCapacityReservation
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ec2.CfnCapacityReservation
- All Implemented Interfaces:
IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:07.413Z")
@Stability(Stable)
public class CfnCapacityReservation
extends CfnResource
implements IInspectable
Creates a new Capacity Reservation with the specified attributes.
For more information, see Capacity Reservations in the Amazon EC2 User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
CfnCapacityReservation cfnCapacityReservation = CfnCapacityReservation.Builder.create(this, "MyCfnCapacityReservation")
.availabilityZone("availabilityZone")
.instanceCount(123)
.instancePlatform("instancePlatform")
.instanceType("instanceType")
// the properties below are optional
.ebsOptimized(false)
.endDate("endDate")
.endDateType("endDateType")
.ephemeralStorage(false)
.instanceMatchCriteria("instanceMatchCriteria")
.outPostArn("outPostArn")
.placementGroupArn("placementGroupArn")
.tagSpecifications(List.of(TagSpecificationProperty.builder()
.resourceType("resourceType")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build()))
.tenancy("tenancy")
.unusedReservationBillingOwnerId("unusedReservationBillingOwnerId")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnCapacityReservation.static interfaceAn array of key-value pairs to apply to this resource.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCapacityReservation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCapacityReservation(software.amazon.jsii.JsiiObjectRef objRef) CfnCapacityReservation(software.constructs.Construct scope, String id, CfnCapacityReservationProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Availability Zone in which the capacity is reserved.Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation.The ID of the Capacity Reservation.Returns the type of instance for which the capacity is reserved.Returns the tenancy of the Capacity Reservation.Returns the total number of instances for which the Capacity Reservation reserves capacity.The Availability Zone in which to create the Capacity Reservation.Indicates whether the Capacity Reservation supports EBS-optimized instances.The date and time at which the Capacity Reservation expires.Indicates the way in which the Capacity Reservation ends.Deprecated..The number of instances for which to reserve capacity.Indicates the type of instance launches that the Capacity Reservation accepts.The type of operating system for which to reserve capacity.The instance type for which to reserve capacity.The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation.The tags to apply to the Capacity Reservation during launch.Indicates the tenancy of the Capacity Reservation.The ID of the AWS account to which billing of the unused capacity of the Capacity Reservation is assigned.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAvailabilityZone(String value) The Availability Zone in which to create the Capacity Reservation.voidsetEbsOptimized(Boolean value) Indicates whether the Capacity Reservation supports EBS-optimized instances.voidsetEbsOptimized(IResolvable value) Indicates whether the Capacity Reservation supports EBS-optimized instances.voidsetEndDate(String value) The date and time at which the Capacity Reservation expires.voidsetEndDateType(String value) Indicates the way in which the Capacity Reservation ends.voidsetEphemeralStorage(Boolean value) Deprecated..voidsetEphemeralStorage(IResolvable value) Deprecated..voidsetInstanceCount(Number value) The number of instances for which to reserve capacity.voidsetInstanceMatchCriteria(String value) Indicates the type of instance launches that the Capacity Reservation accepts.voidsetInstancePlatform(String value) The type of operating system for which to reserve capacity.voidsetInstanceType(String value) The instance type for which to reserve capacity.voidsetOutPostArn(String value) The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.voidsetPlacementGroupArn(String value) The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation.voidsetTagSpecifications(List<Object> value) The tags to apply to the Capacity Reservation during launch.voidsetTagSpecifications(IResolvable value) The tags to apply to the Capacity Reservation during launch.voidsetTenancy(String value) Indicates the tenancy of the Capacity Reservation.voidThe ID of the AWS account to which billing of the unused capacity of the Capacity Reservation is assigned.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnCapacityReservation
protected CfnCapacityReservation(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCapacityReservation
protected CfnCapacityReservation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCapacityReservation
@Stability(Stable) public CfnCapacityReservation(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCapacityReservationProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAvailabilityZone
Returns the Availability Zone in which the capacity is reserved.For example:
us-east-1a. -
getAttrAvailableInstanceCount
Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation.For example:
9. -
getAttrId
The ID of the Capacity Reservation. -
getAttrInstanceType
Returns the type of instance for which the capacity is reserved.For example:
m4.large. -
getAttrTenancy
Returns the tenancy of the Capacity Reservation.For example:
dedicated. -
getAttrTotalInstanceCount
Returns the total number of instances for which the Capacity Reservation reserves capacity.For example:
15. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getAvailabilityZone
The Availability Zone in which to create the Capacity Reservation. -
setAvailabilityZone
The Availability Zone in which to create the Capacity Reservation. -
getInstanceCount
The number of instances for which to reserve capacity. -
setInstanceCount
The number of instances for which to reserve capacity. -
getInstancePlatform
The type of operating system for which to reserve capacity. -
setInstancePlatform
The type of operating system for which to reserve capacity. -
getInstanceType
The instance type for which to reserve capacity. -
setInstanceType
The instance type for which to reserve capacity. -
getEbsOptimized
Indicates whether the Capacity Reservation supports EBS-optimized instances. -
setEbsOptimized
Indicates whether the Capacity Reservation supports EBS-optimized instances. -
setEbsOptimized
Indicates whether the Capacity Reservation supports EBS-optimized instances. -
getEndDate
The date and time at which the Capacity Reservation expires. -
setEndDate
The date and time at which the Capacity Reservation expires. -
getEndDateType
Indicates the way in which the Capacity Reservation ends. -
setEndDateType
Indicates the way in which the Capacity Reservation ends. -
getEphemeralStorage
Deprecated.. -
setEphemeralStorage
Deprecated.. -
setEphemeralStorage
Deprecated.. -
getInstanceMatchCriteria
Indicates the type of instance launches that the Capacity Reservation accepts.The options include:.
-
setInstanceMatchCriteria
Indicates the type of instance launches that the Capacity Reservation accepts.The options include:.
-
getOutPostArn
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. -
setOutPostArn
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. -
getPlacementGroupArn
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. -
setPlacementGroupArn
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. -
getTagSpecifications
The tags to apply to the Capacity Reservation during launch. -
setTagSpecifications
The tags to apply to the Capacity Reservation during launch. -
setTagSpecifications
The tags to apply to the Capacity Reservation during launch. -
getTenancy
Indicates the tenancy of the Capacity Reservation.A Capacity Reservation can have one of the following tenancy settings:.
-
setTenancy
Indicates the tenancy of the Capacity Reservation.A Capacity Reservation can have one of the following tenancy settings:.
-
getUnusedReservationBillingOwnerId
The ID of the AWS account to which billing of the unused capacity of the Capacity Reservation is assigned. -
setUnusedReservationBillingOwnerId
The ID of the AWS account to which billing of the unused capacity of the Capacity Reservation is assigned.
-