@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.284Z") public class CfnCapacityReservationFleet extends CfnResource implements IInspectable
Creates a new Capacity Reservation Fleet with the specified attributes. For more information, see Capacity Reservation Fleets 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.*; CfnCapacityReservationFleet cfnCapacityReservationFleet = CfnCapacityReservationFleet.Builder.create(this, "MyCfnCapacityReservationFleet") .allocationStrategy("allocationStrategy") .endDate("endDate") .instanceMatchCriteria("instanceMatchCriteria") .instanceTypeSpecifications(List.of(InstanceTypeSpecificationProperty.builder() .availabilityZone("availabilityZone") .availabilityZoneId("availabilityZoneId") .ebsOptimized(false) .instancePlatform("instancePlatform") .instanceType("instanceType") .priority(123) .weight(123) .build())) .noRemoveEndDate(false) .removeEndDate(false) .tagSpecifications(List.of(TagSpecificationProperty.builder() .resourceType("resourceType") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build())) .tenancy("tenancy") .totalTargetCapacity(123) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnCapacityReservationFleet.Builder
A fluent builder for
CfnCapacityReservationFleet . |
static interface |
CfnCapacityReservationFleet.InstanceTypeSpecificationProperty
Specifies information about an instance type to use in a Capacity Reservation Fleet.
|
static interface |
CfnCapacityReservationFleet.TagSpecificationProperty
The tags to apply to a resource when the resource is being created.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnCapacityReservationFleet(Construct scope,
java.lang.String id)
Create a new `AWS::EC2::CapacityReservationFleet`.
|
|
CfnCapacityReservationFleet(Construct scope,
java.lang.String id,
CfnCapacityReservationFleetProps props)
Create a new `AWS::EC2::CapacityReservationFleet`.
|
protected |
CfnCapacityReservationFleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnCapacityReservationFleet(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAllocationStrategy()
The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
|
java.lang.String |
getAttrCapacityReservationFleetId()
The ID of the Capacity Reservation Fleet.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getEndDate()
The date and time at which the Capacity Reservation Fleet expires.
|
java.lang.String |
getInstanceMatchCriteria()
Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
|
java.lang.Object |
getInstanceTypeSpecifications()
Information about the instance types for which to reserve the capacity.
|
java.lang.Object |
getNoRemoveEndDate()
`AWS::EC2::CapacityReservationFleet.NoRemoveEndDate`.
|
java.lang.Object |
getRemoveEndDate()
`AWS::EC2::CapacityReservationFleet.RemoveEndDate`.
|
java.lang.Object |
getTagSpecifications()
The tags to assign to the Capacity Reservation Fleet.
|
java.lang.String |
getTenancy()
Indicates the tenancy of the Capacity Reservation Fleet.
|
java.lang.Number |
getTotalTargetCapacity()
The total number of capacity units to be reserved by the Capacity Reservation Fleet.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAllocationStrategy(java.lang.String value)
The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
|
void |
setEndDate(java.lang.String value)
The date and time at which the Capacity Reservation Fleet expires.
|
void |
setInstanceMatchCriteria(java.lang.String value)
Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
|
void |
setInstanceTypeSpecifications(IResolvable value)
Information about the instance types for which to reserve the capacity.
|
void |
setInstanceTypeSpecifications(java.util.List<java.lang.Object> value)
Information about the instance types for which to reserve the capacity.
|
void |
setNoRemoveEndDate(java.lang.Boolean value)
`AWS::EC2::CapacityReservationFleet.NoRemoveEndDate`.
|
void |
setNoRemoveEndDate(IResolvable value)
`AWS::EC2::CapacityReservationFleet.NoRemoveEndDate`.
|
void |
setRemoveEndDate(java.lang.Boolean value)
`AWS::EC2::CapacityReservationFleet.RemoveEndDate`.
|
void |
setRemoveEndDate(IResolvable value)
`AWS::EC2::CapacityReservationFleet.RemoveEndDate`.
|
void |
setTagSpecifications(IResolvable value)
The tags to assign to the Capacity Reservation Fleet.
|
void |
setTagSpecifications(java.util.List<java.lang.Object> value)
The tags to assign to the Capacity Reservation Fleet.
|
void |
setTenancy(java.lang.String value)
Indicates the tenancy of the Capacity Reservation Fleet.
|
void |
setTotalTargetCapacity(java.lang.Number value)
The total number of capacity units to be reserved by the Capacity Reservation Fleet.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnCapacityReservationFleet(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnCapacityReservationFleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnCapacityReservationFleet(Construct scope, java.lang.String id, CfnCapacityReservationFleetProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties.public CfnCapacityReservationFleet(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrCapacityReservationFleetId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getAllocationStrategy()
Currently, only the prioritized
allocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide.
Valid values: prioritized
public void setAllocationStrategy(java.lang.String value)
Currently, only the prioritized
allocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide.
Valid values: prioritized
public java.lang.String getEndDate()
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
.
public void setEndDate(java.lang.String value)
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
.
public java.lang.String getInstanceMatchCriteria()
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.
public void setInstanceMatchCriteria(java.lang.String value)
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.
public java.lang.Object getInstanceTypeSpecifications()
public void setInstanceTypeSpecifications(IResolvable value)
public void setInstanceTypeSpecifications(java.util.List<java.lang.Object> value)
public java.lang.Object getNoRemoveEndDate()
public void setNoRemoveEndDate(java.lang.Boolean value)
public void setNoRemoveEndDate(IResolvable value)
public java.lang.Object getRemoveEndDate()
public void setRemoveEndDate(java.lang.Boolean value)
public void setRemoveEndDate(IResolvable value)
public java.lang.Object getTagSpecifications()
The tags are automatically assigned to the Capacity Reservations in the Fleet.
public void setTagSpecifications(IResolvable value)
The tags are automatically assigned to the Capacity Reservations in the Fleet.
public void setTagSpecifications(java.util.List<java.lang.Object> value)
The tags are automatically assigned to the Capacity Reservations in the Fleet.
public java.lang.String getTenancy()
All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:
default
- The Capacity Reservation Fleet is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservations are created on single-tenant hardware that is dedicated to a single AWS account .public void setTenancy(java.lang.String value)
All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:
default
- The Capacity Reservation Fleet is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservations are created on single-tenant hardware that is dedicated to a single AWS account .public java.lang.Number getTotalTargetCapacity()
This value, together with the instance type weights that you assign to each instance type used by 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 in the Amazon EC2 User Guide.
public void setTotalTargetCapacity(java.lang.Number value)
This value, together with the instance type weights that you assign to each instance type used by 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 in the Amazon EC2 User Guide.