Class CfnMaintenanceWindowTaskProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnMaintenanceWindowTaskProps>
- Enclosing interface:
CfnMaintenanceWindowTaskProps
CfnMaintenanceWindowTaskProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.cutoffBehavior
(String cutoffBehavior) Sets the value ofCfnMaintenanceWindowTaskProps.getCutoffBehavior()
description
(String description) Sets the value ofCfnMaintenanceWindowTaskProps.getDescription()
loggingInfo
(IResolvable loggingInfo) Sets the value ofCfnMaintenanceWindowTaskProps.getLoggingInfo()
loggingInfo
(CfnMaintenanceWindowTask.LoggingInfoProperty loggingInfo) Sets the value ofCfnMaintenanceWindowTaskProps.getLoggingInfo()
maxConcurrency
(String maxConcurrency) Sets the value ofCfnMaintenanceWindowTaskProps.getMaxConcurrency()
Sets the value ofCfnMaintenanceWindowTaskProps.getMaxErrors()
Sets the value ofCfnMaintenanceWindowTaskProps.getName()
Sets the value ofCfnMaintenanceWindowTaskProps.getPriority()
serviceRoleArn
(String serviceRoleArn) Sets the value ofCfnMaintenanceWindowTaskProps.getServiceRoleArn()
Sets the value ofCfnMaintenanceWindowTaskProps.getTargets()
targets
(IResolvable targets) Sets the value ofCfnMaintenanceWindowTaskProps.getTargets()
Sets the value ofCfnMaintenanceWindowTaskProps.getTaskArn()
taskInvocationParameters
(IResolvable taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskProps.getTaskInvocationParameters()
taskInvocationParameters
(CfnMaintenanceWindowTask.TaskInvocationParametersProperty taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskProps.getTaskInvocationParameters()
taskParameters
(Object taskParameters) Sets the value ofCfnMaintenanceWindowTaskProps.getTaskParameters()
Sets the value ofCfnMaintenanceWindowTaskProps.getTaskType()
Sets the value ofCfnMaintenanceWindowTaskProps.getWindowId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
priority
Sets the value ofCfnMaintenanceWindowTaskProps.getPriority()
- Parameters:
priority
- The priority of the task in the maintenance window. This parameter is required. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.- Returns:
this
-
taskArn
Sets the value ofCfnMaintenanceWindowTaskProps.getTaskArn()
- Parameters:
taskArn
- The resource that the task uses during execution. This parameter is required. ForRUN_COMMAND
andAUTOMATION
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.- Returns:
this
-
taskType
Sets the value ofCfnMaintenanceWindowTaskProps.getTaskType()
- Parameters:
taskType
- The type of task. This parameter is required. Valid values:RUN_COMMAND
,AUTOMATION
,LAMBDA
,STEP_FUNCTIONS
.- Returns:
this
-
windowId
Sets the value ofCfnMaintenanceWindowTaskProps.getWindowId()
- Parameters:
windowId
- The ID of the maintenance window where the task is registered. This parameter is required.- Returns:
this
-
cutoffBehavior
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder cutoffBehavior(String cutoffBehavior) Sets the value ofCfnMaintenanceWindowTaskProps.getCutoffBehavior()
- Parameters:
cutoffBehavior
- The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.- Returns:
this
-
description
Sets the value ofCfnMaintenanceWindowTaskProps.getDescription()
- Parameters:
description
- A description of the task.- Returns:
this
-
loggingInfo
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder loggingInfo(IResolvable loggingInfo) Sets the value ofCfnMaintenanceWindowTaskProps.getLoggingInfo()
- Parameters:
loggingInfo
- Information about an Amazon S3 bucket to write Run Command task-level logs to.LoggingInfo
has been deprecated. To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use theOutputS3BucketName
andOutputS3KeyPrefix
options in theTaskInvocationParameters
structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see AWS ::SSM::MaintenanceWindowTask MaintenanceWindowRunCommandParameters .- Returns:
this
-
loggingInfo
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder loggingInfo(CfnMaintenanceWindowTask.LoggingInfoProperty loggingInfo) Sets the value ofCfnMaintenanceWindowTaskProps.getLoggingInfo()
- Parameters:
loggingInfo
- Information about an Amazon S3 bucket to write Run Command task-level logs to.LoggingInfo
has been deprecated. To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use theOutputS3BucketName
andOutputS3KeyPrefix
options in theTaskInvocationParameters
structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see AWS ::SSM::MaintenanceWindowTask MaintenanceWindowRunCommandParameters .- Returns:
this
-
maxConcurrency
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder maxConcurrency(String maxConcurrency) Sets the value ofCfnMaintenanceWindowTaskProps.getMaxConcurrency()
- Parameters:
maxConcurrency
- The maximum number of targets this task can be run for, in parallel.Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task 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.- Returns:
this
-
maxErrors
Sets the value ofCfnMaintenanceWindowTaskProps.getMaxErrors()
- Parameters:
maxErrors
- The maximum number of errors allowed before this task stops being scheduled.Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task 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.- Returns:
this
-
name
Sets the value ofCfnMaintenanceWindowTaskProps.getName()
- Parameters:
name
- The task name.- Returns:
this
-
serviceRoleArn
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder serviceRoleArn(String serviceRoleArn) Sets the value ofCfnMaintenanceWindowTaskProps.getServiceRoleArn()
- Parameters:
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.- Returns:
this
-
targets
Sets the value ofCfnMaintenanceWindowTaskProps.getTargets()
- Parameters:
targets
- The targets, either instances or window target IDs.- Specify instances using
Key=InstanceIds,Values= *instanceid1* , *instanceid2*
. - Specify window target IDs using
Key=WindowTargetIds,Values= *window-target-id-1* , *window-target-id-2*
.
- Specify instances using
- Returns:
this
-
targets
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder targets(List<? extends Object> targets) Sets the value ofCfnMaintenanceWindowTaskProps.getTargets()
- Parameters:
targets
- The targets, either instances or window target IDs.- Specify instances using
Key=InstanceIds,Values= *instanceid1* , *instanceid2*
. - Specify window target IDs using
Key=WindowTargetIds,Values= *window-target-id-1* , *window-target-id-2*
.
- Specify instances using
- Returns:
this
-
taskInvocationParameters
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder taskInvocationParameters(IResolvable taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskProps.getTaskInvocationParameters()
- Parameters:
taskInvocationParameters
- The parameters to pass to the task when it runs. 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
TaskInvocationParameters
, you must provide again all theTaskInvocationParameters
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 specifiedTaskInvocationParameters
values forComment
,NotificationConfig
, andOutputS3BucketName
. If you update the maintenance window task and specify only a differentOutputS3BucketName
value, the values forComment
andNotificationConfig
are removed.- Returns:
this
-
taskInvocationParameters
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder taskInvocationParameters(CfnMaintenanceWindowTask.TaskInvocationParametersProperty taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskProps.getTaskInvocationParameters()
- Parameters:
taskInvocationParameters
- The parameters to pass to the task when it runs. 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
TaskInvocationParameters
, you must provide again all theTaskInvocationParameters
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 specifiedTaskInvocationParameters
values forComment
,NotificationConfig
, andOutputS3BucketName
. If you update the maintenance window task and specify only a differentOutputS3BucketName
value, the values forComment
andNotificationConfig
are removed.- Returns:
this
-
taskParameters
@Stability(Stable) public CfnMaintenanceWindowTaskProps.Builder taskParameters(Object taskParameters) Sets the value ofCfnMaintenanceWindowTaskProps.getTaskParameters()
- Parameters:
taskParameters
- The parameters to pass to the task when it runs.TaskParameters
has been deprecated. To specify parameters to pass to a task when it runs, instead use theParameters
option in theTaskInvocationParameters
structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnMaintenanceWindowTaskProps>
- Returns:
- a new instance of
CfnMaintenanceWindowTaskProps
- Throws:
NullPointerException
- if any required attribute was not provided
-