Table of Contents

Interface CfnMaintenanceWindowTask.IMaintenanceWindowRunCommandParametersProperty

Namespace
Amazon.CDK.AWS.SSM
Assembly
Amazon.CDK.AWS.SSM.dll

The MaintenanceWindowRunCommandParameters property type specifies the parameters for a RUN_COMMAND task type for a maintenance window task in AWS Systems Manager .

public interface CfnMaintenanceWindowTask.IMaintenanceWindowRunCommandParametersProperty

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.SSM;

             var parameters;

             var maintenanceWindowRunCommandParametersProperty = new MaintenanceWindowRunCommandParametersProperty {
                 CloudWatchOutputConfig = new CloudWatchOutputConfigProperty {
                     CloudWatchLogGroupName = "cloudWatchLogGroupName",
                     CloudWatchOutputEnabled = false
                 },
                 Comment = "comment",
                 DocumentHash = "documentHash",
                 DocumentHashType = "documentHashType",
                 DocumentVersion = "documentVersion",
                 NotificationConfig = new NotificationConfigProperty {
                     NotificationArn = "notificationArn",

                     // the properties below are optional
                     NotificationEvents = new [] { "notificationEvents" },
                     NotificationType = "notificationType"
                 },
                 OutputS3BucketName = "outputS3BucketName",
                 OutputS3KeyPrefix = "outputS3KeyPrefix",
                 Parameters = parameters,
                 ServiceRoleArn = "serviceRoleArn",
                 TimeoutSeconds = 123
             };

Remarks

This means that these parameters are the same as those for the SendCommand API call. For more information about SendCommand parameters, see SendCommand in the AWS Systems Manager API Reference .

For information about available parameters in SSM Command documents, you can view the content of the document itself in the Systems Manager console. For information, see Viewing SSM command document content in the AWS Systems Manager User Guide .

MaintenanceWindowRunCommandParameters is a property of the TaskInvocationParameters property type.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-maintenancewindowtask-maintenancewindowruncommandparameters.html

ExampleMetadata: fixture=_generated

Properties

CloudWatchOutputConfig

Configuration options for sending command output to Amazon CloudWatch Logs.

object? CloudWatchOutputConfig { get; }

Property Value

object

Remarks

Comment

Information about the command or commands to run.

string? Comment { get; }

Property Value

string

Remarks

DocumentHash

The SHA-256 or SHA-1 hash created by the system when the document was created.

string? DocumentHash { get; }

Property Value

string

Remarks

DocumentHashType

The SHA-256 or SHA-1 hash type.

string? DocumentHashType { get; }

Property Value

string

Remarks

DocumentVersion

The AWS Systems Manager document (SSM document) version to use in the request.

string? DocumentVersion { get; }

Property Value

string

Remarks

You can specify $DEFAULT , $LATEST , or a specific version number. If you run commands by using the AWS CLI, then you must escape the first two options by using a backslash. If you specify a version number, then you don't need to use the backslash. For example:

--document-version "$DEFAULT"

--document-version "$LATEST"

--document-version "3"

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-maintenancewindowtask-maintenancewindowruncommandparameters.html#cfn-ssm-maintenancewindowtask-maintenancewindowruncommandparameters-documentversion

NotificationConfig

Configurations for sending notifications about command status changes on a per-managed node basis.

object? NotificationConfig { get; }

Property Value

object

Remarks

OutputS3BucketName

The name of the Amazon Simple Storage Service (Amazon S3) bucket.

string? OutputS3BucketName { get; }

Property Value

string

Remarks

OutputS3KeyPrefix

The S3 bucket subfolder.

string? OutputS3KeyPrefix { get; }

Property Value

string

Remarks

Parameters

The parameters for the RUN_COMMAND task execution.

object? Parameters { get; }

Property Value

object

Remarks

ServiceRoleArn

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.

string? ServiceRoleArn { get; }

Property Value

string

Remarks

TimeoutSeconds

If this time is reached and the command hasn't already started running, it doesn't run.

double? TimeoutSeconds { get; }

Property Value

double?

Remarks