Skip to content

GetInvalidation

Source: src/AWS/CloudFront/GetInvalidation.ts

Runtime binding for cloudfront:GetInvalidation.

Reads the status of a cache invalidation on the bound distribution — pairs with CreateInvalidation to poll a purge to Completed. Provide the implementation with Effect.provide(AWS.CloudFront.GetInvalidationHttp).

// init — bind the operation to the distribution
const getInvalidation = yield* CloudFront.GetInvalidation(distribution);
// runtime
const res = yield* getInvalidation({ Id: invalidationId });
console.log(res.Invalidation?.Status); // "InProgress" | "Completed"