diff --git a/.changes/next-release/feature-AmazonRecycleBin-742f90b.json b/.changes/next-release/feature-AmazonRecycleBin-742f90b.json new file mode 100644 index 000000000000..37c84972172c --- /dev/null +++ b/.changes/next-release/feature-AmazonRecycleBin-742f90b.json @@ -0,0 +1,6 @@ +{ + "type": "feature", + "category": "Amazon Recycle Bin", + "contributor": "", + "description": "This release adds support for Recycle Bin." +} diff --git a/services/rbin/pom.xml b/services/rbin/pom.xml new file mode 100644 index 000000000000..f4cc60fbd665 --- /dev/null +++ b/services/rbin/pom.xml @@ -0,0 +1,60 @@ + + + + + 4.0.0 + + software.amazon.awssdk + services + 2.17.92-SNAPSHOT + + rbin + AWS Java SDK :: Services :: Rbin + The AWS Java SDK for Rbin module holds the client classes that are used for + communicating with Rbin. + + https://aws.amazon.com/sdkforjava + + + + org.apache.maven.plugins + maven-jar-plugin + + + + software.amazon.awssdk.services.rbin + + + + + + + + + + software.amazon.awssdk + protocol-core + ${awsjavasdk.version} + + + software.amazon.awssdk + aws-json-protocol + ${awsjavasdk.version} + + + diff --git a/services/rbin/src/main/resources/codegen-resources/paginators-1.json b/services/rbin/src/main/resources/codegen-resources/paginators-1.json new file mode 100644 index 000000000000..bdbfafb4836c --- /dev/null +++ b/services/rbin/src/main/resources/codegen-resources/paginators-1.json @@ -0,0 +1,10 @@ +{ + "pagination": { + "ListRules": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults", + "result_key": "Rules" + } + } +} diff --git a/services/rbin/src/main/resources/codegen-resources/service-2.json b/services/rbin/src/main/resources/codegen-resources/service-2.json new file mode 100644 index 000000000000..cd91db4ec901 --- /dev/null +++ b/services/rbin/src/main/resources/codegen-resources/service-2.json @@ -0,0 +1,643 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2021-06-15", + "endpointPrefix":"rbin", + "jsonVersion":"1.1", + "protocol":"rest-json", + "serviceFullName":"Amazon Recycle Bin", + "serviceId":"rbin", + "signatureVersion":"v4", + "signingName":"rbin", + "uid":"rbin-2021-06-15" + }, + "operations":{ + "CreateRule":{ + "name":"CreateRule", + "http":{ + "method":"POST", + "requestUri":"/rules", + "responseCode":201 + }, + "input":{"shape":"CreateRuleRequest"}, + "output":{"shape":"CreateRuleResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"InternalServerException"} + ], + "documentation":"

Creates a Recycle Bin retention rule. For more information, see Create Recycle Bin retention rules in the Amazon EC2 User Guide.

" + }, + "DeleteRule":{ + "name":"DeleteRule", + "http":{ + "method":"DELETE", + "requestUri":"/rules/{identifier}", + "responseCode":204 + }, + "input":{"shape":"DeleteRuleRequest"}, + "output":{"shape":"DeleteRuleResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"} + ], + "documentation":"

Deletes a Recycle Bin retention rule. For more information, see Delete Recycle Bin retention rules in the Amazon EC2 User Guide.

" + }, + "GetRule":{ + "name":"GetRule", + "http":{ + "method":"GET", + "requestUri":"/rules/{identifier}", + "responseCode":200 + }, + "input":{"shape":"GetRuleRequest"}, + "output":{"shape":"GetRuleResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"} + ], + "documentation":"

Gets information about a Recycle Bin retention rule.

" + }, + "ListRules":{ + "name":"ListRules", + "http":{ + "method":"POST", + "requestUri":"/list-rules", + "responseCode":200 + }, + "input":{"shape":"ListRulesRequest"}, + "output":{"shape":"ListRulesResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"InternalServerException"} + ], + "documentation":"

Lists the Recycle Bin retention rules in the Region.

" + }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"GET", + "requestUri":"/tags/{resourceArn}", + "responseCode":200 + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"} + ], + "documentation":"

Lists the tags assigned a specific resource.

" + }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/tags/{resourceArn}", + "responseCode":201 + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceQuotaExceededException"} + ], + "documentation":"

Assigns tags to the specified resource.

" + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"DELETE", + "requestUri":"/tags/{resourceArn}", + "responseCode":204 + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"} + ], + "documentation":"

Unassigns a tag from a resource.

