gogol-pubsub-0.1.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.Subscriptions.Create

Contents

Description

Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.

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

Synopsis

REST Resource

type ProjectsSubscriptionsCreateResource = "v1" :> (Capture "name" Text :> (QueryParam "$.xgafv" Text :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Subscription :> Put '[JSON] Subscription)))))))))) Source #

A resource alias for pubsub.projects.subscriptions.create method which the ProjectsSubscriptionsCreate request conforms to.

Creating a Request

projectsSubscriptionsCreate Source #

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

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

data ProjectsSubscriptionsCreate Source #

Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.

See: projectsSubscriptionsCreate smart constructor.

Instances

Eq ProjectsSubscriptionsCreate Source # 
Data ProjectsSubscriptionsCreate Source # 

Methods

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

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

toConstr :: ProjectsSubscriptionsCreate -> Constr #

dataTypeOf :: ProjectsSubscriptionsCreate -> DataType #

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

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

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

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

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

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

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

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

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

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

Show ProjectsSubscriptionsCreate Source # 
Generic ProjectsSubscriptionsCreate Source # 
GoogleRequest ProjectsSubscriptionsCreate Source # 
type Rep ProjectsSubscriptionsCreate Source # 
type Scopes ProjectsSubscriptionsCreate Source # 
type Scopes ProjectsSubscriptionsCreate = (:) Symbol "https://www.googleapis.com/auth/cloud-platform" ((:) Symbol "https://www.googleapis.com/auth/pubsub" ([] Symbol))
type Rs ProjectsSubscriptionsCreate Source # 

Request Lenses

pscUploadProtocol :: Lens' ProjectsSubscriptionsCreate (Maybe Text) Source #

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

pscUploadType :: Lens' ProjectsSubscriptionsCreate (Maybe Text) Source #

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

pscName :: Lens' ProjectsSubscriptionsCreate Text Source #

The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.