"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.CapacityProvider = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Resource Type definition for AWS::ECS::CapacityProvider.
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const myCapacityProvider = new aws_native.ecs.CapacityProvider("myCapacityProvider", {
 *     autoScalingGroupProvider: {
 *         autoScalingGroupArn: "arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/MyAutoScalingGroup",
 *         managedScaling: {
 *             maximumScalingStepSize: 10,
 *             minimumScalingStepSize: 1,
 *             status: aws_native.ecs.CapacityProviderManagedScalingStatus.Enabled,
 *             targetCapacity: 100,
 *         },
 *         managedTerminationProtection: aws_native.ecs.CapacityProviderAutoScalingGroupProviderManagedTerminationProtection.Enabled,
 *     },
 *     tags: [{
 *         key: "environment",
 *         value: "production",
 *     }],
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const myCapacityProvider = new aws_native.ecs.CapacityProvider("myCapacityProvider", {
 *     autoScalingGroupProvider: {
 *         autoScalingGroupArn: "arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/MyAutoScalingGroup",
 *         managedScaling: {
 *             maximumScalingStepSize: 10,
 *             minimumScalingStepSize: 1,
 *             status: aws_native.ecs.CapacityProviderManagedScalingStatus.Enabled,
 *             targetCapacity: 100,
 *         },
 *         managedTerminationProtection: aws_native.ecs.CapacityProviderAutoScalingGroupProviderManagedTerminationProtection.Enabled,
 *     },
 *     tags: [{
 *         key: "environment",
 *         value: "production",
 *     }],
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const config = new pulumi.Config();
 * const autoScalingGroupArn1 = config.require("autoScalingGroupArn1");
 * const autoScalingGroupArn2 = config.require("autoScalingGroupArn2");
 * const capacityProvider1 = new aws_native.ecs.CapacityProvider("capacityProvider1", {autoScalingGroupProvider: {
 *     autoScalingGroupArn: autoScalingGroupArn1,
 *     managedScaling: {
 *         status: aws_native.ecs.CapacityProviderManagedScalingStatus.Enabled,
 *     },
 *     managedTerminationProtection: aws_native.ecs.CapacityProviderAutoScalingGroupProviderManagedTerminationProtection.Disabled,
 * }});
 * const capacityProvider2 = new aws_native.ecs.CapacityProvider("capacityProvider2", {autoScalingGroupProvider: {
 *     autoScalingGroupArn: autoScalingGroupArn2,
 *     managedScaling: {
 *         status: aws_native.ecs.CapacityProviderManagedScalingStatus.Enabled,
 *     },
 *     managedTerminationProtection: aws_native.ecs.CapacityProviderAutoScalingGroupProviderManagedTerminationProtection.Disabled,
 * }});
 * const cluster = new aws_native.ecs.Cluster("cluster", {});
 * const clusterCPAssociation = new aws_native.ecs.ClusterCapacityProviderAssociations("clusterCPAssociation", {
 *     cluster: cluster.id,
 *     capacityProviders: [
 *         capacityProvider1.id,
 *         capacityProvider2.id,
 *     ],
 *     defaultCapacityProviderStrategy: [
 *         {
 *             base: 2,
 *             weight: 6,
 *             capacityProvider: capacityProvider1.id,
 *         },
 *         {
 *             base: 0,
 *             weight: 10,
 *             capacityProvider: capacityProvider2.id,
 *         },
 *     ],
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const config = new pulumi.Config();
 * const autoScalingGroupArn1 = config.require("autoScalingGroupArn1");
 * const autoScalingGroupArn2 = config.require("autoScalingGroupArn2");
 * const capacityProvider1 = new aws_native.ecs.CapacityProvider("capacityProvider1", {autoScalingGroupProvider: {
 *     autoScalingGroupArn: autoScalingGroupArn1,
 *     managedScaling: {
 *         status: aws_native.ecs.CapacityProviderManagedScalingStatus.Enabled,
 *     },
 *     managedTerminationProtection: aws_native.ecs.CapacityProviderAutoScalingGroupProviderManagedTerminationProtection.Disabled,
 * }});
 * const capacityProvider2 = new aws_native.ecs.CapacityProvider("capacityProvider2", {autoScalingGroupProvider: {
 *     autoScalingGroupArn: autoScalingGroupArn2,
 *     managedScaling: {
 *         status: aws_native.ecs.CapacityProviderManagedScalingStatus.Enabled,
 *     },
 *     managedTerminationProtection: aws_native.ecs.CapacityProviderAutoScalingGroupProviderManagedTerminationProtection.Disabled,
 * }});
 * const cluster = new aws_native.ecs.Cluster("cluster", {});
 * const clusterCPAssociation = new aws_native.ecs.ClusterCapacityProviderAssociations("clusterCPAssociation", {
 *     cluster: cluster.id,
 *     capacityProviders: [
 *         capacityProvider1.id,
 *         capacityProvider2.id,
 *     ],
 *     defaultCapacityProviderStrategy: [
 *         {
 *             base: 2,
 *             weight: 6,
 *             capacityProvider: capacityProvider1.id,
 *         },
 *         {
 *             base: 0,
 *             weight: 10,
 *             capacityProvider: capacityProvider2.id,
 *         },
 *     ],
 * });
 *
 * ```
 */
class CapacityProvider extends pulumi.CustomResource {
    /**
     * Get an existing CapacityProvider 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 opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new CapacityProvider(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of CapacityProvider.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === CapacityProvider.__pulumiType;
    }
    /**
     * Create a CapacityProvider 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, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            resourceInputs["autoScalingGroupProvider"] = args?.autoScalingGroupProvider;
            resourceInputs["clusterName"] = args?.clusterName;
            resourceInputs["managedInstancesProvider"] = args?.managedInstancesProvider;
            resourceInputs["name"] = args?.name;
            resourceInputs["tags"] = args?.tags;
        }
        else {
            resourceInputs["autoScalingGroupProvider"] = undefined /*out*/;
            resourceInputs["clusterName"] = undefined /*out*/;
            resourceInputs["managedInstancesProvider"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["autoScalingGroupProvider.autoScalingGroupArn", "clusterName", "managedInstancesProvider.instanceLaunchTemplate.fipsEnabled", "name"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(CapacityProvider.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CapacityProvider = CapacityProvider;
/** @internal */
CapacityProvider.__pulumiType = 'aws-native:ecs:CapacityProvider';
//# sourceMappingURL=capacityProvider.js.map