AWS.Rbin — AWS SDK for JavaScript (original) (raw)

We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Rbin

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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 resource recovery feature that enables you to restore accidentally deleted snapshots and EBS-backed AMIs. When using Recycle Bin, if your resources are deleted, they are retained in the Recycle Bin for a time period that you specify.

You can restore a resource from the Recycle Bin at any time before its retention period expires. After you restore a resource from the Recycle Bin, the resource is removed from the Recycle Bin, and you can then use it in the same way you use any other resource of that type in your account. If the retention period expires and the resource is not restored, the resource 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 Elastic Compute Cloud User Guide.

Sending a Request Using Rbin

var rbin = new AWS.Rbin();
rbin.createRule(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Rbin object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var rbin = new AWS.Rbin({apiVersion: '2021-06-15'});

You can also set the API version globally in AWS.config.apiVersions using the rbin service identifier:

AWS.config.apiVersions = {
  rbin: '2021-06-15',
  // other service API versions
};

var rbin = new AWS.Rbin();

Constructor Summarycollapse

Property Summarycollapse

Properties inherited from AWS.Service

apiVersions

Method Summarycollapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Rbin(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Property Details

endpointAWS.Endpoint

Returns an Endpoint object representing the endpoint URL for service requests.

Method Details

getRule(params = {}, callback) ⇒ AWS.Request

Gets information about a Recycle Bin retention rule.

listRules(params = {}, callback) ⇒ AWS.Request

Lists the Recycle Bin retention rules in the Region.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Lists the tags assigned to a retention rule.

lockRule(params = {}, callback) ⇒ AWS.Request

Locks a retention rule. A locked retention rule can't be modified or deleted.

tagResource(params = {}, callback) ⇒ AWS.Request

Assigns tags to the specified retention rule.

unlockRule(params = {}, callback) ⇒ AWS.Request

Unlocks a retention rule. After a retention rule is unlocked, it can be modified or deleted only after the unlock delay period expires.

untagResource(params = {}, callback) ⇒ AWS.Request

Unassigns a tag from a retention rule.

updateRule(params = {}, callback) ⇒ AWS.Request

Updates an existing Recycle Bin retention rule. You can update a retention rule's description, resource tags, and retention period at any time after creation. You can't update a retention rule's resource type after creation. For more information, see Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.