Skip to content
Back to main site

Recycle Bin

Create, inspect, update and delete EBS snapshot retention-rule records.

Plan: Pro10 of 10 operations implemented2Known differences

Retaining and recovering actual snapshots or images was not verified; the example tests rules only.

Example checked on Vera 1.2.2, 8 November 2026. Each coverage note names its own evidence and date.

Activate your license key and start the emulator with the Vera launcher, as in Activate Pro, then run this in a terminal of its own, from an empty scratch directory. It gives the official AWS CLI dummy credentials and a config file of its own, so no AWS account is needed and your own AWS profile isn't touched.

Terminal window
export VERA_ENDPOINT="http://localhost:5003"
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test
export AWS_REGION=us-east-1 AWS_DEFAULT_REGION=us-east-1
export AWS_SHARED_CREDENTIALS_FILE=/dev/null
export AWS_EC2_METADATA_DISABLED=true
export AWS_PAGER="" AWS_CLI_AUTO_PROMPT=off
unset AWS_PROFILE AWS_DEFAULT_PROFILE
unset AWS_SESSION_TOKEN AWS_SECURITY_TOKEN
unset AWS_WEB_IDENTITY_TOKEN_FILE AWS_ROLE_ARN AWS_ROLE_SESSION_NAME
unset AWS_CONTAINER_CREDENTIALS_FULL_URI
unset AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
cat > vera-aws-config <<'EOF'
[default]
region = us-east-1
output = json
cli_binary_format = base64
s3 =
addressing_style = path
EOF
export AWS_CONFIG_FILE="$PWD/vera-aws-config"

When you've finished every example in this terminal, close it and delete vera-aws-config, not before.

The emulator serves Recycle Bin’s 2021-06-15 API over the REST JSON protocol, through the AWS CLI’s rbin commands. Rule ARNs name the account configured on your Vera instance, such as arn:aws:rbin:us-east-1:123456789012:rule/rule9606d13.

Create a seven-day retention rule for EBS snapshots tagged Purpose=docs, then read it and list the rules for EBS snapshots:

Terminal window
RULE_ID=$(aws --endpoint-url "$VERA_ENDPOINT" rbin create-rule \
--retention-period RetentionPeriodValue=7,RetentionPeriodUnit=DAYS \
--resource-type EBS_SNAPSHOT --description 'Vera documentation rule' \
--resource-tags ResourceTagKey=Purpose,ResourceTagValue=docs \
--query Identifier --output text)
aws --endpoint-url "$VERA_ENDPOINT" rbin get-rule --identifier "$RULE_ID"
aws --endpoint-url "$VERA_ENDPOINT" rbin list-rules --resource-type EBS_SNAPSHOT

Change the rule to fourteen days, with a new description:

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" rbin update-rule --identifier "$RULE_ID" \
--retention-period RetentionPeriodValue=14,RetentionPeriodUnit=DAYS \
--description 'Updated documentation rule'

The update returns the changed rule, which keeps the ResourceTags it was created with. Its output includes these fields, and the Identifier and RuleArn differ on every run:

Output (selected fields)
{
"Identifier": "rule9606d13",
"RetentionPeriod": {
"RetentionPeriodValue": 14,
"RetentionPeriodUnit": "DAYS"
},
"Description": "Updated documentation rule",
"ResourceType": "EBS_SNAPSHOT",
"ResourceTags": [
{
"ResourceTagKey": "Purpose",
"ResourceTagValue": "docs"
}
],
"Status": "available",
"RuleArn": "arn:aws:rbin:us-east-1:123456789012:rule/rule9606d13"
}

To clean up, delete the rule. The command prints nothing, and reading the rule afterwards answers HTTP 404 ResourceNotFoundException.

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" rbin delete-rule --identifier "$RULE_ID"
  • Retention rules for EBS snapshots, created with a retention period, a description and resource tags, read, listed by resource type, updated and deleted.
  • Resource tags for selection: the ResourceTags given to CreateRule, which in AWS select the snapshots a rule covers, are kept on the rule. They’re not the same as tags on the rule itself (see Limitations).
  • Also served, not yet tested: locking and unlocking rules.

The main limits are below. A few more apply to every service, and the API coverage notes cover smaller differences.

  • Rules weren’t tested on resources. No EBS snapshot or EC2 image was deleted or recovered, so whether a rule retains anything, how long for, and how rules work with EC2 weren’t checked.
  • Tags on a rule don’t read back. TagResource on a rule, with the tag audit=aroot, returned HTTP 200, but ListTagsForResource then returned Tags: []. UntagResource also returned HTTP 200, with no tag there to remove. This is about tags on the rule itself, not the rule’s selection ResourceTags, which are kept.
  • Locks weren’t tested, including the delay before a rule unlocks.

Every operation in AWS's published 2021-06-15 API (SDK model, botocore 1.43.105), and whether the emulator implements it. Availability combines the earlier implementation inventory with the dated observations below; checking a page's example does not verify every operation. Each note names its evidence first; an observation given without a build or date comes from earlier testing, on 3 November 2026. What the statuses mean

OperationStatusNotes
CreateRuleImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — created an EBS_SNAPSHOT rule with a seven-day retention period, a description and selection ResourceTags, which the rule kept.
DeleteRuleImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — deleted the rule, with no output.
GetRuleImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — read the rule back, and answered HTTP 404 ResourceNotFoundException once it was deleted.
ListRulesImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — listed the rule for resource type EBS_SNAPSHOT.
ListTagsForResourceKnown differenceLocal observation: Vera 1.2.0 preview, 5 November 2026 — returned Tags: [] for a rule just tagged with TagResource, which had returned HTTP 200. The rule's selection ResourceTags are separate, and were kept.
LockRuleImplemented
TagResourceKnown differenceLocal observation: Vera 1.2.0 preview, 5 November 2026 — tagging a rule with audit = aroot returned HTTP 200, but ListTagsForResource then returned Tags: []. These are tags on the rule itself, not its selection ResourceTags.
UnlockRuleImplemented
UntagResourceImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — returned HTTP 200, but the rule had no tags to remove (see TagResource), so removing one wasn't demonstrated.
UpdateRuleImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — changed the retention period to 14 days and the description, returning Status: available with the original ResourceTags.