ansible-collections / community.aws

Ansible Collection for Community AWS
GNU General Public License v3.0
188 stars 396 forks source link

Add Support for EBS direct APIs to manage and update snapshots #1053

Open davdunc opened 2 years ago

davdunc commented 2 years ago

Summary

It would be beneficial to have advanced snapshot management using the EBS direct APSs to create Amazon EBS snapshots, write data directly to existing snapshots, read data from existing snapshots, and review the changes between snapshots. The EBS direct APIs make it possible to create incremental snapshots from local volumes as well as from existing EBS Volumes.

API actions to support:

Issue Type

Feature Idea

Component Name

community.aws.fast_snapshot_write community.aws.fast_snapshot_read community.aws.fast_snapshot_info

Additional Information

Examples

Start Snapshot

Create an open snapshot.

community.aws.fast_snapshot_write:
  profile: "string"
  region: "string"
  client_token: "string"
  description: "string"
  encrypted: "boolean"
  action: "start_snapshot"
  kms_key_arn: "string"
  tags:
    "<key1>": "<value1>"
    "<key2>": "<value2>"
  timeout: int
  volume_size: int  # in GB  

Create incremental write to the open snapshot

Similar this can be writing to an open snapshot.

community.aws.fast_snapshot_write:
  profile: "string"
  region: "string"
  client_token: "string"
  action: put 
  block_index: int
  checksum: "string"
  checksum_algorithm: "string"
  data_length: int
  block_data: "blob"

Complete Snapshot

community.aws.fast_snapshot_write:
  profile: "string"
  region: "string"
  client_token: "string"
  action: complete 
  changed_blocks_count: int
  checksum: "string"
  checksum_aggregation_method: LINEAR
  snapshot_id: "string" 

At this point, I am simply speculating on what it could look like by using an action to distinguish the various API calls to the Amazon EC2 API without creating a headache of multiple modules for users.

Code of Conduct

ansibullbot commented 2 years ago

Files identified in the description: None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help