@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Amazon Data Lifecycle Manager
@version 2018-01-12
@auth AWS SigV4
@endpoints 8
@toc policies(5), tags(3)

@group policies
@endpoint POST /policies
@desc Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:   Custom EBS snapshot policy   Custom EBS-backed AMI policy   Cross-account copy event policy   Default policy for EBS snapshots   Default policy for EBS-backed AMIs   For more information, see  Default policies vs custom policies.  If you create a default policy, you can specify the request parameters either in the request body, or in the PolicyDetails request structure, but not both.
@required {ExecutionRoleArn: str, Description: str, State: str}
@optional {PolicyDetails: PolicyDetails, Tags: map<str,str>, DefaultPolicy: str, CreateInterval: int, RetainInterval: int, CopyTags: bool, ExtendDeletion: bool, CrossRegionCopyTargets: [CrossRegionCopyTarget], Exclusions: Exclusions}
@returns(200) {PolicyId: str?}

@endpoint DELETE /policies/{policyId}
@desc Deletes the specified lifecycle policy and halts the automated operations that the policy specified. For more information about deleting a policy, see Delete lifecycle policies.
@required {PolicyId: str}

@endpoint GET /policies
@desc Gets summary information about all or the specified data lifecycle policies. To get complete information about a policy, use GetLifecyclePolicy.
@optional {policyIds: [str], state: str, resourceTypes: [str], targetTags: [str], tagsToAdd: [str], defaultPolicyType: str}
@returns(200) {Policies: [LifecyclePolicySummary]?}

@endpoint GET /policies/{policyId}
@desc Gets detailed information about the specified lifecycle policy.
@required {PolicyId: str}
@returns(200) {Policy: LifecyclePolicy?{PolicyId: str?, Description: str?, State: str?, StatusMessage: str?, ExecutionRoleArn: str?, DateCreated: str(timestamp)?, DateModified: str(timestamp)?, PolicyDetails: PolicyDetails?{PolicyType: str?, ResourceTypes: [str]?, ResourceLocations: [str]?, TargetTags: [Tag]?, Schedules: [Schedule]?, Parameters: Parameters?{ExcludeBootVolume: bool?, NoReboot: bool?, ExcludeDataVolumeTags: [Tag]?}, EventSource: EventSource?{Type: str, Parameters: EventParameters?}, Actions: [Action]?, PolicyLanguage: str?, ResourceType: str?, CreateInterval: int?, RetainInterval: int?, CopyTags: bool?, CrossRegionCopyTargets: [CrossRegionCopyTarget]?, ExtendDeletion: bool?, Exclusions: Exclusions?{ExcludeBootVolumes: bool?, ExcludeVolumeTypes: [str]?, ExcludeTags: [Tag]?}}, Tags: map<str,str>?, PolicyArn: str?, DefaultPolicy: bool?}}

@endgroup

@group tags
@endpoint GET /tags/{resourceArn}
@desc Lists the tags for the specified resource.
@required {ResourceArn: str}
@returns(200) {Tags: map<str,str>?}

@endpoint POST /tags/{resourceArn}
@desc Adds the specified tags to the specified resource.
@required {ResourceArn: str, Tags: map<str,str>}

@endpoint DELETE /tags/{resourceArn}
@desc Removes the specified tags from the specified resource.
@required {ResourceArn: str, tagKeys: [str]}

@endgroup

@group policies
@endpoint PATCH /policies/{policyId}
@desc Updates the specified lifecycle policy. For more information about updating a policy, see Modify lifecycle policies.
@required {PolicyId: str}
@optional {ExecutionRoleArn: str, State: str, Description: str, PolicyDetails: PolicyDetails, CreateInterval: int, RetainInterval: int, CopyTags: bool, ExtendDeletion: bool, CrossRegionCopyTargets: [CrossRegionCopyTarget], Exclusions: Exclusions}

@endgroup

@end
