Class CfnMaintenanceWindowTaskMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnMaintenanceWindowTaskMixinProps>
- Enclosing interface:
CfnMaintenanceWindowTaskMixinProps
CfnMaintenanceWindowTaskMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.cutoffBehavior(String cutoffBehavior) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getCutoffBehavior()description(String description) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getDescription()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getLoggingInfo()loggingInfo(IResolvable loggingInfo) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getLoggingInfo()maxConcurrency(String maxConcurrency) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getMaxConcurrency()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getMaxErrors()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getName()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getPriority()serviceRoleArn(String serviceRoleArn) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getServiceRoleArn()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTargets()targets(IResolvable targets) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTargets()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskArn()taskInvocationParameters(CfnMaintenanceWindowTaskPropsMixin.TaskInvocationParametersProperty taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskInvocationParameters()taskInvocationParameters(IResolvable taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskInvocationParameters()taskParameters(Object taskParameters) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskParameters()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskType()Sets the value ofCfnMaintenanceWindowTaskMixinProps.getWindowId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cutoffBehavior
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder cutoffBehavior(String cutoffBehavior) Sets the value ofCfnMaintenanceWindowTaskMixinProps.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
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder description(String description) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getDescription()- Parameters:
description- A description of the task.- Returns:
this
-
loggingInfo
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder loggingInfo(IResolvable loggingInfo) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getLoggingInfo()- Parameters:
loggingInfo-
To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use theLoggingInfohas been deprecated.OutputS3BucketNameandOutputS3KeyPrefixoptions in theTaskInvocationParametersstructure. 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.
- Returns:
this
-
loggingInfo
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder loggingInfo(CfnMaintenanceWindowTaskPropsMixin.LoggingInfoProperty loggingInfo) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getLoggingInfo()- Parameters:
loggingInfo-
To specify an Amazon S3 bucket to contain logs for Run Command tasks, instead use theLoggingInfohas been deprecated.OutputS3BucketNameandOutputS3KeyPrefixoptions in theTaskInvocationParametersstructure. 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.
- Returns:
this
-
maxConcurrency
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder maxConcurrency(String maxConcurrency) Sets the value ofCfnMaintenanceWindowTaskMixinProps.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 ofCfnMaintenanceWindowTaskMixinProps.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 ofCfnMaintenanceWindowTaskMixinProps.getName()- Parameters:
name- The task name.- Returns:
this
-
priority
Sets the value ofCfnMaintenanceWindowTaskMixinProps.getPriority()- Parameters:
priority- The priority of the task in the maintenance window. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.- Returns:
this
-
serviceRoleArn
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder serviceRoleArn(String serviceRoleArn) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getServiceRoleArn()- Parameters:
serviceRoleArn- The Amazon Resource Name (ARN) of the IAM service role for AWS Systems Manager to assume when running a maintenance window task. 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 runRegisterTaskWithMaintenanceWindow.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 .
- Returns:
this
-
targets
Sets the value ofCfnMaintenanceWindowTaskMixinProps.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 CfnMaintenanceWindowTaskMixinProps.Builder targets(List<? extends Object> targets) Sets the value ofCfnMaintenanceWindowTaskMixinProps.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
-
taskArn
Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskArn()- Parameters:
taskArn- The resource that the task uses during execution. ForRUN_COMMANDandAUTOMATIONtask types,TaskArnis the SSM document name or Amazon Resource Name (ARN).For
LAMBDAtasks,TaskArnis the function name or ARN.For
STEP_FUNCTIONStasks,TaskArnis the state machine ARN.- Returns:
this
-
taskInvocationParameters
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder taskInvocationParameters(IResolvable taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskMixinProps.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 theTaskInvocationParametersvalues 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 specifiedTaskInvocationParametersvalues forComment,NotificationConfig, andOutputS3BucketName. If you update the maintenance window task and specify only a differentOutputS3BucketNamevalue, the values forCommentandNotificationConfigare removed.- Returns:
this
-
taskInvocationParameters
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder taskInvocationParameters(CfnMaintenanceWindowTaskPropsMixin.TaskInvocationParametersProperty taskInvocationParameters) Sets the value ofCfnMaintenanceWindowTaskMixinProps.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 theTaskInvocationParametersvalues 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 specifiedTaskInvocationParametersvalues forComment,NotificationConfig, andOutputS3BucketName. If you update the maintenance window task and specify only a differentOutputS3BucketNamevalue, the values forCommentandNotificationConfigare removed.- Returns:
this
-
taskParameters
@Stability(Stable) public CfnMaintenanceWindowTaskMixinProps.Builder taskParameters(Object taskParameters) Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskParameters()- Parameters:
taskParameters-
To specify parameters to pass to a task when it runs, instead use theTaskParametershas been deprecated.Parametersoption in theTaskInvocationParametersstructure. 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.
- Returns:
this
-
taskType
Sets the value ofCfnMaintenanceWindowTaskMixinProps.getTaskType()- Parameters:
taskType- The type of task. Valid values:RUN_COMMAND,AUTOMATION,LAMBDA,STEP_FUNCTIONS.- Returns:
this
-
windowId
Sets the value ofCfnMaintenanceWindowTaskMixinProps.getWindowId()- Parameters:
windowId- The ID of the maintenance window where the task is registered.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnMaintenanceWindowTaskMixinProps>- Returns:
- a new instance of
CfnMaintenanceWindowTaskMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-