aws.ssm.MaintenanceWindowTask
Explore with Pulumi AI
Provides an SSM Maintenance Window Task resource
Example Usage
Automation Tasks
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,
taskArn: "AWS-RestartEC2Instance",
taskType: "AUTOMATION",
windowId: exampleAwsSsmMaintenanceWindow.id,
targets: [{
key: "InstanceIds",
values: [exampleAwsInstance.id],
}],
taskInvocationParameters: {
automationParameters: {
documentVersion: "$LATEST",
parameters: [{
name: "InstanceId",
values: [exampleAwsInstance.id],
}],
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.ssm.MaintenanceWindowTask("example",
max_concurrency="2",
max_errors="1",
priority=1,
task_arn="AWS-RestartEC2Instance",
task_type="AUTOMATION",
window_id=example_aws_ssm_maintenance_window["id"],
targets=[{
"key": "InstanceIds",
"values": [example_aws_instance["id"]],
}],
task_invocation_parameters={
"automation_parameters": {
"document_version": "$LATEST",
"parameters": [{
"name": "InstanceId",
"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.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
MaxConcurrency: pulumi.String("2"),
MaxErrors: pulumi.String("1"),
Priority: pulumi.Int(1),
TaskArn: pulumi.String("AWS-RestartEC2Instance"),
TaskType: pulumi.String("AUTOMATION"),
WindowId: pulumi.Any(exampleAwsSsmMaintenanceWindow.Id),
Targets: ssm.MaintenanceWindowTaskTargetArray{
&ssm.MaintenanceWindowTaskTargetArgs{
Key: pulumi.String("InstanceIds"),
Values: pulumi.StringArray{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
AutomationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs{
DocumentVersion: pulumi.String("$LATEST"),
Parameters: ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArray{
&ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs{
Name: pulumi.String("InstanceId"),
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.MaintenanceWindowTask("example", new()
{
MaxConcurrency = "2",
MaxErrors = "1",
Priority = 1,
TaskArn = "AWS-RestartEC2Instance",
TaskType = "AUTOMATION",
WindowId = exampleAwsSsmMaintenanceWindow.Id,
Targets = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
{
Key = "InstanceIds",
Values = new[]
{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
{
AutomationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs
{
DocumentVersion = "$LATEST",
Parameters = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs
{
Name = "InstanceId",
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.MaintenanceWindowTask;
import com.pulumi.aws.ssm.MaintenanceWindowTaskArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTargetArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs;
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 MaintenanceWindowTask("example", MaintenanceWindowTaskArgs.builder()
.maxConcurrency(2)
.maxErrors(1)
.priority(1)
.taskArn("AWS-RestartEC2Instance")
.taskType("AUTOMATION")
.windowId(exampleAwsSsmMaintenanceWindow.id())
.targets(MaintenanceWindowTaskTargetArgs.builder()
.key("InstanceIds")
.values(exampleAwsInstance.id())
.build())
.taskInvocationParameters(MaintenanceWindowTaskTaskInvocationParametersArgs.builder()
.automationParameters(MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs.builder()
.documentVersion("$LATEST")
.parameters(MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs.builder()
.name("InstanceId")
.values(exampleAwsInstance.id())
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:ssm:MaintenanceWindowTask
properties:
maxConcurrency: 2
maxErrors: 1
priority: 1
taskArn: AWS-RestartEC2Instance
taskType: AUTOMATION
windowId: ${exampleAwsSsmMaintenanceWindow.id}
targets:
- key: InstanceIds
values:
- ${exampleAwsInstance.id}
taskInvocationParameters:
automationParameters:
documentVersion: $LATEST
parameters:
- name: InstanceId
values:
- ${exampleAwsInstance.id}
Lambda Tasks
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const example = new aws.ssm.MaintenanceWindowTask("example", {
maxConcurrency: "2",
maxErrors: "1",
priority: 1,
taskArn: exampleAwsLambdaFunction.arn,
taskType: "LAMBDA",
windowId: exampleAwsSsmMaintenanceWindow.id,
targets: [{
key: "InstanceIds",
values: [exampleAwsInstance.id],
}],
taskInvocationParameters: {
lambdaParameters: {
clientContext: std.base64encode({
input: "{\"key1\":\"value1\"}",
}).then(invoke => invoke.result),
payload: "{\"key1\":\"value1\"}",
},
},
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
example = aws.ssm.MaintenanceWindowTask("example",
max_concurrency="2",
max_errors="1",
priority=1,
task_arn=example_aws_lambda_function["arn"],
task_type="LAMBDA",
window_id=example_aws_ssm_maintenance_window["id"],
targets=[{
"key": "InstanceIds",
"values": [example_aws_instance["id"]],
}],
task_invocation_parameters={
"lambda_parameters": {
"client_context": std.base64encode(input="{\"key1\":\"value1\"}").result,
"payload": "{\"key1\":\"value1\"}",
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
Input: "{\"key1\":\"value1\"}",
}, nil)
if err != nil {
return err
}
_, err = ssm.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
MaxConcurrency: pulumi.String("2"),
MaxErrors: pulumi.String("1"),
Priority: pulumi.Int(1),
TaskArn: pulumi.Any(exampleAwsLambdaFunction.Arn),
TaskType: pulumi.String("LAMBDA"),
WindowId: pulumi.Any(exampleAwsSsmMaintenanceWindow.Id),
Targets: ssm.MaintenanceWindowTaskTargetArray{
&ssm.MaintenanceWindowTaskTargetArgs{
Key: pulumi.String("InstanceIds"),
Values: pulumi.StringArray{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
LambdaParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs{
ClientContext: pulumi.String(invokeBase64encode.Result),
Payload: pulumi.String("{\"key1\":\"value1\"}"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ssm.MaintenanceWindowTask("example", new()
{
MaxConcurrency = "2",
MaxErrors = "1",
Priority = 1,
TaskArn = exampleAwsLambdaFunction.Arn,
TaskType = "LAMBDA",
WindowId = exampleAwsSsmMaintenanceWindow.Id,
Targets = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
{
Key = "InstanceIds",
Values = new[]
{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
{
LambdaParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs
{
ClientContext = Std.Base64encode.Invoke(new()
{
Input = "{\"key1\":\"value1\"}",
}).Apply(invoke => invoke.Result),
Payload = "{\"key1\":\"value1\"}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.MaintenanceWindowTask;
import com.pulumi.aws.ssm.MaintenanceWindowTaskArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTargetArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs;
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 MaintenanceWindowTask("example", MaintenanceWindowTaskArgs.builder()
.maxConcurrency(2)
.maxErrors(1)
.priority(1)
.taskArn(exampleAwsLambdaFunction.arn())
.taskType("LAMBDA")
.windowId(exampleAwsSsmMaintenanceWindow.id())
.targets(MaintenanceWindowTaskTargetArgs.builder()
.key("InstanceIds")
.values(exampleAwsInstance.id())
.build())
.taskInvocationParameters(MaintenanceWindowTaskTaskInvocationParametersArgs.builder()
.lambdaParameters(MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs.builder()
.clientContext(StdFunctions.base64encode(Base64encodeArgs.builder()
.input("{\"key1\":\"value1\"}")
.build()).result())
.payload("{\"key1\":\"value1\"}")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:ssm:MaintenanceWindowTask
properties:
maxConcurrency: 2
maxErrors: 1
priority: 1
taskArn: ${exampleAwsLambdaFunction.arn}
taskType: LAMBDA
windowId: ${exampleAwsSsmMaintenanceWindow.id}
targets:
- key: InstanceIds
values:
- ${exampleAwsInstance.id}
taskInvocationParameters:
lambdaParameters:
clientContext:
fn::invoke:
Function: std:base64encode
Arguments:
input: '{"key1":"value1"}'
Return: result
payload: '{"key1":"value1"}'
Run Command Tasks
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,
taskArn: "AWS-RunShellScript",
taskType: "RUN_COMMAND",
windowId: exampleAwsSsmMaintenanceWindow.id,
targets: [{
key: "InstanceIds",
values: [exampleAwsInstance.id],
}],
taskInvocationParameters: {
runCommandParameters: {
outputS3Bucket: exampleAwsS3Bucket.id,
outputS3KeyPrefix: "output",
serviceRoleArn: exampleAwsIamRole.arn,
timeoutSeconds: 600,
notificationConfig: {
notificationArn: exampleAwsSnsTopic.arn,
notificationEvents: ["All"],
notificationType: "Command",
},
parameters: [{
name: "commands",
values: ["date"],
}],
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.ssm.MaintenanceWindowTask("example",
max_concurrency="2",
max_errors="1",
priority=1,
task_arn="AWS-RunShellScript",
task_type="RUN_COMMAND",
window_id=example_aws_ssm_maintenance_window["id"],
targets=[{
"key": "InstanceIds",
"values": [example_aws_instance["id"]],
}],
task_invocation_parameters={
"run_command_parameters": {
"output_s3_bucket": example_aws_s3_bucket["id"],
"output_s3_key_prefix": "output",
"service_role_arn": example_aws_iam_role["arn"],
"timeout_seconds": 600,
"notification_config": {
"notification_arn": example_aws_sns_topic["arn"],
"notification_events": ["All"],
"notification_type": "Command",
},
"parameters": [{
"name": "commands",
"values": ["date"],
}],
},
})
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.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
MaxConcurrency: pulumi.String("2"),
MaxErrors: pulumi.String("1"),
Priority: pulumi.Int(1),
TaskArn: pulumi.String("AWS-RunShellScript"),
TaskType: pulumi.String("RUN_COMMAND"),
WindowId: pulumi.Any(exampleAwsSsmMaintenanceWindow.Id),
Targets: ssm.MaintenanceWindowTaskTargetArray{
&ssm.MaintenanceWindowTaskTargetArgs{
Key: pulumi.String("InstanceIds"),
Values: pulumi.StringArray{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
RunCommandParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs{
OutputS3Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
OutputS3KeyPrefix: pulumi.String("output"),
ServiceRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
TimeoutSeconds: pulumi.Int(600),
NotificationConfig: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs{
NotificationArn: pulumi.Any(exampleAwsSnsTopic.Arn),
NotificationEvents: pulumi.StringArray{
pulumi.String("All"),
},
NotificationType: pulumi.String("Command"),
},
Parameters: ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArray{
&ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs{
Name: pulumi.String("commands"),
Values: pulumi.StringArray{
pulumi.String("date"),
},
},
},
},
},
})
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.MaintenanceWindowTask("example", new()
{
MaxConcurrency = "2",
MaxErrors = "1",
Priority = 1,
TaskArn = "AWS-RunShellScript",
TaskType = "RUN_COMMAND",
WindowId = exampleAwsSsmMaintenanceWindow.Id,
Targets = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
{
Key = "InstanceIds",
Values = new[]
{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
{
RunCommandParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs
{
OutputS3Bucket = exampleAwsS3Bucket.Id,
OutputS3KeyPrefix = "output",
ServiceRoleArn = exampleAwsIamRole.Arn,
TimeoutSeconds = 600,
NotificationConfig = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs
{
NotificationArn = exampleAwsSnsTopic.Arn,
NotificationEvents = new[]
{
"All",
},
NotificationType = "Command",
},
Parameters = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs
{
Name = "commands",
Values = new[]
{
"date",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.MaintenanceWindowTask;
import com.pulumi.aws.ssm.MaintenanceWindowTaskArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTargetArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs;
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 MaintenanceWindowTask("example", MaintenanceWindowTaskArgs.builder()
.maxConcurrency(2)
.maxErrors(1)
.priority(1)
.taskArn("AWS-RunShellScript")
.taskType("RUN_COMMAND")
.windowId(exampleAwsSsmMaintenanceWindow.id())
.targets(MaintenanceWindowTaskTargetArgs.builder()
.key("InstanceIds")
.values(exampleAwsInstance.id())
.build())
.taskInvocationParameters(MaintenanceWindowTaskTaskInvocationParametersArgs.builder()
.runCommandParameters(MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs.builder()
.outputS3Bucket(exampleAwsS3Bucket.id())
.outputS3KeyPrefix("output")
.serviceRoleArn(exampleAwsIamRole.arn())
.timeoutSeconds(600)
.notificationConfig(MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs.builder()
.notificationArn(exampleAwsSnsTopic.arn())
.notificationEvents("All")
.notificationType("Command")
.build())
.parameters(MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs.builder()
.name("commands")
.values("date")
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:ssm:MaintenanceWindowTask
properties:
maxConcurrency: 2
maxErrors: 1
priority: 1
taskArn: AWS-RunShellScript
taskType: RUN_COMMAND
windowId: ${exampleAwsSsmMaintenanceWindow.id}
targets:
- key: InstanceIds
values:
- ${exampleAwsInstance.id}
taskInvocationParameters:
runCommandParameters:
outputS3Bucket: ${exampleAwsS3Bucket.id}
outputS3KeyPrefix: output
serviceRoleArn: ${exampleAwsIamRole.arn}
timeoutSeconds: 600
notificationConfig:
notificationArn: ${exampleAwsSnsTopic.arn}
notificationEvents:
- All
notificationType: Command
parameters:
- name: commands
values:
- date
Step Function Tasks
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,
taskArn: exampleAwsSfnActivity.id,
taskType: "STEP_FUNCTIONS",
windowId: exampleAwsSsmMaintenanceWindow.id,
targets: [{
key: "InstanceIds",
values: [exampleAwsInstance.id],
}],
taskInvocationParameters: {
stepFunctionsParameters: {
input: "{\"key1\":\"value1\"}",
name: "example",
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.ssm.MaintenanceWindowTask("example",
max_concurrency="2",
max_errors="1",
priority=1,
task_arn=example_aws_sfn_activity["id"],
task_type="STEP_FUNCTIONS",
window_id=example_aws_ssm_maintenance_window["id"],
targets=[{
"key": "InstanceIds",
"values": [example_aws_instance["id"]],
}],
task_invocation_parameters={
"step_functions_parameters": {
"input": "{\"key1\":\"value1\"}",
"name": "example",
},
})
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.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
MaxConcurrency: pulumi.String("2"),
MaxErrors: pulumi.String("1"),
Priority: pulumi.Int(1),
TaskArn: pulumi.Any(exampleAwsSfnActivity.Id),
TaskType: pulumi.String("STEP_FUNCTIONS"),
WindowId: pulumi.Any(exampleAwsSsmMaintenanceWindow.Id),
Targets: ssm.MaintenanceWindowTaskTargetArray{
&ssm.MaintenanceWindowTaskTargetArgs{
Key: pulumi.String("InstanceIds"),
Values: pulumi.StringArray{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
StepFunctionsParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs{
Input: pulumi.String("{\"key1\":\"value1\"}"),
Name: pulumi.String("example"),
},
},
})
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.MaintenanceWindowTask("example", new()
{
MaxConcurrency = "2",
MaxErrors = "1",
Priority = 1,
TaskArn = exampleAwsSfnActivity.Id,
TaskType = "STEP_FUNCTIONS",
WindowId = exampleAwsSsmMaintenanceWindow.Id,
Targets = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
{
Key = "InstanceIds",
Values = new[]
{
exampleAwsInstance.Id,
},
},
},
TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
{
StepFunctionsParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs
{
Input = "{\"key1\":\"value1\"}",
Name = "example",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.MaintenanceWindowTask;
import com.pulumi.aws.ssm.MaintenanceWindowTaskArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTargetArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersArgs;
import com.pulumi.aws.ssm.inputs.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs;
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 MaintenanceWindowTask("example", MaintenanceWindowTaskArgs.builder()
.maxConcurrency(2)
.maxErrors(1)
.priority(1)
.taskArn(exampleAwsSfnActivity.id())
.taskType("STEP_FUNCTIONS")
.windowId(exampleAwsSsmMaintenanceWindow.id())
.targets(MaintenanceWindowTaskTargetArgs.builder()
.key("InstanceIds")
.values(exampleAwsInstance.id())
.build())
.taskInvocationParameters(MaintenanceWindowTaskTaskInvocationParametersArgs.builder()
.stepFunctionsParameters(MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs.builder()
.input("{\"key1\":\"value1\"}")
.name("example")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:ssm:MaintenanceWindowTask
properties:
maxConcurrency: 2
maxErrors: 1
priority: 1
taskArn: ${exampleAwsSfnActivity.id}
taskType: STEP_FUNCTIONS
windowId: ${exampleAwsSsmMaintenanceWindow.id}
targets:
- key: InstanceIds
values:
- ${exampleAwsInstance.id}
taskInvocationParameters:
stepFunctionsParameters:
input: '{"key1":"value1"}'
name: example
Create MaintenanceWindowTask Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MaintenanceWindowTask(name: string, args: MaintenanceWindowTaskArgs, opts?: CustomResourceOptions);
@overload
def MaintenanceWindowTask(resource_name: str,
args: MaintenanceWindowTaskArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MaintenanceWindowTask(resource_name: str,
opts: Optional[ResourceOptions] = None,
task_arn: Optional[str] = None,
task_type: Optional[str] = None,
window_id: Optional[str] = None,
cutoff_behavior: Optional[str] = None,
description: Optional[str] = None,
max_concurrency: Optional[str] = None,
max_errors: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[int] = None,
service_role_arn: Optional[str] = None,
targets: Optional[Sequence[MaintenanceWindowTaskTargetArgs]] = None,
task_invocation_parameters: Optional[MaintenanceWindowTaskTaskInvocationParametersArgs] = None)
func NewMaintenanceWindowTask(ctx *Context, name string, args MaintenanceWindowTaskArgs, opts ...ResourceOption) (*MaintenanceWindowTask, error)
public MaintenanceWindowTask(string name, MaintenanceWindowTaskArgs args, CustomResourceOptions? opts = null)
public MaintenanceWindowTask(String name, MaintenanceWindowTaskArgs args)
public MaintenanceWindowTask(String name, MaintenanceWindowTaskArgs args, CustomResourceOptions options)
type: aws:ssm:MaintenanceWindowTask
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 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.
- args MaintenanceWindowTaskArgs
- 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 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.
- name String
- The unique name of the resource.
- args MaintenanceWindowTaskArgs
- 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 maintenanceWindowTaskResource = new Aws.Ssm.MaintenanceWindowTask("maintenanceWindowTaskResource", new()
{
TaskArn = "string",
TaskType = "string",
WindowId = "string",
CutoffBehavior = "string",
Description = "string",
MaxConcurrency = "string",
MaxErrors = "string",
Name = "string",
Priority = 0,
ServiceRoleArn = "string",
Targets = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTargetArgs
{
Key = "string",
Values = new[]
{
"string",
},
},
},
TaskInvocationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersArgs
{
AutomationParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs
{
DocumentVersion = "string",
Parameters = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs
{
Name = "string",
Values = new[]
{
"string",
},
},
},
},
LambdaParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs
{
ClientContext = "string",
Payload = "string",
Qualifier = "string",
},
RunCommandParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs
{
CloudwatchConfig = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersCloudwatchConfigArgs
{
CloudwatchLogGroupName = "string",
CloudwatchOutputEnabled = false,
},
Comment = "string",
DocumentHash = "string",
DocumentHashType = "string",
DocumentVersion = "string",
NotificationConfig = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs
{
NotificationArn = "string",
NotificationEvents = new[]
{
"string",
},
NotificationType = "string",
},
OutputS3Bucket = "string",
OutputS3KeyPrefix = "string",
Parameters = new[]
{
new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs
{
Name = "string",
Values = new[]
{
"string",
},
},
},
ServiceRoleArn = "string",
TimeoutSeconds = 0,
},
StepFunctionsParameters = new Aws.Ssm.Inputs.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs
{
Input = "string",
Name = "string",
},
},
});
example, err := ssm.NewMaintenanceWindowTask(ctx, "maintenanceWindowTaskResource", &ssm.MaintenanceWindowTaskArgs{
TaskArn: pulumi.String("string"),
TaskType: pulumi.String("string"),
WindowId: pulumi.String("string"),
CutoffBehavior: pulumi.String("string"),
Description: pulumi.String("string"),
MaxConcurrency: pulumi.String("string"),
MaxErrors: pulumi.String("string"),
Name: pulumi.String("string"),
Priority: pulumi.Int(0),
ServiceRoleArn: pulumi.String("string"),
Targets: ssm.MaintenanceWindowTaskTargetArray{
&ssm.MaintenanceWindowTaskTargetArgs{
Key: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
AutomationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs{
DocumentVersion: pulumi.String("string"),
Parameters: ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArray{
&ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs{
Name: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
LambdaParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs{
ClientContext: pulumi.String("string"),
Payload: pulumi.String("string"),
Qualifier: pulumi.String("string"),
},
RunCommandParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs{
CloudwatchConfig: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersCloudwatchConfigArgs{
CloudwatchLogGroupName: pulumi.String("string"),
CloudwatchOutputEnabled: pulumi.Bool(false),
},
Comment: pulumi.String("string"),
DocumentHash: pulumi.String("string"),
DocumentHashType: pulumi.String("string"),
DocumentVersion: pulumi.String("string"),
NotificationConfig: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs{
NotificationArn: pulumi.String("string"),
NotificationEvents: pulumi.StringArray{
pulumi.String("string"),
},
NotificationType: pulumi.String("string"),
},
OutputS3Bucket: pulumi.String("string"),
OutputS3KeyPrefix: pulumi.String("string"),
Parameters: ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArray{
&ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs{
Name: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
ServiceRoleArn: pulumi.String("string"),
TimeoutSeconds: pulumi.Int(0),
},
StepFunctionsParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs{
Input: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
})
var maintenanceWindowTaskResource = new MaintenanceWindowTask("maintenanceWindowTaskResource", MaintenanceWindowTaskArgs.builder()
.taskArn("string")
.taskType("string")
.windowId("string")
.cutoffBehavior("string")
.description("string")
.maxConcurrency("string")
.maxErrors("string")
.name("string")
.priority(0)
.serviceRoleArn("string")
.targets(MaintenanceWindowTaskTargetArgs.builder()
.key("string")
.values("string")
.build())
.taskInvocationParameters(MaintenanceWindowTaskTaskInvocationParametersArgs.builder()
.automationParameters(MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs.builder()
.documentVersion("string")
.parameters(MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs.builder()
.name("string")
.values("string")
.build())
.build())
.lambdaParameters(MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs.builder()
.clientContext("string")
.payload("string")
.qualifier("string")
.build())
.runCommandParameters(MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs.builder()
.cloudwatchConfig(MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersCloudwatchConfigArgs.builder()
.cloudwatchLogGroupName("string")
.cloudwatchOutputEnabled(false)
.build())
.comment("string")
.documentHash("string")
.documentHashType("string")
.documentVersion("string")
.notificationConfig(MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs.builder()
.notificationArn("string")
.notificationEvents("string")
.notificationType("string")
.build())
.outputS3Bucket("string")
.outputS3KeyPrefix("string")
.parameters(MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs.builder()
.name("string")
.values("string")
.build())
.serviceRoleArn("string")
.timeoutSeconds(0)
.build())
.stepFunctionsParameters(MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs.builder()
.input("string")
.name("string")
.build())
.build())
.build());
maintenance_window_task_resource = aws.ssm.MaintenanceWindowTask("maintenanceWindowTaskResource",
task_arn="string",
task_type="string",
window_id="string",
cutoff_behavior="string",
description="string",
max_concurrency="string",
max_errors="string",
name="string",
priority=0,
service_role_arn="string",
targets=[{
"key": "string",
"values": ["string"],
}],
task_invocation_parameters={
"automation_parameters": {
"document_version": "string",
"parameters": [{
"name": "string",
"values": ["string"],
}],
},
"lambda_parameters": {
"client_context": "string",
"payload": "string",
"qualifier": "string",
},
"run_command_parameters": {
"cloudwatch_config": {
"cloudwatch_log_group_name": "string",
"cloudwatch_output_enabled": False,
},
"comment": "string",
"document_hash": "string",
"document_hash_type": "string",
"document_version": "string",
"notification_config": {
"notification_arn": "string",
"notification_events": ["string"],
"notification_type": "string",
},
"output_s3_bucket": "string",
"output_s3_key_prefix": "string",
"parameters": [{
"name": "string",
"values": ["string"],
}],
"service_role_arn": "string",
"timeout_seconds": 0,
},
"step_functions_parameters": {
"input": "string",
"name": "string",
},
})
const maintenanceWindowTaskResource = new aws.ssm.MaintenanceWindowTask("maintenanceWindowTaskResource", {
taskArn: "string",
taskType: "string",
windowId: "string",
cutoffBehavior: "string",
description: "string",
maxConcurrency: "string",
maxErrors: "string",
name: "string",
priority: 0,
serviceRoleArn: "string",
targets: [{
key: "string",
values: ["string"],
}],
taskInvocationParameters: {
automationParameters: {
documentVersion: "string",
parameters: [{
name: "string",
values: ["string"],
}],
},
lambdaParameters: {
clientContext: "string",
payload: "string",
qualifier: "string",
},
runCommandParameters: {
cloudwatchConfig: {
cloudwatchLogGroupName: "string",
cloudwatchOutputEnabled: false,
},
comment: "string",
documentHash: "string",
documentHashType: "string",
documentVersion: "string",
notificationConfig: {
notificationArn: "string",
notificationEvents: ["string"],
notificationType: "string",
},
outputS3Bucket: "string",
outputS3KeyPrefix: "string",
parameters: [{
name: "string",
values: ["string"],
}],
serviceRoleArn: "string",
timeoutSeconds: 0,
},
stepFunctionsParameters: {
input: "string",
name: "string",
},
},
});
type: aws:ssm:MaintenanceWindowTask
properties:
cutoffBehavior: string
description: string
maxConcurrency: string
maxErrors: string
name: string
priority: 0
serviceRoleArn: string
targets:
- key: string
values:
- string
taskArn: string
taskInvocationParameters:
automationParameters:
documentVersion: string
parameters:
- name: string
values:
- string
lambdaParameters:
clientContext: string
payload: string
qualifier: string
runCommandParameters:
cloudwatchConfig:
cloudwatchLogGroupName: string
cloudwatchOutputEnabled: false
comment: string
documentHash: string
documentHashType: string
documentVersion: string
notificationConfig:
notificationArn: string
notificationEvents:
- string
notificationType: string
outputS3Bucket: string
outputS3KeyPrefix: string
parameters:
- name: string
values:
- string
serviceRoleArn: string
timeoutSeconds: 0
stepFunctionsParameters:
input: string
name: string
taskType: string
windowId: string
MaintenanceWindowTask Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MaintenanceWindowTask resource accepts the following input properties:
- Task
Arn string - The ARN of the task to execute.
- Task
Type string - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - Window
Id string - The Id of the maintenance window to register the task with.
- Cutoff
Behavior string - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - Description string
- The description of the maintenance window task.
- Max
Concurrency string - The maximum number of targets this task can be run for in parallel.
- Max
Errors 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.
- Service
Role stringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- Targets
List<Maintenance
Window Task Target> - 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
Invocation MaintenanceParameters Window Task Task Invocation Parameters - Configuration block with parameters for task execution.
- Task
Arn string - The ARN of the task to execute.
- Task
Type string - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - Window
Id string - The Id of the maintenance window to register the task with.
- Cutoff
Behavior string - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - Description string
- The description of the maintenance window task.
- Max
Concurrency string - The maximum number of targets this task can be run for in parallel.
- Max
Errors 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.
- Service
Role stringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- Targets
[]Maintenance
Window Task Target Args - 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
Invocation MaintenanceParameters Window Task Task Invocation Parameters Args - Configuration block with parameters for task execution.
- task
Arn String - The ARN of the task to execute.
- task
Type String - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window
Id String - The Id of the maintenance window to register the task with.
- cutoff
Behavior String - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description String
- The description of the maintenance window task.
- max
Concurrency String - The maximum number of targets this task can be run for in parallel.
- max
Errors String - The maximum number of errors allowed before this task stops being scheduled.
- name String
- The name of the maintenance window task.
- priority Integer
- 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 StringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets
List<Maintenance
Window Task Target> - 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
Invocation MaintenanceParameters Window Task Task Invocation Parameters - Configuration block with parameters for task execution.
- task
Arn string - The ARN of the task to execute.
- task
Type string - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window
Id string - The Id of the maintenance window to register the task with.
- cutoff
Behavior string - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description string
- The description of the maintenance window task.
- max
Concurrency string - The maximum number of targets this task can be run for in parallel.
- max
Errors 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.
- service
Role stringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets
Maintenance
Window Task Target[] - 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
Invocation MaintenanceParameters Window Task Task Invocation Parameters - Configuration block with parameters for task execution.
- task_
arn str - The ARN of the task to execute.
- task_
type str - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window_
id str - The Id of the maintenance window to register the task with.
- cutoff_
behavior str - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description str
- The description of the maintenance window task.
- 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 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.
- service_
role_ strarn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets
Sequence[Maintenance
Window Task Target Args] - 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_
invocation_ Maintenanceparameters Window Task Task Invocation Parameters Args - Configuration block with parameters for task execution.
- task
Arn String - The ARN of the task to execute.
- task
Type String - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window
Id String - The Id of the maintenance window to register the task with.
- cutoff
Behavior String - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description String
- The description of the maintenance window task.
- max
Concurrency String - The maximum number of targets this task can be run for in parallel.
- max
Errors 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.
- service
Role StringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets List<Property Map>
- 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
Invocation Property MapParameters - Configuration block with parameters for task execution.
Outputs
All input properties are implicitly available as output properties. Additionally, the MaintenanceWindowTask resource produces the following output properties:
- Arn string
- The ARN of the maintenance window task.
- Id string
- The provider-assigned unique ID for this managed resource.
- Window
Task stringId - The ID of the maintenance window task.
- Arn string
- The ARN of the maintenance window task.
- Id string
- The provider-assigned unique ID for this managed resource.
- Window
Task stringId - The ID of the maintenance window task.
- arn String
- The ARN of the maintenance window task.
- id String
- The provider-assigned unique ID for this managed resource.
- window
Task StringId - The ID of the maintenance window task.
- arn string
- The ARN of the maintenance window task.
- id string
- The provider-assigned unique ID for this managed resource.
- window
Task stringId - The ID of the maintenance window task.
- arn str
- The ARN of the maintenance window task.
- id str
- The provider-assigned unique ID for this managed resource.
- window_
task_ strid - The ID of the maintenance window task.
- arn String
- The ARN of the maintenance window task.
- id String
- The provider-assigned unique ID for this managed resource.
- window
Task StringId - The ID of the maintenance window task.
Look up Existing MaintenanceWindowTask Resource
Get an existing MaintenanceWindowTask 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?: MaintenanceWindowTaskState, opts?: CustomResourceOptions): MaintenanceWindowTask
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
cutoff_behavior: Optional[str] = None,
description: Optional[str] = None,
max_concurrency: Optional[str] = None,
max_errors: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[int] = None,
service_role_arn: Optional[str] = None,
targets: Optional[Sequence[MaintenanceWindowTaskTargetArgs]] = None,
task_arn: Optional[str] = None,
task_invocation_parameters: Optional[MaintenanceWindowTaskTaskInvocationParametersArgs] = None,
task_type: Optional[str] = None,
window_id: Optional[str] = None,
window_task_id: Optional[str] = None) -> MaintenanceWindowTask
func GetMaintenanceWindowTask(ctx *Context, name string, id IDInput, state *MaintenanceWindowTaskState, opts ...ResourceOption) (*MaintenanceWindowTask, error)
public static MaintenanceWindowTask Get(string name, Input<string> id, MaintenanceWindowTaskState? state, CustomResourceOptions? opts = null)
public static MaintenanceWindowTask get(String name, Output<String> id, MaintenanceWindowTaskState 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.
- Arn string
- The ARN of the maintenance window task.
- Cutoff
Behavior string - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - Description string
- The description of the maintenance window task.
- Max
Concurrency string - The maximum number of targets this task can be run for in parallel.
- Max
Errors 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.
- Service
Role stringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- Targets
List<Maintenance
Window Task Target> - 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 string - The ARN of the task to execute.
- Task
Invocation MaintenanceParameters Window Task Task Invocation Parameters - Configuration block with parameters for task execution.
- Task
Type string - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - Window
Id string - The Id of the maintenance window to register the task with.
- Window
Task stringId - The ID of the maintenance window task.
- Arn string
- The ARN of the maintenance window task.
- Cutoff
Behavior string - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - Description string
- The description of the maintenance window task.
- Max
Concurrency string - The maximum number of targets this task can be run for in parallel.
- Max
Errors 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.
- Service
Role stringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- Targets
[]Maintenance
Window Task Target Args - 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 string - The ARN of the task to execute.
- Task
Invocation MaintenanceParameters Window Task Task Invocation Parameters Args - Configuration block with parameters for task execution.
- Task
Type string - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - Window
Id string - The Id of the maintenance window to register the task with.
- Window
Task stringId - The ID of the maintenance window task.
- arn String
- The ARN of the maintenance window task.
- cutoff
Behavior String - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description String
- The description of the maintenance window task.
- max
Concurrency String - The maximum number of targets this task can be run for in parallel.
- max
Errors String - The maximum number of errors allowed before this task stops being scheduled.
- name String
- The name of the maintenance window task.
- priority Integer
- 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 StringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets
List<Maintenance
Window Task Target> - 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 String - The ARN of the task to execute.
- task
Invocation MaintenanceParameters Window Task Task Invocation Parameters - Configuration block with parameters for task execution.
- task
Type String - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window
Id String - The Id of the maintenance window to register the task with.
- window
Task StringId - The ID of the maintenance window task.
- arn string
- The ARN of the maintenance window task.
- cutoff
Behavior string - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description string
- The description of the maintenance window task.
- max
Concurrency string - The maximum number of targets this task can be run for in parallel.
- max
Errors 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.
- service
Role stringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets
Maintenance
Window Task Target[] - 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 string - The ARN of the task to execute.
- task
Invocation MaintenanceParameters Window Task Task Invocation Parameters - Configuration block with parameters for task execution.
- task
Type string - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window
Id string - The Id of the maintenance window to register the task with.
- window
Task stringId - The ID of the maintenance window task.
- arn str
- The ARN of the maintenance window task.
- cutoff_
behavior str - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description str
- The description of the maintenance window task.
- 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 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.
- service_
role_ strarn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets
Sequence[Maintenance
Window Task Target Args] - 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_ Maintenanceparameters Window Task Task Invocation Parameters Args - Configuration block with parameters for task execution.
- task_
type str - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window_
id str - The Id of the maintenance window to register the task with.
- window_
task_ strid - The ID of the maintenance window task.
- arn String
- The ARN of the maintenance window task.
- cutoff
Behavior String - Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. Valid values are
CONTINUE_TASK
andCANCEL_TASK
. - description String
- The description of the maintenance window task.
- max
Concurrency String - The maximum number of targets this task can be run for in parallel.
- max
Errors 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.
- service
Role StringArn - The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
- targets List<Property Map>
- 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 String - The ARN of the task to execute.
- task
Invocation Property MapParameters - Configuration block with parameters for task execution.
- task
Type String - The type of task being registered. Valid values:
AUTOMATION
,LAMBDA
,RUN_COMMAND
orSTEP_FUNCTIONS
. - window
Id String - The Id of the maintenance window to register the task with.
- window
Task StringId - The ID of the maintenance window task.
Supporting Types
MaintenanceWindowTaskTarget, MaintenanceWindowTaskTargetArgs
MaintenanceWindowTaskTaskInvocationParameters, MaintenanceWindowTaskTaskInvocationParametersArgs
- Automation
Parameters MaintenanceWindow Task Task Invocation Parameters Automation Parameters - The parameters for an AUTOMATION task type. Documented below.
- Lambda
Parameters MaintenanceWindow Task Task Invocation Parameters Lambda Parameters - The parameters for a LAMBDA task type. Documented below.
- Run
Command MaintenanceParameters Window Task Task Invocation Parameters Run Command Parameters - The parameters for a RUN_COMMAND task type. Documented below.
- Step
Functions MaintenanceParameters Window Task Task Invocation Parameters Step Functions Parameters - The parameters for a STEP_FUNCTIONS task type. Documented below.
- Automation
Parameters MaintenanceWindow Task Task Invocation Parameters Automation Parameters - The parameters for an AUTOMATION task type. Documented below.
- Lambda
Parameters MaintenanceWindow Task Task Invocation Parameters Lambda Parameters - The parameters for a LAMBDA task type. Documented below.
- Run
Command MaintenanceParameters Window Task Task Invocation Parameters Run Command Parameters - The parameters for a RUN_COMMAND task type. Documented below.
- Step
Functions MaintenanceParameters Window Task Task Invocation Parameters Step Functions Parameters - The parameters for a STEP_FUNCTIONS task type. Documented below.
- automation
Parameters MaintenanceWindow Task Task Invocation Parameters Automation Parameters - The parameters for an AUTOMATION task type. Documented below.
- lambda
Parameters MaintenanceWindow Task Task Invocation Parameters Lambda Parameters - The parameters for a LAMBDA task type. Documented below.
- run
Command MaintenanceParameters Window Task Task Invocation Parameters Run Command Parameters - The parameters for a RUN_COMMAND task type. Documented below.
- step
Functions MaintenanceParameters Window Task Task Invocation Parameters Step Functions Parameters - The parameters for a STEP_FUNCTIONS task type. Documented below.
- automation
Parameters MaintenanceWindow Task Task Invocation Parameters Automation Parameters - The parameters for an AUTOMATION task type. Documented below.
- lambda
Parameters MaintenanceWindow Task Task Invocation Parameters Lambda Parameters - The parameters for a LAMBDA task type. Documented below.
- run
Command MaintenanceParameters Window Task Task Invocation Parameters Run Command Parameters - The parameters for a RUN_COMMAND task type. Documented below.
- step
Functions MaintenanceParameters Window Task Task Invocation Parameters Step Functions Parameters - The parameters for a STEP_FUNCTIONS task type. Documented below.
- automation_
parameters MaintenanceWindow Task Task Invocation Parameters Automation Parameters - The parameters for an AUTOMATION task type. Documented below.
- lambda_
parameters MaintenanceWindow Task Task Invocation Parameters Lambda Parameters - The parameters for a LAMBDA task type. Documented below.
- run_
command_ Maintenanceparameters Window Task Task Invocation Parameters Run Command Parameters - The parameters for a RUN_COMMAND task type. Documented below.
- step_
functions_ Maintenanceparameters Window Task Task Invocation Parameters Step Functions Parameters - The parameters for a STEP_FUNCTIONS task type. Documented below.
- automation
Parameters Property Map - The parameters for an AUTOMATION task type. Documented below.
- lambda
Parameters Property Map - The parameters for a LAMBDA task type. Documented below.
- run
Command Property MapParameters - The parameters for a RUN_COMMAND task type. Documented below.
- step
Functions Property MapParameters - The parameters for a STEP_FUNCTIONS task type. Documented below.
MaintenanceWindowTaskTaskInvocationParametersAutomationParameters, MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs
- Document
Version string - The version of an Automation document to use during task execution.
- Parameters
List<Maintenance
Window Task Task Invocation Parameters Automation Parameters Parameter> - The parameters for the RUN_COMMAND task execution. Documented below.
- Document
Version string - The version of an Automation document to use during task execution.
- Parameters
[]Maintenance
Window Task Task Invocation Parameters Automation Parameters Parameter - The parameters for the RUN_COMMAND task execution. Documented below.
- document
Version String - The version of an Automation document to use during task execution.
- parameters
List<Maintenance
Window Task Task Invocation Parameters Automation Parameters Parameter> - The parameters for the RUN_COMMAND task execution. Documented below.
- document
Version string - The version of an Automation document to use during task execution.
- parameters
Maintenance
Window Task Task Invocation Parameters Automation Parameters Parameter[] - 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
Sequence[Maintenance
Window Task Task Invocation Parameters Automation Parameters Parameter] - The parameters for the RUN_COMMAND task execution. Documented below.
- document
Version String - The version of an Automation document to use during task execution.
- parameters List<Property Map>
- The parameters for the RUN_COMMAND task execution. Documented below.
MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameter, MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs
MaintenanceWindowTaskTaskInvocationParametersLambdaParameters, MaintenanceWindowTaskTaskInvocationParametersLambdaParametersArgs
- Client
Context 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.
- Client
Context 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.
- client
Context 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.
- client
Context 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.
- client_
context 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.
- client
Context 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.
MaintenanceWindowTaskTaskInvocationParametersRunCommandParameters, MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs
- Cloudwatch
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Cloudwatch Config - Configuration options for sending command output to CloudWatch Logs. Documented below.
- Comment string
- Information about the command(s) to execute.
- Document
Hash string - The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.
- Document
Hash stringType - SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values:
Sha256
andSha1
- Document
Version string - The version of an Automation document to use during task execution.
- Notification
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Notification Config - Configurations for sending notifications about command status changes on a per-instance basis. Documented below.
- Output
S3Bucket string - The name of the Amazon S3 bucket.
- Output
S3Key stringPrefix - The Amazon S3 bucket subfolder.
- Parameters
List<Maintenance
Window Task Task Invocation Parameters Run Command Parameters Parameter> - The parameters for the RUN_COMMAND task execution. Documented below.
- Service
Role stringArn - The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
- Timeout
Seconds int - If this time is reached and the command has not already started executing, it doesn't run.
- Cloudwatch
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Cloudwatch Config - Configuration options for sending command output to CloudWatch Logs. Documented below.
- Comment string
- Information about the command(s) to execute.
- Document
Hash string - The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.
- Document
Hash stringType - SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values:
Sha256
andSha1
- Document
Version string - The version of an Automation document to use during task execution.
- Notification
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Notification Config - Configurations for sending notifications about command status changes on a per-instance basis. Documented below.
- Output
S3Bucket string - The name of the Amazon S3 bucket.
- Output
S3Key stringPrefix - The Amazon S3 bucket subfolder.
- Parameters
[]Maintenance
Window Task Task Invocation Parameters Run Command Parameters Parameter - The parameters for the RUN_COMMAND task execution. Documented below.
- Service
Role stringArn - The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
- Timeout
Seconds int - If this time is reached and the command has not already started executing, it doesn't run.
- cloudwatch
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Cloudwatch Config - Configuration options for sending command output to CloudWatch Logs. Documented below.
- comment String
- Information about the command(s) to execute.
- document
Hash String - The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.
- document
Hash StringType - SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values:
Sha256
andSha1
- document
Version String - The version of an Automation document to use during task execution.
- notification
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Notification Config - Configurations for sending notifications about command status changes on a per-instance basis. Documented below.
- output
S3Bucket String - The name of the Amazon S3 bucket.
- output
S3Key StringPrefix - The Amazon S3 bucket subfolder.
- parameters
List<Maintenance
Window Task Task Invocation Parameters Run Command Parameters Parameter> - The parameters for the RUN_COMMAND task execution. Documented below.
- service
Role StringArn - The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
- timeout
Seconds Integer - If this time is reached and the command has not already started executing, it doesn't run.
- cloudwatch
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Cloudwatch Config - Configuration options for sending command output to CloudWatch Logs. Documented below.
- comment string
- Information about the command(s) to execute.
- document
Hash string - The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.
- document
Hash stringType - SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values:
Sha256
andSha1
- document
Version string - The version of an Automation document to use during task execution.
- notification
Config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Notification Config - Configurations for sending notifications about command status changes on a per-instance basis. Documented below.
- output
S3Bucket string - The name of the Amazon S3 bucket.
- output
S3Key stringPrefix - The Amazon S3 bucket subfolder.
- parameters
Maintenance
Window Task Task Invocation Parameters Run Command Parameters Parameter[] - The parameters for the RUN_COMMAND task execution. Documented below.
- service
Role stringArn - The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
- timeout
Seconds number - If this time is reached and the command has not already started executing, it doesn't run.
- cloudwatch_
config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Cloudwatch Config - Configuration options for sending command output to CloudWatch Logs. Documented below.
- comment str
- Information about the command(s) to execute.
- document_
hash str - The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.
- document_
hash_ strtype - SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values:
Sha256
andSha1
- document_
version str - The version of an Automation document to use during task execution.
- notification_
config MaintenanceWindow Task Task Invocation Parameters Run Command Parameters Notification Config - Configurations for sending notifications about command status changes on a per-instance basis. Documented below.
- output_
s3_ strbucket - The name of the Amazon S3 bucket.
- output_
s3_ strkey_ prefix - The Amazon S3 bucket subfolder.
- parameters
Sequence[Maintenance
Window Task Task Invocation Parameters Run Command Parameters Parameter] - The parameters for the RUN_COMMAND task execution. Documented below.
- service_
role_ strarn - The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
- timeout_
seconds int - If this time is reached and the command has not already started executing, it doesn't run.
- cloudwatch
Config Property Map - Configuration options for sending command output to CloudWatch Logs. Documented below.
- comment String
- Information about the command(s) to execute.
- document
Hash String - The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.
- document
Hash StringType - SHA-256 or SHA-1. SHA-1 hashes have been deprecated. Valid values:
Sha256
andSha1
- document
Version String - The version of an Automation document to use during task execution.
- notification
Config Property Map - Configurations for sending notifications about command status changes on a per-instance basis. Documented below.
- output
S3Bucket String - The name of the Amazon S3 bucket.
- output
S3Key StringPrefix - The Amazon S3 bucket subfolder.
- parameters List<Property Map>
- The parameters for the RUN_COMMAND task execution. Documented below.
- service
Role StringArn - The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
- timeout
Seconds Number - If this time is reached and the command has not already started executing, it doesn't run.
MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersCloudwatchConfig, MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersCloudwatchConfigArgs
- Cloudwatch
Log stringGroup Name - The name of the CloudWatch log group where you want to send command output. If you don't specify a group name, Systems Manager automatically creates a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName.
- Cloudwatch
Output boolEnabled - Enables Systems Manager to send command output to CloudWatch Logs.
- Cloudwatch
Log stringGroup Name - The name of the CloudWatch log group where you want to send command output. If you don't specify a group name, Systems Manager automatically creates a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName.
- Cloudwatch
Output boolEnabled - Enables Systems Manager to send command output to CloudWatch Logs.
- cloudwatch
Log StringGroup Name - The name of the CloudWatch log group where you want to send command output. If you don't specify a group name, Systems Manager automatically creates a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName.
- cloudwatch
Output BooleanEnabled - Enables Systems Manager to send command output to CloudWatch Logs.
- cloudwatch
Log stringGroup Name - The name of the CloudWatch log group where you want to send command output. If you don't specify a group name, Systems Manager automatically creates a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName.
- cloudwatch
Output booleanEnabled - Enables Systems Manager to send command output to CloudWatch Logs.
- cloudwatch_
log_ strgroup_ name - The name of the CloudWatch log group where you want to send command output. If you don't specify a group name, Systems Manager automatically creates a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName.
- cloudwatch_
output_ boolenabled - Enables Systems Manager to send command output to CloudWatch Logs.
- cloudwatch
Log StringGroup Name - The name of the CloudWatch log group where you want to send command output. If you don't specify a group name, Systems Manager automatically creates a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName.
- cloudwatch
Output BooleanEnabled - Enables Systems Manager to send command output to CloudWatch Logs.
MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfig, MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs
- Notification
Arn string - An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
- Notification
Events List<string> - The different events for which you can receive notifications. Valid values:
All
,InProgress
,Success
,TimedOut
,Cancelled
, andFailed
- Notification
Type string - When specified with
Command
, receive notification when the status of a command changes. When specified withInvocation
, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values:Command
andInvocation
- Notification
Arn string - An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
- Notification
Events []string - The different events for which you can receive notifications. Valid values:
All
,InProgress
,Success
,TimedOut
,Cancelled
, andFailed
- Notification
Type string - When specified with
Command
, receive notification when the status of a command changes. When specified withInvocation
, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values:Command
andInvocation
- notification
Arn String - An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
- notification
Events List<String> - The different events for which you can receive notifications. Valid values:
All
,InProgress
,Success
,TimedOut
,Cancelled
, andFailed
- notification
Type String - When specified with
Command
, receive notification when the status of a command changes. When specified withInvocation
, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values:Command
andInvocation
- notification
Arn string - An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
- notification
Events string[] - The different events for which you can receive notifications. Valid values:
All
,InProgress
,Success
,TimedOut
,Cancelled
, andFailed
- notification
Type string - When specified with
Command
, receive notification when the status of a command changes. When specified withInvocation
, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values:Command
andInvocation
- notification_
arn str - An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
- notification_
events Sequence[str] - The different events for which you can receive notifications. Valid values:
All
,InProgress
,Success
,TimedOut
,Cancelled
, andFailed
- notification_
type str - When specified with
Command
, receive notification when the status of a command changes. When specified withInvocation
, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values:Command
andInvocation
- notification
Arn String - An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
- notification
Events List<String> - The different events for which you can receive notifications. Valid values:
All
,InProgress
,Success
,TimedOut
,Cancelled
, andFailed
- notification
Type String - When specified with
Command
, receive notification when the status of a command changes. When specified withInvocation
, for commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes. Valid values:Command
andInvocation
MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameter, MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs
MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParameters, MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs
Import
Using pulumi import
, import AWS Maintenance Window Task using the window_id
and window_task_id
separated by /
. For example:
$ pulumi import aws:ssm/maintenanceWindowTask:MaintenanceWindowTask task <window_id>/<window_task_id>
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.