{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.SQL.Instances.StartReplica
(
InstancesStartReplicaResource
, instancesStartReplica
, InstancesStartReplica
, iProject
, iInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesStartReplicaResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"startReplica" :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
-- | Starts the replication in the read replica instance.
--
-- /See:/ 'instancesStartReplica' smart constructor.
data InstancesStartReplica = InstancesStartReplica'
{ _iProject :: !Text
, _iInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'InstancesStartReplica' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iProject'
--
-- * 'iInstance'
instancesStartReplica
:: Text -- ^ 'iProject'
-> Text -- ^ 'iInstance'
-> InstancesStartReplica
instancesStartReplica pIProject_ pIInstance_ =
InstancesStartReplica'
{ _iProject = pIProject_
, _iInstance = pIInstance_
}
-- | ID of the project that contains the read replica.
iProject :: Lens' InstancesStartReplica Text
iProject = lens _iProject (\ s a -> s{_iProject = a})
-- | Cloud SQL read replica instance name.
iInstance :: Lens' InstancesStartReplica Text
iInstance
= lens _iInstance (\ s a -> s{_iInstance = a})
instance GoogleRequest InstancesStartReplica where
type Rs InstancesStartReplica = Operation
type Scopes InstancesStartReplica =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesStartReplica'{..}
= go _iProject _iInstance (Just AltJSON)
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesStartReplicaResource)
mempty