Class CfnCapacityReservation

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:02.987Z") @Stability(Stable) public class CfnCapacityReservation extends CfnResource implements IInspectable, ITaggableV2
Specifies a capacity reservation with the provided name and number of requested data processing units.

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.athena.*;
 CfnCapacityReservation cfnCapacityReservation = CfnCapacityReservation.Builder.create(this, "MyCfnCapacityReservation")
         .name("name")
         .targetDpus(123)
         // the properties below are optional
         .capacityAssignmentConfiguration(CapacityAssignmentConfigurationProperty.builder()
                 .capacityAssignments(List.of(CapacityAssignmentProperty.builder()
                         .workgroupNames(List.of("workgroupNames"))
                         .build()))
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAllocatedDpus

      @Stability(Stable) @NotNull public Number getAttrAllocatedDpus()
      The number of data processing units currently allocated.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the capacity reservation.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      The time in UTC epoch millis when the capacity reservation was created.
    • getAttrLastSuccessfulAllocationTime

      @Stability(Stable) @NotNull public String getAttrLastSuccessfulAllocationTime()
      The time of the most recent capacity allocation that succeeded.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the capacity reservation.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the capacity reservation.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the capacity reservation.
    • getTargetDpus

      @Stability(Stable) @NotNull public Number getTargetDpus()
      The number of data processing units requested.
    • setTargetDpus

      @Stability(Stable) public void setTargetDpus(@NotNull Number value)
      The number of data processing units requested.
    • getCapacityAssignmentConfiguration

      @Stability(Stable) @Nullable public Object getCapacityAssignmentConfiguration()
      Assigns Athena workgroups (and hence their queries) to capacity reservations.
    • setCapacityAssignmentConfiguration

      @Stability(Stable) public void setCapacityAssignmentConfiguration(@Nullable IResolvable value)
      Assigns Athena workgroups (and hence their queries) to capacity reservations.
    • setCapacityAssignmentConfiguration

      @Stability(Stable) public void setCapacityAssignmentConfiguration(@Nullable CfnCapacityReservation.CapacityAssignmentConfigurationProperty value)
      Assigns Athena workgroups (and hence their queries) to capacity reservations.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to the capacity reservation.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to the capacity reservation.