| Copyright | (c) 2013-2016 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.SSM.SendCommand
Description
Executes commands on one or more remote instances.
- sendCommand :: Text -> SendCommand
- data SendCommand
- scServiceRoleARN :: Lens' SendCommand (Maybe Text)
- scNotificationConfig :: Lens' SendCommand (Maybe NotificationConfig)
- scDocumentHashType :: Lens' SendCommand (Maybe DocumentHashType)
- scOutputS3KeyPrefix :: Lens' SendCommand (Maybe Text)
- scMaxErrors :: Lens' SendCommand (Maybe Text)
- scInstanceIds :: Lens' SendCommand [Text]
- scOutputS3Region :: Lens' SendCommand (Maybe Text)
- scTargets :: Lens' SendCommand [Target]
- scParameters :: Lens' SendCommand (HashMap Text [Text])
- scDocumentHash :: Lens' SendCommand (Maybe Text)
- scTimeoutSeconds :: Lens' SendCommand (Maybe Natural)
- scComment :: Lens' SendCommand (Maybe Text)
- scOutputS3BucketName :: Lens' SendCommand (Maybe Text)
- scMaxConcurrency :: Lens' SendCommand (Maybe Text)
- scDocumentName :: Lens' SendCommand Text
- sendCommandResponse :: Int -> SendCommandResponse
- data SendCommandResponse
- scrsCommand :: Lens' SendCommandResponse (Maybe Command)
- scrsResponseStatus :: Lens' SendCommandResponse Int
Creating a Request
Arguments
| :: Text | |
| -> SendCommand |
Creates a value of SendCommand with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
scServiceRoleARN- The IAM role that Systems Manager uses to send notifications.scNotificationConfig- Configurations for sending notifications.scDocumentHashType- Sha256 or Sha1.scOutputS3KeyPrefix- The directory structure within the S3 bucket where the responses should be stored.scMaxErrors- The maximum number of errors allowed without the command failing. When the command fails one more time beyond the value ofMaxErrors, the systems stops sending the command to additional targets. You can specify a number like “10” or a percentage like “10%”. The default value is 50. For more information about how to useMaxErrors, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).scInstanceIds- Required. The instance IDs where the command should execute. You can specify a maximum of 50 IDs.scOutputS3Region- (Optional) The region where the Amazon Simple Storage Service (Amazon S3) output bucket is located. The default value is the region where Run Command is being called.scTargets- (Optional) An array of search criteria that targets instances using aKey;Valuecombination that you specify.Targetsis required if you don't provide one or more instance IDs in the call. For more information about how to useTargets, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).scParameters- The required and optional parameters specified in the SSM document being executed.scDocumentHash- The Sha256 or Sha1 hash created by the system when the document was created.scTimeoutSeconds- If this time is reached and the command has not already started executing, it will not execute.scComment- User-specified information about the command, such as a brief description of what the command should do.scOutputS3BucketName- The name of the S3 bucket where command execution responses should be stored.scMaxConcurrency- (Optional) The maximum number of instances that are allowed to execute 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 Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).scDocumentName- Required. The name of the SSM document to execute. This can be an SSM public document or a custom document.
data SendCommand Source #
See: sendCommand smart constructor.
Instances
Request Lenses
scServiceRoleARN :: Lens' SendCommand (Maybe Text) Source #
The IAM role that Systems Manager uses to send notifications.
scNotificationConfig :: Lens' SendCommand (Maybe NotificationConfig) Source #
Configurations for sending notifications.
scDocumentHashType :: Lens' SendCommand (Maybe DocumentHashType) Source #
Sha256 or Sha1.
scOutputS3KeyPrefix :: Lens' SendCommand (Maybe Text) Source #
The directory structure within the S3 bucket where the responses should be stored.
scMaxErrors :: Lens' SendCommand (Maybe Text) Source #
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 is 50. For more information about how to use MaxErrors , see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
scInstanceIds :: Lens' SendCommand [Text] Source #
Required. The instance IDs where the command should execute. You can specify a maximum of 50 IDs.
scOutputS3Region :: Lens' SendCommand (Maybe Text) Source #
(Optional) The region where the Amazon Simple Storage Service (Amazon S3) output bucket is located. The default value is the region where Run Command is being called.
scTargets :: Lens' SendCommand [Target] Source #
(Optional) 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. For more information about how to use Targets , see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
scParameters :: Lens' SendCommand (HashMap Text [Text]) Source #
The required and optional parameters specified in the SSM document being executed.
scDocumentHash :: Lens' SendCommand (Maybe Text) Source #
The Sha256 or Sha1 hash created by the system when the document was created.
scTimeoutSeconds :: Lens' SendCommand (Maybe Natural) Source #
If this time is reached and the command has not already started executing, it will not execute.
scComment :: Lens' SendCommand (Maybe Text) Source #
User-specified information about the command, such as a brief description of what the command should do.
scOutputS3BucketName :: Lens' SendCommand (Maybe Text) Source #
The name of the S3 bucket where command execution responses should be stored.
scMaxConcurrency :: Lens' SendCommand (Maybe Text) Source #
(Optional) The maximum number of instances that are allowed to execute 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 use MaxConcurrency , see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
scDocumentName :: Lens' SendCommand Text Source #
Required. The name of the SSM document to execute. This can be an SSM public document or a custom document.
Destructuring the Response
Arguments
| :: Int | |
| -> SendCommandResponse |
Creates a value of SendCommandResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
scrsCommand- The request as it was received by Systems Manager. Also provides the command ID which can be used future references to this request.scrsResponseStatus- -- | The response status code.
data SendCommandResponse Source #
See: sendCommandResponse smart constructor.
Response Lenses
scrsCommand :: Lens' SendCommandResponse (Maybe Command) Source #
The request as it was received by Systems Manager. Also provides the command ID which can be used future references to this request.
scrsResponseStatus :: Lens' SendCommandResponse Int Source #
- - | The response status code.