"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.Association = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The AWS::SSM::Association resource associates an SSM document in AWS Systems Manager with EC2 instances that contain a configuration agent to process the document.
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const specificInstanceIdAssociation = new aws_native.ssm.Association("specificInstanceIdAssociation", {
 *     name: "AWS-RunShellScript",
 *     targets: [{
 *         key: "InstanceIds",
 *         values: ["i-1234567890abcdef0"],
 *     }],
 *     parameters: {
 *         commands: ["ls"],
 *         workingDirectory: ["/"],
 *     },
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const specificInstanceIdAssociation = new aws_native.ssm.Association("specificInstanceIdAssociation", {
 *     name: "AWS-RunShellScript",
 *     targets: [{
 *         key: "InstanceIds",
 *         values: ["i-1234567890abcdef0"],
 *     }],
 *     parameters: {
 *         commands: ["ls"],
 *         workingDirectory: ["/"],
 *     },
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const allInstanceIdsAssociation = new aws_native.ssm.Association("allInstanceIdsAssociation", {
 *     associationName: "UpdateSSMAgent",
 *     name: "AWS-UpdateSSMAgent",
 *     scheduleExpression: "cron(0 2 ? * SUN *)",
 *     targets: [{
 *         key: "InstanceIds",
 *         values: ["*"],
 *     }],
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const allInstanceIdsAssociation = new aws_native.ssm.Association("allInstanceIdsAssociation", {
 *     associationName: "UpdateSSMAgent",
 *     name: "AWS-UpdateSSMAgent",
 *     scheduleExpression: "cron(0 2 ? * SUN *)",
 *     targets: [{
 *         key: "InstanceIds",
 *         values: ["*"],
 *     }],
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const taggedInstancesAssociation = new aws_native.ssm.Association("taggedInstancesAssociation", {
 *     associationName: "UpdateSSMAgent",
 *     name: "AWS-UpdateSSMAgent",
 *     scheduleExpression: "rate(7 days)",
 *     targets: [{
 *         key: "tag:Environment",
 *         values: ["Production"],
 *     }],
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const taggedInstancesAssociation = new aws_native.ssm.Association("taggedInstancesAssociation", {
 *     associationName: "UpdateSSMAgent",
 *     name: "AWS-UpdateSSMAgent",
 *     scheduleExpression: "rate(7 days)",
 *     targets: [{
 *         key: "tag:Environment",
 *         values: ["Production"],
 *     }],
 * });
 *
 * ```
 */
class Association extends pulumi.CustomResource {
    /**
     * Get an existing Association 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 Association(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Association.  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'] === Association.__pulumiType;
    }
    /**
     * Create a Association 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["applyOnlyAtCronInterval"] = args?.applyOnlyAtCronInterval;
            resourceInputs["associationName"] = args?.associationName;
            resourceInputs["automationTargetParameterName"] = args?.automationTargetParameterName;
            resourceInputs["calendarNames"] = args?.calendarNames;
            resourceInputs["complianceSeverity"] = args?.complianceSeverity;
            resourceInputs["documentVersion"] = args?.documentVersion;
            resourceInputs["instanceId"] = args?.instanceId;
            resourceInputs["maxConcurrency"] = args?.maxConcurrency;
            resourceInputs["maxErrors"] = args?.maxErrors;
            resourceInputs["name"] = args?.name;
            resourceInputs["outputLocation"] = args?.outputLocation;
            resourceInputs["parameters"] = args?.parameters;
            resourceInputs["scheduleExpression"] = args?.scheduleExpression;
            resourceInputs["scheduleOffset"] = args?.scheduleOffset;
            resourceInputs["syncCompliance"] = args?.syncCompliance;
            resourceInputs["targets"] = args?.targets;
            resourceInputs["waitForSuccessTimeoutSeconds"] = args?.waitForSuccessTimeoutSeconds;
            resourceInputs["associationId"] = undefined /*out*/;
        }
        else {
            resourceInputs["applyOnlyAtCronInterval"] = undefined /*out*/;
            resourceInputs["associationId"] = undefined /*out*/;
            resourceInputs["associationName"] = undefined /*out*/;
            resourceInputs["automationTargetParameterName"] = undefined /*out*/;
            resourceInputs["calendarNames"] = undefined /*out*/;
            resourceInputs["complianceSeverity"] = undefined /*out*/;
            resourceInputs["documentVersion"] = undefined /*out*/;
            resourceInputs["instanceId"] = undefined /*out*/;
            resourceInputs["maxConcurrency"] = undefined /*out*/;
            resourceInputs["maxErrors"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["outputLocation"] = undefined /*out*/;
            resourceInputs["parameters"] = undefined /*out*/;
            resourceInputs["scheduleExpression"] = undefined /*out*/;
            resourceInputs["scheduleOffset"] = undefined /*out*/;
            resourceInputs["syncCompliance"] = undefined /*out*/;
            resourceInputs["targets"] = undefined /*out*/;
            resourceInputs["waitForSuccessTimeoutSeconds"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Association.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Association = Association;
/** @internal */
Association.__pulumiType = 'aws-native:ssm:Association';
//# sourceMappingURL=association.js.map