{-# 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.QuickSight.DeleteGroup -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Removes a user group from Amazon QuickSight. module Amazonka.QuickSight.DeleteGroup ( -- * Creating a Request DeleteGroup (..), newDeleteGroup, -- * Request Lenses deleteGroup_groupName, deleteGroup_awsAccountId, deleteGroup_namespace, -- * Destructuring the Response DeleteGroupResponse (..), newDeleteGroupResponse, -- * Response Lenses deleteGroupResponse_requestId, deleteGroupResponse_status, ) where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude import Amazonka.QuickSight.Types import qualified Amazonka.Request as Request import qualified Amazonka.Response as Response -- | /See:/ 'newDeleteGroup' smart constructor. data DeleteGroup = DeleteGroup' { -- | The name of the group that you want to delete. groupName :: Prelude.Text, -- | The ID for the Amazon Web Services account that the group is in. -- Currently, you use the ID for the Amazon Web Services account that -- contains your Amazon QuickSight account. awsAccountId :: Prelude.Text, -- | The namespace of the group that you want to delete. namespace :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteGroup' 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: -- -- 'groupName', 'deleteGroup_groupName' - The name of the group that you want to delete. -- -- 'awsAccountId', 'deleteGroup_awsAccountId' - The ID for the Amazon Web Services account that the group is in. -- Currently, you use the ID for the Amazon Web Services account that -- contains your Amazon QuickSight account. -- -- 'namespace', 'deleteGroup_namespace' - The namespace of the group that you want to delete. newDeleteGroup :: -- | 'groupName' Prelude.Text -> -- | 'awsAccountId' Prelude.Text -> -- | 'namespace' Prelude.Text -> DeleteGroup newDeleteGroup pGroupName_ pAwsAccountId_ pNamespace_ = DeleteGroup' { groupName = pGroupName_, awsAccountId = pAwsAccountId_, namespace = pNamespace_ } -- | The name of the group that you want to delete. deleteGroup_groupName :: Lens.Lens' DeleteGroup Prelude.Text deleteGroup_groupName = Lens.lens (\DeleteGroup' {groupName} -> groupName) (\s@DeleteGroup' {} a -> s {groupName = a} :: DeleteGroup) -- | The ID for the Amazon Web Services account that the group is in. -- Currently, you use the ID for the Amazon Web Services account that -- contains your Amazon QuickSight account. deleteGroup_awsAccountId :: Lens.Lens' DeleteGroup Prelude.Text deleteGroup_awsAccountId = Lens.lens (\DeleteGroup' {awsAccountId} -> awsAccountId) (\s@DeleteGroup' {} a -> s {awsAccountId = a} :: DeleteGroup) -- | The namespace of the group that you want to delete. deleteGroup_namespace :: Lens.Lens' DeleteGroup Prelude.Text deleteGroup_namespace = Lens.lens (\DeleteGroup' {namespace} -> namespace) (\s@DeleteGroup' {} a -> s {namespace = a} :: DeleteGroup) instance Core.AWSRequest DeleteGroup where type AWSResponse DeleteGroup = DeleteGroupResponse request overrides = Request.delete (overrides defaultService) response = Response.receiveJSON ( \s h x -> DeleteGroupResponse' Prelude.<$> (x Data..?> "RequestId") Prelude.<*> (Prelude.pure (Prelude.fromEnum s)) ) instance Prelude.Hashable DeleteGroup where hashWithSalt _salt DeleteGroup' {..} = _salt `Prelude.hashWithSalt` groupName `Prelude.hashWithSalt` awsAccountId `Prelude.hashWithSalt` namespace instance Prelude.NFData DeleteGroup where rnf DeleteGroup' {..} = Prelude.rnf groupName `Prelude.seq` Prelude.rnf awsAccountId `Prelude.seq` Prelude.rnf namespace instance Data.ToHeaders DeleteGroup where toHeaders = Prelude.const ( Prelude.mconcat [ "Content-Type" Data.=# ( "application/x-amz-json-1.0" :: Prelude.ByteString ) ] ) instance Data.ToPath DeleteGroup where toPath DeleteGroup' {..} = Prelude.mconcat [ "/accounts/", Data.toBS awsAccountId, "/namespaces/", Data.toBS namespace, "/groups/", Data.toBS groupName ] instance Data.ToQuery DeleteGroup where toQuery = Prelude.const Prelude.mempty -- | /See:/ 'newDeleteGroupResponse' smart constructor. data DeleteGroupResponse = DeleteGroupResponse' { -- | The Amazon Web Services request ID for this operation. requestId :: Prelude.Maybe Prelude.Text, -- | The HTTP status of the request. status :: Prelude.Int } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteGroupResponse' 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: -- -- 'requestId', 'deleteGroupResponse_requestId' - The Amazon Web Services request ID for this operation. -- -- 'status', 'deleteGroupResponse_status' - The HTTP status of the request. newDeleteGroupResponse :: -- | 'status' Prelude.Int -> DeleteGroupResponse newDeleteGroupResponse pStatus_ = DeleteGroupResponse' { requestId = Prelude.Nothing, status = pStatus_ } -- | The Amazon Web Services request ID for this operation. deleteGroupResponse_requestId :: Lens.Lens' DeleteGroupResponse (Prelude.Maybe Prelude.Text) deleteGroupResponse_requestId = Lens.lens (\DeleteGroupResponse' {requestId} -> requestId) (\s@DeleteGroupResponse' {} a -> s {requestId = a} :: DeleteGroupResponse) -- | The HTTP status of the request. deleteGroupResponse_status :: Lens.Lens' DeleteGroupResponse Prelude.Int deleteGroupResponse_status = Lens.lens (\DeleteGroupResponse' {status} -> status) (\s@DeleteGroupResponse' {} a -> s {status = a} :: DeleteGroupResponse) instance Prelude.NFData DeleteGroupResponse where rnf DeleteGroupResponse' {..} = Prelude.rnf requestId `Prelude.seq` Prelude.rnf status