Show / Hide Table of Contents

Class ProjectsResource.SnapshotsResource.CreateRequest

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. 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] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is populated in the returned Snapshot object. Note that for REST API requests, you must specify a name in the request.

Inheritance
object
ClientServiceRequest
ClientServiceRequest<Snapshot>
PubsubBaseServiceRequest<Snapshot>
ProjectsResource.SnapshotsResource.CreateRequest
Implements
IClientServiceRequest<Snapshot>
IClientServiceRequest
Inherited Members
PubsubBaseServiceRequest<Snapshot>.Xgafv
PubsubBaseServiceRequest<Snapshot>.AccessToken
PubsubBaseServiceRequest<Snapshot>.Alt
PubsubBaseServiceRequest<Snapshot>.Callback
PubsubBaseServiceRequest<Snapshot>.Fields
PubsubBaseServiceRequest<Snapshot>.Key
PubsubBaseServiceRequest<Snapshot>.OauthToken
PubsubBaseServiceRequest<Snapshot>.PrettyPrint
PubsubBaseServiceRequest<Snapshot>.QuotaUser
PubsubBaseServiceRequest<Snapshot>.UploadType
PubsubBaseServiceRequest<Snapshot>.UploadProtocol
ClientServiceRequest<Snapshot>.Execute()
ClientServiceRequest<Snapshot>.ExecuteAsStream()
ClientServiceRequest<Snapshot>.ExecuteAsync()
ClientServiceRequest<Snapshot>.ExecuteAsync(CancellationToken)
ClientServiceRequest<Snapshot>.ExecuteAsStreamAsync()
ClientServiceRequest<Snapshot>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<Snapshot>.CreateRequest(bool?)
ClientServiceRequest<Snapshot>.GenerateRequestUri()
ClientServiceRequest<Snapshot>.GetDefaultETagAction(string)
ClientServiceRequest<Snapshot>.ETagAction
ClientServiceRequest<Snapshot>.ModifyRequest
ClientServiceRequest<Snapshot>.ValidateParameters
ClientServiceRequest<Snapshot>.ApiVersion
ClientServiceRequest<Snapshot>.RequestParameters
ClientServiceRequest<Snapshot>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
ClientServiceRequest.Credential
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Pubsub.v1
Assembly: Google.Apis.Pubsub.v1.dll
Syntax
public class ProjectsResource.SnapshotsResource.CreateRequest : PubsubBaseServiceRequest<Snapshot>, IClientServiceRequest<Snapshot>, IClientServiceRequest

Constructors

CreateRequest(IClientService, CreateSnapshotRequest, string)

Constructs a new Create request.

Declaration
public CreateRequest(IClientService service, CreateSnapshotRequest body, string name)
Parameters
Type Name Description
IClientService service
CreateSnapshotRequest body
string name

Properties

HttpMethod

Gets the HTTP method.

Declaration
public override string HttpMethod { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Snapshot>.HttpMethod

MethodName

Gets the method name.

Declaration
public override string MethodName { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Snapshot>.MethodName

Name

Required. 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}.

Declaration
[RequestParameter("name", RequestParameterType.Path)]
public virtual string Name { get; }
Property Value
Type Description
string

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Snapshot>.RestPath

Methods

GetBody()

Returns the body of the request.

Declaration
protected override object GetBody()
Returns
Type Description
object
Overrides
ClientServiceRequest<Snapshot>.GetBody()

InitParameters()

Initializes Create parameter list.

Declaration
protected override void InitParameters()
Overrides
PubsubBaseServiceRequest<Snapshot>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
In this article
Back to top Generated by DocFX