" + }, + "UpdateRule":{ + "name":"UpdateRule", + "http":{ + "method":"PATCH", + "requestUri":"/rules/{identifier}", + "responseCode":200 + }, + "input":{"shape":"UpdateRuleRequest"}, + "output":{"shape":"UpdateRuleResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"} + ], + "documentation":"

Updates an existing Recycle Bin retention rule. For more information, see Update Recycle Bin retention rules in the Amazon EC2 User Guide.

" + } + }, + "shapes":{ + "CreateRuleRequest":{ + "type":"structure", + "required":[ + "RetentionPeriod", + "ResourceType" + ], + "members":{ + "RetentionPeriod":{ + "shape":"RetentionPeriod", + "documentation":"

Information about the retention period for which the retention rule is to retain resources.

" + }, + "Description":{ + "shape":"Description", + "documentation":"

A brief description for the retention rule.

" + }, + "Tags":{ + "shape":"TagList", + "documentation":"

Information about the tags to assign to the retention rule.

" + }, + "ResourceType":{ + "shape":"ResourceType", + "documentation":"

The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots are supported.

" + }, + "ResourceTags":{ + "shape":"ResourceTags", + "documentation":"

Information about the resource tags to use to identify resources that are to be retained by the retention rule. The retention rule retains only deleted snapshots that have one or more of the specified tag key and value pairs. If a snapshot is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

You can add the same tag key and value pair to a maximum or five retention rules.

" + } + } + }, + "CreateRuleResponse":{ + "type":"structure", + "members":{ + "Identifier":{ + "shape":"RuleIdentifier", + "documentation":"

The unique identifier of the retention rule.

" + }, + "RetentionPeriod":{"shape":"RetentionPeriod"}, + "Description":{ + "shape":"Description", + "documentation":"

The retention rule description.

" + }, + "Tags":{ + "shape":"TagList", + "documentation":"

The tags assigned to the retention rule.

" + }, + "ResourceType":{ + "shape":"ResourceType", + "documentation":"

The resource type retained by the retention rule.

" + }, + "ResourceTags":{ + "shape":"ResourceTags", + "documentation":"

Information about the resource tags used to identify resources that are retained by the retention rule.

" + }, + "Status":{ + "shape":"RuleStatus", + "documentation":"

The state of the retention rule. Only retention rules that are in the available state retain snapshots.

" + } + } + }, + "DeleteRuleRequest":{ + "type":"structure", + "required":["Identifier"], + "members":{ + "Identifier":{ + "shape":"RuleIdentifier", + "documentation":"

The unique ID of the retention rule to delete.

", + "location":"uri", + "locationName":"identifier" + } + } + }, + "DeleteRuleResponse":{ + "type":"structure", + "members":{ + } + }, + "Description":{ + "type":"string", + "pattern":"^[\\S ]{0,255}$" + }, + "ErrorMessage":{"type":"string"}, + "GetRuleRequest":{ + "type":"structure", + "required":["Identifier"], + "members":{ + "Identifier":{ + "shape":"RuleIdentifier", + "documentation":"

The unique ID of the retention rule.

", + "location":"uri", + "locationName":"identifier" + } + } + }, + "GetRuleResponse":{ + "type":"structure", + "members":{ + "Identifier":{ + "shape":"RuleIdentifier", + "documentation":"

The unique ID of the retention rule.

" + }, + "Description":{ + "shape":"Description", + "documentation":"

The description assigned to the retention rule.

" + }, + "ResourceType":{ + "shape":"ResourceType", + "documentation":"

The resource type retained by the retention rule. Currently, only Amazon EBS snapshots are supported.

" + }, + "RetentionPeriod":{ + "shape":"RetentionPeriod", + "documentation":"

Information about the period for which the retention rule retains resources.

" + }, + "ResourceTags":{ + "shape":"ResourceTags", + "documentation":"

The resource tags used to identify resources that are to be retained by the retention rule.

" + }, + "Status":{ + "shape":"RuleStatus", + "documentation":"

The state of the retention rule. Only retention rules that are in the available state retain snapshots.

" + } + } + }, + "InternalServerException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "documentation":"

The service could not respond to the request due to an internal problem.

", + "error":{"httpStatusCode":500}, + "exception":true, + "fault":true + }, + "ListRulesRequest":{ + "type":"structure", + "required":["ResourceType"], + "members":{ + "MaxResults":{ + "shape":"MaxResults", + "documentation":"

The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"

The token to use to retrieve the next page of results.

" + }, + "ResourceType":{ + "shape":"ResourceType", + "documentation":"

