Interface Command.Builder

    • Method Detail

      • commandId

        Command.Builder commandId​(String commandId)

        A unique identifier for this command.

        Parameters:
        commandId - A unique identifier for this command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • documentName

        Command.Builder documentName​(String documentName)

        The name of the document requested for execution.

        Parameters:
        documentName - The name of the document requested for execution.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • documentVersion

        Command.Builder documentVersion​(String documentVersion)

        The Systems Manager document (SSM document) version.

        Parameters:
        documentVersion - The Systems Manager document (SSM document) version.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • comment

        Command.Builder comment​(String comment)

        User-specified information about the command, such as a brief description of what the command should do.

        Parameters:
        comment - User-specified information about the command, such as a brief description of what the command should do.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • expiresAfter

        Command.Builder expiresAfter​(Instant expiresAfter)

        If a command expires, it changes status to DeliveryTimedOut for all invocations that have the status InProgress, Pending, or Delayed. ExpiresAfter is calculated based on the total timeout for the overall command. For more information, see Understanding command timeout values in the Amazon Web Services Systems Manager User Guide.

        Parameters:
        expiresAfter - If a command expires, it changes status to DeliveryTimedOut for all invocations that have the status InProgress, Pending, or Delayed. ExpiresAfter is calculated based on the total timeout for the overall command. For more information, see Understanding command timeout values in the Amazon Web Services Systems Manager User Guide.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • parameters

        Command.Builder parameters​(Map<String,​? extends Collection<String>> parameters)

        The parameter values to be inserted in the document when running the command.

        Parameters:
        parameters - The parameter values to be inserted in the document when running the command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • instanceIds

        Command.Builder instanceIds​(Collection<String> instanceIds)

        The managed node IDs against which this command was requested.

        Parameters:
        instanceIds - The managed node IDs against which this command was requested.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • instanceIds

        Command.Builder instanceIds​(String... instanceIds)

        The managed node IDs against which this command was requested.

        Parameters:
        instanceIds - The managed node IDs against which this command was requested.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • targets

        Command.Builder targets​(Collection<Target> targets)

        An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.

        Parameters:
        targets - An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • targets

        Command.Builder targets​(Target... targets)

        An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.

        Parameters:
        targets - An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • targets

        Command.Builder targets​(Consumer<Target.Builder>... targets)

        An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.

        This is a convenience method that creates an instance of the Target.Builder avoiding the need to create one manually via Target.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #targets(List).

        Parameters:
        targets - a consumer that will call methods on Target.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #targets(java.util.Collection)
      • requestedDateTime

        Command.Builder requestedDateTime​(Instant requestedDateTime)

        The date and time the command was requested.

        Parameters:
        requestedDateTime - The date and time the command was requested.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • status

        Command.Builder status​(String status)

        The status of the command.

        Parameters:
        status - The status of the command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        CommandStatus, CommandStatus
      • statusDetails

        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 Understanding command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the following values:

        • Pending: The command hasn't been sent to any managed nodes.

        • In Progress: The command has been sent to at least one managed node but hasn't reached a final state on all managed nodes.

        • Success: The command successfully ran 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 managed nodes and one or more invocations doesn't have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.

        • Cancelled: The command was terminated before it was completed. This is a terminal state.

        • Rate Exceeded: The number of managed nodes targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before running it on any managed node. This is a terminal state.

        • Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.

        Parameters:
        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 Understanding command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the following values:

        • Pending: The command hasn't been sent to any managed nodes.

        • In Progress: The command has been sent to at least one managed node but hasn't reached a final state on all managed nodes.

        • Success: The command successfully ran 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 managed nodes and one or more invocations doesn't have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.

        • Cancelled: The command was terminated before it was completed. This is a terminal state.

        • Rate Exceeded: The number of managed nodes targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before running it on any managed node. This is a terminal state.

        • Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • outputS3Region

        Command.Builder outputS3Region​(String outputS3Region)

        (Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon Web Services Region of the S3 bucket.

        Parameters:
        outputS3Region - (Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon Web Services Region of the S3 bucket.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • outputS3BucketName

        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.

        Parameters:
        outputS3BucketName - The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • outputS3KeyPrefix

        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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • maxConcurrency

        Command.Builder maxConcurrency​(String maxConcurrency)

        The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number of managed nodes, such as 10, or a percentage of nodes, such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.

        Parameters:
        maxConcurrency - The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number of managed nodes, such as 10, or a percentage of nodes, such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • maxErrors

        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 0. For more information about how to use MaxErrors, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.

        Parameters:
        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 0. For more information about how to use MaxErrors, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • targetCount

        Command.Builder targetCount​(Integer targetCount)

        The number of targets for the command.

        Parameters:
        targetCount - The number of targets for the command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • completedCount

        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, Cancelled, Terminated, or Undeliverable.

        Parameters:
        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, Cancelled, Terminated, or Undeliverable.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • errorCount

        Command.Builder errorCount​(Integer errorCount)

        The number of targets for which the status is Failed or Execution Timed Out.

        Parameters:
        errorCount - The number of targets for which the status is Failed or Execution Timed Out.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • deliveryTimedOutCount

        Command.Builder deliveryTimedOutCount​(Integer deliveryTimedOutCount)

        The number of targets for which the status is Delivery Timed Out.

        Parameters:
        deliveryTimedOutCount - The number of targets for which the status is Delivery Timed Out.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • serviceRole

        Command.Builder serviceRole​(String serviceRole)

        The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes.

        Parameters:
        serviceRole - The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • notificationConfig

        Command.Builder notificationConfig​(NotificationConfig notificationConfig)

        Configurations for sending notifications about command status changes.

        Parameters:
        notificationConfig - Configurations for sending notifications about command status changes.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • cloudWatchOutputConfig

        Command.Builder cloudWatchOutputConfig​(CloudWatchOutputConfig cloudWatchOutputConfig)

        Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.

        Parameters:
        cloudWatchOutputConfig - Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • timeoutSeconds

        Command.Builder timeoutSeconds​(Integer timeoutSeconds)

        The TimeoutSeconds value specified for a command.

        Parameters:
        timeoutSeconds - The TimeoutSeconds value specified for a command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • alarmConfiguration

        Command.Builder alarmConfiguration​(AlarmConfiguration alarmConfiguration)

        The details for the CloudWatch alarm applied to your command.

        Parameters:
        alarmConfiguration - The details for the CloudWatch alarm applied to your command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • triggeredAlarms

        Command.Builder triggeredAlarms​(Collection<AlarmStateInformation> triggeredAlarms)

        The CloudWatch alarm that was invoked by the command.

        Parameters:
        triggeredAlarms - The CloudWatch alarm that was invoked by the command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • triggeredAlarms

        Command.Builder triggeredAlarms​(AlarmStateInformation... triggeredAlarms)

        The CloudWatch alarm that was invoked by the command.

        Parameters:
        triggeredAlarms - The CloudWatch alarm that was invoked by the command.
        Returns:
        Returns a reference to this object so that method calls can be chained together.