gogol-pubsub-0.4.0: Google Cloud Pub/Sub SDK.

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.PubSub.Projects.Snapshots.Create

Contents

Description

Creates a snapshot from the requested subscription. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. If the snapshot already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the `Snapshot.expire_time` field. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription, conforming to the resource name format. The generated name is populated in the returned Snapshot object. Note that for REST API requests, you must specify a name in the request.

See: Cloud Pub/Sub API Reference for pubsub.projects.snapshots.create.

Synopsis

REST Resource

type ProjectsSnapshotsCreateResource = "v1" :> (Capture "name" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] CreateSnapshotRequest :> Put '[JSON] Snapshot)))))))) Source #

A resource alias for pubsub.projects.snapshots.create method which the ProjectsSnapshotsCreate request conforms to.

Creating a Request

projectsSnapshotsCreate Source #

Creates a value of ProjectsSnapshotsCreate with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data ProjectsSnapshotsCreate Source #

Creates a snapshot from the requested subscription. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. If the snapshot already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the `Snapshot.expire_time` field. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription, conforming to the resource name format. The generated name is populated in the returned Snapshot object. Note that for REST API requests, you must specify a name in the request.

See: projectsSnapshotsCreate smart constructor.

Instances
Eq ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

Data ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ProjectsSnapshotsCreate -> c ProjectsSnapshotsCreate #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ProjectsSnapshotsCreate #

toConstr :: ProjectsSnapshotsCreate -> Constr #

dataTypeOf :: ProjectsSnapshotsCreate -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ProjectsSnapshotsCreate) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProjectsSnapshotsCreate) #

gmapT :: (forall b. Data b => b -> b) -> ProjectsSnapshotsCreate -> ProjectsSnapshotsCreate #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ProjectsSnapshotsCreate -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ProjectsSnapshotsCreate -> r #

gmapQ :: (forall d. Data d => d -> u) -> ProjectsSnapshotsCreate -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ProjectsSnapshotsCreate -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ProjectsSnapshotsCreate -> m ProjectsSnapshotsCreate #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ProjectsSnapshotsCreate -> m ProjectsSnapshotsCreate #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ProjectsSnapshotsCreate -> m ProjectsSnapshotsCreate #

Show ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

Generic ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

Associated Types

type Rep ProjectsSnapshotsCreate :: Type -> Type #

GoogleRequest ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

type Rep ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

type Rep ProjectsSnapshotsCreate = D1 (MetaData "ProjectsSnapshotsCreate" "Network.Google.Resource.PubSub.Projects.Snapshots.Create" "gogol-pubsub-0.4.0-4HrlFZL2Veq5x2Cv2TajBN" False) (C1 (MetaCons "ProjectsSnapshotsCreate'" PrefixI True) ((S1 (MetaSel (Just "_pXgafv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Xgafv)) :*: (S1 (MetaSel (Just "_pUploadProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_pAccessToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 (MetaSel (Just "_pUploadType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_pPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 CreateSnapshotRequest)) :*: (S1 (MetaSel (Just "_pName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_pCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))
type Scopes ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

type Scopes ProjectsSnapshotsCreate = "https://www.googleapis.com/auth/cloud-platform" ': ("https://www.googleapis.com/auth/pubsub" ': ([] :: [Symbol]))
type Rs ProjectsSnapshotsCreate Source # 
Instance details

Defined in Network.Google.Resource.PubSub.Projects.Snapshots.Create

Request Lenses

pUploadProtocol :: Lens' ProjectsSnapshotsCreate (Maybe Text) Source #

Upload protocol for media (e.g. "raw", "multipart").

pUploadType :: Lens' ProjectsSnapshotsCreate (Maybe Text) Source #

Legacy upload protocol for media (e.g. "media", "multipart").

pName :: Lens' ProjectsSnapshotsCreate Text Source #

Optional user-provided name for this snapshot. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription. Note that for REST API requests, you must specify a name. See the resource name rules. Format is `projects/{project}/snapshots/{snap}`.