@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Amazon Elastic Block Store
@version 2019-11-02
@auth AWS SigV4
@endpoints 6
@toc snapshots(6)

@endpoint POST /snapshots/completion/{snapshotId}
@required {SnapshotId: str, x-amz-ChangedBlocksCount: int}
@optional {x-amz-Checksum: str, x-amz-Checksum-Algorithm: str, x-amz-Checksum-Aggregation-Method: str}
@returns(200) {Status: str?}

@endpoint GET /snapshots/{snapshotId}/blocks/{blockIndex}
@required {SnapshotId: str, BlockIndex: int, blockToken: str}
@returns(200) {DataLength: int?, BlockData: bytes?, Checksum: str?, ChecksumAlgorithm: str?}

@endpoint GET /snapshots/{secondSnapshotId}/changedblocks
@required {SecondSnapshotId: str}
@optional {firstSnapshotId: str, pageToken: str, maxResults: int, startingBlockIndex: int}
@returns(200) {ChangedBlocks: [ChangedBlock]?, ExpiryTime: str(timestamp)?, VolumeSize: int(i64)?, BlockSize: int?, NextToken: str?}

@endpoint GET /snapshots/{snapshotId}/blocks
@required {SnapshotId: str}
@optional {pageToken: str, maxResults: int, startingBlockIndex: int}
@returns(200) {Blocks: [Block]?, ExpiryTime: str(timestamp)?, VolumeSize: int(i64)?, BlockSize: int?, NextToken: str?}

@endpoint PUT /snapshots/{snapshotId}/blocks/{blockIndex}
@required {SnapshotId: str, BlockIndex: int, x-amz-Data-Length: int, x-amz-Checksum: str, x-amz-Checksum-Algorithm: str, BlockData: bytes}
@optional {x-amz-Progress: int}
@returns(200) {Checksum: str?, ChecksumAlgorithm: str?}

@endpoint POST /snapshots
@required {VolumeSize: int(i64)}
@optional {ParentSnapshotId: str, Tags: [Tag], Description: str, ClientToken: str, Encrypted: bool, KmsKeyArn: str, Timeout: int}
@returns(200) {Description: str?, SnapshotId: str?, OwnerId: str?, Status: str?, StartTime: str(timestamp)?, VolumeSize: int(i64)?, BlockSize: int?, Tags: [Tag]?, ParentSnapshotId: str?, KmsKeyArn: str?, SseType: str?}

@end
