Class CfnMaintenanceWindowTaskMixinProps
Properties for CfnMaintenanceWindowTaskPropsMixin.
Implements
Inherited Members
Namespace: Amazon.CDK.CfnPropertyMixins.AWS.SSM
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public class CfnMaintenanceWindowTaskMixinProps : ICfnMaintenanceWindowTaskMixinProps
Syntax (vb)
Public Class CfnMaintenanceWindowTaskMixinProps Implements ICfnMaintenanceWindowTaskMixinProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.CfnPropertyMixins.AWS.SSM;
var parameters;
var taskParameters;
var cfnMaintenanceWindowTaskMixinProps = new CfnMaintenanceWindowTaskMixinProps {
CutoffBehavior = "cutoffBehavior",
Description = "description",
LoggingInfo = new LoggingInfoProperty {
Region = "region",
S3Bucket = "s3Bucket",
S3Prefix = "s3Prefix"
},
MaxConcurrency = "maxConcurrency",
MaxErrors = "maxErrors",
Name = "name",
Priority = 123,
ServiceRoleArn = "serviceRoleArn",
Targets = new [] { new TargetProperty {
Key = "key",
Values = new [] { "values" }
} },
TaskArn = "taskArn",
TaskInvocationParameters = new TaskInvocationParametersProperty {
MaintenanceWindowAutomationParameters = new MaintenanceWindowAutomationParametersProperty {
DocumentVersion = "documentVersion",
Parameters = parameters
},
MaintenanceWindowLambdaParameters = new MaintenanceWindowLambdaParametersProperty {
ClientContext = "clientContext",
Payload = "payload",
Qualifier = "qualifier"
},
MaintenanceWindowRunCommandParameters = new MaintenanceWindowRunCommandParametersProperty {
CloudWatchOutputConfig = new CloudWatchOutputConfigProperty {
CloudWatchLogGroupName = "cloudWatchLogGroupName",
CloudWatchOutputEnabled = false
},
Comment = "comment",
DocumentHash = "documentHash",
DocumentHashType = "documentHashType",
DocumentVersion = "documentVersion",
NotificationConfig = new NotificationConfigProperty {
NotificationArn = "notificationArn",
NotificationEvents = new [] { "notificationEvents" },
NotificationType = "notificationType"
},
OutputS3BucketName = "outputS3BucketName",
OutputS3KeyPrefix = "outputS3KeyPrefix",
Parameters = parameters,
ServiceRoleArn = "serviceRoleArn",
TimeoutSeconds = 123
},
MaintenanceWindowStepFunctionsParameters = new MaintenanceWindowStepFunctionsParametersProperty {
Input = "input",
Name = "name"
}
},
TaskParameters = taskParameters,
TaskType = "taskType",
WindowId = "windowId"
};
Synopsis
Constructors
| CfnMaintenanceWindowTaskMixinProps() | Properties for CfnMaintenanceWindowTaskPropsMixin. |
Properties
| CutoffBehavior | The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. |
| Description | A description of the task. |
| LoggingInfo |
|
| MaxConcurrency | The maximum number of targets this task can be run for, in parallel. |
| MaxErrors | The maximum number of errors allowed before this task stops being scheduled. |
| Name | The task name. |
| Priority | The priority of the task in the maintenance window. |
| ServiceRoleArn | The Amazon Resource Name (ARN) of the IAM service role for AWS Systems Manager to assume when running a maintenance window task. |
| Targets | The targets, either instances or window target IDs. |
| TaskArn | The resource that the task uses during execution. |
| TaskInvocationParameters | The parameters to pass to the task when it runs. |
| TaskParameters |
|
| TaskType | The type of task. |
| WindowId | The ID of the maintenance window where the task is registered. |
Constructors
CfnMaintenanceWindowTaskMixinProps()
Properties for CfnMaintenanceWindowTaskPropsMixin.
public CfnMaintenanceWindowTaskMixinProps()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.CfnPropertyMixins.AWS.SSM;
var parameters;
var taskParameters;
var cfnMaintenanceWindowTaskMixinProps = new CfnMaintenanceWindowTaskMixinProps {
CutoffBehavior = "cutoffBehavior",
Description = "description",
LoggingInfo = new LoggingInfoProperty {
Region = "region",
S3Bucket = "s3Bucket",
S3Prefix = "s3Prefix"
},
MaxConcurrency = "maxConcurrency",
MaxErrors = "maxErrors",
Name = "name",
Priority = 123,
ServiceRoleArn = "serviceRoleArn",
Targets = new [] { new TargetProperty {
Key = "key",
Values = new [] { "values" }
} },
TaskArn = "taskArn",
TaskInvocationParameters = new TaskInvocationParametersProperty {
MaintenanceWindowAutomationParameters = new MaintenanceWindowAutomationParametersProperty {
DocumentVersion = "documentVersion",
Parameters = parameters
},
MaintenanceWindowLambdaParameters = new MaintenanceWindowLambdaParametersProperty {
ClientContext = "clientContext",
Payload = "payload",
Qualifier = "qualifier"
},
MaintenanceWindowRunCommandParameters = new MaintenanceWindowRunCommandParametersProperty {
CloudWatchOutputConfig = new CloudWatchOutputConfigProperty {
CloudWatchLogGroupName = "cloudWatchLogGroupName",
CloudWatchOutputEnabled = false
},
Comment = "comment",
DocumentHash = "documentHash",
DocumentHashType = "documentHashType",
DocumentVersion = "documentVersion",
NotificationConfig = new NotificationConfigProperty {
NotificationArn = "notificationArn",
NotificationEvents = new [] { "notificationEvents" },
NotificationType = "notificationType"
},
OutputS3BucketName = "outputS3BucketName",
OutputS3KeyPrefix = "outputS3KeyPrefix",
Parameters = parameters,
ServiceRoleArn = "serviceRoleArn",
TimeoutSeconds = 123
},
MaintenanceWindowStepFunctionsParameters = new MaintenanceWindowStepFunctionsParametersProperty {
Input = "input",
Name = "name"
}
},
TaskParameters = taskParameters,
TaskType = "taskType",
WindowId = "windowId"
};
Properties
CutoffBehavior
The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.
public string? CutoffBehavior { get; set; }
Property Value
Remarks
Description
A description of the task.
public string? Description { get; set; }
Property Value
Remarks
LoggingInfo
LoggingInfohas been deprecated.
public object? LoggingInfo { get; set; }
Property Value
Remarks
To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see AWS ::SSM::MaintenanceWindowTask MaintenanceWindowRunCommandParameters .
Information about an Amazon S3 bucket to write Run Command task-level logs to.
Type union: either IResolvable or CfnMaintenanceWindowTaskPropsMixin.ILoggingInfoProperty
MaxConcurrency
The maximum number of targets this task can be run for, in parallel.
public string? MaxConcurrency { get; set; }
Property Value
Remarks
Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.
For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of 1 . This value doesn't affect the running of your task.
MaxErrors
The maximum number of errors allowed before this task stops being scheduled.
public string? MaxErrors { get; set; }
Property Value
Remarks
Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.
For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of 1 . This value doesn't affect the running of your task.
Name
The task name.
public string? Name { get; set; }
Property Value
Remarks
Priority
The priority of the task in the maintenance window.
public double? Priority { get; set; }
Property Value
Remarks
The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.
ServiceRoleArn
The Amazon Resource Name (ARN) of the IAM service role for AWS Systems Manager to assume when running a maintenance window task.
public string? ServiceRoleArn { get; set; }
Property Value
Remarks
If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run RegisterTaskWithMaintenanceWindow .
However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see Setting up Maintenance Windows in the in the AWS Systems Manager User Guide .
Targets
The targets, either instances or window target IDs.
public object? Targets { get; set; }
Property Value
Remarks
TaskArn
The resource that the task uses during execution.
public string? TaskArn { get; set; }
Property Value
Remarks
For RUN_COMMAND and AUTOMATION task types, TaskArn is the SSM document name or Amazon Resource Name (ARN).
For LAMBDA tasks, TaskArn is the function name or ARN.
For STEP_FUNCTIONS tasks, TaskArn is the state machine ARN.
TaskInvocationParameters
The parameters to pass to the task when it runs.
public object? TaskInvocationParameters { get; set; }
Property Value
Remarks
Populate only the fields that match the task type. All other fields should be empty.
When you update a maintenance window task that has options specified in <code>TaskInvocationParameters</code> , you must provide again all the <code>TaskInvocationParameters</code> values that you want to retain. The values you do not specify again are removed. For example, suppose that when you registered a Run Command task, you specified <code>TaskInvocationParameters</code> values for <code>Comment</code> , <code>NotificationConfig</code> , and <code>OutputS3BucketName</code> . If you update the maintenance window task and specify only a different <code>OutputS3BucketName</code> value, the values for <code>Comment</code> and <code>NotificationConfig</code> are removed.
Type union: either IResolvable or CfnMaintenanceWindowTaskPropsMixin.ITaskInvocationParametersProperty
TaskParameters
TaskParametershas been deprecated.
public object? TaskParameters { get; set; }
Property Value
Remarks
To specify parameters to pass to a task when it runs, instead use the Parameters option in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters .
The parameters to pass to the task when it runs.
TaskType
The type of task.
public string? TaskType { get; set; }
Property Value
Remarks
Valid values: RUN_COMMAND , AUTOMATION , LAMBDA , STEP_FUNCTIONS .
WindowId
The ID of the maintenance window where the task is registered.
public string? WindowId { get; set; }