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

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

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

aws.ssm.MaintenanceWindowTarget

Explore with Pulumi AI

aws logo

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

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

    Provides an SSM Maintenance Window Target resource

    Example Usage

    Instance Target

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const window = new aws.ssm.MaintenanceWindow("window", {
        name: "maintenance-window-webapp",
        schedule: "cron(0 16 ? * TUE *)",
        duration: 3,
        cutoff: 1,
    });
    const target1 = new aws.ssm.MaintenanceWindowTarget("target1", {
        windowId: window.id,
        name: "maintenance-window-target",
        description: "This is a maintenance window target",
        resourceType: "INSTANCE",
        targets: [{
            key: "tag:Name",
            values: ["acceptance_test"],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    window = aws.ssm.MaintenanceWindow("window",
        name="maintenance-window-webapp",
        schedule="cron(0 16 ? * TUE *)",
        duration=3,
        cutoff=1)
    target1 = aws.ssm.MaintenanceWindowTarget("target1",
        window_id=window.id,
        name="maintenance-window-target",
        description="This is a maintenance window target",
        resource_type="INSTANCE",
        targets=[{
            "key": "tag:Name",
            "values": ["acceptance_test"],
        }])
    
    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 {
    		window, err := ssm.NewMaintenanceWindow(ctx, "window", &ssm.MaintenanceWindowArgs{
    			Name:     pulumi.String("maintenance-window-webapp"),
    			Schedule: pulumi.String("cron(0 16 ? * TUE *)"),
    			Duration: pulumi.Int(3),
    			Cutoff:   pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ssm.NewMaintenanceWindowTarget(ctx, "target1", &ssm.MaintenanceWindowTargetArgs{
    			WindowId:     window.ID(),
    			Name:         pulumi.String("maintenance-window-target"),
    			Description:  pulumi.String("This is a maintenance window target"),
    			ResourceType: pulumi.String("INSTANCE"),
    			Targets: ssm.MaintenanceWindowTargetTargetArray{
    				&ssm.MaintenanceWindowTargetTargetArgs{
    					Key: pulumi.String("tag:Name"),
    					Values: pulumi.StringArray{
    						pulumi.String("acceptance_test"),
    					},
    				},
    			},
    		})
    		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 window = new Aws.Ssm.MaintenanceWindow("window", new()
        {
            Name = "maintenance-window-webapp",
            Schedule = "cron(0 16 ? * TUE *)",
            Duration = 3,
            Cutoff = 1,
        });
    
        var target1 = new Aws.Ssm.MaintenanceWindowTarget("target1", new()
        {
            WindowId = window.Id,
            Name = "maintenance-window-target",
            Description = "This is a maintenance window target",
            ResourceType = "INSTANCE",
            Targets = new[]
            {
                new Aws.Ssm.Inputs.MaintenanceWindowTargetTargetArgs
                {
                    Key = "tag:Name",
                    Values = new[]
                    {
                        "acceptance_test",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.MaintenanceWindow;
    import com.pulumi.aws.ssm.MaintenanceWindowArgs;
    import com.pulumi.aws.ssm.MaintenanceWindowTarget;
    import com.pulumi.aws.ssm.MaintenanceWindowTargetArgs;
    import com.pulumi.aws.ssm.inputs.MaintenanceWindowTargetTargetArgs;
    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 window = new MaintenanceWindow("window", MaintenanceWindowArgs.builder()
                .name("maintenance-window-webapp")
                .schedule("cron(0 16 ? * TUE *)")
                .duration(3)
                .cutoff(1)
                .build());
    
            var target1 = new MaintenanceWindowTarget("target1", MaintenanceWindowTargetArgs.builder()
                .windowId(window.id())
                .name("maintenance-window-target")
                .description("This is a maintenance window target")
                .resourceType("INSTANCE")
                .targets(MaintenanceWindowTargetTargetArgs.builder()
                    .key("tag:Name")
                    .values("acceptance_test")
                    .build())
                .build());
    
        }
    }
    
    resources:
      window:
        type: aws:ssm:MaintenanceWindow
        properties:
          name: maintenance-window-webapp
          schedule: cron(0 16 ? * TUE *)
          duration: 3
          cutoff: 1
      target1:
        type: aws:ssm:MaintenanceWindowTarget
        properties:
          windowId: ${window.id}
          name: maintenance-window-target
          description: This is a maintenance window target
          resourceType: INSTANCE
          targets:
            - key: tag:Name
              values:
                - acceptance_test
    

    Resource Group Target

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const window = new aws.ssm.MaintenanceWindow("window", {
        name: "maintenance-window-webapp",
        schedule: "cron(0 16 ? * TUE *)",
        duration: 3,
        cutoff: 1,
    });
    const target1 = new aws.ssm.MaintenanceWindowTarget("target1", {
        windowId: window.id,
        name: "maintenance-window-target",
        description: "This is a maintenance window target",
        resourceType: "RESOURCE_GROUP",
        targets: [{
            key: "resource-groups:ResourceTypeFilters",
            values: ["AWS::EC2::Instance"],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    window = aws.ssm.MaintenanceWindow("window",
        name="maintenance-window-webapp",
        schedule="cron(0 16 ? * TUE *)",
        duration=3,
        cutoff=1)
    target1 = aws.ssm.MaintenanceWindowTarget("target1",
        window_id=window.id,
        name="maintenance-window-target",
        description="This is a maintenance window target",
        resource_type="RESOURCE_GROUP",
        targets=[{
            "key": "resource-groups:ResourceTypeFilters",
            "values": ["AWS::EC2::Instance"],
        }])
    
    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 {
    		window, err := ssm.NewMaintenanceWindow(ctx, "window", &ssm.MaintenanceWindowArgs{
    			Name:     pulumi.String("maintenance-window-webapp"),
    			Schedule: pulumi.String("cron(0 16 ? * TUE *)"),
    			Duration: pulumi.Int(3),
    			Cutoff:   pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ssm.NewMaintenanceWindowTarget(ctx, "target1", &ssm.MaintenanceWindowTargetArgs{
    			WindowId:     window.ID(),
    			Name:         pulumi.String("maintenance-window-target"),
    			Description:  pulumi.String("This is a maintenance window target"),
    			ResourceType: pulumi.String("RESOURCE_GROUP"),
    			Targets: ssm.MaintenanceWindowTargetTargetArray{
    				&ssm.MaintenanceWindowTargetTargetArgs{
    					Key: pulumi.String("resource-groups:ResourceTypeFilters"),
    					Values: pulumi.StringArray{
    						pulumi.String("AWS::EC2::Instance"),
    					},
    				},
    			},
    		})
    		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 window = new Aws.Ssm.MaintenanceWindow("window", new()
        {
            Name = "maintenance-window-webapp",
            Schedule = "cron(0 16 ? * TUE *)",
            Duration = 3,
            Cutoff = 1,
        });
    
        var target1 = new Aws.Ssm.MaintenanceWindowTarget("target1", new()
        {
            WindowId = window.Id,
            Name = "maintenance-window-target",
            Description = "This is a maintenance window target",
            ResourceType = "RESOURCE_GROUP",
            Targets = new[]
            {
                new Aws.Ssm.Inputs.MaintenanceWindowTargetTargetArgs
                {
                    Key = "resource-groups:ResourceTypeFilters",
                    Values = new[]
                    {
                        "AWS::EC2::Instance",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.MaintenanceWindow;
    import com.pulumi.aws.ssm.MaintenanceWindowArgs;
    import com.pulumi.aws.ssm.MaintenanceWindowTarget;
    import com.pulumi.aws.ssm.MaintenanceWindowTargetArgs;
    import com.pulumi.aws.ssm.inputs.MaintenanceWindowTargetTargetArgs;
    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 window = new MaintenanceWindow("window", MaintenanceWindowArgs.builder()
                .name("maintenance-window-webapp")
                .schedule("cron(0 16 ? * TUE *)")
                .duration(3)
                .cutoff(1)
                .build());
    
            var target1 = new MaintenanceWindowTarget("target1", MaintenanceWindowTargetArgs.builder()
                .windowId(window.id())
                .name("maintenance-window-target")
                .description("This is a maintenance window target")
                .resourceType("RESOURCE_GROUP")
                .targets(MaintenanceWindowTargetTargetArgs.builder()
                    .key("resource-groups:ResourceTypeFilters")
                    .values("AWS::EC2::Instance")
                    .build())
                .build());
    
        }
    }
    
    resources:
      window:
        type: aws:ssm:MaintenanceWindow
        properties:
          name: maintenance-window-webapp
          schedule: cron(0 16 ? * TUE *)
          duration: 3
          cutoff: 1
      target1:
        type: aws:ssm:MaintenanceWindowTarget
        properties:
          windowId: ${window.id}
          name: maintenance-window-target
          description: This is a maintenance window target
          resourceType: RESOURCE_GROUP
          targets:
            - key: resource-groups:ResourceTypeFilters
              values:
                - AWS::EC2::Instance
    

    Create MaintenanceWindowTarget Resource

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

    Constructor syntax

    new MaintenanceWindowTarget(name: string, args: MaintenanceWindowTargetArgs, opts?: CustomResourceOptions);
    @overload
    def MaintenanceWindowTarget(resource_name: str,
                                args: MaintenanceWindowTargetArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def MaintenanceWindowTarget(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                resource_type: Optional[str] = None,
                                targets: Optional[Sequence[MaintenanceWindowTargetTargetArgs]] = None,
                                window_id: Optional[str] = None,
                                description: Optional[str] = None,
                                name: Optional[str] = None,
                                owner_information: Optional[str] = None)
    func NewMaintenanceWindowTarget(ctx *Context, name string, args MaintenanceWindowTargetArgs, opts ...ResourceOption) (*MaintenanceWindowTarget, error)
    public MaintenanceWindowTarget(string name, MaintenanceWindowTargetArgs args, CustomResourceOptions? opts = null)
    public MaintenanceWindowTarget(String name, MaintenanceWindowTargetArgs args)
    public MaintenanceWindowTarget(String name, MaintenanceWindowTargetArgs args, CustomResourceOptions options)
    
    type: aws:ssm:MaintenanceWindowTarget
    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 MaintenanceWindowTargetArgs
    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 MaintenanceWindowTargetArgs
    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 MaintenanceWindowTargetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MaintenanceWindowTargetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MaintenanceWindowTargetArgs
    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 maintenanceWindowTargetResource = new Aws.Ssm.MaintenanceWindowTarget("maintenanceWindowTargetResource", new()
    {
        ResourceType = "string",
        Targets = new[]
        {
            new Aws.Ssm.Inputs.MaintenanceWindowTargetTargetArgs
            {
                Key = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
        WindowId = "string",
        Description = "string",
        Name = "string",
        OwnerInformation = "string",
    });
    
    example, err := ssm.NewMaintenanceWindowTarget(ctx, "maintenanceWindowTargetResource", &ssm.MaintenanceWindowTargetArgs{
    	ResourceType: pulumi.String("string"),
    	Targets: ssm.MaintenanceWindowTargetTargetArray{
    		&ssm.MaintenanceWindowTargetTargetArgs{
    			Key: pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	WindowId:         pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	OwnerInformation: pulumi.String("string"),
    })
    
    var maintenanceWindowTargetResource = new MaintenanceWindowTarget("maintenanceWindowTargetResource", MaintenanceWindowTargetArgs.builder()
        .resourceType("string")
        .targets(MaintenanceWindowTargetTargetArgs.builder()
            .key("string")
            .values("string")
            .build())
        .windowId("string")
        .description("string")
        .name("string")
        .ownerInformation("string")
        .build());
    
    maintenance_window_target_resource = aws.ssm.MaintenanceWindowTarget("maintenanceWindowTargetResource",
        resource_type="string",
        targets=[{
            "key": "string",
            "values": ["string"],
        }],
        window_id="string",
        description="string",
        name="string",
        owner_information="string")
    
    const maintenanceWindowTargetResource = new aws.ssm.MaintenanceWindowTarget("maintenanceWindowTargetResource", {
        resourceType: "string",
        targets: [{
            key: "string",
            values: ["string"],
        }],
        windowId: "string",
        description: "string",
        name: "string",
        ownerInformation: "string",
    });
    
    type: aws:ssm:MaintenanceWindowTarget
    properties:
        description: string
        name: string
        ownerInformation: string
        resourceType: string
        targets:
            - key: string
              values:
                - string
        windowId: string
    

    MaintenanceWindowTarget 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 MaintenanceWindowTarget resource accepts the following input properties:

    ResourceType string
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    Targets List<MaintenanceWindowTargetTarget>
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    WindowId string
    The Id of the maintenance window to register the target with.
    Description string
    The description of the maintenance window target.
    Name string
    The name of the maintenance window target.
    OwnerInformation string
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    ResourceType string
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    Targets []MaintenanceWindowTargetTargetArgs
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    WindowId string
    The Id of the maintenance window to register the target with.
    Description string
    The description of the maintenance window target.
    Name string
    The name of the maintenance window target.
    OwnerInformation string
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resourceType String
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets List<MaintenanceWindowTargetTarget>
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    windowId String
    The Id of the maintenance window to register the target with.
    description String
    The description of the maintenance window target.
    name String
    The name of the maintenance window target.
    ownerInformation String
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resourceType string
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets MaintenanceWindowTargetTarget[]
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    windowId string
    The Id of the maintenance window to register the target with.
    description string
    The description of the maintenance window target.
    name string
    The name of the maintenance window target.
    ownerInformation string
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resource_type str
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets Sequence[MaintenanceWindowTargetTargetArgs]
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    window_id str
    The Id of the maintenance window to register the target with.
    description str
    The description of the maintenance window target.
    name str
    The name of the maintenance window target.
    owner_information str
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resourceType String
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets List<Property Map>
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    windowId String
    The Id of the maintenance window to register the target with.
    description String
    The description of the maintenance window target.
    name String
    The name of the maintenance window target.
    ownerInformation String
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MaintenanceWindowTarget Resource

    Get an existing MaintenanceWindowTarget 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?: MaintenanceWindowTargetState, opts?: CustomResourceOptions): MaintenanceWindowTarget
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            owner_information: Optional[str] = None,
            resource_type: Optional[str] = None,
            targets: Optional[Sequence[MaintenanceWindowTargetTargetArgs]] = None,
            window_id: Optional[str] = None) -> MaintenanceWindowTarget
    func GetMaintenanceWindowTarget(ctx *Context, name string, id IDInput, state *MaintenanceWindowTargetState, opts ...ResourceOption) (*MaintenanceWindowTarget, error)
    public static MaintenanceWindowTarget Get(string name, Input<string> id, MaintenanceWindowTargetState? state, CustomResourceOptions? opts = null)
    public static MaintenanceWindowTarget get(String name, Output<String> id, MaintenanceWindowTargetState 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:
    Description string
    The description of the maintenance window target.
    Name string
    The name of the maintenance window target.
    OwnerInformation string
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    ResourceType string
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    Targets List<MaintenanceWindowTargetTarget>
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    WindowId string
    The Id of the maintenance window to register the target with.
    Description string
    The description of the maintenance window target.
    Name string
    The name of the maintenance window target.
    OwnerInformation string
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    ResourceType string
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    Targets []MaintenanceWindowTargetTargetArgs
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    WindowId string
    The Id of the maintenance window to register the target with.
    description String
    The description of the maintenance window target.
    name String
    The name of the maintenance window target.
    ownerInformation String
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resourceType String
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets List<MaintenanceWindowTargetTarget>
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    windowId String
    The Id of the maintenance window to register the target with.
    description string
    The description of the maintenance window target.
    name string
    The name of the maintenance window target.
    ownerInformation string
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resourceType string
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets MaintenanceWindowTargetTarget[]
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    windowId string
    The Id of the maintenance window to register the target with.
    description str
    The description of the maintenance window target.
    name str
    The name of the maintenance window target.
    owner_information str
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resource_type str
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets Sequence[MaintenanceWindowTargetTargetArgs]
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    window_id str
    The Id of the maintenance window to register the target with.
    description String
    The description of the maintenance window target.
    name String
    The name of the maintenance window target.
    ownerInformation String
    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
    resourceType String
    The type of target being registered with the Maintenance Window. Possible values are INSTANCE and RESOURCE_GROUP.
    targets List<Property Map>
    The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs. You can specify targets using instance IDs, resource group names, or tags that have been applied to instances. For more information about these examples formats see (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html)
    windowId String
    The Id of the maintenance window to register the target with.

    Supporting Types

    MaintenanceWindowTargetTarget, MaintenanceWindowTargetTargetArgs

    Key string
    Values List<string>
    Key string
    Values []string
    key String
    values List<String>
    key string
    values string[]
    key str
    values Sequence[str]
    key String
    values List<String>

    Import

    Using pulumi import, import SSM Maintenance Window targets using WINDOW_ID/WINDOW_TARGET_ID. For example:

    $ pulumi import aws:ssm/maintenanceWindowTarget:MaintenanceWindowTarget example mw-0c50858d01EXAMPLE/23639a0b-ddbc-4bca-9e72-78d96EXAMPLE
    

    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.44.0 published on Monday, Jul 8, 2024 by Pulumi