{-# 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.Redshift.DeleteEventSubscription -- 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 an Amazon Redshift event notification subscription. module Amazonka.Redshift.DeleteEventSubscription ( -- * Creating a Request DeleteEventSubscription (..), newDeleteEventSubscription, -- * Request Lenses deleteEventSubscription_subscriptionName, -- * Destructuring the Response DeleteEventSubscriptionResponse (..), newDeleteEventSubscriptionResponse, ) 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.Redshift.Types import qualified Amazonka.Request as Request import qualified Amazonka.Response as Response -- | -- -- /See:/ 'newDeleteEventSubscription' smart constructor. data DeleteEventSubscription = DeleteEventSubscription' { -- | The name of the Amazon Redshift event notification subscription to be -- deleted. subscriptionName :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteEventSubscription' 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: -- -- 'subscriptionName', 'deleteEventSubscription_subscriptionName' - The name of the Amazon Redshift event notification subscription to be -- deleted. newDeleteEventSubscription :: -- | 'subscriptionName' Prelude.Text -> DeleteEventSubscription newDeleteEventSubscription pSubscriptionName_ = DeleteEventSubscription' { subscriptionName = pSubscriptionName_ } -- | The name of the Amazon Redshift event notification subscription to be -- deleted. deleteEventSubscription_subscriptionName :: Lens.Lens' DeleteEventSubscription Prelude.Text deleteEventSubscription_subscriptionName = Lens.lens (\DeleteEventSubscription' {subscriptionName} -> subscriptionName) (\s@DeleteEventSubscription' {} a -> s {subscriptionName = a} :: DeleteEventSubscription) instance Core.AWSRequest DeleteEventSubscription where type AWSResponse DeleteEventSubscription = DeleteEventSubscriptionResponse request overrides = Request.postQuery (overrides defaultService) response = Response.receiveNull DeleteEventSubscriptionResponse' instance Prelude.Hashable DeleteEventSubscription where hashWithSalt _salt DeleteEventSubscription' {..} = _salt `Prelude.hashWithSalt` subscriptionName instance Prelude.NFData DeleteEventSubscription where rnf DeleteEventSubscription' {..} = Prelude.rnf subscriptionName instance Data.ToHeaders DeleteEventSubscription where toHeaders = Prelude.const Prelude.mempty instance Data.ToPath DeleteEventSubscription where toPath = Prelude.const "/" instance Data.ToQuery DeleteEventSubscription where toQuery DeleteEventSubscription' {..} = Prelude.mconcat [ "Action" Data.=: ("DeleteEventSubscription" :: Prelude.ByteString), "Version" Data.=: ("2012-12-01" :: Prelude.ByteString), "SubscriptionName" Data.=: subscriptionName ] -- | /See:/ 'newDeleteEventSubscriptionResponse' smart constructor. data DeleteEventSubscriptionResponse = DeleteEventSubscriptionResponse' { } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteEventSubscriptionResponse' with all optional fields omitted. -- -- Use or to modify other optional fields. newDeleteEventSubscriptionResponse :: DeleteEventSubscriptionResponse newDeleteEventSubscriptionResponse = DeleteEventSubscriptionResponse' instance Prelude.NFData DeleteEventSubscriptionResponse where rnf _ = ()