MaintenanceWindowTask

Provides an SSM Maintenance Window Task resource

Example Usage

Automation Tasks

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ssm.MaintenanceWindowTask("example", new Aws.Ssm.MaintenanceWindowTaskArgs
        {
            MaxConcurrency = "2",
            MaxErrors = "1",
            Priority = 1,
            ServiceRoleArn = aws_iam_role.Example.Arn,
            Targets = 
            {
                new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
                {
                    Key = "InstanceIds",
                    Values = 
                    {
                        aws_instance.Example.Id,
                    },
                },
            },
            TaskArn = "AWS-RestartEC2Instance",
            TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
            {
                AutomationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs
                {
                    DocumentVersion = "$LATEST",
                    Parameter = 
                    {
                        
                        {
                            { "name", "InstanceId" },
                            { "values", 
                            {
                                aws_instance.Example.Id,
                            } },
                        },
                    },
                },
            },
            TaskType = "AUTOMATION",
            WindowId = aws_ssm_maintenance_window.Example.Id,
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ssm"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ssm.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
            MaxConcurrency: pulumi.String("2"),
            MaxErrors:      pulumi.String("1"),
            Priority:       pulumi.Int(1),
            ServiceRoleArn: pulumi.String(aws_iam_role.Example.Arn),
            Targets: ssm.MaintenanceWindowTaskTargetArray{
                &ssm.MaintenanceWindowTaskTargetArgs{
                    Key: pulumi.String("InstanceIds"),
                    Values: pulumi.StringArray{
                        pulumi.String(aws_instance.Example.Id),
                    },
                },
            },
            TaskArn: pulumi.String("AWS-RestartEC2Instance"),
            TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
                AutomationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs{
                    DocumentVersion: pulumi.String(fmt.Sprintf("%v%v", "$", "LATEST")),
                    Parameter: pulumi.MapArray{
                        pulumi.Map{
                            "name": pulumi.String("InstanceId"),
                            "values": pulumi.StringArray{
                                pulumi.String(aws_instance.Example.Id),
                            },
                        },
                    },
                },
            },
            TaskType: pulumi.String("AUTOMATION"),
            WindowId: pulumi.String(aws_ssm_maintenance_window.Example.Id),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ssm.MaintenanceWindowTask("example",
    max_concurrency=2,
    max_errors=1,
    priority=1,
    service_role_arn=aws_iam_role["example"]["arn"],
    targets=[{
        "key": "InstanceIds",
        "values": [aws_instance["example"]["id"]],
    }],
    task_arn="AWS-RestartEC2Instance",
    task_invocation_parameters={
        "automationParameters": {
            "document_version": "$LATEST",
            "parameter": [{
                "name": "InstanceId",
                "values": [aws_instance["example"]["id"]],
            }],
        },
    },
    task_type="AUTOMATION",
    window_id=aws_ssm_maintenance_window["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ssm.MaintenanceWindowTask("example", {
    maxConcurrency: "2",
    maxErrors: "1",
    priority: 1,
    serviceRoleArn: aws_iam_role_example.arn,
    targets: [{
        key: "InstanceIds",
        values: [aws_instance_example.id],
    }],
    taskArn: "AWS-RestartEC2Instance",
    taskInvocationParameters: {
        automationParameters: {
            documentVersion: "$LATEST",
            parameters: [{
                name: "InstanceId",
                values: [aws_instance_example.id],
            }],
        },
    },
    taskType: "AUTOMATION",
    windowId: aws_ssm_maintenance_window_example.id,
});

Lambda Tasks

Coming soon!

Coming soon!

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ssm.MaintenanceWindowTask("example", {
    maxConcurrency: "2",
    maxErrors: "1",
    priority: 1,
    serviceRoleArn: aws_iam_role_example.arn,
    targets: [{
        key: "InstanceIds",
        values: [aws_instance_example.id],
    }],
    taskArn: aws_lambda_function_example.arn,
    taskInvocationParameters: {
        lambdaParameters: {
            clientContext: Buffer.from("{\"key1\":\"value1\"}").toString("base64"),
            payload: "{\"key1\":\"value1\"}",
        },
    },
    taskType: "LAMBDA",
    windowId: aws_ssm_maintenance_window_example.id,
});

Run Command Tasks

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ssm.MaintenanceWindowTask("example", new Aws.Ssm.MaintenanceWindowTaskArgs
        {
            MaxConcurrency = "2",
            MaxErrors = "1",
            Priority = 1,
            ServiceRoleArn = aws_iam_role.Example.Arn,
            Targets = 
            {
                new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
                {
                    Key = "InstanceIds",
                    Values = 
                    {
                        aws_instance.Example.Id,
                    },
                },
            },
            TaskArn = "AWS-RunShellScript",
            TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
            {
                RunCommandParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs
                {
                    NotificationConfig = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs
                    {
                        NotificationArn = aws_sns_topic.Example.Arn,
                        NotificationEvents = 
                        {
                            "All",
                        },
                        NotificationType = "Command",
                    },
                    OutputS3Bucket = aws_s3_bucket.Example.Bucket,
                    OutputS3KeyPrefix = "output",
                    Parameter = 
                    {
                        
                        {
                            { "name", "commands" },
                            { "values", 
                            {
                                "date",
                            } },
                        },
                    },
                    ServiceRoleArn = aws_iam_role.Example.Arn,
                    TimeoutSeconds = 600,
                },
            },
            TaskType = "RUN_COMMAND",
            WindowId = aws_ssm_maintenance_window.Example.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ssm"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ssm.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
            MaxConcurrency: pulumi.String("2"),
            MaxErrors:      pulumi.String("1"),
            Priority:       pulumi.Int(1),
            ServiceRoleArn: pulumi.String(aws_iam_role.Example.Arn),
            Targets: ssm.MaintenanceWindowTaskTargetArray{
                &ssm.MaintenanceWindowTaskTargetArgs{
                    Key: pulumi.String("InstanceIds"),
                    Values: pulumi.StringArray{
                        pulumi.String(aws_instance.Example.Id),
                    },
                },
            },
            TaskArn: pulumi.String("AWS-RunShellScript"),
            TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
                RunCommandParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs{
                    NotificationConfig: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs{
                        NotificationArn: pulumi.String(aws_sns_topic.Example.Arn),
                        NotificationEvents: pulumi.StringArray{
                            pulumi.String("All"),
                        },
                        NotificationType: pulumi.String("Command"),
                    },
                    OutputS3Bucket:    pulumi.String(aws_s3_bucket.Example.Bucket),
                    OutputS3KeyPrefix: pulumi.String("output"),
                    Parameter: pulumi.MapArray{
                        pulumi.Map{
                            "name": pulumi.String("commands"),
                            "values": pulumi.StringArray{
                                pulumi.String("date"),
                            },
                        },
                    },
                    ServiceRoleArn: pulumi.String(aws_iam_role.Example.Arn),
                    TimeoutSeconds: pulumi.Int(600),
                },
            },
            TaskType: pulumi.String("RUN_COMMAND"),
            WindowId: pulumi.String(aws_ssm_maintenance_window.Example.Id),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ssm.MaintenanceWindowTask("example",
    max_concurrency=2,
    max_errors=1,
    priority=1,
    service_role_arn=aws_iam_role["example"]["arn"],
    targets=[{
        "key": "InstanceIds",
        "values": [aws_instance["example"]["id"]],
    }],
    task_arn="AWS-RunShellScript",
    task_invocation_parameters={
        "runCommandParameters": {
            "notificationConfig": {
                "notificationArn": aws_sns_topic["example"]["arn"],
                "notificationEvents": ["All"],
                "notification_type": "Command",
            },
            "outputS3Bucket": aws_s3_bucket["example"]["bucket"],
            "outputS3KeyPrefix": "output",
            "parameter": [{
                "name": "commands",
                "values": ["date"],
            }],
            "service_role_arn": aws_iam_role["example"]["arn"],
            "timeoutSeconds": 600,
        },
    },
    task_type="RUN_COMMAND",
    window_id=aws_ssm_maintenance_window["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ssm.MaintenanceWindowTask("example", {
    maxConcurrency: "2",
    maxErrors: "1",
    priority: 1,
    serviceRoleArn: aws_iam_role_example.arn,
    targets: [{
        key: "InstanceIds",
        values: [aws_instance_example.id],
    }],
    taskArn: "AWS-RunShellScript",
    taskInvocationParameters: {
        runCommandParameters: {
            notificationConfig: {
                notificationArn: aws_sns_topic_example.arn,
                notificationEvents: ["All"],
                notificationType: "Command",
            },
            outputS3Bucket: aws_s3_bucket_example.bucket,
            outputS3KeyPrefix: "output",
            parameters: [{
                name: "commands",
                values: ["date"],
            }],
            serviceRoleArn: aws_iam_role_example.arn,
            timeoutSeconds: 600,
        },
    },
    taskType: "RUN_COMMAND",
    windowId: aws_ssm_maintenance_window_example.id,
});

Step Function Tasks

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ssm.MaintenanceWindowTask("example", new Aws.Ssm.MaintenanceWindowTaskArgs
        {
            MaxConcurrency = "2",
            MaxErrors = "1",
            Priority = 1,
            ServiceRoleArn = aws_iam_role.Example.Arn,
            Targets = 
            {
                new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
                {
                    Key = "InstanceIds",
                    Values = 
                    {
                        aws_instance.Example.Id,
                    },
                },
            },
            TaskArn = aws_sfn_activity.Example.Id,
            TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
            {
                StepFunctionsParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs
                {
                    Input = "{\"key1\":\"value1\"}",
                    Name = "example",
                },
            },
            TaskType = "STEP_FUNCTIONS",
            WindowId = aws_ssm_maintenance_window.Example.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ssm"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ssm.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
            MaxConcurrency: pulumi.String("2"),
            MaxErrors:      pulumi.String("1"),
            Priority:       pulumi.Int(1),
            ServiceRoleArn: pulumi.String(aws_iam_role.Example.Arn),
            Targets: ssm.MaintenanceWindowTaskTargetArray{
                &ssm.MaintenanceWindowTaskTargetArgs{
                    Key: pulumi.String("InstanceIds"),
                    Values: pulumi.StringArray{
                        pulumi.String(aws_instance.Example.Id),
                    },
                },
            },
            TaskArn: pulumi.String(aws_sfn_activity.Example.Id),
            TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
                StepFunctionsParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs{
                    Input: pulumi.String("{\"key1\":\"value1\"}"),
                    Name:  pulumi.String("example"),
                },
            },
            TaskType: pulumi.String("STEP_FUNCTIONS"),
            WindowId: pulumi.String(aws_ssm_maintenance_window.Example.Id),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ssm.MaintenanceWindowTask("example",
    max_concurrency=2,
    max_errors=1,
    priority=1,
    service_role_arn=aws_iam_role["example"]["arn"],
    targets=[{
        "key": "InstanceIds",
        "values": [aws_instance["example"]["id"]],
    }],
    task_arn=aws_sfn_activity["example"]["id"],
    task_invocation_parameters={
        "stepFunctionsParameters": {
            "input": "{\"key1\":\"value1\"}",
            "name": "example",
        },
    },
    task_type="STEP_FUNCTIONS",
    window_id=aws_ssm_maintenance_window["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ssm.MaintenanceWindowTask("example", {
    maxConcurrency: "2",
    maxErrors: "1",
    priority: 1,
    serviceRoleArn: aws_iam_role_example.arn,
    targets: [{
        key: "InstanceIds",
        values: [aws_instance_example.id],
    }],
    taskArn: aws_sfn_activity_example.id,
    taskInvocationParameters: {
        stepFunctionsParameters: {
            input: "{\"key1\":\"value1\"}",
            name: "example",
        },
    },
    taskType: "STEP_FUNCTIONS",
    windowId: aws_ssm_maintenance_window_example.id,
});

Create a MaintenanceWindowTask Resource

def MaintenanceWindowTask(resource_name, opts=None, description=None, logging_info=None, max_concurrency=None, max_errors=None, name=None, priority=None, service_role_arn=None, targets=None, task_arn=None, task_invocation_parameters=None, task_parameters=None, task_type=None, window_id=None, __props__=None);
name string
The unique name of the resource.
args MaintenanceWindowTaskArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args MaintenanceWindowTaskArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MaintenanceWindowTaskArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

MaintenanceWindowTask Resource Properties

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

Inputs

The MaintenanceWindowTask resource accepts the following input properties:

MaxConcurrency string

The maximum number of targets this task can be run for in parallel.

MaxErrors string

The maximum number of errors allowed before this task stops being scheduled.

ServiceRoleArn string

The role that should be assumed when executing the task.

Targets List<MaintenanceWindowTaskTargetArgs>

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

TaskArn string

The ARN of the task to execute.

TaskType string

The type of task being registered. The only allowed value is RUN_COMMAND.

WindowId string

The Id of the maintenance window to register the task with.

Description string

The description of the maintenance window task.

LoggingInfo MaintenanceWindowTaskLoggingInfoArgs

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

Name string

The name of the maintenance window task.

Priority int

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

TaskInvocationParameters MaintenanceWindowTaskTaskInvocationParametersArgs

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

TaskParameters List<MaintenanceWindowTaskTaskParameterArgs>

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

MaxConcurrency string

The maximum number of targets this task can be run for in parallel.

MaxErrors string

The maximum number of errors allowed before this task stops being scheduled.

ServiceRoleArn string

The role that should be assumed when executing the task.

Targets []MaintenanceWindowTaskTarget

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

TaskArn string

The ARN of the task to execute.

TaskType string

The type of task being registered. The only allowed value is RUN_COMMAND.

WindowId string

The Id of the maintenance window to register the task with.

Description string

The description of the maintenance window task.

LoggingInfo MaintenanceWindowTaskLoggingInfo

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

Name string

The name of the maintenance window task.

Priority int

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

TaskInvocationParameters MaintenanceWindowTaskTaskInvocationParameters

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

TaskParameters []MaintenanceWindowTaskTaskParameter

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

maxConcurrency string

The maximum number of targets this task can be run for in parallel.

maxErrors string

The maximum number of errors allowed before this task stops being scheduled.

serviceRoleArn string

The role that should be assumed when executing the task.

targets MaintenanceWindowTaskTarget[]

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

taskArn string

The ARN of the task to execute.

taskType string

The type of task being registered. The only allowed value is RUN_COMMAND.

windowId string

The Id of the maintenance window to register the task with.

description string

The description of the maintenance window task.

loggingInfo MaintenanceWindowTaskLoggingInfo

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

name string

The name of the maintenance window task.

priority number

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

taskInvocationParameters MaintenanceWindowTaskTaskInvocationParameters

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

taskParameters MaintenanceWindowTaskTaskParameter[]

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

max_concurrency str

The maximum number of targets this task can be run for in parallel.

max_errors str

The maximum number of errors allowed before this task stops being scheduled.

service_role_arn str

The role that should be assumed when executing the task.

targets List[MaintenanceWindowTaskTarget]

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

task_arn str

The ARN of the task to execute.

task_type str

The type of task being registered. The only allowed value is RUN_COMMAND.

window_id str

The Id of the maintenance window to register the task with.

description str

The description of the maintenance window task.

logging_info Dict[MaintenanceWindowTaskLoggingInfo]

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

name str

The name of the maintenance window task.

priority float

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

task_invocation_parameters Dict[MaintenanceWindowTaskTaskInvocationParameters]

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

task_parameters List[MaintenanceWindowTaskTaskParameter]

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

Outputs

All input properties are implicitly available as output properties. Additionally, the MaintenanceWindowTask 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing MaintenanceWindowTask Resource

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

static get(resource_name, id, opts=None, description=None, logging_info=None, max_concurrency=None, max_errors=None, name=None, priority=None, service_role_arn=None, targets=None, task_arn=None, task_invocation_parameters=None, task_parameters=None, task_type=None, window_id=None, __props__=None);
func GetMaintenanceWindowTask(ctx *Context, name string, id IDInput, state *MaintenanceWindowTaskState, opts ...ResourceOption) (*MaintenanceWindowTask, error)
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.

The following state arguments are supported:

Description string

The description of the maintenance window task.

LoggingInfo MaintenanceWindowTaskLoggingInfoArgs

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

MaxConcurrency string

The maximum number of targets this task can be run for in parallel.

MaxErrors string

The maximum number of errors allowed before this task stops being scheduled.

Name string

The name of the maintenance window task.

Priority int

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

ServiceRoleArn string

The role that should be assumed when executing the task.

Targets List<MaintenanceWindowTaskTargetArgs>

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

TaskArn string

The ARN of the task to execute.

TaskInvocationParameters MaintenanceWindowTaskTaskInvocationParametersArgs

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

TaskParameters List<MaintenanceWindowTaskTaskParameterArgs>

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

TaskType string

The type of task being registered. The only allowed value is RUN_COMMAND.

WindowId string

The Id of the maintenance window to register the task with.

Description string

The description of the maintenance window task.

LoggingInfo MaintenanceWindowTaskLoggingInfo

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

MaxConcurrency string

The maximum number of targets this task can be run for in parallel.

MaxErrors string

The maximum number of errors allowed before this task stops being scheduled.

Name string

The name of the maintenance window task.

Priority int

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

ServiceRoleArn string

The role that should be assumed when executing the task.

Targets []MaintenanceWindowTaskTarget

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

TaskArn string

The ARN of the task to execute.

TaskInvocationParameters MaintenanceWindowTaskTaskInvocationParameters

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

TaskParameters []MaintenanceWindowTaskTaskParameter

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

TaskType string

The type of task being registered. The only allowed value is RUN_COMMAND.

WindowId string

The Id of the maintenance window to register the task with.

description string

The description of the maintenance window task.

loggingInfo MaintenanceWindowTaskLoggingInfo

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

maxConcurrency string

The maximum number of targets this task can be run for in parallel.

maxErrors string

The maximum number of errors allowed before this task stops being scheduled.

name string

The name of the maintenance window task.

priority number

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

serviceRoleArn string

The role that should be assumed when executing the task.

targets MaintenanceWindowTaskTarget[]

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

taskArn string

The ARN of the task to execute.

taskInvocationParameters MaintenanceWindowTaskTaskInvocationParameters

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

taskParameters MaintenanceWindowTaskTaskParameter[]

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

taskType string

The type of task being registered. The only allowed value is RUN_COMMAND.

windowId string

The Id of the maintenance window to register the task with.

description str

The description of the maintenance window task.

logging_info Dict[MaintenanceWindowTaskLoggingInfo]

A structure containing information about an Amazon S3 bucket to write instance-level logs to. Use task_invocation_parameters configuration block run_command_parameters configuration block output_s3_* arguments instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

max_concurrency str

The maximum number of targets this task can be run for in parallel.

max_errors str

The maximum number of errors allowed before this task stops being scheduled.

name str

The name of the maintenance window task.

priority float

The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

service_role_arn str

The role that should be assumed when executing the task.

targets List[MaintenanceWindowTaskTarget]

The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.

task_arn str

The ARN of the task to execute.

task_invocation_parameters Dict[MaintenanceWindowTaskTaskInvocationParameters]

The parameters for task execution. This argument is conflict with task_parameters and logging_info.

task_parameters List[MaintenanceWindowTaskTaskParameter]

A structure containing information about parameters required by the particular task_arn. Use parameter configuration blocks under the task_invocation_parameters configuration block instead. Conflicts with task_invocation_parameters. Documented below.

Deprecated: use 'task_invocation_parameters' argument instead

task_type str

The type of task being registered. The only allowed value is RUN_COMMAND.

window_id str

The Id of the maintenance window to register the task with.

Supporting Types

MaintenanceWindowTaskLoggingInfo

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

S3BucketName string
S3Region string
S3BucketPrefix string
S3BucketName string
S3Region string
S3BucketPrefix string
s3BucketName string
s3Region string
s3BucketPrefix string
s3_bucket_name str
s3_region str
s3BucketPrefix str

MaintenanceWindowTaskTarget

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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

MaintenanceWindowTaskTaskInvocationParameters

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AutomationParameters MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs

The parameters for an AUTOMATION task type. Documented below.

LambdaParameters MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs

The parameters for a LAMBDA task type. Documented below.

RunCommandParameters MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs

The parameters for a RUN_COMMAND task type. Documented below.

StepFunctionsParameters MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs

The parameters for a STEP_FUNCTIONS task type. Documented below.

AutomationParameters MaintenanceWindowTaskTaskInvocationParametersAutomationParameters

The parameters for an AUTOMATION task type. Documented below.

LambdaParameters MaintenanceWindowTaskTaskInvocationParametersLambdaParameters

The parameters for a LAMBDA task type. Documented below.

RunCommandParameters MaintenanceWindowTaskTaskInvocationParametersRunCommandParameters

The parameters for a RUN_COMMAND task type. Documented below.

StepFunctionsParameters MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParameters

The parameters for a STEP_FUNCTIONS task type. Documented below.

automationParameters MaintenanceWindowTaskTaskInvocationParametersAutomationParameters

The parameters for an AUTOMATION task type. Documented below.

lambdaParameters MaintenanceWindowTaskTaskInvocationParametersLambdaParameters

The parameters for a LAMBDA task type. Documented below.

runCommandParameters MaintenanceWindowTaskTaskInvocationParametersRunCommandParameters

The parameters for a RUN_COMMAND task type. Documented below.

stepFunctionsParameters MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParameters

The parameters for a STEP_FUNCTIONS task type. Documented below.

automationParameters Dict[MaintenanceWindowTaskTaskInvocationParametersAutomationParameters]

The parameters for an AUTOMATION task type. Documented below.

lambdaParameters Dict[MaintenanceWindowTaskTaskInvocationParametersLambdaParameters]

The parameters for a LAMBDA task type. Documented below.

runCommandParameters Dict[MaintenanceWindowTaskTaskInvocationParametersRunCommandParameters]

The parameters for a RUN_COMMAND task type. Documented below.

stepFunctionsParameters Dict[MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParameters]

The parameters for a STEP_FUNCTIONS task type. Documented below.

MaintenanceWindowTaskTaskInvocationParametersAutomationParameters

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DocumentVersion string

The version of an Automation document to use during task execution.

Parameters List<MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs>

The parameters for the RUN_COMMAND task execution. Documented below.

DocumentVersion string

The version of an Automation document to use during task execution.

Parameters []MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameter

The parameters for the RUN_COMMAND task execution. Documented below.

documentVersion string

The version of an Automation document to use during task execution.

parameters MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameter[]

The parameters for the RUN_COMMAND task execution. Documented below.

document_version str

The version of an Automation document to use during task execution.

parameters List[MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameter]

The parameters for the RUN_COMMAND task execution. Documented below.

MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The parameter name.

Values List<string>

The array of strings.

Name string

The parameter name.

Values []string

The array of strings.

name string

The parameter name.

values string[]

The array of strings.

name str

The parameter name.

values List[str]

The array of strings.

MaintenanceWindowTaskTaskInvocationParametersLambdaParameters

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ClientContext string

Pass client-specific information to the Lambda function that you are invoking.

Payload string

JSON to provide to your Lambda function as input.

Qualifier string

Specify a Lambda function version or alias name.

ClientContext string

Pass client-specific information to the Lambda function that you are invoking.

Payload string

JSON to provide to your Lambda function as input.

Qualifier string

Specify a Lambda function version or alias name.

clientContext string

Pass client-specific information to the Lambda function that you are invoking.

payload string

JSON to provide to your Lambda function as input.

qualifier string

Specify a Lambda function version or alias name.

clientContext str

Pass client-specific information to the Lambda function that you are invoking.

payload str

JSON to provide to your Lambda function as input.

qualifier str

Specify a Lambda function version or alias name.

MaintenanceWindowTaskTaskInvocationParametersRunCommandParameters

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Comment string

Information about the command(s) to execute.

DocumentHash string

The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.

DocumentHashType string

SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values: Sha256 and Sha1

NotificationConfig MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs

Configurations for sending notifications about command status changes on a per-instance basis. Documented below.

OutputS3Bucket string

The name of the Amazon S3 bucket.

OutputS3KeyPrefix string

The Amazon S3 bucket subfolder.

Parameters List<MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs>

The parameters for the RUN_COMMAND task execution. Documented below.

ServiceRoleArn string

The IAM service role to assume during task execution.

TimeoutSeconds int

If this time is reached and the command has not already started executing, it doesn’t run.

Comment string

Information about the command(s) to execute.

DocumentHash string

The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.

DocumentHashType string

SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values: Sha256 and Sha1

NotificationConfig MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfig

Configurations for sending notifications about command status changes on a per-instance basis. Documented below.

OutputS3Bucket string

The name of the Amazon S3 bucket.

OutputS3KeyPrefix string

The Amazon S3 bucket subfolder.

Parameters []MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameter

The parameters for the RUN_COMMAND task execution. Documented below.

ServiceRoleArn string

The IAM service role to assume during task execution.

TimeoutSeconds int

If this time is reached and the command has not already started executing, it doesn’t run.

comment string

Information about the command(s) to execute.

documentHash string

The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.

documentHashType string

SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values: Sha256 and Sha1

notificationConfig MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfig

Configurations for sending notifications about command status changes on a per-instance basis. Documented below.

outputS3Bucket string

The name of the Amazon S3 bucket.

outputS3KeyPrefix string

The Amazon S3 bucket subfolder.

parameters MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameter[]

The parameters for the RUN_COMMAND task execution. Documented below.

serviceRoleArn string

The IAM service role to assume during task execution.

timeoutSeconds number

If this time is reached and the command has not already started executing, it doesn’t run.

comment str

Information about the command(s) to execute.

documentHash str

The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.

documentHashType str

SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values: Sha256 and Sha1

notificationConfig Dict[MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfig]

Configurations for sending notifications about command status changes on a per-instance basis. Documented below.

outputS3Bucket str

The name of the Amazon S3 bucket.

outputS3KeyPrefix str

The Amazon S3 bucket subfolder.

parameters List[MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameter]

The parameters for the RUN_COMMAND task execution. Documented below.

service_role_arn str

The IAM service role to assume during task execution.

timeoutSeconds float

If this time is reached and the command has not already started executing, it doesn’t run.

MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

NotificationArn string

An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.

NotificationEvents List<string>

The different events for which you can receive notifications. Valid values: All, InProgress, Success, TimedOut, Cancelled, and Failed

NotificationType string

When specified with Command, receive notification when the status of a command changes. When specified with Invocation, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values: Command and Invocation

NotificationArn string

An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.

NotificationEvents []string

The different events for which you can receive notifications. Valid values: All, InProgress, Success, TimedOut, Cancelled, and Failed

NotificationType string

When specified with Command, receive notification when the status of a command changes. When specified with Invocation, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values: Command and Invocation

notificationArn string

An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.

notificationEvents string[]

The different events for which you can receive notifications. Valid values: All, InProgress, Success, TimedOut, Cancelled, and Failed

notificationType string

When specified with Command, receive notification when the status of a command changes. When specified with Invocation, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values: Command and Invocation

notificationArn str

An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.

notificationEvents List[str]

The different events for which you can receive notifications. Valid values: All, InProgress, Success, TimedOut, Cancelled, and Failed

notification_type str

When specified with Command, receive notification when the status of a command changes. When specified with Invocation, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values: Command and Invocation

MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The parameter name.

Values List<string>

The array of strings.

Name string

The parameter name.

Values []string

The array of strings.

name string

The parameter name.

values string[]

The array of strings.

name str

The parameter name.

values List[str]

The array of strings.

MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParameters

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Input string

The inputs for the STEP_FUNCTION task.

Name string

The name of the STEP_FUNCTION task.

Input string

The inputs for the STEP_FUNCTION task.

Name string

The name of the STEP_FUNCTION task.

input string

The inputs for the STEP_FUNCTION task.

name string

The name of the STEP_FUNCTION task.

input str

The inputs for the STEP_FUNCTION task.

name str

The name of the STEP_FUNCTION task.

MaintenanceWindowTaskTaskParameter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the maintenance window task.

Values List<string>
Name string

The name of the maintenance window task.

Values []string
name string

The name of the maintenance window task.

values string[]
name str

The name of the maintenance window task.

values List[str]

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.