{-# 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.SageMaker.DeleteUserProfile -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Deletes a user profile. When a user profile is deleted, the user loses -- access to their EFS volume, including data, notebooks, and other -- artifacts. module Amazonka.SageMaker.DeleteUserProfile ( -- * Creating a Request DeleteUserProfile (..), newDeleteUserProfile, -- * Request Lenses deleteUserProfile_domainId, deleteUserProfile_userProfileName, -- * Destructuring the Response DeleteUserProfileResponse (..), newDeleteUserProfileResponse, ) 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 qualified Amazonka.Request as Request import qualified Amazonka.Response as Response import Amazonka.SageMaker.Types -- | /See:/ 'newDeleteUserProfile' smart constructor. data DeleteUserProfile = DeleteUserProfile' { -- | The domain ID. domainId :: Prelude.Text, -- | The user profile name. userProfileName :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteUserProfile' 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: -- -- 'domainId', 'deleteUserProfile_domainId' - The domain ID. -- -- 'userProfileName', 'deleteUserProfile_userProfileName' - The user profile name. newDeleteUserProfile :: -- | 'domainId' Prelude.Text -> -- | 'userProfileName' Prelude.Text -> DeleteUserProfile newDeleteUserProfile pDomainId_ pUserProfileName_ = DeleteUserProfile' { domainId = pDomainId_, userProfileName = pUserProfileName_ } -- | The domain ID. deleteUserProfile_domainId :: Lens.Lens' DeleteUserProfile Prelude.Text deleteUserProfile_domainId = Lens.lens (\DeleteUserProfile' {domainId} -> domainId) (\s@DeleteUserProfile' {} a -> s {domainId = a} :: DeleteUserProfile) -- | The user profile name. deleteUserProfile_userProfileName :: Lens.Lens' DeleteUserProfile Prelude.Text deleteUserProfile_userProfileName = Lens.lens (\DeleteUserProfile' {userProfileName} -> userProfileName) (\s@DeleteUserProfile' {} a -> s {userProfileName = a} :: DeleteUserProfile) instance Core.AWSRequest DeleteUserProfile where type AWSResponse DeleteUserProfile = DeleteUserProfileResponse request overrides = Request.postJSON (overrides defaultService) response = Response.receiveNull DeleteUserProfileResponse' instance Prelude.Hashable DeleteUserProfile where hashWithSalt _salt DeleteUserProfile' {..} = _salt `Prelude.hashWithSalt` domainId `Prelude.hashWithSalt` userProfileName instance Prelude.NFData DeleteUserProfile where rnf DeleteUserProfile' {..} = Prelude.rnf domainId `Prelude.seq` Prelude.rnf userProfileName instance Data.ToHeaders DeleteUserProfile where toHeaders = Prelude.const ( Prelude.mconcat [ "X-Amz-Target" Data.=# ( "SageMaker.DeleteUserProfile" :: Prelude.ByteString ), "Content-Type" Data.=# ( "application/x-amz-json-1.1" :: Prelude.ByteString ) ] ) instance Data.ToJSON DeleteUserProfile where toJSON DeleteUserProfile' {..} = Data.object ( Prelude.catMaybes [ Prelude.Just ("DomainId" Data..= domainId), Prelude.Just ("UserProfileName" Data..= userProfileName) ] ) instance Data.ToPath DeleteUserProfile where toPath = Prelude.const "/" instance Data.ToQuery DeleteUserProfile where toQuery = Prelude.const Prelude.mempty -- | /See:/ 'newDeleteUserProfileResponse' smart constructor. data DeleteUserProfileResponse = DeleteUserProfileResponse' { } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteUserProfileResponse' with all optional fields omitted. -- -- Use or to modify other optional fields. newDeleteUserProfileResponse :: DeleteUserProfileResponse newDeleteUserProfileResponse = DeleteUserProfileResponse' instance Prelude.NFData DeleteUserProfileResponse where rnf _ = ()