{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.MediaConvert.UntagResource -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Remove tags from a MediaConvert queue, preset, or job template. For -- information about tagging, see the User Guide at -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/tagging-resources.html module Amazonka.MediaConvert.UntagResource ( -- * Creating a Request UntagResource (..), newUntagResource, -- * Request Lenses untagResource_tagKeys, untagResource_arn, -- * Destructuring the Response UntagResourceResponse (..), newUntagResourceResponse, -- * Response Lenses untagResourceResponse_httpStatus, ) where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import Amazonka.MediaConvert.Types import qualified Amazonka.Prelude as Prelude import qualified Amazonka.Request as Request import qualified Amazonka.Response as Response -- | /See:/ 'newUntagResource' smart constructor. data UntagResource = UntagResource' { -- | The keys of the tags that you want to remove from the resource. tagKeys :: Prelude.Maybe [Prelude.Text], -- | The Amazon Resource Name (ARN) of the resource that you want to remove -- tags from. To get the ARN, send a GET request with the resource name. arn :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'UntagResource' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'tagKeys', 'untagResource_tagKeys' - The keys of the tags that you want to remove from the resource. -- -- 'arn', 'untagResource_arn' - The Amazon Resource Name (ARN) of the resource that you want to remove -- tags from. To get the ARN, send a GET request with the resource name. newUntagResource :: -- | 'arn' Prelude.Text -> UntagResource newUntagResource pArn_ = UntagResource' { tagKeys = Prelude.Nothing, arn = pArn_ } -- | The keys of the tags that you want to remove from the resource. untagResource_tagKeys :: Lens.Lens' UntagResource (Prelude.Maybe [Prelude.Text]) untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.mapping Lens.coerced -- | The Amazon Resource Name (ARN) of the resource that you want to remove -- tags from. To get the ARN, send a GET request with the resource name. untagResource_arn :: Lens.Lens' UntagResource Prelude.Text untagResource_arn = Lens.lens (\UntagResource' {arn} -> arn) (\s@UntagResource' {} a -> s {arn = a} :: UntagResource) instance Core.AWSRequest UntagResource where type AWSResponse UntagResource = UntagResourceResponse request overrides = Request.putJSON (overrides defaultService) response = Response.receiveEmpty ( \s h x -> UntagResourceResponse' Prelude.<$> (Prelude.pure (Prelude.fromEnum s)) ) instance Prelude.Hashable UntagResource where hashWithSalt _salt UntagResource' {..} = _salt `Prelude.hashWithSalt` tagKeys `Prelude.hashWithSalt` arn instance Prelude.NFData UntagResource where rnf UntagResource' {..} = Prelude.rnf tagKeys `Prelude.seq` Prelude.rnf arn instance Data.ToHeaders UntagResource where toHeaders = Prelude.const ( Prelude.mconcat [ "Content-Type" Data.=# ( "application/x-amz-json-1.1" :: Prelude.ByteString ) ] ) instance Data.ToJSON UntagResource where toJSON UntagResource' {..} = Data.object ( Prelude.catMaybes [("tagKeys" Data..=) Prelude.<$> tagKeys] ) instance Data.ToPath UntagResource where toPath UntagResource' {..} = Prelude.mconcat ["/2017-08-29/tags/", Data.toBS arn] instance Data.ToQuery UntagResource where toQuery = Prelude.const Prelude.mempty -- | /See:/ 'newUntagResourceResponse' smart constructor. data UntagResourceResponse = UntagResourceResponse' { -- | The response's http status code. httpStatus :: Prelude.Int } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'UntagResourceResponse' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code. newUntagResourceResponse :: -- | 'httpStatus' Prelude.Int -> UntagResourceResponse newUntagResourceResponse pHttpStatus_ = UntagResourceResponse' {httpStatus = pHttpStatus_} -- | The response's http status code. untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse) instance Prelude.NFData UntagResourceResponse where rnf UntagResourceResponse' {..} = Prelude.rnf httpStatus