capacity_manager_data_exports
Creates, updates, deletes, gets or lists a capacity_manager_data_exports resource.
Overview
| Name | capacity_manager_data_exports |
| Type | Resource |
| Id | aws.ec2.capacity_manager_data_exports |
Fields
The following fields are returned by SELECT queries:
- describe_capacity_manager_data_exports
| Name | Datatype | Description |
|---|---|---|
capacity_manager_data_export_id | string | The unique identifier for the data export configuration. |
create_time | string | The timestamp when the data export configuration was created. |
latest_delivery_s3_location_uri | string | The S3 URI of the most recently delivered export file. |
latest_delivery_status | string | The status of the most recent export delivery. |
latest_delivery_status_message | string | A message describing the status of the most recent export delivery, including any error details if the delivery failed. |
latest_delivery_time | string | The timestamp when the most recent export was delivered to S3. |
output_format | string | The file format of the exported data. |
s3_bucket_name | string | The name of the S3 bucket where export files are delivered. |
s3_bucket_prefix | string | The S3 key prefix used for organizing export files within the bucket. |
schedule | string | The frequency at which data exports are generated. |
tags | string | The tags associated with the data export configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_capacity_manager_data_exports | select | region | CapacityManagerDataExportId, MaxResults, NextToken, DryRun, Filter | Describes one or more Capacity Manager data export configurations. Returns information about export settings, delivery status, and recent export activity. |
create_capacity_manager_data_export | insert | S3BucketName, OutputFormat, region | S3BucketPrefix, Schedule, ClientToken, DryRun, TagSpecification | 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. |
delete_capacity_manager_data_export | delete | CapacityManagerDataExportId, region | DryRun | Deletes an existing Capacity Manager data export configuration. This stops future scheduled exports but does not delete previously exported files from S3. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
CapacityManagerDataExportId | string | The unique identifier of the data export configuration to delete. |
OutputFormat | string | The file format for the exported data. Parquet format is recommended for large datasets and better compression. |
S3BucketName | string | The name of the S3 bucket where the capacity data export files will be delivered. The bucket must exist and you must have write permissions to it. |
region | string | AWS region (default: us-east-1) |
CapacityManagerDataExportId | array | The IDs of the data export configurations to describe. If not specified, all export configurations are returned. |
ClientToken | string | Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency. |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
Filter | array | One or more filters to narrow the results. Supported filters include export status, creation date, and S3 bucket name. |
MaxResults | integer | The maximum number of results to return in a single call. If not specified, up to 1000 results are returned. |
NextToken | string | The token for the next page of results. Use this value in a subsequent call to retrieve additional results. |
S3BucketPrefix | string | The S3 key prefix for the exported data files. This allows you to organize exports in a specific folder structure within your bucket. If not specified, files are placed at the bucket root. |
Schedule | string | The frequency at which data exports are generated. |
TagSpecification | array | The tags to apply to the data export configuration. You can tag the export for organization and cost tracking purposes. |
SELECT examples
- describe_capacity_manager_data_exports
Describes one or more Capacity Manager data export configurations. Returns information about export settings, delivery status, and recent export activity.
SELECT
capacity_manager_data_export_id,
create_time,
latest_delivery_s3_location_uri,
latest_delivery_status,
latest_delivery_status_message,
latest_delivery_time,
output_format,
s3_bucket_name,
s3_bucket_prefix,
schedule,
tags
FROM aws.ec2.capacity_manager_data_exports
WHERE region = '{{ region }}' -- required
AND CapacityManagerDataExportId = '{{ CapacityManagerDataExportId }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
;
INSERT examples
- create_capacity_manager_data_export
- Manifest
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.
INSERT INTO aws.ec2.capacity_manager_data_exports (
S3BucketName,
OutputFormat,
region,
S3BucketPrefix,
Schedule,
ClientToken,
DryRun,
TagSpecification
)
SELECT
'{{ S3BucketName }}',
'{{ OutputFormat }}',
'{{ region }}',
'{{ S3BucketPrefix }}',
'{{ Schedule }}',
'{{ ClientToken }}',
'{{ DryRun }}',
'{{ TagSpecification }}'
RETURNING
capacity_manager_data_export_id
;
# Description fields are for documentation purposes
- name: capacity_manager_data_exports
props:
- name: S3BucketName
value: "{{ S3BucketName }}"
description: Required parameter for the capacity_manager_data_exports resource.
- name: OutputFormat
value: "{{ OutputFormat }}"
description: Required parameter for the capacity_manager_data_exports resource.
- name: region
value: "{{ region }}"
description: Required parameter for the capacity_manager_data_exports resource.
- name: S3BucketPrefix
value: "{{ S3BucketPrefix }}"
description: The S3 key prefix for the exported data files. This allows you to organize exports in a specific folder structure within your bucket. If not specified, files are placed at the bucket root.
description: The S3 key prefix for the exported data files. This allows you to organize exports in a specific folder structure within your bucket. If not specified, files are placed at the bucket root.
- name: Schedule
value: "{{ Schedule }}"
description: The frequency at which data exports are generated.
description: The frequency at which data exports are generated.
- name: ClientToken
value: "{{ ClientToken }}"
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
- name: DryRun
value: {{ DryRun }}
description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the data export configuration. You can tag the export for organization and cost tracking purposes.
description: The tags to apply to the data export configuration. You can tag the export for organization and cost tracking purposes.
DELETE examples
- delete_capacity_manager_data_export
Deletes an existing Capacity Manager data export configuration. This stops future scheduled exports but does not delete previously exported files from S3.
DELETE FROM aws.ec2.capacity_manager_data_exports
WHERE CapacityManagerDataExportId = '{{ CapacityManagerDataExportId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;