Compute Engine v1 API - Class RolloutsClient (3.28.0)

public abstract class RolloutsClient

Reference documentation and code samples for the Compute Engine v1 API class RolloutsClient.

Rollouts client wrapper, for convenient use.

Inheritance

object > RolloutsClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Rollouts API.

Properties

CancelOperationsClient

public virtual OperationsClient CancelOperationsClient { get; }

The long-running operations client for Cancel.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Rollouts service, which is a host of "compute.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Rollouts scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual Rollouts.RolloutsClient GrpcClient { get; }

The underlying gRPC Rollouts client

Property Value
Type Description
RolloutsRolloutsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Cancel(CancelRolloutRequest, CallSettings)

public virtual Operation<Operation, Operation> Cancel(CancelRolloutRequest request, CallSettings callSettings = null)

Cancels a Rollout.

Parameters
Name Description
request CancelRolloutRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
CancelRolloutRequest request = new CancelRolloutRequest
{
    RequestId = "",
    Project = "",
    Rollback = false,
    Rollout = "",
};
// Make the request
lro::Operation<Operation, Operation> response = rolloutsClient.Cancel(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = rolloutsClient.PollOnceCancel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Cancel(string, string, CallSettings)

public virtual Operation<Operation, Operation> Cancel(string project, string rollout, CallSettings callSettings = null)

Cancels a Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the Rollout resource to cancel.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
lro::Operation<Operation, Operation> response = rolloutsClient.Cancel(project, rollout);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = rolloutsClient.PollOnceCancel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CancelAsync(CancelRolloutRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> CancelAsync(CancelRolloutRequest request, CallSettings callSettings = null)

Cancels a Rollout.

Parameters
Name Description
request CancelRolloutRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
CancelRolloutRequest request = new CancelRolloutRequest
{
    RequestId = "",
    Project = "",
    Rollback = false,
    Rollout = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.CancelAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceCancelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CancelAsync(CancelRolloutRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> CancelAsync(CancelRolloutRequest request, CancellationToken cancellationToken)

Cancels a Rollout.

Parameters
Name Description
request CancelRolloutRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
CancelRolloutRequest request = new CancelRolloutRequest
{
    RequestId = "",
    Project = "",
    Rollback = false,
    Rollout = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.CancelAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceCancelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CancelAsync(string, string, CallSettings)

public virtual Task<Operation<Operation, Operation>> CancelAsync(string project, string rollout, CallSettings callSettings = null)

Cancels a Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the Rollout resource to cancel.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.CancelAsync(project, rollout);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceCancelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CancelAsync(string, string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> CancelAsync(string project, string rollout, CancellationToken cancellationToken)

Cancels a Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the Rollout resource to cancel.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.CancelAsync(project, rollout);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceCancelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Create()

public static RolloutsClient Create()

Synchronously creates a RolloutsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RolloutsClientBuilder.

Returns
Type Description
RolloutsClient

The created RolloutsClient.

CreateAsync(CancellationToken)

public static Task<RolloutsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a RolloutsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RolloutsClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskRolloutsClient

The task representing the created RolloutsClient.

Delete(DeleteRolloutRequest, CallSettings)

public virtual Operation<Operation, Operation> Delete(DeleteRolloutRequest request, CallSettings callSettings = null)

Deletes a Rollout.

Parameters
Name Description
request DeleteRolloutRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
DeleteRolloutRequest request = new DeleteRolloutRequest
{
    RequestId = "",
    Project = "",
    Rollout = "",
};
// Make the request
lro::Operation<Operation, Operation> response = rolloutsClient.Delete(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = rolloutsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Delete(string, string, CallSettings)

public virtual Operation<Operation, Operation> Delete(string project, string rollout, CallSettings callSettings = null)

Deletes a Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the Rollout resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
lro::Operation<Operation, Operation> response = rolloutsClient.Delete(project, rollout);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = rolloutsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteRolloutRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteRolloutRequest request, CallSettings callSettings = null)

Deletes a Rollout.

Parameters
Name Description
request DeleteRolloutRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
DeleteRolloutRequest request = new DeleteRolloutRequest
{
    RequestId = "",
    Project = "",
    Rollout = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteRolloutRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteRolloutRequest request, CancellationToken cancellationToken)

Deletes a Rollout.

Parameters
Name Description
request DeleteRolloutRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
DeleteRolloutRequest request = new DeleteRolloutRequest
{
    RequestId = "",
    Project = "",
    Rollout = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, string, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string rollout, CallSettings callSettings = null)

Deletes a Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the Rollout resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.DeleteAsync(project, rollout);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string rollout, CancellationToken cancellationToken)

Deletes a Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the Rollout resource to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
lro::Operation<Operation, Operation> response = await rolloutsClient.DeleteAsync(project, rollout);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await rolloutsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Get(GetRolloutRequest, CallSettings)

public virtual Rollout Get(GetRolloutRequest request, CallSettings callSettings = null)

Gets details of a single project-scoped Rollout.

Parameters
Name Description
request GetRolloutRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Rollout

The RPC response.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
GetRolloutRequest request = new GetRolloutRequest
{
    Project = "",
    Rollout = "",
};
// Make the request
Rollout response = rolloutsClient.Get(request);

Get(string, string, CallSettings)

public virtual Rollout Get(string project, string rollout, CallSettings callSettings = null)

Gets details of a single project-scoped Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the persistent rollout to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Rollout

The RPC response.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
Rollout response = rolloutsClient.Get(project, rollout);

GetAsync(GetRolloutRequest, CallSettings)

public virtual Task<Rollout> GetAsync(GetRolloutRequest request, CallSettings callSettings = null)

Gets details of a single project-scoped Rollout.

Parameters
Name Description
request GetRolloutRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRollout

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
GetRolloutRequest request = new GetRolloutRequest
{
    Project = "",
    Rollout = "",
};
// Make the request
Rollout response = await rolloutsClient.GetAsync(request);

GetAsync(GetRolloutRequest, CancellationToken)

public virtual Task<Rollout> GetAsync(GetRolloutRequest request, CancellationToken cancellationToken)

Gets details of a single project-scoped Rollout.

Parameters
Name Description
request GetRolloutRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRollout

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
GetRolloutRequest request = new GetRolloutRequest
{
    Project = "",
    Rollout = "",
};
// Make the request
Rollout response = await rolloutsClient.GetAsync(request);

GetAsync(string, string, CallSettings)

public virtual Task<Rollout> GetAsync(string project, string rollout, CallSettings callSettings = null)

Gets details of a single project-scoped Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the persistent rollout to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRollout

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
Rollout response = await rolloutsClient.GetAsync(project, rollout);

GetAsync(string, string, CancellationToken)

public virtual Task<Rollout> GetAsync(string project, string rollout, CancellationToken cancellationToken)

Gets details of a single project-scoped Rollout.

Parameters
Name Description
project string

Project ID for this request.

rollout string

Name of the persistent rollout to return.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRollout

A Task containing the RPC response.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string rollout = "";
// Make the request
Rollout response = await rolloutsClient.GetAsync(project, rollout);

List(ListRolloutsRequest, CallSettings)

public virtual PagedEnumerable<RolloutsListResponse, Rollout> List(ListRolloutsRequest request, CallSettings callSettings = null)

Lists Rollouts in a given project and location.

Parameters
Name Description
request ListRolloutsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableRolloutsListResponseRollout

A pageable sequence of Rollout resources.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
ListRolloutsRequest request = new ListRolloutsRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<RolloutsListResponse, Rollout> response = rolloutsClient.List(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Rollout 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 (RolloutsListResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Rollout 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<Rollout> 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 (Rollout 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;

List(string, string, int?, CallSettings)

public virtual PagedEnumerable<RolloutsListResponse, Rollout> List(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Rollouts in a given project and location.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableRolloutsListResponseRollout

A pageable sequence of Rollout resources.

Example
// Create client
RolloutsClient rolloutsClient = RolloutsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<RolloutsListResponse, Rollout> response = rolloutsClient.List(project);

// Iterate over all response items, lazily performing RPCs as required
foreach (Rollout 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 (RolloutsListResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Rollout 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<Rollout> 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 (Rollout 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;

ListAsync(ListRolloutsRequest, CallSettings)

public virtual PagedAsyncEnumerable<RolloutsListResponse, Rollout> ListAsync(ListRolloutsRequest request, CallSettings callSettings = null)

Lists Rollouts in a given project and location.

Parameters
Name Description
request ListRolloutsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableRolloutsListResponseRollout

A pageable asynchronous sequence of Rollout resources.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
ListRolloutsRequest request = new ListRolloutsRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<RolloutsListResponse, Rollout> response = rolloutsClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Rollout item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (RolloutsListResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Rollout 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<Rollout> 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 (Rollout 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;

ListAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<RolloutsListResponse, Rollout> ListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Rollouts in a given project and location.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableRolloutsListResponseRollout

A pageable asynchronous sequence of Rollout resources.

Example
// Create client
RolloutsClient rolloutsClient = await RolloutsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<RolloutsListResponse, Rollout> response = rolloutsClient.ListAsync(project);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Rollout item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (RolloutsListResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Rollout 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<Rollout> 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 (Rollout 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;

PollOnceCancel(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceCancel(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Cancel.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceCancelAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceCancelAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Cancel .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceDelete(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Delete.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Delete .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

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.

Remarks

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.