Class CfnCapacityManagerDataExport

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

@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)", date="2025-11-10T13:40:02.629Z") @Stability(Stable) public class CfnCapacityManagerDataExport extends CfnResource implements IInspectable, ICapacityManagerDataExportRef, ITaggableV2
Creates a new data export configuration for EC2 Capacity Manager.

This allows you to automatically export capacity usage data to an S3 bucket on a scheduled basis. The exported data includes metrics for On-Demand, Spot, and Capacity Reservations usage across your organization.

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.*;
 CfnCapacityManagerDataExport cfnCapacityManagerDataExport = CfnCapacityManagerDataExport.Builder.create(this, "MyCfnCapacityManagerDataExport")
         .outputFormat("outputFormat")
         .s3BucketName("s3BucketName")
         .schedule("schedule")
         // the properties below are optional
         .s3BucketPrefix("s3BucketPrefix")
         .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

    • CfnCapacityManagerDataExport

      protected CfnCapacityManagerDataExport(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnCapacityManagerDataExport

      protected CfnCapacityManagerDataExport(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnCapacityManagerDataExport

      @Stability(Stable) public CfnCapacityManagerDataExport(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCapacityManagerDataExportProps 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.
    • getAttrCapacityManagerDataExportId

      @Stability(Stable) @NotNull public String getAttrCapacityManagerDataExportId()
      The unique identifier for the data export configuration.
    • getCapacityManagerDataExportRef

      @Stability(Stable) @NotNull public CapacityManagerDataExportReference getCapacityManagerDataExportRef()
      A reference to a CapacityManagerDataExport resource.
      Specified by:
      getCapacityManagerDataExportRef in interface ICapacityManagerDataExportRef
    • 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
    • getOutputFormat

      @Stability(Stable) @NotNull public String getOutputFormat()
      The file format of the exported data.
    • setOutputFormat

      @Stability(Stable) public void setOutputFormat(@NotNull String value)
      The file format of the exported data.
    • getS3BucketName

      @Stability(Stable) @NotNull public String getS3BucketName()
      The name of the S3 bucket where export files are delivered.
    • setS3BucketName

      @Stability(Stable) public void setS3BucketName(@NotNull String value)
      The name of the S3 bucket where export files are delivered.
    • getSchedule

      @Stability(Stable) @NotNull public String getSchedule()
      The frequency at which data exports are generated.
    • setSchedule

      @Stability(Stable) public void setSchedule(@NotNull String value)
      The frequency at which data exports are generated.
    • getS3BucketPrefix

      @Stability(Stable) @Nullable public String getS3BucketPrefix()
      The S3 key prefix used for organizing export files within the bucket.
    • setS3BucketPrefix

      @Stability(Stable) public void setS3BucketPrefix(@Nullable String value)
      The S3 key prefix used for organizing export files within the bucket.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags associated with the data export configuration.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags associated with the data export configuration.