import * as pulumi from "@pulumi/pulumi"; /** * Manages [EC2 Capacity Manager](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-manager.html) settings for the current AWS account. EC2 Capacity Manager monitors, analyzes, and helps manage EC2 capacity usage across On-Demand Instances, Spot Instances, and Capacity Reservations. * * Capacity Manager can be enabled in only one Region per account (the home Region), where it aggregates capacity data from all Regions. After enabling, initial data ingestion may take several hours to complete. * * > **Note:** Destroying this resource disables EC2 Capacity Manager, which also disables Organizations access. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.CapacityManager("example", {enabled: true}); * ``` * * ### Organizations Access * * To aggregate data from all accounts in an AWS Organization, enable Organizations access from the management account (or a delegated administrator account): * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.CapacityManager("example", { * enabled: true, * organizationsAccess: true, * }); * ``` * * ### Organizations Access with a Delegated Administrator * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const delegated = aws.getCallerIdentity({}); * const example = new aws.organizations.DelegatedAdministrator("example", { * accountId: delegated.then(delegated => delegated.accountId), * servicePrincipal: "ec2.capacitymanager.amazonaws.com", * }); * const exampleCapacityManager = new aws.ec2.CapacityManager("example", { * enabled: true, * organizationsAccess: true, * }, { * dependsOn: [example], * }); * ``` * * ## Import * * ### Identity Schema * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import EC2 Capacity Manager settings using the region name. For example: * * ```sh * $ pulumi import aws:ec2/capacityManager:CapacityManager example us-west-2 * ``` */ export declare class CapacityManager extends pulumi.CustomResource { /** * Get an existing CapacityManager 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?: CapacityManagerState, opts?: pulumi.CustomResourceOptions): CapacityManager; /** * Check whether an existing CapacityManager 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?: CapacityManagerState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of CapacityManager. 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 CapacityManager; /** * Whether to enable EC2 Capacity Manager for the account in the configured Region. */ readonly enabled: pulumi.Output; /** * Whether to enable cross-account data aggregation for AWS Organizations. Requires `enabled` to be `true`. Can only be enabled from the Organizations management account or a delegated administrator account. If not specified, AWS defaults this to `false` when Capacity Manager is enabled. Removing this argument does not disable Organizations access; set it to `false` explicitly. */ readonly organizationsAccess: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Create a CapacityManager 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: CapacityManagerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CapacityManager resources. */ export interface CapacityManagerState { /** * Whether to enable EC2 Capacity Manager for the account in the configured Region. */ enabled?: pulumi.Input; /** * Whether to enable cross-account data aggregation for AWS Organizations. Requires `enabled` to be `true`. Can only be enabled from the Organizations management account or a delegated administrator account. If not specified, AWS defaults this to `false` when Capacity Manager is enabled. Removing this argument does not disable Organizations access; set it to `false` explicitly. */ organizationsAccess?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } /** * The set of arguments for constructing a CapacityManager resource. */ export interface CapacityManagerArgs { /** * Whether to enable EC2 Capacity Manager for the account in the configured Region. */ enabled: pulumi.Input; /** * Whether to enable cross-account data aggregation for AWS Organizations. Requires `enabled` to be `true`. Can only be enabled from the Organizations management account or a delegated administrator account. If not specified, AWS defaults this to `false` when Capacity Manager is enabled. Removing this argument does not disable Organizations access; set it to `false` explicitly. */ organizationsAccess?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } //# sourceMappingURL=capacityManager.d.ts.map