Copyright | (c) 2015-2016 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 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
- 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))))))))
- projectsSnapshotsCreate :: CreateSnapshotRequest -> Text -> ProjectsSnapshotsCreate
- data ProjectsSnapshotsCreate
- pXgafv :: Lens' ProjectsSnapshotsCreate (Maybe Xgafv)
- pUploadProtocol :: Lens' ProjectsSnapshotsCreate (Maybe Text)
- pAccessToken :: Lens' ProjectsSnapshotsCreate (Maybe Text)
- pUploadType :: Lens' ProjectsSnapshotsCreate (Maybe Text)
- pPayload :: Lens' ProjectsSnapshotsCreate CreateSnapshotRequest
- pName :: Lens' ProjectsSnapshotsCreate Text
- pCallback :: Lens' ProjectsSnapshotsCreate (Maybe Text)
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
Request Lenses
pUploadProtocol :: Lens' ProjectsSnapshotsCreate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
pAccessToken :: Lens' ProjectsSnapshotsCreate (Maybe Text) Source #
OAuth access token.
pUploadType :: Lens' ProjectsSnapshotsCreate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
pPayload :: Lens' ProjectsSnapshotsCreate CreateSnapshotRequest Source #
Multipart request metadata.
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}`.