import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing an AWS Pricing Plan Manager Subscription. A subscription applies a flat-rate pricing plan, such as an [Amazon CloudFront flat-rate plan](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/flat-rate-plans.html), to a set of AWS resources: you pay a fixed recurring fee for the covered resources instead of usage-based pricing. * * > Destroying this resource cancels the subscription. For active paid subscriptions, AWS schedules the cancellation to take effect at the end of the current billing period, so the subscription remains visible (and billed) in AWS until that date. Subscriptions in `PENDING_APPROVAL` status (and free-tier subscriptions) are deleted immediately. If a scheduled change (such as a downgrade) is pending, it is reverted automatically before the cancellation is requested. * * > While a distribution is covered by a subscription, CloudFront blocks removing or replacing its web ACL and blocks deleting the distribution — including after cancellation, until the cancellation takes effect at the end of the billing cycle. * * > Resources must meet the plan family's eligibility requirements or `CreateSubscription` fails with a `ValidationException`. For the `CloudFront` plan family, distributions using legacy cache settings (`forwardedValues`) are rejected as not eligible — use [cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) instead. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.pricingplanmanager.Subscription("example", { * planFamily: "CloudFront", * planTier: "PRO", * resourceArns: [ * exampleAwsCloudfrontDistribution.arn, * exampleAwsWafv2WebAcl.arn, * ], * }); * ``` * * ### Manual Approval * * Paid-tier subscriptions created with `approvalMode = "MANUAL"` (the AWS default for paid tiers when `approvalMode` is not set) remain in `PENDING_APPROVAL` status, and billing does not start, until approved with a separate `ApprovePaidSubscription` API call. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.pricingplanmanager.Subscription("example", { * approvalMode: "MANUAL", * planFamily: "CloudFront", * planTier: "BUSINESS", * resourceArns: [ * exampleAwsCloudfrontDistribution.arn, * exampleAwsWafv2WebAcl.arn, * ], * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `arn` (String) ARN of the Pricing Plan Manager Subscription. * * Using `pulumi import`, import Pricing Plan Manager Subscription using the `arn`. For example: * * ```sh * $ pulumi import aws:pricingplanmanager/subscription:Subscription example arn:aws:pricingplanmanager::123456789012:subscription:sub_1a2B3c4D5e6F7g8H9i0JkLmNoPq * ``` */ export declare class Subscription extends pulumi.CustomResource { /** * Get an existing Subscription resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SubscriptionState, opts?: pulumi.CustomResourceOptions): Subscription; /** * Check whether an existing Subscription resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: SubscriptionState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Subscription. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Subscription; /** * Whether the subscription requires explicit approval before billing starts. Valid values: `MANUAL`, `IMMEDIATE`. If not set, AWS defaults to `MANUAL` for paid-tier subscriptions and `IMMEDIATE` for `FREE` tier subscriptions. With `MANUAL`, paid-tier subscriptions remain in `PENDING_APPROVAL` (unbilled, and unmodifiable) until approved with a separate `ApprovePaidSubscription` API call. This value is used only at creation time and is not returned by the AWS API. Changing this argument creates a new resource. */ readonly approvalMode: pulumi.Output; /** * ARN of the subscription. */ readonly arn: pulumi.Output; /** * Entity tag of the subscription, used by AWS for optimistic concurrency control. */ readonly etag: pulumi.Output; /** * Pricing plan family to subscribe to, such as `CloudFront`. Changing this argument creates a new resource. */ readonly planFamily: pulumi.Output; /** * Tier level for the subscription, such as `FREE`, `PRO`, `BUSINESS`, or `PREMIUM`. Upgrades take effect immediately. Downgrades are scheduled by AWS to take effect at the end of the current billing period: until then AWS keeps billing the old tier and this argument reflects the desired (scheduled) tier, with the pending change exposed in `scheduledChange`. Raising the tier again before the downgrade takes effect reverts the pending change. */ readonly planTier: pulumi.Output; /** * Set of ARNs of the AWS resources to include in the subscription, between 1 and 10 entries. For subscriptions in the `CloudFront` plan family, the resources must include exactly one CloudFront distribution and exactly one WAF web ACL, and can also include other supported resources such as Route 53 hosted zones (any tier) and CloudFront KeyValueStores (paid tiers only). Associated resources are protected by AWS while covered — for example, a hosted zone cannot be deleted until it is disassociated from the plan. * * The following arguments are optional: */ readonly resourceArns: pulumi.Output; /** * Pending change that takes effect at the end of the current billing period, if any. See `scheduledChange` below. */ readonly scheduledChanges: pulumi.Output; /** * Current status of the subscription. Valid values: `PENDING_APPROVAL`, `ACTIVE`, `SYNC_IN_PROGRESS`, `FAILED`. */ readonly status: pulumi.Output; /** * Human-readable explanation of the current status, when available. */ readonly statusReason: pulumi.Output; readonly timeouts: pulumi.Output; /** * Usage level within the plan tier. Specify `DEFAULT` for the base configuration, or a higher level if the plan tier supports it. If omitted on an update, the usage level is reset to the plan tier's default. */ readonly usageLevel: pulumi.Output; /** * Create a Subscription resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SubscriptionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Subscription resources. */ export interface SubscriptionState { /** * Whether the subscription requires explicit approval before billing starts. Valid values: `MANUAL`, `IMMEDIATE`. If not set, AWS defaults to `MANUAL` for paid-tier subscriptions and `IMMEDIATE` for `FREE` tier subscriptions. With `MANUAL`, paid-tier subscriptions remain in `PENDING_APPROVAL` (unbilled, and unmodifiable) until approved with a separate `ApprovePaidSubscription` API call. This value is used only at creation time and is not returned by the AWS API. Changing this argument creates a new resource. */ approvalMode?: pulumi.Input; /** * ARN of the subscription. */ arn?: pulumi.Input; /** * Entity tag of the subscription, used by AWS for optimistic concurrency control. */ etag?: pulumi.Input; /** * Pricing plan family to subscribe to, such as `CloudFront`. Changing this argument creates a new resource. */ planFamily?: pulumi.Input; /** * Tier level for the subscription, such as `FREE`, `PRO`, `BUSINESS`, or `PREMIUM`. Upgrades take effect immediately. Downgrades are scheduled by AWS to take effect at the end of the current billing period: until then AWS keeps billing the old tier and this argument reflects the desired (scheduled) tier, with the pending change exposed in `scheduledChange`. Raising the tier again before the downgrade takes effect reverts the pending change. */ planTier?: pulumi.Input; /** * Set of ARNs of the AWS resources to include in the subscription, between 1 and 10 entries. For subscriptions in the `CloudFront` plan family, the resources must include exactly one CloudFront distribution and exactly one WAF web ACL, and can also include other supported resources such as Route 53 hosted zones (any tier) and CloudFront KeyValueStores (paid tiers only). Associated resources are protected by AWS while covered — for example, a hosted zone cannot be deleted until it is disassociated from the plan. * * The following arguments are optional: */ resourceArns?: pulumi.Input[] | undefined>; /** * Pending change that takes effect at the end of the current billing period, if any. See `scheduledChange` below. */ scheduledChanges?: pulumi.Input[] | undefined>; /** * Current status of the subscription. Valid values: `PENDING_APPROVAL`, `ACTIVE`, `SYNC_IN_PROGRESS`, `FAILED`. */ status?: pulumi.Input; /** * Human-readable explanation of the current status, when available. */ statusReason?: pulumi.Input; timeouts?: pulumi.Input; /** * Usage level within the plan tier. Specify `DEFAULT` for the base configuration, or a higher level if the plan tier supports it. If omitted on an update, the usage level is reset to the plan tier's default. */ usageLevel?: pulumi.Input; } /** * The set of arguments for constructing a Subscription resource. */ export interface SubscriptionArgs { /** * Whether the subscription requires explicit approval before billing starts. Valid values: `MANUAL`, `IMMEDIATE`. If not set, AWS defaults to `MANUAL` for paid-tier subscriptions and `IMMEDIATE` for `FREE` tier subscriptions. With `MANUAL`, paid-tier subscriptions remain in `PENDING_APPROVAL` (unbilled, and unmodifiable) until approved with a separate `ApprovePaidSubscription` API call. This value is used only at creation time and is not returned by the AWS API. Changing this argument creates a new resource. */ approvalMode?: pulumi.Input; /** * Pricing plan family to subscribe to, such as `CloudFront`. Changing this argument creates a new resource. */ planFamily: pulumi.Input; /** * Tier level for the subscription, such as `FREE`, `PRO`, `BUSINESS`, or `PREMIUM`. Upgrades take effect immediately. Downgrades are scheduled by AWS to take effect at the end of the current billing period: until then AWS keeps billing the old tier and this argument reflects the desired (scheduled) tier, with the pending change exposed in `scheduledChange`. Raising the tier again before the downgrade takes effect reverts the pending change. */ planTier: pulumi.Input; /** * Set of ARNs of the AWS resources to include in the subscription, between 1 and 10 entries. For subscriptions in the `CloudFront` plan family, the resources must include exactly one CloudFront distribution and exactly one WAF web ACL, and can also include other supported resources such as Route 53 hosted zones (any tier) and CloudFront KeyValueStores (paid tiers only). Associated resources are protected by AWS while covered — for example, a hosted zone cannot be deleted until it is disassociated from the plan. * * The following arguments are optional: */ resourceArns: pulumi.Input[]>; timeouts?: pulumi.Input; /** * Usage level within the plan tier. Specify `DEFAULT` for the base configuration, or a higher level if the plan tier supports it. If omitted on an update, the usage level is reset to the plan tier's default. */ usageLevel?: pulumi.Input; } //# sourceMappingURL=subscription.d.ts.map