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

Copyright(c) 2013-2018 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 0. 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.
  • scDocumentVersion - The SSM document version to use in the request. You can specify Default, Latest, or a specific version number.
  • scTimeoutSeconds - If this time is reached and the command has not already started executing, it will not run.
  • 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 # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Data SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

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 # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Show SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Generic SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Associated Types

type Rep SendCommand :: Type -> Type #

Hashable SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

ToJSON SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

AWSRequest SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Associated Types

type Rs SendCommand :: Type #

ToHeaders SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Methods

toHeaders :: SendCommand -> [Header] #

ToPath SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

ToQuery SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

NFData SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Methods

rnf :: SendCommand -> () #

type Rep SendCommand Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

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

Defined in Network.AWS.SSM.SendCommand

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 0. 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.

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

The SSM document version to use in the request. You can specify Default, Latest, or a specific version number.

scTimeoutSeconds :: Lens' SendCommand (Maybe Natural) Source #

If this time is reached and the command has not already started executing, it will not run.

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 # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Data SendCommandResponse Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

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 # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Show SendCommandResponse Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Generic SendCommandResponse Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Associated Types

type Rep SendCommandResponse :: Type -> Type #

NFData SendCommandResponse Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

Methods

rnf :: SendCommandResponse -> () #

type Rep SendCommandResponse Source # 
Instance details

Defined in Network.AWS.SSM.SendCommand

type Rep SendCommandResponse = D1 (MetaData "SendCommandResponse" "Network.AWS.SSM.SendCommand" "amazonka-ssm-1.6.1-7PbnocxNW5qAr7pEvzAy6Q" False) (C1 (MetaCons "SendCommandResponse'" PrefixI True) (S1 (MetaSel (Just "_scrsCommand") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Command)) :*: S1 (MetaSel (Just "_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.