Class SendCommandRequest
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<SendCommandRequest.Builder,
SendCommandRequest>
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal AlarmConfiguration
The CloudWatch alarm you want to apply to your command.static SendCommandRequest.Builder
builder()
final CloudWatchOutputConfig
Enables Amazon Web Services Systems Manager to send Run Command output to Amazon CloudWatch Logs.final String
comment()
User-specified information about the command, such as a brief description of what the command should do.final String
The Sha256 or Sha1 hash created by the system when the document was created.final DocumentHashType
Sha256 or Sha1.final String
Sha256 or Sha1.final String
The name of the Amazon Web Services Systems Manager document (SSM document) to run.final String
The SSM document version to use in the request.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkRequest
.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the InstanceIds property.final boolean
For responses, this returns true if the service returned a value for the Parameters property.final boolean
For responses, this returns true if the service returned a value for the Targets property.The IDs of the managed nodes where the command should run.final String
(Optional) The maximum number of managed nodes that are allowed to run the command at the same time.final String
The maximum number of errors allowed without the command failing.final NotificationConfig
Configurations for sending notifications.final String
The name of the S3 bucket where command execution responses should be stored.final String
The directory structure within the S3 bucket where the responses should be stored.final String
(Deprecated) You can no longer specify this parameter.The required and optional parameters specified in the document being run.static Class
<? extends SendCommandRequest.Builder> final String
The ARN of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for Run Command commands.targets()
An array of search criteria that targets managed nodes using aKey,Value
combination that you specify.final Integer
If this time is reached and the command hasn't already started running, it won't run.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
hasInstanceIds
public final boolean hasInstanceIds()For responses, this returns true if the service returned a value for the InstanceIds property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
instanceIds
The IDs of the managed nodes where the command should run. Specifying managed node IDs is most useful when you are targeting a limited number of managed nodes, though you can specify up to 50 IDs.
To target a larger number of managed nodes, or if you prefer not to list individual node IDs, we recommend using the
Targets
option instead. UsingTargets
, which accepts tag key-value pairs to identify the managed nodes to send commands to, you can a send command to tens, hundreds, or thousands of nodes at once.For more information about how to use targets, see Run commands at scale in the Amazon Web Services Systems Manager User Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInstanceIds()
method.- Returns:
- The IDs of the managed nodes where the command should run. Specifying managed node IDs is most useful
when you are targeting a limited number of managed nodes, though you can specify up to 50 IDs.
To target a larger number of managed nodes, or if you prefer not to list individual node IDs, we recommend using the
Targets
option instead. UsingTargets
, which accepts tag key-value pairs to identify the managed nodes to send commands to, you can a send command to tens, hundreds, or thousands of nodes at once.For more information about how to use targets, see Run commands at scale in the Amazon Web Services Systems Manager User Guide.
-
hasTargets
public final boolean hasTargets()For responses, this returns true if the service returned a value for the Targets property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
targets
An array of search criteria that targets managed nodes using a
Key,Value
combination that you specify. Specifying targets is most useful when you want to send a command to a large number of managed nodes at once. UsingTargets
, which accepts tag key-value pairs to identify managed nodes, you can send a command to tens, hundreds, or thousands of nodes at once.To send a command to a smaller number of managed nodes, you can use the
InstanceIds
option instead.For more information about how to use targets, see Run commands at scale in the Amazon Web Services Systems Manager User Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTargets()
method.- Returns:
- An array of search criteria that targets managed nodes using a
Key,Value
combination that you specify. Specifying targets is most useful when you want to send a command to a large number of managed nodes at once. UsingTargets
, which accepts tag key-value pairs to identify managed nodes, you can send a command to tens, hundreds, or thousands of nodes at once.To send a command to a smaller number of managed nodes, you can use the
InstanceIds
option instead.For more information about how to use targets, see Run commands at scale in the Amazon Web Services Systems Manager User Guide.
-
documentName
The name of the Amazon Web Services Systems Manager document (SSM document) to run. This can be a public document or a custom document. To run a shared document belonging to another account, specify the document Amazon Resource Name (ARN). For more information about how to use shared documents, see Sharing SSM documents in the Amazon Web Services Systems Manager User Guide.
If you specify a document name or ARN that hasn't been shared with your account, you receive an
InvalidDocument
error.- Returns:
- The name of the Amazon Web Services Systems Manager document (SSM document) to run. This can be a public
document or a custom document. To run a shared document belonging to another account, specify the
document Amazon Resource Name (ARN). For more information about how to use shared documents, see Sharing SSM
documents in the Amazon Web Services Systems Manager User Guide.
If you specify a document name or ARN that hasn't been shared with your account, you receive an
InvalidDocument
error.
-
documentVersion
The SSM document version to use in the request. You can specify $DEFAULT, $LATEST, or a specific version number. If you run commands by using the Command Line Interface (Amazon Web Services CLI), then you must escape the first two options by using a backslash. If you specify a version number, then you don't need to use the backslash. For example:
--document-version "\$DEFAULT"
--document-version "\$LATEST"
--document-version "3"
- Returns:
- The SSM document version to use in the request. You can specify $DEFAULT, $LATEST, or a specific version
number. If you run commands by using the Command Line Interface (Amazon Web Services CLI), then you must
escape the first two options by using a backslash. If you specify a version number, then you don't need
to use the backslash. For example:
--document-version "\$DEFAULT"
--document-version "\$LATEST"
--document-version "3"
-
documentHash
The Sha256 or Sha1 hash created by the system when the document was created.
Sha1 hashes have been deprecated.
- Returns:
- The Sha256 or Sha1 hash created by the system when the document was created.
Sha1 hashes have been deprecated.
-
documentHashType
Sha256 or Sha1.
Sha1 hashes have been deprecated.
If the service returns an enum value that is not available in the current SDK version,
documentHashType
will returnDocumentHashType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdocumentHashTypeAsString()
.- Returns:
- Sha256 or Sha1.
Sha1 hashes have been deprecated.
- See Also:
-
documentHashTypeAsString
Sha256 or Sha1.
Sha1 hashes have been deprecated.
If the service returns an enum value that is not available in the current SDK version,
documentHashType
will returnDocumentHashType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdocumentHashTypeAsString()
.- Returns:
- Sha256 or Sha1.
Sha1 hashes have been deprecated.
- See Also:
-
timeoutSeconds
If this time is reached and the command hasn't already started running, it won't run.
- Returns:
- If this time is reached and the command hasn't already started running, it won't run.
-
comment
User-specified information about the command, such as a brief description of what the command should do.
- Returns:
- User-specified information about the command, such as a brief description of what the command should do.
-
hasParameters
public final boolean hasParameters()For responses, this returns true if the service returned a value for the Parameters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
parameters
The required and optional parameters specified in the document being run.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasParameters()
method.- Returns:
- The required and optional parameters specified in the document being run.
-
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:
- (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.
-
outputS3BucketName
The name of the S3 bucket where command execution responses should be stored.
- Returns:
- The name of the S3 bucket where command execution responses should be stored.
-
outputS3KeyPrefix
The directory structure within the S3 bucket where the responses should be stored.
- Returns:
- The directory structure within the S3 bucket where the responses should be stored.
-
maxConcurrency
(Optional) The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number such as 10 or a percentage such as 10%. The default value is
50
. For more information about how to useMaxConcurrency
, see Using concurrency controls in the Amazon Web Services Systems Manager User Guide.- Returns:
- (Optional) The maximum number of managed nodes that are allowed to run the command at the same time. You
can specify a number such as 10 or a percentage such as 10%. The default value is
50
. For more information about how to useMaxConcurrency
, see Using concurrency controls in the Amazon Web Services Systems Manager User Guide.
-
maxErrors
The maximum number of errors allowed without the command failing. When the command fails one more time beyond the value of
MaxErrors
, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 10%. The default value is0
. For more information about how to useMaxErrors
, see Using error controls in the Amazon Web Services Systems Manager User Guide.- Returns:
- The maximum number of errors allowed without the command failing. When the command fails one more time
beyond the value of
MaxErrors
, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 10%. The default value is0
. For more information about how to useMaxErrors
, see Using error controls in the Amazon Web Services Systems Manager User Guide.
-
serviceRoleArn
The ARN of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for Run Command commands.
This role must provide the
sns:Publish
permission for your notification topic. For information about creating and using this service role, see Monitoring Systems Manager status changes using Amazon SNS notifications in the Amazon Web Services Systems Manager User Guide.- Returns:
- The ARN of the Identity and Access Management (IAM) service role to use to publish Amazon Simple
Notification Service (Amazon SNS) notifications for Run Command commands.
This role must provide the
sns:Publish
permission for your notification topic. For information about creating and using this service role, see Monitoring Systems Manager status changes using Amazon SNS notifications in the Amazon Web Services Systems Manager User Guide.
-
notificationConfig
Configurations for sending notifications.
- Returns:
- Configurations for sending notifications.
-
cloudWatchOutputConfig
Enables Amazon Web Services Systems Manager to send Run Command output to Amazon CloudWatch Logs. Run Command is a capability of Amazon Web Services Systems Manager.
- Returns:
- Enables Amazon Web Services Systems Manager to send Run Command output to Amazon CloudWatch Logs. Run Command is a capability of Amazon Web Services Systems Manager.
-
alarmConfiguration
The CloudWatch alarm you want to apply to your command.
- Returns:
- The CloudWatch alarm you want to apply to your command.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<SendCommandRequest.Builder,
SendCommandRequest> - Specified by:
toBuilder
in classSsmRequest
- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCode
in classAwsRequest
-
equals
- Overrides:
equals
in classAwsRequest
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
Description copied from class:SdkRequest
Used to retrieve the value of a field from any class that extendsSdkRequest
. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkRequest.getValueForField(String, Class)
method will again be available.- Overrides:
getValueForField
in classSdkRequest
- Parameters:
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-