amazonka-ssm-1.5.0: Amazon Simple Systems Manager (SSM) SDK.

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SSM.SendCommand

Contents

Description

Executes commands on one or more managed instances.

Synopsis

Creating a Request

sendCommand Source #

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 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 Using Error Controls .
  • scInstanceIds - The instance IDs where the command should execute. You can specify a maximum of 50 IDs. If you prefer not to list individual instance IDs, you can instead send commands to a fleet of instances using the Targets parameter, which accepts EC2 tags. For more information about how to use Targets, see Sending Commands to a Fleet .
  • scOutputS3Region - (Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon S3 bucket region.
  • scTargets - (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 Sending Commands to a Fleet .
  • scParameters - The required and optional parameters specified in the 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 use MaxConcurrency, see Using Concurrency Controls .
  • scDocumentName - Required. The name of the Systems Manager document to execute. This can be a public document or a custom document.

data SendCommand Source #

See: sendCommand smart constructor.

Instances

Eq SendCommand Source # 
Data SendCommand Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SendCommand -> c SendCommand #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SendCommand #

toConstr :: SendCommand -> Constr #

dataTypeOf :: SendCommand -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SendCommand) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SendCommand) #

gmapT :: (forall b. Data b => b -> b) -> SendCommand -> SendCommand #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SendCommand -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SendCommand -> r #

gmapQ :: (forall d. Data d => d -> u) -> SendCommand -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SendCommand -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SendCommand -> m SendCommand #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SendCommand -> m SendCommand #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SendCommand -> m SendCommand #

Read SendCommand Source # 
Show SendCommand Source # 
Generic SendCommand Source # 

Associated Types

type Rep SendCommand :: * -> * #

Hashable SendCommand Source # 
ToJSON SendCommand Source # 
NFData SendCommand Source # 

Methods

rnf :: SendCommand -> () #

AWSRequest SendCommand Source # 
ToQuery SendCommand Source # 
ToPath SendCommand Source # 
ToHeaders SendCommand Source # 

Methods

toHeaders :: SendCommand -> [Header] #

type Rep SendCommand Source # 
type Rep SendCommand = D1 (MetaData "SendCommand" "Network.AWS.SSM.SendCommand" "amazonka-ssm-1.5.0-7otWUS4XVRaHT5J0sMcEDs" False) (C1 (MetaCons "SendCommand'" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_scServiceRoleARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_scNotificationConfig") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe NotificationConfig))) (S1 (MetaSel (Just Symbol "_scDocumentHashType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe DocumentHashType))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_scOutputS3KeyPrefix") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_scMaxErrors") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_scInstanceIds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Text]))) (S1 (MetaSel (Just Symbol "_scOutputS3Region") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_scTargets") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Target]))) (S1 (MetaSel (Just Symbol "_scParameters") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text [Text]))))) ((:*:) (S1 (MetaSel (Just Symbol "_scDocumentHash") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_scTimeoutSeconds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_scComment") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_scOutputS3BucketName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_scMaxConcurrency") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_scDocumentName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))))
type Rs SendCommand Source # 

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.

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 Using Error Controls .

scInstanceIds :: Lens' SendCommand [Text] Source #

The instance IDs where the command should execute. You can specify a maximum of 50 IDs. If you prefer not to list individual instance IDs, you can instead send commands to a fleet of instances using the Targets parameter, which accepts EC2 tags. For more information about how to use Targets, see Sending Commands to a Fleet .

scOutputS3Region :: Lens' SendCommand (Maybe Text) Source #

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

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 Sending Commands to a Fleet .

scParameters :: Lens' SendCommand (HashMap Text [Text]) Source #

The required and optional parameters specified in the 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 Using Concurrency Controls .

scDocumentName :: Lens' SendCommand Text Source #

Required. The name of the Systems Manager document to execute. This can be a public document or a custom document.

Destructuring the Response

sendCommandResponse Source #

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.

Instances

Eq SendCommandResponse Source # 
Data SendCommandResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SendCommandResponse -> c SendCommandResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SendCommandResponse #

toConstr :: SendCommandResponse -> Constr #

dataTypeOf :: SendCommandResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SendCommandResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SendCommandResponse) #

gmapT :: (forall b. Data b => b -> b) -> SendCommandResponse -> SendCommandResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SendCommandResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SendCommandResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> SendCommandResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SendCommandResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SendCommandResponse -> m SendCommandResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SendCommandResponse -> m SendCommandResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SendCommandResponse -> m SendCommandResponse #

Read SendCommandResponse Source # 
Show SendCommandResponse Source # 
Generic SendCommandResponse Source # 
NFData SendCommandResponse Source # 

Methods

rnf :: SendCommandResponse -> () #

type Rep SendCommandResponse Source # 
type Rep SendCommandResponse = D1 (MetaData "SendCommandResponse" "Network.AWS.SSM.SendCommand" "amazonka-ssm-1.5.0-7otWUS4XVRaHT5J0sMcEDs" False) (C1 (MetaCons "SendCommandResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_scrsCommand") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Command))) (S1 (MetaSel (Just Symbol "_scrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

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.