"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.Service = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The ``AWS::ECS::Service`` resource creates an Amazon Elastic Container Service (Amazon ECS) service that runs and maintains the requested number of tasks and associated load balancers.
 *   The stack update fails if you change any properties that require replacement and at least one ECS Service Connect ``ServiceConnectConfiguration`` property is configured. This is because AWS CloudFormation creates the replacement service first, but each ``ServiceConnectService`` must have a name that is unique in the namespace.
 *    Starting April 15, 2023, AWS; will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, ECS, or EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
 */
class Service extends pulumi.CustomResource {
    /**
     * Get an existing Service 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 Service(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Service.  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'] === Service.__pulumiType;
    }
    /**
     * Create a Service 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["availabilityZoneRebalancing"] = args ? args.availabilityZoneRebalancing : undefined;
            resourceInputs["capacityProviderStrategy"] = args ? args.capacityProviderStrategy : undefined;
            resourceInputs["cluster"] = args ? args.cluster : undefined;
            resourceInputs["deploymentConfiguration"] = args ? args.deploymentConfiguration : undefined;
            resourceInputs["deploymentController"] = args ? args.deploymentController : undefined;
            resourceInputs["desiredCount"] = args ? args.desiredCount : undefined;
            resourceInputs["enableEcsManagedTags"] = args ? args.enableEcsManagedTags : undefined;
            resourceInputs["enableExecuteCommand"] = args ? args.enableExecuteCommand : undefined;
            resourceInputs["healthCheckGracePeriodSeconds"] = args ? args.healthCheckGracePeriodSeconds : undefined;
            resourceInputs["launchType"] = args ? args.launchType : undefined;
            resourceInputs["loadBalancers"] = args ? args.loadBalancers : undefined;
            resourceInputs["networkConfiguration"] = args ? args.networkConfiguration : undefined;
            resourceInputs["placementConstraints"] = args ? args.placementConstraints : undefined;
            resourceInputs["placementStrategies"] = args ? args.placementStrategies : undefined;
            resourceInputs["platformVersion"] = args ? args.platformVersion : undefined;
            resourceInputs["propagateTags"] = args ? args.propagateTags : undefined;
            resourceInputs["role"] = args ? args.role : undefined;
            resourceInputs["schedulingStrategy"] = args ? args.schedulingStrategy : undefined;
            resourceInputs["serviceConnectConfiguration"] = args ? args.serviceConnectConfiguration : undefined;
            resourceInputs["serviceName"] = args ? args.serviceName : undefined;
            resourceInputs["serviceRegistries"] = args ? args.serviceRegistries : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["taskDefinition"] = args ? args.taskDefinition : undefined;
            resourceInputs["volumeConfigurations"] = args ? args.volumeConfigurations : undefined;
            resourceInputs["vpcLatticeConfigurations"] = args ? args.vpcLatticeConfigurations : undefined;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["serviceArn"] = undefined /*out*/;
        }
        else {
            resourceInputs["availabilityZoneRebalancing"] = undefined /*out*/;
            resourceInputs["capacityProviderStrategy"] = undefined /*out*/;
            resourceInputs["cluster"] = undefined /*out*/;
            resourceInputs["deploymentConfiguration"] = undefined /*out*/;
            resourceInputs["deploymentController"] = undefined /*out*/;
            resourceInputs["desiredCount"] = undefined /*out*/;
            resourceInputs["enableEcsManagedTags"] = undefined /*out*/;
            resourceInputs["enableExecuteCommand"] = undefined /*out*/;
            resourceInputs["healthCheckGracePeriodSeconds"] = undefined /*out*/;
            resourceInputs["launchType"] = undefined /*out*/;
            resourceInputs["loadBalancers"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["networkConfiguration"] = undefined /*out*/;
            resourceInputs["placementConstraints"] = undefined /*out*/;
            resourceInputs["placementStrategies"] = undefined /*out*/;
            resourceInputs["platformVersion"] = undefined /*out*/;
            resourceInputs["propagateTags"] = undefined /*out*/;
            resourceInputs["role"] = undefined /*out*/;
            resourceInputs["schedulingStrategy"] = undefined /*out*/;
            resourceInputs["serviceArn"] = undefined /*out*/;
            resourceInputs["serviceConnectConfiguration"] = undefined /*out*/;
            resourceInputs["serviceName"] = undefined /*out*/;
            resourceInputs["serviceRegistries"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["taskDefinition"] = undefined /*out*/;
            resourceInputs["volumeConfigurations"] = undefined /*out*/;
            resourceInputs["vpcLatticeConfigurations"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["cluster", "deploymentController", "launchType", "role", "schedulingStrategy", "serviceName"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(Service.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Service = Service;
/** @internal */
Service.__pulumiType = 'aws-native:ecs:Service';
//# sourceMappingURL=service.js.map