Copyright | (c) 2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a subscription to a given topic for a given subscriber. 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
.
- 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))))))))))
- projectsSubscriptionsCreate :: Subscription -> Text -> ProjectsSubscriptionsCreate
- data ProjectsSubscriptionsCreate
- pscXgafv :: Lens' ProjectsSubscriptionsCreate (Maybe Text)
- pscUploadProtocol :: Lens' ProjectsSubscriptionsCreate (Maybe Text)
- pscPp :: Lens' ProjectsSubscriptionsCreate Bool
- pscAccessToken :: Lens' ProjectsSubscriptionsCreate (Maybe Text)
- pscUploadType :: Lens' ProjectsSubscriptionsCreate (Maybe Text)
- pscPayload :: Lens' ProjectsSubscriptionsCreate Subscription
- pscBearerToken :: Lens' ProjectsSubscriptionsCreate (Maybe Text)
- pscName :: Lens' ProjectsSubscriptionsCreate Text
- pscCallback :: Lens' ProjectsSubscriptionsCreate (Maybe Text)
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 for a given subscriber. 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.
Request Lenses
pscUploadProtocol :: Lens' ProjectsSubscriptionsCreate (Maybe Text) Source
Upload protocol for media (e.g. "raw", "multipart").
pscPp :: Lens' ProjectsSubscriptionsCreate Bool Source
Pretty-print response.
pscAccessToken :: Lens' ProjectsSubscriptionsCreate (Maybe Text) Source
OAuth access token.
pscUploadType :: Lens' ProjectsSubscriptionsCreate (Maybe Text) Source
Legacy upload protocol for media (e.g. "media", "multipart").
pscPayload :: Lens' ProjectsSubscriptionsCreate Subscription Source
Multipart request metadata.
pscBearerToken :: Lens' ProjectsSubscriptionsCreate (Maybe Text) Source
OAuth bearer token.
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"`.
pscCallback :: Lens' ProjectsSubscriptionsCreate (Maybe Text) Source
JSONP