1. Packages
  2. AWS Classic
  3. API Docs
  4. ssm
  5. Association

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.ssm.Association

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Associates an SSM Document to an instance or EC2 tag.

    Example Usage

    Create an association for a specific instance

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ssm.Association("example", {
        name: exampleAwsSsmDocument.name,
        targets: [{
            key: "InstanceIds",
            values: [exampleAwsInstance.id],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssm.Association("example",
        name=example_aws_ssm_document["name"],
        targets=[{
            "key": "InstanceIds",
            "values": [example_aws_instance["id"]],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.NewAssociation(ctx, "example", &ssm.AssociationArgs{
    			Name: pulumi.Any(exampleAwsSsmDocument.Name),
    			Targets: ssm.AssociationTargetArray{
    				&ssm.AssociationTargetArgs{
    					Key: pulumi.String("InstanceIds"),
    					Values: pulumi.StringArray{
    						exampleAwsInstance.Id,
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ssm.Association("example", new()
        {
            Name = exampleAwsSsmDocument.Name,
            Targets = new[]
            {
                new Aws.Ssm.Inputs.AssociationTargetArgs
                {
                    Key = "InstanceIds",
                    Values = new[]
                    {
                        exampleAwsInstance.Id,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.Association;
    import com.pulumi.aws.ssm.AssociationArgs;
    import com.pulumi.aws.ssm.inputs.AssociationTargetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Association("example", AssociationArgs.builder()
                .name(exampleAwsSsmDocument.name())
                .targets(AssociationTargetArgs.builder()
                    .key("InstanceIds")
                    .values(exampleAwsInstance.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ssm:Association
        properties:
          name: ${exampleAwsSsmDocument.name}
          targets:
            - key: InstanceIds
              values:
                - ${exampleAwsInstance.id}
    

    Create an association for all managed instances in an AWS account

    To target all managed instances in an AWS account, set the key as "InstanceIds" with values set as ["*"]. This example also illustrates how to use an Amazon owned SSM document named AmazonCloudWatch-ManageAgent.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ssm.Association("example", {
        name: "AmazonCloudWatch-ManageAgent",
        targets: [{
            key: "InstanceIds",
            values: ["*"],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssm.Association("example",
        name="AmazonCloudWatch-ManageAgent",
        targets=[{
            "key": "InstanceIds",
            "values": ["*"],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.NewAssociation(ctx, "example", &ssm.AssociationArgs{
    			Name: pulumi.String("AmazonCloudWatch-ManageAgent"),
    			Targets: ssm.AssociationTargetArray{
    				&ssm.AssociationTargetArgs{
    					Key: pulumi.String("InstanceIds"),
    					Values: pulumi.StringArray{
    						pulumi.String("*"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ssm.Association("example", new()
        {
            Name = "AmazonCloudWatch-ManageAgent",
            Targets = new[]
            {
                new Aws.Ssm.Inputs.AssociationTargetArgs
                {
                    Key = "InstanceIds",
                    Values = new[]
                    {
                        "*",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.Association;
    import com.pulumi.aws.ssm.AssociationArgs;
    import com.pulumi.aws.ssm.inputs.AssociationTargetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Association("example", AssociationArgs.builder()
                .name("AmazonCloudWatch-ManageAgent")
                .targets(AssociationTargetArgs.builder()
                    .key("InstanceIds")
                    .values("*")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ssm:Association
        properties:
          name: AmazonCloudWatch-ManageAgent
          targets:
            - key: InstanceIds
              values:
                - '*'
    

    Create an association for a specific tag

    This example shows how to target all managed instances that are assigned a tag key of Environment and value of Development.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ssm.Association("example", {
        name: "AmazonCloudWatch-ManageAgent",
        targets: [{
            key: "tag:Environment",
            values: ["Development"],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssm.Association("example",
        name="AmazonCloudWatch-ManageAgent",
        targets=[{
            "key": "tag:Environment",
            "values": ["Development"],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.NewAssociation(ctx, "example", &ssm.AssociationArgs{
    			Name: pulumi.String("AmazonCloudWatch-ManageAgent"),
    			Targets: ssm.AssociationTargetArray{
    				&ssm.AssociationTargetArgs{
    					Key: pulumi.String("tag:Environment"),
    					Values: pulumi.StringArray{
    						pulumi.String("Development"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ssm.Association("example", new()
        {
            Name = "AmazonCloudWatch-ManageAgent",
            Targets = new[]
            {
                new Aws.Ssm.Inputs.AssociationTargetArgs
                {
                    Key = "tag:Environment",
                    Values = new[]
                    {
                        "Development",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.Association;
    import com.pulumi.aws.ssm.AssociationArgs;
    import com.pulumi.aws.ssm.inputs.AssociationTargetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Association("example", AssociationArgs.builder()
                .name("AmazonCloudWatch-ManageAgent")
                .targets(AssociationTargetArgs.builder()
                    .key("tag:Environment")
                    .values("Development")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ssm:Association
        properties:
          name: AmazonCloudWatch-ManageAgent
          targets:
            - key: tag:Environment
              values:
                - Development
    

    Create an association with a specific schedule

    This example shows how to schedule an association in various ways.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ssm.Association("example", {
        name: exampleAwsSsmDocument.name,
        scheduleExpression: "cron(0 2 ? * SUN *)",
        targets: [{
            key: "InstanceIds",
            values: [exampleAwsInstance.id],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssm.Association("example",
        name=example_aws_ssm_document["name"],
        schedule_expression="cron(0 2 ? * SUN *)",
        targets=[{
            "key": "InstanceIds",
            "values": [example_aws_instance["id"]],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.NewAssociation(ctx, "example", &ssm.AssociationArgs{
    			Name:               pulumi.Any(exampleAwsSsmDocument.Name),
    			ScheduleExpression: pulumi.String("cron(0 2 ? * SUN *)"),
    			Targets: ssm.AssociationTargetArray{
    				&ssm.AssociationTargetArgs{
    					Key: pulumi.String("InstanceIds"),
    					Values: pulumi.StringArray{
    						exampleAwsInstance.Id,
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ssm.Association("example", new()
        {
            Name = exampleAwsSsmDocument.Name,
            ScheduleExpression = "cron(0 2 ? * SUN *)",
            Targets = new[]
            {
                new Aws.Ssm.Inputs.AssociationTargetArgs
                {
                    Key = "InstanceIds",
                    Values = new[]
                    {
                        exampleAwsInstance.Id,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.Association;
    import com.pulumi.aws.ssm.AssociationArgs;
    import com.pulumi.aws.ssm.inputs.AssociationTargetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Association("example", AssociationArgs.builder()
                .name(exampleAwsSsmDocument.name())
                .scheduleExpression("cron(0 2 ? * SUN *)")
                .targets(AssociationTargetArgs.builder()
                    .key("InstanceIds")
                    .values(exampleAwsInstance.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ssm:Association
        properties:
          name: ${exampleAwsSsmDocument.name}
          scheduleExpression: cron(0 2 ? * SUN *)
          targets:
            - key: InstanceIds
              values:
                - ${exampleAwsInstance.id}
    

    Create Association Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Association(name: string, args?: AssociationArgs, opts?: CustomResourceOptions);
    @overload
    def Association(resource_name: str,
                    args: Optional[AssociationArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Association(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    apply_only_at_cron_interval: Optional[bool] = None,
                    association_name: Optional[str] = None,
                    automation_target_parameter_name: Optional[str] = None,
                    compliance_severity: Optional[str] = None,
                    document_version: Optional[str] = None,
                    instance_id: Optional[str] = None,
                    max_concurrency: Optional[str] = None,
                    max_errors: Optional[str] = None,
                    name: Optional[str] = None,
                    output_location: Optional[AssociationOutputLocationArgs] = None,
                    parameters: Optional[Mapping[str, str]] = None,
                    schedule_expression: Optional[str] = None,
                    sync_compliance: Optional[str] = None,
                    targets: Optional[Sequence[AssociationTargetArgs]] = None,
                    wait_for_success_timeout_seconds: Optional[int] = None)
    func NewAssociation(ctx *Context, name string, args *AssociationArgs, opts ...ResourceOption) (*Association, error)
    public Association(string name, AssociationArgs? args = null, CustomResourceOptions? opts = null)
    public Association(String name, AssociationArgs args)
    public Association(String name, AssociationArgs args, CustomResourceOptions options)
    
    type: aws:ssm:Association
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsAssociationResource = new Aws.Ssm.Association("awsAssociationResource", new()
    {
        ApplyOnlyAtCronInterval = false,
        AssociationName = "string",
        AutomationTargetParameterName = "string",
        ComplianceSeverity = "string",
        DocumentVersion = "string",
        MaxConcurrency = "string",
        MaxErrors = "string",
        Name = "string",
        OutputLocation = new Aws.Ssm.Inputs.AssociationOutputLocationArgs
        {
            S3BucketName = "string",
            S3KeyPrefix = "string",
            S3Region = "string",
        },
        Parameters = 
        {
            { "string", "string" },
        },
        ScheduleExpression = "string",
        SyncCompliance = "string",
        Targets = new[]
        {
            new Aws.Ssm.Inputs.AssociationTargetArgs
            {
                Key = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
        WaitForSuccessTimeoutSeconds = 0,
    });
    
    example, err := ssm.NewAssociation(ctx, "awsAssociationResource", &ssm.AssociationArgs{
    	ApplyOnlyAtCronInterval:       pulumi.Bool(false),
    	AssociationName:               pulumi.String("string"),
    	AutomationTargetParameterName: pulumi.String("string"),
    	ComplianceSeverity:            pulumi.String("string"),
    	DocumentVersion:               pulumi.String("string"),
    	MaxConcurrency:                pulumi.String("string"),
    	MaxErrors:                     pulumi.String("string"),
    	Name:                          pulumi.String("string"),
    	OutputLocation: &ssm.AssociationOutputLocationArgs{
    		S3BucketName: pulumi.String("string"),
    		S3KeyPrefix:  pulumi.String("string"),
    		S3Region:     pulumi.String("string"),
    	},
    	Parameters: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ScheduleExpression: pulumi.String("string"),
    	SyncCompliance:     pulumi.String("string"),
    	Targets: ssm.AssociationTargetArray{
    		&ssm.AssociationTargetArgs{
    			Key: pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	WaitForSuccessTimeoutSeconds: pulumi.Int(0),
    })
    
    var awsAssociationResource = new Association("awsAssociationResource", AssociationArgs.builder()
        .applyOnlyAtCronInterval(false)
        .associationName("string")
        .automationTargetParameterName("string")
        .complianceSeverity("string")
        .documentVersion("string")
        .maxConcurrency("string")
        .maxErrors("string")
        .name("string")
        .outputLocation(AssociationOutputLocationArgs.builder()
            .s3BucketName("string")
            .s3KeyPrefix("string")
            .s3Region("string")
            .build())
        .parameters(Map.of("string", "string"))
        .scheduleExpression("string")
        .syncCompliance("string")
        .targets(AssociationTargetArgs.builder()
            .key("string")
            .values("string")
            .build())
        .waitForSuccessTimeoutSeconds(0)
        .build());
    
    aws_association_resource = aws.ssm.Association("awsAssociationResource",
        apply_only_at_cron_interval=False,
        association_name="string",
        automation_target_parameter_name="string",
        compliance_severity="string",
        document_version="string",
        max_concurrency="string",
        max_errors="string",
        name="string",
        output_location={
            "s3BucketName": "string",
            "s3KeyPrefix": "string",
            "s3Region": "string",
        },
        parameters={
            "string": "string",
        },
        schedule_expression="string",
        sync_compliance="string",
        targets=[{
            "key": "string",
            "values": ["string"],
        }],
        wait_for_success_timeout_seconds=0)
    
    const awsAssociationResource = new aws.ssm.Association("awsAssociationResource", {
        applyOnlyAtCronInterval: false,
        associationName: "string",
        automationTargetParameterName: "string",
        complianceSeverity: "string",
        documentVersion: "string",
        maxConcurrency: "string",
        maxErrors: "string",
        name: "string",
        outputLocation: {
            s3BucketName: "string",
            s3KeyPrefix: "string",
            s3Region: "string",
        },
        parameters: {
            string: "string",
        },
        scheduleExpression: "string",
        syncCompliance: "string",
        targets: [{
            key: "string",
            values: ["string"],
        }],
        waitForSuccessTimeoutSeconds: 0,
    });
    
    type: aws:ssm:Association
    properties:
        applyOnlyAtCronInterval: false
        associationName: string
        automationTargetParameterName: string
        complianceSeverity: string
        documentVersion: string
        maxConcurrency: string
        maxErrors: string
        name: string
        outputLocation:
            s3BucketName: string
            s3KeyPrefix: string
            s3Region: string
        parameters:
            string: string
        scheduleExpression: string
        syncCompliance: string
        targets:
            - key: string
              values:
                - string
        waitForSuccessTimeoutSeconds: 0
    

    Association Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Association resource accepts the following input properties:

    ApplyOnlyAtCronInterval bool
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    AssociationName string
    The descriptive name for the association.
    AutomationTargetParameterName string
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    ComplianceSeverity string
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    DocumentVersion string
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    InstanceId string
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    MaxConcurrency string
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    MaxErrors string
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    Name string
    The name of the SSM document to apply.
    OutputLocation AssociationOutputLocation
    An output location block. Output Location is documented below.
    Parameters Dictionary<string, string>
    A block of arbitrary string parameters to pass to the SSM document.
    ScheduleExpression string
    A cron or rate expression that specifies when the association runs.
    SyncCompliance string
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    Targets List<AssociationTarget>
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    WaitForSuccessTimeoutSeconds int

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    ApplyOnlyAtCronInterval bool
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    AssociationName string
    The descriptive name for the association.
    AutomationTargetParameterName string
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    ComplianceSeverity string
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    DocumentVersion string
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    InstanceId string
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    MaxConcurrency string
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    MaxErrors string
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    Name string
    The name of the SSM document to apply.
    OutputLocation AssociationOutputLocationArgs
    An output location block. Output Location is documented below.
    Parameters map[string]string
    A block of arbitrary string parameters to pass to the SSM document.
    ScheduleExpression string
    A cron or rate expression that specifies when the association runs.
    SyncCompliance string
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    Targets []AssociationTargetArgs
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    WaitForSuccessTimeoutSeconds int

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    applyOnlyAtCronInterval Boolean
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    associationName String
    The descriptive name for the association.
    automationTargetParameterName String
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    complianceSeverity String
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    documentVersion String
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instanceId String
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    maxConcurrency String
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    maxErrors String
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name String
    The name of the SSM document to apply.
    outputLocation AssociationOutputLocation
    An output location block. Output Location is documented below.
    parameters Map<String,String>
    A block of arbitrary string parameters to pass to the SSM document.
    scheduleExpression String
    A cron or rate expression that specifies when the association runs.
    syncCompliance String
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets List<AssociationTarget>
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    waitForSuccessTimeoutSeconds Integer

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    applyOnlyAtCronInterval boolean
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    associationName string
    The descriptive name for the association.
    automationTargetParameterName string
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    complianceSeverity string
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    documentVersion string
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instanceId string
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    maxConcurrency string
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    maxErrors string
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name string
    The name of the SSM document to apply.
    outputLocation AssociationOutputLocation
    An output location block. Output Location is documented below.
    parameters {[key: string]: string}
    A block of arbitrary string parameters to pass to the SSM document.
    scheduleExpression string
    A cron or rate expression that specifies when the association runs.
    syncCompliance string
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets AssociationTarget[]
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    waitForSuccessTimeoutSeconds number

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    apply_only_at_cron_interval bool
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    association_name str
    The descriptive name for the association.
    automation_target_parameter_name str
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    compliance_severity str
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    document_version str
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instance_id str
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    max_concurrency str
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    max_errors str
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name str
    The name of the SSM document to apply.
    output_location AssociationOutputLocationArgs
    An output location block. Output Location is documented below.
    parameters Mapping[str, str]
    A block of arbitrary string parameters to pass to the SSM document.
    schedule_expression str
    A cron or rate expression that specifies when the association runs.
    sync_compliance str
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets Sequence[AssociationTargetArgs]
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    wait_for_success_timeout_seconds int

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    applyOnlyAtCronInterval Boolean
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    associationName String
    The descriptive name for the association.
    automationTargetParameterName String
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    complianceSeverity String
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    documentVersion String
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instanceId String
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    maxConcurrency String
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    maxErrors String
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name String
    The name of the SSM document to apply.
    outputLocation Property Map
    An output location block. Output Location is documented below.
    parameters Map<String>
    A block of arbitrary string parameters to pass to the SSM document.
    scheduleExpression String
    A cron or rate expression that specifies when the association runs.
    syncCompliance String
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets List<Property Map>
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    waitForSuccessTimeoutSeconds Number

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Association resource produces the following output properties:

    Arn string
    The ARN of the SSM association
    AssociationId string
    The ID of the SSM association.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The ARN of the SSM association
    AssociationId string
    The ID of the SSM association.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the SSM association
    associationId String
    The ID of the SSM association.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The ARN of the SSM association
    associationId string
    The ID of the SSM association.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The ARN of the SSM association
    association_id str
    The ID of the SSM association.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the SSM association
    associationId String
    The ID of the SSM association.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Association Resource

    Get an existing Association resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AssociationState, opts?: CustomResourceOptions): Association
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apply_only_at_cron_interval: Optional[bool] = None,
            arn: Optional[str] = None,
            association_id: Optional[str] = None,
            association_name: Optional[str] = None,
            automation_target_parameter_name: Optional[str] = None,
            compliance_severity: Optional[str] = None,
            document_version: Optional[str] = None,
            instance_id: Optional[str] = None,
            max_concurrency: Optional[str] = None,
            max_errors: Optional[str] = None,
            name: Optional[str] = None,
            output_location: Optional[AssociationOutputLocationArgs] = None,
            parameters: Optional[Mapping[str, str]] = None,
            schedule_expression: Optional[str] = None,
            sync_compliance: Optional[str] = None,
            targets: Optional[Sequence[AssociationTargetArgs]] = None,
            wait_for_success_timeout_seconds: Optional[int] = None) -> Association
    func GetAssociation(ctx *Context, name string, id IDInput, state *AssociationState, opts ...ResourceOption) (*Association, error)
    public static Association Get(string name, Input<string> id, AssociationState? state, CustomResourceOptions? opts = null)
    public static Association get(String name, Output<String> id, AssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplyOnlyAtCronInterval bool
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    Arn string
    The ARN of the SSM association
    AssociationId string
    The ID of the SSM association.
    AssociationName string
    The descriptive name for the association.
    AutomationTargetParameterName string
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    ComplianceSeverity string
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    DocumentVersion string
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    InstanceId string
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    MaxConcurrency string
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    MaxErrors string
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    Name string
    The name of the SSM document to apply.
    OutputLocation AssociationOutputLocation
    An output location block. Output Location is documented below.
    Parameters Dictionary<string, string>
    A block of arbitrary string parameters to pass to the SSM document.
    ScheduleExpression string
    A cron or rate expression that specifies when the association runs.
    SyncCompliance string
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    Targets List<AssociationTarget>
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    WaitForSuccessTimeoutSeconds int

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    ApplyOnlyAtCronInterval bool
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    Arn string
    The ARN of the SSM association
    AssociationId string
    The ID of the SSM association.
    AssociationName string
    The descriptive name for the association.
    AutomationTargetParameterName string
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    ComplianceSeverity string
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    DocumentVersion string
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    InstanceId string
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    MaxConcurrency string
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    MaxErrors string
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    Name string
    The name of the SSM document to apply.
    OutputLocation AssociationOutputLocationArgs
    An output location block. Output Location is documented below.
    Parameters map[string]string
    A block of arbitrary string parameters to pass to the SSM document.
    ScheduleExpression string
    A cron or rate expression that specifies when the association runs.
    SyncCompliance string
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    Targets []AssociationTargetArgs
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    WaitForSuccessTimeoutSeconds int

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    applyOnlyAtCronInterval Boolean
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    arn String
    The ARN of the SSM association
    associationId String
    The ID of the SSM association.
    associationName String
    The descriptive name for the association.
    automationTargetParameterName String
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    complianceSeverity String
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    documentVersion String
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instanceId String
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    maxConcurrency String
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    maxErrors String
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name String
    The name of the SSM document to apply.
    outputLocation AssociationOutputLocation
    An output location block. Output Location is documented below.
    parameters Map<String,String>
    A block of arbitrary string parameters to pass to the SSM document.
    scheduleExpression String
    A cron or rate expression that specifies when the association runs.
    syncCompliance String
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets List<AssociationTarget>
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    waitForSuccessTimeoutSeconds Integer

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    applyOnlyAtCronInterval boolean
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    arn string
    The ARN of the SSM association
    associationId string
    The ID of the SSM association.
    associationName string
    The descriptive name for the association.
    automationTargetParameterName string
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    complianceSeverity string
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    documentVersion string
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instanceId string
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    maxConcurrency string
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    maxErrors string
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name string
    The name of the SSM document to apply.
    outputLocation AssociationOutputLocation
    An output location block. Output Location is documented below.
    parameters {[key: string]: string}
    A block of arbitrary string parameters to pass to the SSM document.
    scheduleExpression string
    A cron or rate expression that specifies when the association runs.
    syncCompliance string
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets AssociationTarget[]
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    waitForSuccessTimeoutSeconds number

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    apply_only_at_cron_interval bool
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    arn str
    The ARN of the SSM association
    association_id str
    The ID of the SSM association.
    association_name str
    The descriptive name for the association.
    automation_target_parameter_name str
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    compliance_severity str
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    document_version str
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instance_id str
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    max_concurrency str
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    max_errors str
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name str
    The name of the SSM document to apply.
    output_location AssociationOutputLocationArgs
    An output location block. Output Location is documented below.
    parameters Mapping[str, str]
    A block of arbitrary string parameters to pass to the SSM document.
    schedule_expression str
    A cron or rate expression that specifies when the association runs.
    sync_compliance str
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets Sequence[AssociationTargetArgs]
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    wait_for_success_timeout_seconds int

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    applyOnlyAtCronInterval Boolean
    By default, when you create a new or update associations, the system runs it immediately and then according to the schedule you specified. Enable this option if you do not want an association to run immediately after you create or update it. This parameter is not supported for rate expressions. Default: false.
    arn String
    The ARN of the SSM association
    associationId String
    The ID of the SSM association.
    associationName String
    The descriptive name for the association.
    automationTargetParameterName String
    Specify the target for the association. This target is required for associations that use an Automation document and target resources by using rate controls. This should be set to the SSM document parameter that will define how your automation will branch out.
    complianceSeverity String
    The compliance severity for the association. Can be one of the following: UNSPECIFIED, LOW, MEDIUM, HIGH or CRITICAL
    documentVersion String
    The document version you want to associate with the target(s). Can be a specific version or the default version.
    instanceId String
    The instance ID to apply an SSM document to. Use targets with key InstanceIds for document schema versions 2.0 and above. Use the targets attribute instead.

    Deprecated: use 'targets' argument instead. https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-InstanceId

    maxConcurrency String
    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%.
    maxErrors String
    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify a number, for example 10, or a percentage of the target set, for example 10%. If you specify a threshold of 3, the stop command is sent when the fourth error is returned. If you specify a threshold of 10% for 50 associations, the stop command is sent when the sixth error is returned.
    name String
    The name of the SSM document to apply.
    outputLocation Property Map
    An output location block. Output Location is documented below.
    parameters Map<String>
    A block of arbitrary string parameters to pass to the SSM document.
    scheduleExpression String
    A cron or rate expression that specifies when the association runs.
    syncCompliance String
    The mode for generating association compliance. You can specify AUTO or MANUAL.
    targets List<Property Map>
    A block containing the targets of the SSM association. Targets are documented below. AWS currently supports a maximum of 5 targets.
    waitForSuccessTimeoutSeconds Number

    The number of seconds to wait for the association status to be Success. If Success status is not reached within the given time, create opration will fail.

    Output Location (output_location) is an S3 bucket where you want to store the results of this association:

    Supporting Types

    AssociationOutputLocation, AssociationOutputLocationArgs

    S3BucketName string
    The S3 bucket name.
    S3KeyPrefix string
    The S3 bucket prefix. Results stored in the root if not configured.
    S3Region string

    The S3 bucket region.

    Targets specify what instance IDs or tags to apply the document to and has these keys:

    S3BucketName string
    The S3 bucket name.
    S3KeyPrefix string
    The S3 bucket prefix. Results stored in the root if not configured.
    S3Region string

    The S3 bucket region.

    Targets specify what instance IDs or tags to apply the document to and has these keys:

    s3BucketName String
    The S3 bucket name.
    s3KeyPrefix String
    The S3 bucket prefix. Results stored in the root if not configured.
    s3Region String

    The S3 bucket region.

    Targets specify what instance IDs or tags to apply the document to and has these keys:

    s3BucketName string
    The S3 bucket name.
    s3KeyPrefix string
    The S3 bucket prefix. Results stored in the root if not configured.
    s3Region string

    The S3 bucket region.

    Targets specify what instance IDs or tags to apply the document to and has these keys:

    s3_bucket_name str
    The S3 bucket name.
    s3_key_prefix str
    The S3 bucket prefix. Results stored in the root if not configured.
    s3_region str

    The S3 bucket region.

    Targets specify what instance IDs or tags to apply the document to and has these keys:

    s3BucketName String
    The S3 bucket name.
    s3KeyPrefix String
    The S3 bucket prefix. Results stored in the root if not configured.
    s3Region String

    The S3 bucket region.

    Targets specify what instance IDs or tags to apply the document to and has these keys:

    AssociationTarget, AssociationTargetArgs

    Key string
    Either InstanceIds or tag:Tag Name to specify an EC2 tag.
    Values List<string>
    A list of instance IDs or tag values. AWS currently limits this list size to one value.
    Key string
    Either InstanceIds or tag:Tag Name to specify an EC2 tag.
    Values []string
    A list of instance IDs or tag values. AWS currently limits this list size to one value.
    key String
    Either InstanceIds or tag:Tag Name to specify an EC2 tag.
    values List<String>
    A list of instance IDs or tag values. AWS currently limits this list size to one value.
    key string
    Either InstanceIds or tag:Tag Name to specify an EC2 tag.
    values string[]
    A list of instance IDs or tag values. AWS currently limits this list size to one value.
    key str
    Either InstanceIds or tag:Tag Name to specify an EC2 tag.
    values Sequence[str]
    A list of instance IDs or tag values. AWS currently limits this list size to one value.
    key String
    Either InstanceIds or tag:Tag Name to specify an EC2 tag.
    values List<String>
    A list of instance IDs or tag values. AWS currently limits this list size to one value.

    Import

    Using pulumi import, import SSM associations using the association_id. For example:

    $ pulumi import aws:ssm/association:Association test-association 10abcdef-0abc-1234-5678-90abcdef123456
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi