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

Amazonka.Lightsail.TagResource

Description

Adds one or more tags to the specified Amazon Lightsail resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see the Amazon Lightsail Developer Guide.

The tag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name. For more information, see the Amazon Lightsail Developer Guide.

Synopsis

Creating a Request

data TagResource Source #

See: newTagResource smart constructor.

Constructors

TagResource' 

Fields

  • resourceArn :: Maybe Text

    The Amazon Resource Name (ARN) of the resource to which you want to add a tag.

  • resourceName :: Text

    The name of the resource to which you are adding tags.

  • tags :: [Tag]

    The tag key and optional value.

Instances

Instances details
Eq TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Read TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Show TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Generic TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Associated Types

type Rep TagResource :: Type -> Type #

NFData TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Methods

rnf :: TagResource -> () #

Hashable TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

ToJSON TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

AWSRequest TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Associated Types

type AWSResponse TagResource #

ToHeaders TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Methods

toHeaders :: TagResource -> [Header] #

ToPath TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

ToQuery TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

type Rep TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

type Rep TagResource = D1 ('MetaData "TagResource" "Amazonka.Lightsail.TagResource" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "TagResource'" 'PrefixI 'True) (S1 ('MetaSel ('Just "resourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "resourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag]))))
type AWSResponse TagResource Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

newTagResource Source #

Create a value of TagResource with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:resourceArn:TagResource', tagResource_resourceArn - The Amazon Resource Name (ARN) of the resource to which you want to add a tag.

$sel:resourceName:TagResource', tagResource_resourceName - The name of the resource to which you are adding tags.

$sel:tags:TagResource', tagResource_tags - The tag key and optional value.

Request Lenses

tagResource_resourceArn :: Lens' TagResource (Maybe Text) Source #

The Amazon Resource Name (ARN) of the resource to which you want to add a tag.

tagResource_resourceName :: Lens' TagResource Text Source #

The name of the resource to which you are adding tags.

tagResource_tags :: Lens' TagResource [Tag] Source #

The tag key and optional value.

Destructuring the Response

data TagResourceResponse Source #

See: newTagResourceResponse smart constructor.

Constructors

TagResourceResponse' 

Fields

  • operations :: Maybe [Operation]

    An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq TagResourceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Read TagResourceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Show TagResourceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Generic TagResourceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Associated Types

type Rep TagResourceResponse :: Type -> Type #

NFData TagResourceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

Methods

rnf :: TagResourceResponse -> () #

type Rep TagResourceResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TagResource

type Rep TagResourceResponse = D1 ('MetaData "TagResourceResponse" "Amazonka.Lightsail.TagResource" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "TagResourceResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Operation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newTagResourceResponse Source #

Create a value of TagResourceResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:operations:TagResourceResponse', tagResourceResponse_operations - An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.

$sel:httpStatus:TagResourceResponse', tagResourceResponse_httpStatus - The response's http status code.

Response Lenses

tagResourceResponse_operations :: Lens' TagResourceResponse (Maybe [Operation]) Source #

An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.