amazonka-resourcegroupstagging-2.0: Amazon Resource Groups Tagging API 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.ResourceGroupsTagging.UntagResources

Description

Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:

  • To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see the documentation for the service whose resource you want to untag.
  • You can only tag resources that are located in the specified Amazon Web Services Region for the calling Amazon Web Services account.

Minimum permissions

In addition to the tag:UntagResources permission required by this operation, you must also have the remove tags permission defined by the service that created the resource. For example, to remove the tags from an Amazon EC2 instance using the UntagResources operation, you must have both of the following permissions:

  • tag:UntagResource
  • ec2:DeleteTags
Synopsis

Creating a Request

data UntagResources Source #

See: newUntagResources smart constructor.

Constructors

UntagResources' 

Fields

Instances

Instances details
ToJSON UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

ToHeaders UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

ToPath UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

ToQuery UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

AWSRequest UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Associated Types

type AWSResponse UntagResources #

Generic UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Associated Types

type Rep UntagResources :: Type -> Type #

Read UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Show UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

NFData UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Methods

rnf :: UntagResources -> () #

Eq UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Hashable UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

type AWSResponse UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

type Rep UntagResources Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

type Rep UntagResources = D1 ('MetaData "UntagResources" "Amazonka.ResourceGroupsTagging.UntagResources" "amazonka-resourcegroupstagging-2.0-BMdZcHlIh2ABktMFQEVTUn" 'False) (C1 ('MetaCons "UntagResources'" 'PrefixI 'True) (S1 ('MetaSel ('Just "resourceARNList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)) :*: S1 ('MetaSel ('Just "tagKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text))))

newUntagResources Source #

Create a value of UntagResources 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:resourceARNList:UntagResources', untagResources_resourceARNList - Specifies a list of ARNs of the resources that you want to remove tags from.

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

$sel:tagKeys:UntagResources', untagResources_tagKeys - Specifies a list of tag keys that you want to remove from the specified resources.

Request Lenses

untagResources_resourceARNList :: Lens' UntagResources (NonEmpty Text) Source #

Specifies a list of ARNs of the resources that you want to remove tags from.

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

untagResources_tagKeys :: Lens' UntagResources (NonEmpty Text) Source #

Specifies a list of tag keys that you want to remove from the specified resources.

Destructuring the Response

data UntagResourcesResponse Source #

See: newUntagResourcesResponse smart constructor.

Constructors

UntagResourcesResponse' 

Fields

  • failedResourcesMap :: Maybe (HashMap Text FailureInfo)

    A map containing a key-value pair for each failed item that couldn't be untagged. The key is the ARN of the failed resource. The value is a FailureInfo object that contains an error code, a status code, and an error message. If there are no errors, the FailedResourcesMap is empty.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic UntagResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Associated Types

type Rep UntagResourcesResponse :: Type -> Type #

Read UntagResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Show UntagResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

NFData UntagResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

Methods

rnf :: UntagResourcesResponse -> () #

Eq UntagResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

type Rep UntagResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroupsTagging.UntagResources

type Rep UntagResourcesResponse = D1 ('MetaData "UntagResourcesResponse" "Amazonka.ResourceGroupsTagging.UntagResources" "amazonka-resourcegroupstagging-2.0-BMdZcHlIh2ABktMFQEVTUn" 'False) (C1 ('MetaCons "UntagResourcesResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "failedResourcesMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text FailureInfo))) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newUntagResourcesResponse Source #

Create a value of UntagResourcesResponse 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:failedResourcesMap:UntagResourcesResponse', untagResourcesResponse_failedResourcesMap - A map containing a key-value pair for each failed item that couldn't be untagged. The key is the ARN of the failed resource. The value is a FailureInfo object that contains an error code, a status code, and an error message. If there are no errors, the FailedResourcesMap is empty.

$sel:httpStatus:UntagResourcesResponse', untagResourcesResponse_httpStatus - The response's http status code.

Response Lenses

untagResourcesResponse_failedResourcesMap :: Lens' UntagResourcesResponse (Maybe (HashMap Text FailureInfo)) Source #

A map containing a key-value pair for each failed item that couldn't be untagged. The key is the ARN of the failed resource. The value is a FailureInfo object that contains an error code, a status code, and an error message. If there are no errors, the FailedResourcesMap is empty.