amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.DescribeTags

Description

Describes the specified tags for your EC2 resources.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

This operation returns paginated results.

Synopsis

Creating a Request

data DescribeTags Source #

See: newDescribeTags smart constructor.

Constructors

DescribeTags' 

Fields

  • dryRun :: Maybe Bool

    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.

  • filters :: Maybe [Filter]

    The filters.

    • key - The tag key.
    • resource-id - The ID of the resource.
    • resource-type - The resource type (customer-gateway | dedicated-host | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | instance | internet-gateway | key-pair | launch-template | natgateway | network-acl | network-interface | placement-group | reserved-instances | route-table | security-group | snapshot | spot-instances-request | subnet | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway).
    • tag:<key> - The key/value combination of the tag. For example, specify "tag:Owner" for the filter name and "TeamA" for the filter value to find resources with the tag "Owner=TeamA".
    • value - The tag value.
  • maxResults :: Maybe Int

    The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • nextToken :: Maybe Text

    The token to retrieve the next page of results.

Instances

Instances details
ToHeaders DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

ToPath DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

ToQuery DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

AWSPager DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

AWSRequest DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Associated Types

type AWSResponse DescribeTags #

Generic DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Associated Types

type Rep DescribeTags :: Type -> Type #

Read DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Show DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

NFData DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Methods

rnf :: DescribeTags -> () #

Eq DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Hashable DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

type AWSResponse DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

type Rep DescribeTags Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

type Rep DescribeTags = D1 ('MetaData "DescribeTags" "Amazonka.EC2.DescribeTags" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DescribeTags'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Filter]))) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

newDescribeTags :: DescribeTags Source #

Create a value of DescribeTags 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:dryRun:DescribeTags', describeTags_dryRun - 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.

$sel:filters:DescribeTags', describeTags_filters - The filters.

  • key - The tag key.
  • resource-id - The ID of the resource.
  • resource-type - The resource type (customer-gateway | dedicated-host | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | instance | internet-gateway | key-pair | launch-template | natgateway | network-acl | network-interface | placement-group | reserved-instances | route-table | security-group | snapshot | spot-instances-request | subnet | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway).
  • tag:<key> - The key/value combination of the tag. For example, specify "tag:Owner" for the filter name and "TeamA" for the filter value to find resources with the tag "Owner=TeamA".
  • value - The tag value.

$sel:maxResults:DescribeTags', describeTags_maxResults - The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

DescribeTags, describeTags_nextToken - The token to retrieve the next page of results.

Request Lenses

describeTags_dryRun :: Lens' DescribeTags (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.

describeTags_filters :: Lens' DescribeTags (Maybe [Filter]) Source #

The filters.

  • key - The tag key.
  • resource-id - The ID of the resource.
  • resource-type - The resource type (customer-gateway | dedicated-host | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | instance | internet-gateway | key-pair | launch-template | natgateway | network-acl | network-interface | placement-group | reserved-instances | route-table | security-group | snapshot | spot-instances-request | subnet | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway).
  • tag:<key> - The key/value combination of the tag. For example, specify "tag:Owner" for the filter name and "TeamA" for the filter value to find resources with the tag "Owner=TeamA".
  • value - The tag value.

describeTags_maxResults :: Lens' DescribeTags (Maybe Int) Source #

The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

describeTags_nextToken :: Lens' DescribeTags (Maybe Text) Source #

The token to retrieve the next page of results.

Destructuring the Response

data DescribeTagsResponse Source #

See: newDescribeTagsResponse smart constructor.

Constructors

DescribeTagsResponse' 

Fields

Instances

Instances details
Generic DescribeTagsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Associated Types

type Rep DescribeTagsResponse :: Type -> Type #

Read DescribeTagsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Show DescribeTagsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

NFData DescribeTagsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

Methods

rnf :: DescribeTagsResponse -> () #

Eq DescribeTagsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

type Rep DescribeTagsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeTags

type Rep DescribeTagsResponse = D1 ('MetaData "DescribeTagsResponse" "Amazonka.EC2.DescribeTags" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DescribeTagsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagDescription])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newDescribeTagsResponse Source #

Create a value of DescribeTagsResponse 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:

DescribeTags, describeTagsResponse_nextToken - The token to use to retrieve the next page of results. This value is null when there are no more results to return.

DescribeTagsResponse, describeTagsResponse_tags - The tags.

$sel:httpStatus:DescribeTagsResponse', describeTagsResponse_httpStatus - The response's http status code.

Response Lenses

describeTagsResponse_nextToken :: Lens' DescribeTagsResponse (Maybe Text) Source #

The token to use to retrieve the next page of results. This value is null when there are no more results to return.