The resource type retained by the retention rule. Only retention rules that retain the specified resource type are listed.

" + }, + "ResourceTags":{ + "shape":"ResourceTags", + "documentation":"

The tags used to identify resources that are to be retained by the retention rule.

" + } + } + }, + "ListRulesResponse":{ + "type":"structure", + "members":{ + "Rules":{ + "shape":"RuleSummaryList", + "documentation":"

Information about the retention rules.

" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + } + } + }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceArn"], + "members":{ + "ResourceArn":{ + "shape":"RuleArn", + "documentation":"

The Amazon Resource Name (ARN) of the resource for which to list the tags.

", + "location":"uri", + "locationName":"resourceArn" + } + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "Tags":{ + "shape":"TagList", + "documentation":"

Information about the tags assigned to the resource.

" + } + } + }, + "MaxResults":{ + "type":"integer", + "max":1000, + "min":1 + }, + "NextToken":{ + "type":"string", + "pattern":"^[A-Za-z0-9+/=]{1,2048}$" + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"}, + "Reason":{ + "shape":"ResourceNotFoundExceptionReason", + "documentation":"

The reason for the exception.

" + } + }, + "documentation":"

The specified resource was not found.

", + "error":{"httpStatusCode":404}, + "exception":true + }, + "ResourceNotFoundExceptionReason":{ + "type":"string", + "enum":["RULE_NOT_FOUND"] + }, + "ResourceTag":{ + "type":"structure", + "required":["ResourceTagKey"], + "members":{ + "ResourceTagKey":{ + "shape":"ResourceTagKey", + "documentation":"

The tag key.

" + }, + "ResourceTagValue":{ + "shape":"ResourceTagValue", + "documentation":"

The tag value.

" + } + }, + "documentation":"

Information about a resource tag used to identify resources that are to be retained by a Recycle Bin retention rule.

" + }, + "ResourceTagKey":{ + "type":"string", + "pattern":"^[\\S\\s]{1,128}$" + }, + "ResourceTagValue":{ + "type":"string", + "pattern":"^[\\S\\s]{0,256}$" + }, + "ResourceTags":{ + "type":"list", + "member":{"shape":"ResourceTag"}, + "max":50, + "min":0 + }, + "ResourceType":{ + "type":"string", + "enum":["EBS_SNAPSHOT"] + }, + "RetentionPeriod":{ + "type":"structure", + "required":[ + "RetentionPeriodValue", + "RetentionPeriodUnit" + ], + "members":{ + "RetentionPeriodValue":{ + "shape":"RetentionPeriodValue", + "documentation":"

The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.

" + }, + "RetentionPeriodUnit":{ + "shape":"RetentionPeriodUnit", + "documentation":"

The unit of time in which the retention period is measured. Currently, only DAYS is supported.

" + } + }, + "documentation":"

Information about the retention period for which a retention rule is to retain resources.

" + }, + "RetentionPeriodUnit":{ + "type":"string", + "enum":["DAYS"] + }, + "RetentionPeriodValue":{ + "type":"integer", + "max":3650, + "min":1 + }, + "RuleArn":{ + "type":"string", + "max":1011, + "min":0, + "pattern":"^arn:aws(-[a-z]{1,3}){0,2}:rbin:[a-z\\-0-9]{0,63}:[0-9]{12}:rule/[0-9a-zA-Z]{11}{0,1011}$" + }, + "RuleIdentifier":{ + "type":"string", + "pattern":"[0-9a-zA-Z]{11}" + }, + "RuleStatus":{ + "type":"string", + "enum":[ + "pending", + "available" + ] + }, + "RuleSummary":{ + "type":"structure", + "members":{ + "Identifier":{ + "shape":"RuleIdentifier", + "documentation":"

The unique ID of the retention rule.

" + }, + "Description":{ + "shape":"Description", + "documentation":"

The description for the retention rule.

" + }, + "RetentionPeriod":{ + "shape":"RetentionPeriod", + "documentation":"

Information about the retention period for which the retention rule retains resources

" + } + }, + "documentation":"

Information about a Recycle Bin retention rule.

" + }, + "RuleSummaryList":{ + "type":"list", + "member":{"shape":"RuleSummary"} + }, + "ServiceQuotaExceededException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"}, + "Reason":{ + "shape":"ServiceQuotaExceededExceptionReason", + "documentation":"

The reason for the exception.

" + } + }, + "documentation":"

The request would cause a service quota for the number of tags per resource to be exceeded.

", + "error":{"httpStatusCode":402}, + "exception":true + }, + "ServiceQuotaExceededExceptionReason":{ + "type":"string", + "enum":["SERVICE_QUOTA_EXCEEDED"] + }, + "Tag":{ + "type":"structure", + "required":[ + "Key", + "Value" + ], + "members":{ + "Key":{ + "shape":"TagKey", + "documentation":"

The tag key.

" + }, + "Value":{ + "shape":"TagValue", + "documentation":"

The tag value.

" + } + }, + "documentation":"

Information about the tags assigned to a Recycle Bin retention rule.

" + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "max":200, + "min":0 + }, + "TagList":{ + "type":"list", + "member":{"shape":"Tag"}, + "max":200, + "min":0 + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceArn", + "Tags" + ], + "members":{ + "ResourceArn":{ + "shape":"RuleArn", + "documentation":"

The Amazon Resource Name (ARN) of the resource to which to assign the tags.

", + "location":"uri", + "locationName":"resourceArn" + }, + "Tags":{ + "shape":"TagList", + "documentation":"

Information about the tags to assign to the resource.

" + } + } + }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagValue":{ + "type":"string", + "max":256, + "min":0, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceArn", + "TagKeys" + ], + "members":{ + "ResourceArn":{ + "shape":"RuleArn", + "documentation":"

The Amazon Resource Name (ARN) of the resource from which to unassign the tags.

", + "location":"uri", + "locationName":"resourceArn" + }, + "TagKeys":{ + "shape":"TagKeyList", + "documentation":"

Information about the tags to unassign from the resource.

", + "location":"querystring", + "locationName":"tagKeys" + } + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "UpdateRuleRequest":{ + "type":"structure", + "required":["Identifier"], + "members":{ + "Identifier":{ + "shape":"RuleIdentifier", + "documentation":"

The unique ID of the retention rule to update.

", + "location":"uri", + "locationName":"identifier" + }, + "RetentionPeriod":{ + "shape":"RetentionPeriod", + "documentation":"

Information about the retention period for which the retention rule is to retain resources.

" + }, + "Description":{ + "shape":"Description", + "documentation":"

The retention rule description.

" + }, + "ResourceType":{ + "shape":"ResourceType", + "documentation":"

The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots are supported.

" + }, + "ResourceTags":{ + "shape":"ResourceTags", + "documentation":"

Information about the resource tags to use to identify resources that are to be retained by the retention rule. The retention rule retains only deleted snapshots that have one or more of the specified tag key and value pairs. If a snapshot is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

You can add the same tag key and value pair to a maximum or five retention rules.

" + } + } + }, + "UpdateRuleResponse":{ + "type":"structure", + "members":{ + "Identifier":{ + "shape":"RuleIdentifier", + "documentation":"

The unique ID of the retention rule.

" + }, + "RetentionPeriod":{"shape":"RetentionPeriod"}, + "Description":{ + "shape":"Description", + "documentation":"

The retention rule description.

" + }, + "ResourceType":{ + "shape":"ResourceType", + "documentation":"

The resource type retained by the retention rule.

" + }, + "ResourceTags":{ + "shape":"ResourceTags", + "documentation":"

Information about the resource tags used to identify resources that are retained by the retention rule.

" + }, + "Status":{ + "shape":"RuleStatus", + "documentation":"

The state of the retention rule. Only retention rules that are in the available state retain snapshots.

" + } + } + }, + "ValidationException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"}, + "Reason":{ + "shape":"ValidationExceptionReason", + "documentation":"

The reason for the exception.

" + } + }, + "documentation":"

One or more of the parameters in the request is not valid.

", + "error":{"httpStatusCode":400}, + "exception":true + }, + "ValidationExceptionReason":{ + "type":"string", + "enum":[ + "INVALID_PAGE_TOKEN", + "INVALID_PARAMETER_VALUE" + ] + } + }, + "documentation":"

This is the Recycle Bin API Reference. This documentation provides descriptions and syntax for each of the actions and data types in Recycle Bin.

Recycle Bin is a snapshot recovery feature that enables you to restore accidentally deleted snapshots. When using Recycle Bin, if your snapshots are deleted, they are retained in the Recycle Bin for a time period that you specify.

You can restore a snapshot from the Recycle Bin at any time before its retention period expires. After you restore a snapshot from the Recycle Bin, the snapshot is removed from the Recycle Bin, and you can then use it in the same way you use any other snapshot in your account. If the retention period expires and the snapshot is not restored, the snapshot is permanently deleted from the Recycle Bin and is no longer available for recovery. For more information about Recycle Bin, see Recycle Bin in the Amazon EC2 User Guide.

" +}