Skip to content

GetSubscriptionState

Source: src/AWS/Shield/GetSubscriptionState.ts

Runtime binding for shield:GetSubscriptionState.

Returns whether the account’s Shield Advanced subscription is ACTIVE or INACTIVE — available to every account, subscribed or not, so a handler can branch on Shield Advanced availability before calling gated operations. Provide the implementation with Effect.provide(AWS.Shield.GetSubscriptionStateHttp).

// init — account-level binding, no resource argument
const getSubscriptionState = yield* AWS.Shield.GetSubscriptionState();
// runtime
const { SubscriptionState } = yield* getSubscriptionState();
if (SubscriptionState === "ACTIVE") {
// Shield Advanced operations are available
}