Dave Thomas
Dave Thomas

Reputation: 3837

Is it possible to delete an Asset Version from a Twilio assets service?

Twilio Assets, have a sub resource Asset Versions: https://www.twilio.com/docs/runtime/serverless-api/api/asset-version

I see that you can create multiple of these versions over time as you make changes and update your asset.

Example: You upload an MP3 for playback in a <Play> twiml verb. Overtime you update that content by creating a new version of that asset.

My worry is that overtime those asset versions could build up. I was wondering if there was a way to clean up old un-used asset versions by deleting them. I don't see a method available via the APIs, other than deleting the whole asset all together.

Deleting the entire asset is undesirable because it will have new versions being used in a live build.

My second worry is do asset versions count towards the limitations of assets in a service. https://www.twilio.com/docs/runtime/assets#limitations. Or do only the assets currently deployed in a build count towards this total?

Upvotes: 1

Views: 330

Answers (1)

philnash
philnash

Reputation: 73075

There isn't a way to delete old asset versions, but there is a retention policy that will delete unused asset versions for you.

Function Versions and Asset Versions that are older than 30 days and not part of a build or active deployment will be deleted.

Asset Versions don't count towards the limits of Assets. You can have 1000 public Assets, and those Assets may have more than one Asset Version.

Upvotes: 1

Related Questions