amazonka-ec2-1.6.1: Amazon Elastic Compute Cloud 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.EC2.CreateTags

Contents

Description

Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported Resource-Level Permissions for Amazon EC2 API Actions in the Amazon Elastic Compute Cloud User Guide .

Synopsis

Creating a Request

createTags :: CreateTags Source #

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

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

  • cDryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • cResources - The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
  • cTags - One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

data CreateTags Source #

Contains the parameters for CreateTags.

See: createTags smart constructor.

Instances
Eq CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Data CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Methods

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

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

toConstr :: CreateTags -> Constr #

dataTypeOf :: CreateTags -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Show CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Generic CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Associated Types

type Rep CreateTags :: Type -> Type #

Hashable CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

AWSRequest CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Associated Types

type Rs CreateTags :: Type #

ToHeaders CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Methods

toHeaders :: CreateTags -> [Header] #

ToPath CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

ToQuery CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

NFData CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Methods

rnf :: CreateTags -> () #

type Rep CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

type Rep CreateTags = D1 (MetaData "CreateTags" "Network.AWS.EC2.CreateTags" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "CreateTags'" PrefixI True) (S1 (MetaSel (Just "_cDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 (MetaSel (Just "_cResources") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Text]) :*: S1 (MetaSel (Just "_cTags") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Tag]))))
type Rs CreateTags Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Request Lenses

cDryRun :: Lens' CreateTags (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

cResources :: Lens' CreateTags [Text] Source #

The IDs of one or more resources to tag. For example, ami-1a2b3c4d.

cTags :: Lens' CreateTags [Tag] Source #

One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

Destructuring the Response

createTagsResponse :: CreateTagsResponse Source #

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

data CreateTagsResponse Source #

See: createTagsResponse smart constructor.

Instances
Eq CreateTagsResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Data CreateTagsResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Methods

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

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

toConstr :: CreateTagsResponse -> Constr #

dataTypeOf :: CreateTagsResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateTagsResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Show CreateTagsResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Generic CreateTagsResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Associated Types

type Rep CreateTagsResponse :: Type -> Type #

NFData CreateTagsResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

Methods

rnf :: CreateTagsResponse -> () #

type Rep CreateTagsResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateTags

type Rep CreateTagsResponse = D1 (MetaData "CreateTagsResponse" "Network.AWS.EC2.CreateTags" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "CreateTagsResponse'" PrefixI False) (U1 :: Type -> Type))