Skip to main content

Boto3 utility library that supports deletion of collections of AWS resources (such as temporary resources created during unit tests).

Project description

b3d

Boto3 utility library that supports deletion of collections of AWS resources (such as temporary resources created during unit tests).

Usage

The function b3d.delete_resources is used to remove all AWS resources with a particular key / value tag pair. It can be called as follows:

from b3d import delete_resources

reports = delete_resources("tag_key", "tag_value", "aws_region_name", dry=False)

The delete_resources() function returns an iterator whose elements are lists of reports for each single resource. A list of reports is yielded (rather than an individual report) because a delete procedure might involve detaching any number of resources from the target resource first. Each report will detail the type of action performed (e.g. detachment from another resource, deletion, noop), whether that action was successful, and an error message if appropriate.

If dry=True, delete_resources will perform all the same queries on AWS resources, but all detach and delete operations will be skipped. The same reports list will therefore be produced, but the resources themselves will be unaffected.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

b3d-0.1.7.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

b3d-0.1.7-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file b3d-0.1.7.tar.gz.

File metadata

  • Download URL: b3d-0.1.7.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for b3d-0.1.7.tar.gz
Algorithm Hash digest
SHA256 5b8e8104649b205667b5d4b925a70a104db6d792c59da54e4a603a28ed2618bd
MD5 e9199203008780d34d670ce8024b10ac
BLAKE2b-256 5bf57772d22f92a1bab3f430e9c411e23c2dcda68d24f220dcceb822c1b16802

See more details on using hashes here.

File details

Details for the file b3d-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: b3d-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for b3d-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8aab012e5b4f0e75545615d829409ca2ab48cf7a63be3ca52428d1ec367f6dc3
MD5 5a840e57965be8083c5968ef35f68f53
BLAKE2b-256 91ed8ff9930e0b4ca06e63b7a667b6b9db48be968bd95087738eeb48758a2cf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page