public abstract class RevisionsClientRevisions client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Run.V2Assembly
Google.Cloud.Run.V2.dll
Remarks
Cloud Run Revision Control Plane API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the Revisions service, which is a host of "run.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
String |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default Revisions scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyList<String> |
|
The default Revisions scopes are:
DeleteRevisionOperationsClient
public virtual OperationsClient DeleteRevisionOperationsClient { get; }The long-running operations client for DeleteRevision.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public virtual Revisions.RevisionsClient GrpcClient { get; }The underlying gRPC Revisions client
| Property Value | |
|---|---|
| Type | Description |
Revisions.RevisionsClient |
|
Methods
Create()
public static RevisionsClient Create()Synchronously creates a RevisionsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RevisionsClientBuilder.
| Returns | |
|---|---|
| Type | Description |
RevisionsClient |
The created RevisionsClient. |
CreateAsync(CancellationToken)
public static Task<RevisionsClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))Asynchronously creates a RevisionsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RevisionsClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
Task<RevisionsClient> |
The task representing the created RevisionsClient. |
DeleteRevision(DeleteRevisionRequest, CallSettings)
public virtual Operation<Revision, Revision> DeleteRevision(DeleteRevisionRequest request, CallSettings callSettings = null)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteRevisionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Revision, Revision> |
The RPC response. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
DeleteRevisionRequest request = new DeleteRevisionRequest
{
RevisionName = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<Revision, Revision> response = revisionsClient.DeleteRevision(request);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = revisionsClient.PollOnceDeleteRevision(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevision(RevisionName, CallSettings)
public virtual Operation<Revision, Revision> DeleteRevision(RevisionName name, CallSettings callSettings = null)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
RevisionNameRequired. The name of the Revision to delete. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Revision, Revision> |
The RPC response. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
RevisionName name = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]");
// Make the request
Operation<Revision, Revision> response = revisionsClient.DeleteRevision(name);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = revisionsClient.PollOnceDeleteRevision(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevision(String, CallSettings)
public virtual Operation<Revision, Revision> DeleteRevision(string name, CallSettings callSettings = null)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the Revision to delete. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Revision, Revision> |
The RPC response. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]/revisions/[REVISION]";
// Make the request
Operation<Revision, Revision> response = revisionsClient.DeleteRevision(name);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = revisionsClient.PollOnceDeleteRevision(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevisionAsync(DeleteRevisionRequest, CallSettings)
public virtual Task<Operation<Revision, Revision>> DeleteRevisionAsync(DeleteRevisionRequest request, CallSettings callSettings = null)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteRevisionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Revision, Revision>> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
DeleteRevisionRequest request = new DeleteRevisionRequest
{
RevisionName = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<Revision, Revision> response = await revisionsClient.DeleteRevisionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = await revisionsClient.PollOnceDeleteRevisionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevisionAsync(DeleteRevisionRequest, CancellationToken)
public virtual Task<Operation<Revision, Revision>> DeleteRevisionAsync(DeleteRevisionRequest request, CancellationToken cancellationToken)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteRevisionRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Revision, Revision>> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
DeleteRevisionRequest request = new DeleteRevisionRequest
{
RevisionName = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]"),
ValidateOnly = false,
Etag = "",
};
// Make the request
Operation<Revision, Revision> response = await revisionsClient.DeleteRevisionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = await revisionsClient.PollOnceDeleteRevisionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevisionAsync(RevisionName, CallSettings)
public virtual Task<Operation<Revision, Revision>> DeleteRevisionAsync(RevisionName name, CallSettings callSettings = null)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
RevisionNameRequired. The name of the Revision to delete. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Revision, Revision>> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
RevisionName name = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]");
// Make the request
Operation<Revision, Revision> response = await revisionsClient.DeleteRevisionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = await revisionsClient.PollOnceDeleteRevisionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevisionAsync(RevisionName, CancellationToken)
public virtual Task<Operation<Revision, Revision>> DeleteRevisionAsync(RevisionName name, CancellationToken cancellationToken)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
RevisionNameRequired. The name of the Revision to delete. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Revision, Revision>> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
RevisionName name = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]");
// Make the request
Operation<Revision, Revision> response = await revisionsClient.DeleteRevisionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = await revisionsClient.PollOnceDeleteRevisionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevisionAsync(String, CallSettings)
public virtual Task<Operation<Revision, Revision>> DeleteRevisionAsync(string name, CallSettings callSettings = null)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the Revision to delete. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Revision, Revision>> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]/revisions/[REVISION]";
// Make the request
Operation<Revision, Revision> response = await revisionsClient.DeleteRevisionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = await revisionsClient.PollOnceDeleteRevisionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
DeleteRevisionAsync(String, CancellationToken)
public virtual Task<Operation<Revision, Revision>> DeleteRevisionAsync(string name, CancellationToken cancellationToken)Delete a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the Revision to delete. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Revision, Revision>> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]/revisions/[REVISION]";
// Make the request
Operation<Revision, Revision> response = await revisionsClient.DeleteRevisionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Revision, Revision> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Revision result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Revision, Revision> retrievedResponse = await revisionsClient.PollOnceDeleteRevisionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Revision retrievedResult = retrievedResponse.Result;
}
GetRevision(GetRevisionRequest, CallSettings)
public virtual Revision GetRevision(GetRevisionRequest request, CallSettings callSettings = null)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
request |
GetRevisionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Revision |
The RPC response. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
GetRevisionRequest request = new GetRevisionRequest
{
RevisionName = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]"),
};
// Make the request
Revision response = revisionsClient.GetRevision(request);
GetRevision(RevisionName, CallSettings)
public virtual Revision GetRevision(RevisionName name, CallSettings callSettings = null)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
RevisionNameRequired. The full name of the Revision. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Revision |
The RPC response. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
RevisionName name = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]");
// Make the request
Revision response = revisionsClient.GetRevision(name);
GetRevision(String, CallSettings)
public virtual Revision GetRevision(string name, CallSettings callSettings = null)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The full name of the Revision. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Revision |
The RPC response. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]/revisions/[REVISION]";
// Make the request
Revision response = revisionsClient.GetRevision(name);
GetRevisionAsync(GetRevisionRequest, CallSettings)
public virtual Task<Revision> GetRevisionAsync(GetRevisionRequest request, CallSettings callSettings = null)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
request |
GetRevisionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Revision> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
GetRevisionRequest request = new GetRevisionRequest
{
RevisionName = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]"),
};
// Make the request
Revision response = await revisionsClient.GetRevisionAsync(request);
GetRevisionAsync(GetRevisionRequest, CancellationToken)
public virtual Task<Revision> GetRevisionAsync(GetRevisionRequest request, CancellationToken cancellationToken)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
request |
GetRevisionRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task<Revision> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
GetRevisionRequest request = new GetRevisionRequest
{
RevisionName = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]"),
};
// Make the request
Revision response = await revisionsClient.GetRevisionAsync(request);
GetRevisionAsync(RevisionName, CallSettings)
public virtual Task<Revision> GetRevisionAsync(RevisionName name, CallSettings callSettings = null)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
RevisionNameRequired. The full name of the Revision. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Revision> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
RevisionName name = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]");
// Make the request
Revision response = await revisionsClient.GetRevisionAsync(name);
GetRevisionAsync(RevisionName, CancellationToken)
public virtual Task<Revision> GetRevisionAsync(RevisionName name, CancellationToken cancellationToken)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
RevisionNameRequired. The full name of the Revision. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task<Revision> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
RevisionName name = RevisionName.FromProjectLocationServiceRevision("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]");
// Make the request
Revision response = await revisionsClient.GetRevisionAsync(name);
GetRevisionAsync(String, CallSettings)
public virtual Task<Revision> GetRevisionAsync(string name, CallSettings callSettings = null)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The full name of the Revision. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Revision> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]/revisions/[REVISION]";
// Make the request
Revision response = await revisionsClient.GetRevisionAsync(name);
GetRevisionAsync(String, CancellationToken)
public virtual Task<Revision> GetRevisionAsync(string name, CancellationToken cancellationToken)Gets information about a Revision.
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The full name of the Revision. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision} |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task<Revision> |
A Task containing the RPC response. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]/revisions/[REVISION]";
// Make the request
Revision response = await revisionsClient.GetRevisionAsync(name);
ListRevisions(ListRevisionsRequest, CallSettings)
public virtual PagedEnumerable<ListRevisionsResponse, Revision> ListRevisions(ListRevisionsRequest request, CallSettings callSettings = null)List Revisions from a given Service, or from a given location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListRevisionsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerable<ListRevisionsResponse, Revision> |
A pageable sequence of Revision resources. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
ListRevisionsRequest request = new ListRevisionsRequest
{
ParentAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
ShowDeleted = false,
};
// Make the request
PagedEnumerable<ListRevisionsResponse, Revision> response = revisionsClient.ListRevisions(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Revision item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRevisionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Revision item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Revision> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Revision item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRevisions(ServiceName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRevisionsResponse, Revision> ListRevisions(ServiceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List Revisions from a given Service, or from a given location.
| Parameters | |
|---|---|
| Name | Description |
parent |
ServiceNameRequired. The Service from which the Revisions should be listed. To list all Revisions across Services, use "-" instead of Service name. Format: projects/{project}/locations/{location}/services/{service} |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerable<ListRevisionsResponse, Revision> |
A pageable sequence of Revision resources. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
ServiceName parent = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
PagedEnumerable<ListRevisionsResponse, Revision> response = revisionsClient.ListRevisions(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Revision item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRevisionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Revision item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Revision> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Revision item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRevisions(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRevisionsResponse, Revision> ListRevisions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List Revisions from a given Service, or from a given location.
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The Service from which the Revisions should be listed. To list all Revisions across Services, use "-" instead of Service name. Format: projects/{project}/locations/{location}/services/{service} |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerable<ListRevisionsResponse, Revision> |
A pageable sequence of Revision resources. |
// Create client
RevisionsClient revisionsClient = RevisionsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
PagedEnumerable<ListRevisionsResponse, Revision> response = revisionsClient.ListRevisions(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Revision item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRevisionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Revision item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Revision> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Revision item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRevisionsAsync(ListRevisionsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListRevisionsResponse, Revision> ListRevisionsAsync(ListRevisionsRequest request, CallSettings callSettings = null)List Revisions from a given Service, or from a given location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListRevisionsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerable<ListRevisionsResponse, Revision> |
A pageable asynchronous sequence of Revision resources. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
ListRevisionsRequest request = new ListRevisionsRequest
{
ParentAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
ShowDeleted = false,
};
// Make the request
PagedAsyncEnumerable<ListRevisionsResponse, Revision> response = revisionsClient.ListRevisionsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Revision item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRevisionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Revision item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Revision> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Revision item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRevisionsAsync(ServiceName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRevisionsResponse, Revision> ListRevisionsAsync(ServiceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List Revisions from a given Service, or from a given location.
| Parameters | |
|---|---|
| Name | Description |
parent |
ServiceNameRequired. The Service from which the Revisions should be listed. To list all Revisions across Services, use "-" instead of Service name. Format: projects/{project}/locations/{location}/services/{service} |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerable<ListRevisionsResponse, Revision> |
A pageable asynchronous sequence of Revision resources. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
ServiceName parent = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
PagedAsyncEnumerable<ListRevisionsResponse, Revision> response = revisionsClient.ListRevisionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Revision item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRevisionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Revision item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Revision> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Revision item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRevisionsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRevisionsResponse, Revision> ListRevisionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List Revisions from a given Service, or from a given location.
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The Service from which the Revisions should be listed. To list all Revisions across Services, use "-" instead of Service name. Format: projects/{project}/locations/{location}/services/{service} |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerable<ListRevisionsResponse, Revision> |
A pageable asynchronous sequence of Revision resources. |
// Create client
RevisionsClient revisionsClient = await RevisionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
PagedAsyncEnumerable<ListRevisionsResponse, Revision> response = revisionsClient.ListRevisionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Revision item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRevisionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Revision item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Revision> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Revision item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceDeleteRevision(String, CallSettings)
public virtual Operation<Revision, Revision> PollOnceDeleteRevision(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of DeleteRevision.
| Parameters | |
|---|---|
| Name | Description |
operationName |
StringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Revision, Revision> |
The result of polling the operation. |
PollOnceDeleteRevisionAsync(String, CallSettings)
public virtual Task<Operation<Revision, Revision>> PollOnceDeleteRevisionAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
DeleteRevision.
| Parameters | |
|---|---|
| Name | Description |
operationName |
StringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Revision, Revision>> |
A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
| Returns | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.