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

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

Network.AWS.SSM.CreateAssociation

Contents

Description

Associates the specified SSM document with the specified instances or targets.

When you associate an SSM document with one or more instances using instance IDs or tags, the SSM agent running on the instance processes the document and configures the instance as specified.

If you associate a document with an instance that already has an associated document, the system throws the AssociationAlreadyExists exception.

Synopsis

Creating a Request

createAssociation #

Creates a value of CreateAssociation with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • caInstanceId - The instance ID.
  • caScheduleExpression - A cron expression when the association will be applied to the target(s). Supported expressions are every half, 1, 2, 4, 8 or 12 hour(s); every specified day and time of the week. For example: cron(0 030 * 11 * ? *) to run every thirty minutes; cron(0 0 04 11 * ? *) to run every four hours; and cron(0 0 10 ? * SUN *) to run every Sunday at 10 a.m.
  • caOutputLocation - An Amazon S3 bucket where you want to store the output details of the request. For example: "{ "S3Location": { "OutputS3Region": "region", "OutputS3BucketName": "bucket name", "OutputS3KeyPrefix": "folder name" } }"
  • caTargets - The targets (either instances or tags) for the association. Instances are specified using Key=instanceids,Values=instanceid1,instanceid2. Tags are specified using Key=name,Values=value.
  • caParameters - The parameters for the documents runtime configuration.
  • caDocumentVersion - The document version you want to associate with the target(s). Can be a specific version or the default version.
  • caName - The name of the SSM document.

data CreateAssociation #

See: createAssociation smart constructor.

Instances

Eq CreateAssociation # 
Data CreateAssociation # 

Methods

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

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

toConstr :: CreateAssociation -> Constr #

dataTypeOf :: CreateAssociation -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateAssociation # 
Show CreateAssociation # 
Generic CreateAssociation # 
Hashable CreateAssociation # 
ToJSON CreateAssociation # 
NFData CreateAssociation # 

Methods

rnf :: CreateAssociation -> () #

AWSRequest CreateAssociation # 
ToQuery CreateAssociation # 
ToPath CreateAssociation # 
ToHeaders CreateAssociation # 
type Rep CreateAssociation # 
type Rs CreateAssociation # 

Request Lenses

caScheduleExpression :: Lens' CreateAssociation (Maybe Text) #

A cron expression when the association will be applied to the target(s). Supported expressions are every half, 1, 2, 4, 8 or 12 hour(s); every specified day and time of the week. For example: cron(0 030 * 11 * ? *) to run every thirty minutes; cron(0 0 04 11 * ? *) to run every four hours; and cron(0 0 10 ? * SUN *) to run every Sunday at 10 a.m.

caOutputLocation :: Lens' CreateAssociation (Maybe InstanceAssociationOutputLocation) #

An Amazon S3 bucket where you want to store the output details of the request. For example: "{ "S3Location": { "OutputS3Region": "region", "OutputS3BucketName": "bucket name", "OutputS3KeyPrefix": "folder name" } }"

caTargets :: Lens' CreateAssociation [Target] #

The targets (either instances or tags) for the association. Instances are specified using Key=instanceids,Values=instanceid1,instanceid2. Tags are specified using Key=name,Values=value.

caParameters :: Lens' CreateAssociation (HashMap Text [Text]) #

The parameters for the documents runtime configuration.

caDocumentVersion :: Lens' CreateAssociation (Maybe Text) #

The document version you want to associate with the target(s). Can be a specific version or the default version.

caName :: Lens' CreateAssociation Text #

The name of the SSM document.

Destructuring the Response

createAssociationResponse #

Creates a value of CreateAssociationResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateAssociationResponse #

See: createAssociationResponse smart constructor.

Instances

Eq CreateAssociationResponse # 
Data CreateAssociationResponse # 

Methods

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

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

toConstr :: CreateAssociationResponse -> Constr #

dataTypeOf :: CreateAssociationResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateAssociationResponse # 
Show CreateAssociationResponse # 
Generic CreateAssociationResponse # 
NFData CreateAssociationResponse # 
type Rep CreateAssociationResponse # 
type Rep CreateAssociationResponse = D1 (MetaData "CreateAssociationResponse" "Network.AWS.SSM.CreateAssociation" "amazonka-ssm-1.4.5-1XugwZI5i6oEK9zpTg7Crt" False) (C1 (MetaCons "CreateAssociationResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_crsAssociationDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AssociationDescription))) (S1 (MetaSel (Just Symbol "_crsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

crsResponseStatus :: Lens' CreateAssociationResponse Int #

  • - | The response status code.