public static interface Command.Builder extends CopyableBuilder<Command.Builder,Command>
Modifier and Type | Method and Description |
---|---|
Command.Builder |
commandId(String commandId)
A unique identifier for this command.
|
Command.Builder |
comment(String comment)
User-specified information about the command, such as a brief description of what the command should do.
|
Command.Builder |
completedCount(Integer completedCount)
The number of targets for which the command invocation reached a terminal state.
|
Command.Builder |
documentName(String documentName)
The name of the document requested for execution.
|
Command.Builder |
errorCount(Integer errorCount)
The number of targets for which the status is Failed or Execution Timed Out.
|
Command.Builder |
expiresAfter(Instant expiresAfter)
If this time is reached and the command has not already started executing, it will not execute.
|
Command.Builder |
instanceIds(Collection<String> instanceIds)
The instance IDs against which this command was requested.
|
Command.Builder |
instanceIds(String... instanceIds)
The instance IDs against which this command was requested.
|
Command.Builder |
maxConcurrency(String maxConcurrency)
The maximum number of instances that are allowed to execute the command at the same time.
|
Command.Builder |
maxErrors(String maxErrors)
The maximum number of errors allowed before the system stops sending the command to additional targets.
|
default Command.Builder |
notificationConfig(Consumer<NotificationConfig.Builder> notificationConfig)
Configurations for sending notifications about command status changes.
|
Command.Builder |
notificationConfig(NotificationConfig notificationConfig)
Configurations for sending notifications about command status changes.
|
Command.Builder |
outputS3BucketName(String outputS3BucketName)
The S3 bucket where the responses to the command executions should be stored.
|
Command.Builder |
outputS3KeyPrefix(String outputS3KeyPrefix)
The S3 directory path inside the bucket where the responses to the command executions should be stored.
|
Command.Builder |
outputS3Region(String outputS3Region)
(Deprecated) You can no longer specify this parameter.
|
Command.Builder |
parameters(Map<String,? extends Collection<String>> parameters)
The parameter values to be inserted in the document when executing the command.
|
Command.Builder |
requestedDateTime(Instant requestedDateTime)
The date and time the command was requested.
|
Command.Builder |
serviceRole(String serviceRole)
The IAM service role that Run Command uses to act on your behalf when sending notifications about command
status changes.
|
Command.Builder |
status(CommandStatus status)
The status of the command.
|
Command.Builder |
status(String status)
The status of the command.
|
Command.Builder |
statusDetails(String statusDetails)
A detailed status of the command execution.
|
Command.Builder |
targetCount(Integer targetCount)
The number of targets for the command.
|
Command.Builder |
targets(Collection<Target> targets)
An array of search criteria that targets instances using a Key,Value combination that you specify.
|
Command.Builder |
targets(Target... targets)
An array of search criteria that targets instances using a Key,Value combination that you specify.
|
copy
apply, build
Command.Builder commandId(String commandId)
A unique identifier for this command.
commandId
- A unique identifier for this command.Command.Builder documentName(String documentName)
The name of the document requested for execution.
documentName
- The name of the document requested for execution.Command.Builder comment(String comment)
User-specified information about the command, such as a brief description of what the command should do.
comment
- User-specified information about the command, such as a brief description of what the command should
do.Command.Builder expiresAfter(Instant expiresAfter)
If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
expiresAfter
- If this time is reached and the command has not already started executing, it will not execute.
Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.Command.Builder parameters(Map<String,? extends Collection<String>> parameters)
The parameter values to be inserted in the document when executing the command.
parameters
- The parameter values to be inserted in the document when executing the command.Command.Builder instanceIds(Collection<String> instanceIds)
The instance IDs against which this command was requested.
instanceIds
- The instance IDs against which this command was requested.Command.Builder instanceIds(String... instanceIds)
The instance IDs against which this command was requested.
instanceIds
- The instance IDs against which this command was requested.Command.Builder targets(Collection<Target> targets)
An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
targets
- An array of search criteria that targets instances using a Key,Value combination that you specify.
Targets is required if you don't provide one or more instance IDs in the call.Command.Builder targets(Target... targets)
An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
targets
- An array of search criteria that targets instances using a Key,Value combination that you specify.
Targets is required if you don't provide one or more instance IDs in the call.Command.Builder requestedDateTime(Instant requestedDateTime)
The date and time the command was requested.
requestedDateTime
- The date and time the command was requested.Command.Builder status(String status)
The status of the command.
status
- The status of the command.CommandStatus
,
CommandStatus
Command.Builder status(CommandStatus status)
The status of the command.
status
- The status of the command.CommandStatus
,
CommandStatus
Command.Builder statusDetails(String statusDetails)
A detailed status of the command execution. StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Run Command Status. StatusDetails can be one of the following values:
Pending: The command has not been sent to any instances.
In Progress: The command has been sent to at least one instance but has not reached a final state on all instances.
Success: The command successfully executed on all invocations. This is a terminal state.
Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
Incomplete: The command was attempted on all instances and one or more invocations does not have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal state.
Rate Exceeded: The number of instances targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before executing it on any instance. This is a terminal state.
statusDetails
- A detailed status of the command execution. StatusDetails includes more information than Status
because it includes states resulting from error and concurrency control parameters. StatusDetails can
show different results than Status. For more information about these statuses, see Run
Command Status. StatusDetails can be one of the following values:
Pending: The command has not been sent to any instances.
In Progress: The command has been sent to at least one instance but has not reached a final state on all instances.
Success: The command successfully executed on all invocations. This is a terminal state.
Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
Incomplete: The command was attempted on all instances and one or more invocations does not have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal state.
Rate Exceeded: The number of instances targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before executing it on any instance. This is a terminal state.
Command.Builder outputS3Region(String outputS3Region)
(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon S3 bucket region.
outputS3Region
- (Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager
automatically determines the Amazon S3 bucket region.Command.Builder outputS3BucketName(String outputS3BucketName)
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
outputS3BucketName
- The S3 bucket where the responses to the command executions should be stored. This was requested when
issuing the command.Command.Builder outputS3KeyPrefix(String outputS3KeyPrefix)
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
outputS3KeyPrefix
- The S3 directory path inside the bucket where the responses to the command executions should be
stored. This was requested when issuing the command.Command.Builder maxConcurrency(String maxConcurrency)
The maximum number of instances that are allowed to execute the command at the same time. You can specify a number of instances, such as 10, or a percentage of instances, such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Executing a Command Using Systems Manager Run Command.
maxConcurrency
- The maximum number of instances that are allowed to execute the command at the same time. You can
specify a number of instances, such as 10, or a percentage of instances, such as 10%. The default
value is 50. For more information about how to use MaxConcurrency, see Executing a
Command Using Systems Manager Run Command.Command.Builder maxErrors(String maxErrors)
The maximum number of errors allowed before the system stops sending the command to additional targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The default value is 50. For more information about how to use MaxErrors, see Executing a Command Using Systems Manager Run Command.
maxErrors
- The maximum number of errors allowed before the system stops sending the command to additional
targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The
default value is 50. For more information about how to use MaxErrors, see Executing a
Command Using Systems Manager Run Command.Command.Builder targetCount(Integer targetCount)
The number of targets for the command.
targetCount
- The number of targets for the command.Command.Builder completedCount(Integer completedCount)
The number of targets for which the command invocation reached a terminal state. Terminal states include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Canceled, Terminated, or Undeliverable.
completedCount
- The number of targets for which the command invocation reached a terminal state. Terminal states
include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Canceled, Terminated,
or Undeliverable.Command.Builder errorCount(Integer errorCount)
The number of targets for which the status is Failed or Execution Timed Out.
errorCount
- The number of targets for which the status is Failed or Execution Timed Out.Command.Builder serviceRole(String serviceRole)
The IAM service role that Run Command uses to act on your behalf when sending notifications about command status changes.
serviceRole
- The IAM service role that Run Command uses to act on your behalf when sending notifications about
command status changes.Command.Builder notificationConfig(NotificationConfig notificationConfig)
Configurations for sending notifications about command status changes.
notificationConfig
- Configurations for sending notifications about command status changes.default Command.Builder notificationConfig(Consumer<NotificationConfig.Builder> notificationConfig)
Configurations for sending notifications about command status changes.
This is a convenience that creates an instance of theNotificationConfig.Builder
avoiding the need to
create one manually via NotificationConfig.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its
result is passed to notificationConfig(NotificationConfig)
.notificationConfig
- a consumer that will call methods on NotificationConfig.Builder
notificationConfig(NotificationConfig)
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.