Class ReservationServiceClient (1.6.0)

public abstract class ReservationServiceClient

ReservationService client wrapper, for convenient use.

Inheritance

Object > ReservationServiceClient

Namespace

Google.Cloud.BigQuery.Reservation.V1

Assembly

Google.Cloud.BigQuery.Reservation.V1.dll

Remarks

This API allows users to manage their flat-rate BigQuery reservations.

A reservation provides computational resource guarantees, in the form of slots, to users. A slot is a unit of computational power in BigQuery, and serves as the basic unit of parallelism. In a scan of a multi-partitioned table, a single slot operates on a single partition of the table. A reservation resource exists as a child resource of the admin project and location, e.g.: projects/myproject/locations/US/reservations/reservationName.

A capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. A capacity commitment resource exists as a child resource of the admin project and location, e.g.: projects/myproject/locations/US/capacityCommitments/id.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ReservationService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

GrpcClient

public virtual ReservationService.ReservationServiceClient GrpcClient { get; }

The underlying gRPC ReservationService client

Property Value
TypeDescription
ReservationService.ReservationServiceClient

Methods

Create()

public static ReservationServiceClient Create()

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

Returns
TypeDescription
ReservationServiceClient

The created ReservationServiceClient.

CreateAssignment(CreateAssignmentRequest, CallSettings)

public virtual Assignment CreateAssignment(CreateAssignmentRequest request, CallSettings callSettings = null)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
requestCreateAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
CreateAssignmentRequest request = new CreateAssignmentRequest
{
    ParentAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
    Assignment = new Assignment(),
    AssignmentId = "",
};
// Make the request
Assignment response = reservationServiceClient.CreateAssignment(request);

CreateAssignment(ReservationName, Assignment, CallSettings)

public virtual Assignment CreateAssignment(ReservationName parent, Assignment assignment, CallSettings callSettings = null)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
parentReservationName

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

assignmentAssignment

Assignment resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
ReservationName parent = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
Assignment assignment = new Assignment();
// Make the request
Assignment response = reservationServiceClient.CreateAssignment(parent, assignment);

CreateAssignment(String, Assignment, CallSettings)

public virtual Assignment CreateAssignment(string parent, Assignment assignment, CallSettings callSettings = null)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
parentString

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

assignmentAssignment

Assignment resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
Assignment assignment = new Assignment();
// Make the request
Assignment response = reservationServiceClient.CreateAssignment(parent, assignment);

CreateAssignmentAsync(CreateAssignmentRequest, CallSettings)

public virtual Task<Assignment> CreateAssignmentAsync(CreateAssignmentRequest request, CallSettings callSettings = null)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
requestCreateAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAssignmentRequest request = new CreateAssignmentRequest
{
    ParentAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
    Assignment = new Assignment(),
    AssignmentId = "",
};
// Make the request
Assignment response = await reservationServiceClient.CreateAssignmentAsync(request);

CreateAssignmentAsync(CreateAssignmentRequest, CancellationToken)

public virtual Task<Assignment> CreateAssignmentAsync(CreateAssignmentRequest request, CancellationToken cancellationToken)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
requestCreateAssignmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAssignmentRequest request = new CreateAssignmentRequest
{
    ParentAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
    Assignment = new Assignment(),
    AssignmentId = "",
};
// Make the request
Assignment response = await reservationServiceClient.CreateAssignmentAsync(request);

CreateAssignmentAsync(ReservationName, Assignment, CallSettings)

public virtual Task<Assignment> CreateAssignmentAsync(ReservationName parent, Assignment assignment, CallSettings callSettings = null)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
parentReservationName

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

assignmentAssignment

Assignment resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ReservationName parent = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
Assignment assignment = new Assignment();
// Make the request
Assignment response = await reservationServiceClient.CreateAssignmentAsync(parent, assignment);

CreateAssignmentAsync(ReservationName, Assignment, CancellationToken)

public virtual Task<Assignment> CreateAssignmentAsync(ReservationName parent, Assignment assignment, CancellationToken cancellationToken)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
parentReservationName

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

assignmentAssignment

Assignment resource to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ReservationName parent = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
Assignment assignment = new Assignment();
// Make the request
Assignment response = await reservationServiceClient.CreateAssignmentAsync(parent, assignment);

CreateAssignmentAsync(String, Assignment, CallSettings)

public virtual Task<Assignment> CreateAssignmentAsync(string parent, Assignment assignment, CallSettings callSettings = null)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
parentString

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

assignmentAssignment

Assignment resource to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
Assignment assignment = new Assignment();
// Make the request
Assignment response = await reservationServiceClient.CreateAssignmentAsync(parent, assignment);

CreateAssignmentAsync(String, Assignment, CancellationToken)

public virtual Task<Assignment> CreateAssignmentAsync(string parent, Assignment assignment, CancellationToken cancellationToken)

Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation.

Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type.

Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at higher levels.

Example:

  • The organization organizationA contains two projects, project1 and project2.
  • Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none.

Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation.

Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

Parameters
NameDescription
parentString

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

assignmentAssignment

Assignment resource to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
Assignment assignment = new Assignment();
// Make the request
Assignment response = await reservationServiceClient.CreateAssignmentAsync(parent, assignment);

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ReservationServiceClient>

The task representing the created ReservationServiceClient.

CreateCapacityCommitment(LocationName, CapacityCommitment, CallSettings)

public virtual CapacityCommitment CreateCapacityCommitment(LocationName parent, CapacityCommitment capacityCommitment, CallSettings callSettings = null)

Creates a new capacity commitment resource.

Parameters
NameDescription
parentLocationName

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

capacityCommitmentCapacityCommitment

Content of the capacity commitment to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CapacityCommitment capacityCommitment = new CapacityCommitment();
// Make the request
CapacityCommitment response = reservationServiceClient.CreateCapacityCommitment(parent, capacityCommitment);

CreateCapacityCommitment(CreateCapacityCommitmentRequest, CallSettings)

public virtual CapacityCommitment CreateCapacityCommitment(CreateCapacityCommitmentRequest request, CallSettings callSettings = null)

Creates a new capacity commitment resource.

Parameters
NameDescription
requestCreateCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
CreateCapacityCommitmentRequest request = new CreateCapacityCommitmentRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CapacityCommitment = new CapacityCommitment(),
    EnforceSingleAdminProjectPerOrg = false,
    CapacityCommitmentId = "",
};
// Make the request
CapacityCommitment response = reservationServiceClient.CreateCapacityCommitment(request);

CreateCapacityCommitment(String, CapacityCommitment, CallSettings)

public virtual CapacityCommitment CreateCapacityCommitment(string parent, CapacityCommitment capacityCommitment, CallSettings callSettings = null)

Creates a new capacity commitment resource.

Parameters
NameDescription
parentString

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

capacityCommitmentCapacityCommitment

Content of the capacity commitment to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CapacityCommitment capacityCommitment = new CapacityCommitment();
// Make the request
CapacityCommitment response = reservationServiceClient.CreateCapacityCommitment(parent, capacityCommitment);

CreateCapacityCommitmentAsync(LocationName, CapacityCommitment, CallSettings)

public virtual Task<CapacityCommitment> CreateCapacityCommitmentAsync(LocationName parent, CapacityCommitment capacityCommitment, CallSettings callSettings = null)

Creates a new capacity commitment resource.

Parameters
NameDescription
parentLocationName

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

capacityCommitmentCapacityCommitment

Content of the capacity commitment to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CapacityCommitment capacityCommitment = new CapacityCommitment();
// Make the request
CapacityCommitment response = await reservationServiceClient.CreateCapacityCommitmentAsync(parent, capacityCommitment);

CreateCapacityCommitmentAsync(LocationName, CapacityCommitment, CancellationToken)

public virtual Task<CapacityCommitment> CreateCapacityCommitmentAsync(LocationName parent, CapacityCommitment capacityCommitment, CancellationToken cancellationToken)

Creates a new capacity commitment resource.

Parameters
NameDescription
parentLocationName

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

capacityCommitmentCapacityCommitment

Content of the capacity commitment to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CapacityCommitment capacityCommitment = new CapacityCommitment();
// Make the request
CapacityCommitment response = await reservationServiceClient.CreateCapacityCommitmentAsync(parent, capacityCommitment);

CreateCapacityCommitmentAsync(CreateCapacityCommitmentRequest, CallSettings)

public virtual Task<CapacityCommitment> CreateCapacityCommitmentAsync(CreateCapacityCommitmentRequest request, CallSettings callSettings = null)

Creates a new capacity commitment resource.

Parameters
NameDescription
requestCreateCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCapacityCommitmentRequest request = new CreateCapacityCommitmentRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CapacityCommitment = new CapacityCommitment(),
    EnforceSingleAdminProjectPerOrg = false,
    CapacityCommitmentId = "",
};
// Make the request
CapacityCommitment response = await reservationServiceClient.CreateCapacityCommitmentAsync(request);

CreateCapacityCommitmentAsync(CreateCapacityCommitmentRequest, CancellationToken)

public virtual Task<CapacityCommitment> CreateCapacityCommitmentAsync(CreateCapacityCommitmentRequest request, CancellationToken cancellationToken)

Creates a new capacity commitment resource.

Parameters
NameDescription
requestCreateCapacityCommitmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCapacityCommitmentRequest request = new CreateCapacityCommitmentRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CapacityCommitment = new CapacityCommitment(),
    EnforceSingleAdminProjectPerOrg = false,
    CapacityCommitmentId = "",
};
// Make the request
CapacityCommitment response = await reservationServiceClient.CreateCapacityCommitmentAsync(request);

CreateCapacityCommitmentAsync(String, CapacityCommitment, CallSettings)

public virtual Task<CapacityCommitment> CreateCapacityCommitmentAsync(string parent, CapacityCommitment capacityCommitment, CallSettings callSettings = null)

Creates a new capacity commitment resource.

Parameters
NameDescription
parentString

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

capacityCommitmentCapacityCommitment

Content of the capacity commitment to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CapacityCommitment capacityCommitment = new CapacityCommitment();
// Make the request
CapacityCommitment response = await reservationServiceClient.CreateCapacityCommitmentAsync(parent, capacityCommitment);

CreateCapacityCommitmentAsync(String, CapacityCommitment, CancellationToken)

public virtual Task<CapacityCommitment> CreateCapacityCommitmentAsync(string parent, CapacityCommitment capacityCommitment, CancellationToken cancellationToken)

Creates a new capacity commitment resource.

Parameters
NameDescription
parentString

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

capacityCommitmentCapacityCommitment

Content of the capacity commitment to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CapacityCommitment capacityCommitment = new CapacityCommitment();
// Make the request
CapacityCommitment response = await reservationServiceClient.CreateCapacityCommitmentAsync(parent, capacityCommitment);

CreateReservation(LocationName, Reservation, String, CallSettings)

public virtual Reservation CreateReservation(LocationName parent, Reservation reservation, string reservationId, CallSettings callSettings = null)

Creates a new reservation resource.

Parameters
NameDescription
parentLocationName

Required. Project, location. E.g., projects/myproject/locations/US

reservationReservation

Definition of the new reservation to create.

reservationIdString

The reservation ID. It must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Reservation reservation = new Reservation();
string reservationId = "";
// Make the request
Reservation response = reservationServiceClient.CreateReservation(parent, reservation, reservationId);

CreateReservation(CreateReservationRequest, CallSettings)

public virtual Reservation CreateReservation(CreateReservationRequest request, CallSettings callSettings = null)

Creates a new reservation resource.

Parameters
NameDescription
requestCreateReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
CreateReservationRequest request = new CreateReservationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ReservationId = "",
    Reservation = new Reservation(),
};
// Make the request
Reservation response = reservationServiceClient.CreateReservation(request);

CreateReservation(String, Reservation, String, CallSettings)

public virtual Reservation CreateReservation(string parent, Reservation reservation, string reservationId, CallSettings callSettings = null)

Creates a new reservation resource.

Parameters
NameDescription
parentString

Required. Project, location. E.g., projects/myproject/locations/US

reservationReservation

Definition of the new reservation to create.

reservationIdString

The reservation ID. It must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Reservation reservation = new Reservation();
string reservationId = "";
// Make the request
Reservation response = reservationServiceClient.CreateReservation(parent, reservation, reservationId);

CreateReservationAsync(LocationName, Reservation, String, CallSettings)

public virtual Task<Reservation> CreateReservationAsync(LocationName parent, Reservation reservation, string reservationId, CallSettings callSettings = null)

Creates a new reservation resource.

Parameters
NameDescription
parentLocationName

Required. Project, location. E.g., projects/myproject/locations/US

reservationReservation

Definition of the new reservation to create.

reservationIdString

The reservation ID. It must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Reservation reservation = new Reservation();
string reservationId = "";
// Make the request
Reservation response = await reservationServiceClient.CreateReservationAsync(parent, reservation, reservationId);

CreateReservationAsync(LocationName, Reservation, String, CancellationToken)

public virtual Task<Reservation> CreateReservationAsync(LocationName parent, Reservation reservation, string reservationId, CancellationToken cancellationToken)

Creates a new reservation resource.

Parameters
NameDescription
parentLocationName

Required. Project, location. E.g., projects/myproject/locations/US

reservationReservation

Definition of the new reservation to create.

reservationIdString

The reservation ID. It must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Reservation reservation = new Reservation();
string reservationId = "";
// Make the request
Reservation response = await reservationServiceClient.CreateReservationAsync(parent, reservation, reservationId);

CreateReservationAsync(CreateReservationRequest, CallSettings)

public virtual Task<Reservation> CreateReservationAsync(CreateReservationRequest request, CallSettings callSettings = null)

Creates a new reservation resource.

Parameters
NameDescription
requestCreateReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateReservationRequest request = new CreateReservationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ReservationId = "",
    Reservation = new Reservation(),
};
// Make the request
Reservation response = await reservationServiceClient.CreateReservationAsync(request);

CreateReservationAsync(CreateReservationRequest, CancellationToken)

public virtual Task<Reservation> CreateReservationAsync(CreateReservationRequest request, CancellationToken cancellationToken)

Creates a new reservation resource.

Parameters
NameDescription
requestCreateReservationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateReservationRequest request = new CreateReservationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ReservationId = "",
    Reservation = new Reservation(),
};
// Make the request
Reservation response = await reservationServiceClient.CreateReservationAsync(request);

CreateReservationAsync(String, Reservation, String, CallSettings)

public virtual Task<Reservation> CreateReservationAsync(string parent, Reservation reservation, string reservationId, CallSettings callSettings = null)

Creates a new reservation resource.

Parameters
NameDescription
parentString

Required. Project, location. E.g., projects/myproject/locations/US

reservationReservation

Definition of the new reservation to create.

reservationIdString

The reservation ID. It must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Reservation reservation = new Reservation();
string reservationId = "";
// Make the request
Reservation response = await reservationServiceClient.CreateReservationAsync(parent, reservation, reservationId);

CreateReservationAsync(String, Reservation, String, CancellationToken)

public virtual Task<Reservation> CreateReservationAsync(string parent, Reservation reservation, string reservationId, CancellationToken cancellationToken)

Creates a new reservation resource.

Parameters
NameDescription
parentString

Required. Project, location. E.g., projects/myproject/locations/US

reservationReservation

Definition of the new reservation to create.

reservationIdString

The reservation ID. It must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Reservation reservation = new Reservation();
string reservationId = "";
// Make the request
Reservation response = await reservationServiceClient.CreateReservationAsync(parent, reservation, reservationId);

DeleteAssignment(AssignmentName, CallSettings)

public virtual void DeleteAssignment(AssignmentName name, CallSettings callSettings = null)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
nameAssignmentName

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
AssignmentName name = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
// Make the request
reservationServiceClient.DeleteAssignment(name);

DeleteAssignment(DeleteAssignmentRequest, CallSettings)

public virtual void DeleteAssignment(DeleteAssignmentRequest request, CallSettings callSettings = null)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
requestDeleteAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
DeleteAssignmentRequest request = new DeleteAssignmentRequest
{
    AssignmentName = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]"),
};
// Make the request
reservationServiceClient.DeleteAssignment(request);

DeleteAssignment(String, CallSettings)

public virtual void DeleteAssignment(string name, CallSettings callSettings = null)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
nameString

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]/assignments/[ASSIGNMENT]";
// Make the request
reservationServiceClient.DeleteAssignment(name);

DeleteAssignmentAsync(AssignmentName, CallSettings)

public virtual Task DeleteAssignmentAsync(AssignmentName name, CallSettings callSettings = null)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
nameAssignmentName

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
AssignmentName name = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
// Make the request
await reservationServiceClient.DeleteAssignmentAsync(name);

DeleteAssignmentAsync(AssignmentName, CancellationToken)

public virtual Task DeleteAssignmentAsync(AssignmentName name, CancellationToken cancellationToken)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
nameAssignmentName

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
AssignmentName name = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
// Make the request
await reservationServiceClient.DeleteAssignmentAsync(name);

DeleteAssignmentAsync(DeleteAssignmentRequest, CallSettings)

public virtual Task DeleteAssignmentAsync(DeleteAssignmentRequest request, CallSettings callSettings = null)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
requestDeleteAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAssignmentRequest request = new DeleteAssignmentRequest
{
    AssignmentName = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]"),
};
// Make the request
await reservationServiceClient.DeleteAssignmentAsync(request);

DeleteAssignmentAsync(DeleteAssignmentRequest, CancellationToken)

public virtual Task DeleteAssignmentAsync(DeleteAssignmentRequest request, CancellationToken cancellationToken)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
requestDeleteAssignmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAssignmentRequest request = new DeleteAssignmentRequest
{
    AssignmentName = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]"),
};
// Make the request
await reservationServiceClient.DeleteAssignmentAsync(request);

DeleteAssignmentAsync(String, CallSettings)

public virtual Task DeleteAssignmentAsync(string name, CallSettings callSettings = null)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
nameString

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]/assignments/[ASSIGNMENT]";
// Make the request
await reservationServiceClient.DeleteAssignmentAsync(name);

DeleteAssignmentAsync(String, CancellationToken)

public virtual Task DeleteAssignmentAsync(string name, CancellationToken cancellationToken)

Deletes a assignment. No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, deletion of the &amp;lt;organizationA, res1&amp;gt; assignment won't affect the other assignment &amp;lt;project1, res1&amp;gt;. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
NameDescription
nameString

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]/assignments/[ASSIGNMENT]";
// Make the request
await reservationServiceClient.DeleteAssignmentAsync(name);

DeleteCapacityCommitment(CapacityCommitmentName, CallSettings)

public virtual void DeleteCapacityCommitment(CapacityCommitmentName name, CallSettings callSettings = null)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
nameCapacityCommitmentName

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
// Make the request
reservationServiceClient.DeleteCapacityCommitment(name);

DeleteCapacityCommitment(DeleteCapacityCommitmentRequest, CallSettings)

public virtual void DeleteCapacityCommitment(DeleteCapacityCommitmentRequest request, CallSettings callSettings = null)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestDeleteCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
DeleteCapacityCommitmentRequest request = new DeleteCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
    Force = false,
};
// Make the request
reservationServiceClient.DeleteCapacityCommitment(request);

DeleteCapacityCommitment(String, CallSettings)

public virtual void DeleteCapacityCommitment(string name, CallSettings callSettings = null)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
nameString

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
// Make the request
reservationServiceClient.DeleteCapacityCommitment(name);

DeleteCapacityCommitmentAsync(CapacityCommitmentName, CallSettings)

public virtual Task DeleteCapacityCommitmentAsync(CapacityCommitmentName name, CallSettings callSettings = null)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
nameCapacityCommitmentName

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
// Make the request
await reservationServiceClient.DeleteCapacityCommitmentAsync(name);

DeleteCapacityCommitmentAsync(CapacityCommitmentName, CancellationToken)

public virtual Task DeleteCapacityCommitmentAsync(CapacityCommitmentName name, CancellationToken cancellationToken)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
nameCapacityCommitmentName

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
// Make the request
await reservationServiceClient.DeleteCapacityCommitmentAsync(name);

DeleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest, CallSettings)

public virtual Task DeleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest request, CallSettings callSettings = null)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestDeleteCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteCapacityCommitmentRequest request = new DeleteCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
    Force = false,
};
// Make the request
await reservationServiceClient.DeleteCapacityCommitmentAsync(request);

DeleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest, CancellationToken)

public virtual Task DeleteCapacityCommitmentAsync(DeleteCapacityCommitmentRequest request, CancellationToken cancellationToken)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestDeleteCapacityCommitmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteCapacityCommitmentRequest request = new DeleteCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
    Force = false,
};
// Make the request
await reservationServiceClient.DeleteCapacityCommitmentAsync(request);

DeleteCapacityCommitmentAsync(String, CallSettings)

public virtual Task DeleteCapacityCommitmentAsync(string name, CallSettings callSettings = null)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
nameString

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
// Make the request
await reservationServiceClient.DeleteCapacityCommitmentAsync(name);

DeleteCapacityCommitmentAsync(String, CancellationToken)

public virtual Task DeleteCapacityCommitmentAsync(string name, CancellationToken cancellationToken)

Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
nameString

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
// Make the request
await reservationServiceClient.DeleteCapacityCommitmentAsync(name);

DeleteReservation(DeleteReservationRequest, CallSettings)

public virtual void DeleteReservation(DeleteReservationRequest request, CallSettings callSettings = null)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
requestDeleteReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
DeleteReservationRequest request = new DeleteReservationRequest
{
    ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
reservationServiceClient.DeleteReservation(request);

DeleteReservation(ReservationName, CallSettings)

public virtual void DeleteReservation(ReservationName name, CallSettings callSettings = null)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
nameReservationName

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
ReservationName name = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
reservationServiceClient.DeleteReservation(name);

DeleteReservation(String, CallSettings)

public virtual void DeleteReservation(string name, CallSettings callSettings = null)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
nameString

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
reservationServiceClient.DeleteReservation(name);

DeleteReservationAsync(DeleteReservationRequest, CallSettings)

public virtual Task DeleteReservationAsync(DeleteReservationRequest request, CallSettings callSettings = null)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
requestDeleteReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteReservationRequest request = new DeleteReservationRequest
{
    ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
await reservationServiceClient.DeleteReservationAsync(request);

DeleteReservationAsync(DeleteReservationRequest, CancellationToken)

public virtual Task DeleteReservationAsync(DeleteReservationRequest request, CancellationToken cancellationToken)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
requestDeleteReservationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteReservationRequest request = new DeleteReservationRequest
{
    ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
await reservationServiceClient.DeleteReservationAsync(request);

DeleteReservationAsync(ReservationName, CallSettings)

public virtual Task DeleteReservationAsync(ReservationName name, CallSettings callSettings = null)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
nameReservationName

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ReservationName name = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
await reservationServiceClient.DeleteReservationAsync(name);

DeleteReservationAsync(ReservationName, CancellationToken)

public virtual Task DeleteReservationAsync(ReservationName name, CancellationToken cancellationToken)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
nameReservationName

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ReservationName name = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
await reservationServiceClient.DeleteReservationAsync(name);

DeleteReservationAsync(String, CallSettings)

public virtual Task DeleteReservationAsync(string name, CallSettings callSettings = null)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
nameString

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
await reservationServiceClient.DeleteReservationAsync(name);

DeleteReservationAsync(String, CancellationToken)

public virtual Task DeleteReservationAsync(string name, CancellationToken cancellationToken)

Deletes a reservation. Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
NameDescription
nameString

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
await reservationServiceClient.DeleteReservationAsync(name);

GetBiReservation(BiReservationName, CallSettings)

public virtual BiReservation GetBiReservation(BiReservationName name, CallSettings callSettings = null)

Retrieves a BI reservation.

Parameters
NameDescription
nameBiReservationName

Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BiReservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
BiReservationName name = BiReservationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
BiReservation response = reservationServiceClient.GetBiReservation(name);

GetBiReservation(GetBiReservationRequest, CallSettings)

public virtual BiReservation GetBiReservation(GetBiReservationRequest request, CallSettings callSettings = null)

Retrieves a BI reservation.

Parameters
NameDescription
requestGetBiReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BiReservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
GetBiReservationRequest request = new GetBiReservationRequest
{
    BiReservationName = BiReservationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
BiReservation response = reservationServiceClient.GetBiReservation(request);

GetBiReservation(String, CallSettings)

public virtual BiReservation GetBiReservation(string name, CallSettings callSettings = null)

Retrieves a BI reservation.

Parameters
NameDescription
nameString

Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BiReservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/biReservation";
// Make the request
BiReservation response = reservationServiceClient.GetBiReservation(name);

GetBiReservationAsync(BiReservationName, CallSettings)

public virtual Task<BiReservation> GetBiReservationAsync(BiReservationName name, CallSettings callSettings = null)

Retrieves a BI reservation.

Parameters
NameDescription
nameBiReservationName

Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
BiReservationName name = BiReservationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
BiReservation response = await reservationServiceClient.GetBiReservationAsync(name);

GetBiReservationAsync(BiReservationName, CancellationToken)

public virtual Task<BiReservation> GetBiReservationAsync(BiReservationName name, CancellationToken cancellationToken)

Retrieves a BI reservation.

Parameters
NameDescription
nameBiReservationName

Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
BiReservationName name = BiReservationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
BiReservation response = await reservationServiceClient.GetBiReservationAsync(name);

GetBiReservationAsync(GetBiReservationRequest, CallSettings)

public virtual Task<BiReservation> GetBiReservationAsync(GetBiReservationRequest request, CallSettings callSettings = null)

Retrieves a BI reservation.

Parameters
NameDescription
requestGetBiReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
GetBiReservationRequest request = new GetBiReservationRequest
{
    BiReservationName = BiReservationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
BiReservation response = await reservationServiceClient.GetBiReservationAsync(request);

GetBiReservationAsync(GetBiReservationRequest, CancellationToken)

public virtual Task<BiReservation> GetBiReservationAsync(GetBiReservationRequest request, CancellationToken cancellationToken)

Retrieves a BI reservation.

Parameters
NameDescription
requestGetBiReservationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
GetBiReservationRequest request = new GetBiReservationRequest
{
    BiReservationName = BiReservationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
BiReservation response = await reservationServiceClient.GetBiReservationAsync(request);

GetBiReservationAsync(String, CallSettings)

public virtual Task<BiReservation> GetBiReservationAsync(string name, CallSettings callSettings = null)

Retrieves a BI reservation.

Parameters
NameDescription
nameString

Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/biReservation";
// Make the request
BiReservation response = await reservationServiceClient.GetBiReservationAsync(name);

GetBiReservationAsync(String, CancellationToken)

public virtual Task<BiReservation> GetBiReservationAsync(string name, CancellationToken cancellationToken)

Retrieves a BI reservation.

Parameters
NameDescription
nameString

Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/biReservation";
// Make the request
BiReservation response = await reservationServiceClient.GetBiReservationAsync(name);

GetCapacityCommitment(CapacityCommitmentName, CallSettings)

public virtual CapacityCommitment GetCapacityCommitment(CapacityCommitmentName name, CallSettings callSettings = null)

Returns information about the capacity commitment.

Parameters
NameDescription
nameCapacityCommitmentName

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
// Make the request
CapacityCommitment response = reservationServiceClient.GetCapacityCommitment(name);

GetCapacityCommitment(GetCapacityCommitmentRequest, CallSettings)

public virtual CapacityCommitment GetCapacityCommitment(GetCapacityCommitmentRequest request, CallSettings callSettings = null)

Returns information about the capacity commitment.

Parameters
NameDescription
requestGetCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
GetCapacityCommitmentRequest request = new GetCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
};
// Make the request
CapacityCommitment response = reservationServiceClient.GetCapacityCommitment(request);

GetCapacityCommitment(String, CallSettings)

public virtual CapacityCommitment GetCapacityCommitment(string name, CallSettings callSettings = null)

Returns information about the capacity commitment.

Parameters
NameDescription
nameString

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
// Make the request
CapacityCommitment response = reservationServiceClient.GetCapacityCommitment(name);

GetCapacityCommitmentAsync(CapacityCommitmentName, CallSettings)

public virtual Task<CapacityCommitment> GetCapacityCommitmentAsync(CapacityCommitmentName name, CallSettings callSettings = null)

Returns information about the capacity commitment.

Parameters
NameDescription
nameCapacityCommitmentName

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
// Make the request
CapacityCommitment response = await reservationServiceClient.GetCapacityCommitmentAsync(name);

GetCapacityCommitmentAsync(CapacityCommitmentName, CancellationToken)

public virtual Task<CapacityCommitment> GetCapacityCommitmentAsync(CapacityCommitmentName name, CancellationToken cancellationToken)

Returns information about the capacity commitment.

Parameters
NameDescription
nameCapacityCommitmentName

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
// Make the request
CapacityCommitment response = await reservationServiceClient.GetCapacityCommitmentAsync(name);

GetCapacityCommitmentAsync(GetCapacityCommitmentRequest, CallSettings)

public virtual Task<CapacityCommitment> GetCapacityCommitmentAsync(GetCapacityCommitmentRequest request, CallSettings callSettings = null)

Returns information about the capacity commitment.

Parameters
NameDescription
requestGetCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
GetCapacityCommitmentRequest request = new GetCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
};
// Make the request
CapacityCommitment response = await reservationServiceClient.GetCapacityCommitmentAsync(request);

GetCapacityCommitmentAsync(GetCapacityCommitmentRequest, CancellationToken)

public virtual Task<CapacityCommitment> GetCapacityCommitmentAsync(GetCapacityCommitmentRequest request, CancellationToken cancellationToken)

Returns information about the capacity commitment.

Parameters
NameDescription
requestGetCapacityCommitmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
GetCapacityCommitmentRequest request = new GetCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
};
// Make the request
CapacityCommitment response = await reservationServiceClient.GetCapacityCommitmentAsync(request);

GetCapacityCommitmentAsync(String, CallSettings)

public virtual Task<CapacityCommitment> GetCapacityCommitmentAsync(string name, CallSettings callSettings = null)

Returns information about the capacity commitment.

Parameters
NameDescription
nameString

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
// Make the request
CapacityCommitment response = await reservationServiceClient.GetCapacityCommitmentAsync(name);

GetCapacityCommitmentAsync(String, CancellationToken)

public virtual Task<CapacityCommitment> GetCapacityCommitmentAsync(string name, CancellationToken cancellationToken)

Returns information about the capacity commitment.

Parameters
NameDescription
nameString

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
// Make the request
CapacityCommitment response = await reservationServiceClient.GetCapacityCommitmentAsync(name);

GetReservation(GetReservationRequest, CallSettings)

public virtual Reservation GetReservation(GetReservationRequest request, CallSettings callSettings = null)

Returns information about the reservation.

Parameters
NameDescription
requestGetReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
GetReservationRequest request = new GetReservationRequest
{
    ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Reservation response = reservationServiceClient.GetReservation(request);

GetReservation(ReservationName, CallSettings)

public virtual Reservation GetReservation(ReservationName name, CallSettings callSettings = null)

Returns information about the reservation.

Parameters
NameDescription
nameReservationName

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
ReservationName name = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
Reservation response = reservationServiceClient.GetReservation(name);

GetReservation(String, CallSettings)

public virtual Reservation GetReservation(string name, CallSettings callSettings = null)

Returns information about the reservation.

Parameters
NameDescription
nameString

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
Reservation response = reservationServiceClient.GetReservation(name);

GetReservationAsync(GetReservationRequest, CallSettings)

public virtual Task<Reservation> GetReservationAsync(GetReservationRequest request, CallSettings callSettings = null)

Returns information about the reservation.

Parameters
NameDescription
requestGetReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
GetReservationRequest request = new GetReservationRequest
{
    ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Reservation response = await reservationServiceClient.GetReservationAsync(request);

GetReservationAsync(GetReservationRequest, CancellationToken)

public virtual Task<Reservation> GetReservationAsync(GetReservationRequest request, CancellationToken cancellationToken)

Returns information about the reservation.

Parameters
NameDescription
requestGetReservationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
GetReservationRequest request = new GetReservationRequest
{
    ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Reservation response = await reservationServiceClient.GetReservationAsync(request);

GetReservationAsync(ReservationName, CallSettings)

public virtual Task<Reservation> GetReservationAsync(ReservationName name, CallSettings callSettings = null)

Returns information about the reservation.

Parameters
NameDescription
nameReservationName

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ReservationName name = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
Reservation response = await reservationServiceClient.GetReservationAsync(name);

GetReservationAsync(ReservationName, CancellationToken)

public virtual Task<Reservation> GetReservationAsync(ReservationName name, CancellationToken cancellationToken)

Returns information about the reservation.

Parameters
NameDescription
nameReservationName

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ReservationName name = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
Reservation response = await reservationServiceClient.GetReservationAsync(name);

GetReservationAsync(String, CallSettings)

public virtual Task<Reservation> GetReservationAsync(string name, CallSettings callSettings = null)

Returns information about the reservation.

Parameters
NameDescription
nameString

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
Reservation response = await reservationServiceClient.GetReservationAsync(name);

GetReservationAsync(String, CancellationToken)

public virtual Task<Reservation> GetReservationAsync(string name, CancellationToken cancellationToken)

Returns information about the reservation.

Parameters
NameDescription
nameString

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
Reservation response = await reservationServiceClient.GetReservationAsync(name);

ListAssignments(ListAssignmentsRequest, CallSettings)

public virtual PagedEnumerable<ListAssignmentsResponse, Assignment> ListAssignments(ListAssignmentsRequest request, CallSettings callSettings = null)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
requestListAssignmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
ListAssignmentsRequest request = new ListAssignmentsRequest
{
    ParentAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
PagedEnumerable<ListAssignmentsResponse, Assignment> response = reservationServiceClient.ListAssignments(request);

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

ListAssignments(ReservationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListAssignmentsResponse, Assignment> ListAssignments(ReservationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentReservationName

Required. The parent resource name e.g.:

projects/myproject/locations/US/reservations/team1-prod

Or:

projects/myproject/locations/US/reservations/-

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
ReservationName parent = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
PagedEnumerable<ListAssignmentsResponse, Assignment> response = reservationServiceClient.ListAssignments(parent);

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

ListAssignments(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListAssignmentsResponse, Assignment> ListAssignments(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentString

Required. The parent resource name e.g.:

projects/myproject/locations/US/reservations/team1-prod

Or:

projects/myproject/locations/US/reservations/-

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
PagedEnumerable<ListAssignmentsResponse, Assignment> response = reservationServiceClient.ListAssignments(parent);

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

ListAssignmentsAsync(ListAssignmentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAssignmentsResponse, Assignment> ListAssignmentsAsync(ListAssignmentsRequest request, CallSettings callSettings = null)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
requestListAssignmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ListAssignmentsRequest request = new ListAssignmentsRequest
{
    ParentAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
PagedAsyncEnumerable<ListAssignmentsResponse, Assignment> response = reservationServiceClient.ListAssignmentsAsync(request);

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

ListAssignmentsAsync(ReservationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListAssignmentsResponse, Assignment> ListAssignmentsAsync(ReservationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentReservationName

Required. The parent resource name e.g.:

projects/myproject/locations/US/reservations/team1-prod

Or:

projects/myproject/locations/US/reservations/-

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ReservationName parent = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
PagedAsyncEnumerable<ListAssignmentsResponse, Assignment> response = reservationServiceClient.ListAssignmentsAsync(parent);

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

ListAssignmentsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListAssignmentsResponse, Assignment> ListAssignmentsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: &amp;lt;organizationA, res1&amp;gt; and &amp;lt;project1, res1&amp;gt;

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentString

Required. The parent resource name e.g.:

projects/myproject/locations/US/reservations/team1-prod

Or:

projects/myproject/locations/US/reservations/-

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
PagedAsyncEnumerable<ListAssignmentsResponse, Assignment> response = reservationServiceClient.ListAssignmentsAsync(parent);

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

ListCapacityCommitments(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> ListCapacityCommitments(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the capacity commitments for the admin project.

Parameters
NameDescription
parentLocationName

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment>

A pageable sequence of CapacityCommitment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> response = reservationServiceClient.ListCapacityCommitments(parent);

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

ListCapacityCommitments(ListCapacityCommitmentsRequest, CallSettings)

public virtual PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> ListCapacityCommitments(ListCapacityCommitmentsRequest request, CallSettings callSettings = null)

Lists all the capacity commitments for the admin project.

Parameters
NameDescription
requestListCapacityCommitmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment>

A pageable sequence of CapacityCommitment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
ListCapacityCommitmentsRequest request = new ListCapacityCommitmentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> response = reservationServiceClient.ListCapacityCommitments(request);

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

ListCapacityCommitments(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> ListCapacityCommitments(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the capacity commitments for the admin project.

Parameters
NameDescription
parentString

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment>

A pageable sequence of CapacityCommitment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> response = reservationServiceClient.ListCapacityCommitments(parent);

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

ListCapacityCommitmentsAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> ListCapacityCommitmentsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the capacity commitments for the admin project.

Parameters
NameDescription
parentLocationName

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment>

A pageable asynchronous sequence of CapacityCommitment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> response = reservationServiceClient.ListCapacityCommitmentsAsync(parent);

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

ListCapacityCommitmentsAsync(ListCapacityCommitmentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> ListCapacityCommitmentsAsync(ListCapacityCommitmentsRequest request, CallSettings callSettings = null)

Lists all the capacity commitments for the admin project.

Parameters
NameDescription
requestListCapacityCommitmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment>

A pageable asynchronous sequence of CapacityCommitment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ListCapacityCommitmentsRequest request = new ListCapacityCommitmentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> response = reservationServiceClient.ListCapacityCommitmentsAsync(request);

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

ListCapacityCommitmentsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> ListCapacityCommitmentsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the capacity commitments for the admin project.

Parameters
NameDescription
parentString

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment>

A pageable asynchronous sequence of CapacityCommitment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListCapacityCommitmentsResponse, CapacityCommitment> response = reservationServiceClient.ListCapacityCommitmentsAsync(parent);

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

ListReservations(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListReservationsResponse, Reservation> ListReservations(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the reservations for the project in the specified location.

Parameters
NameDescription
parentLocationName

Required. The parent resource name containing project and location, e.g.: projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListReservationsResponse, Reservation>

A pageable sequence of Reservation resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListReservationsResponse, Reservation> response = reservationServiceClient.ListReservations(parent);

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

ListReservations(ListReservationsRequest, CallSettings)

public virtual PagedEnumerable<ListReservationsResponse, Reservation> ListReservations(ListReservationsRequest request, CallSettings callSettings = null)

Lists all the reservations for the project in the specified location.

Parameters
NameDescription
requestListReservationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListReservationsResponse, Reservation>

A pageable sequence of Reservation resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
ListReservationsRequest request = new ListReservationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListReservationsResponse, Reservation> response = reservationServiceClient.ListReservations(request);

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

ListReservations(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListReservationsResponse, Reservation> ListReservations(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the reservations for the project in the specified location.

Parameters
NameDescription
parentString

Required. The parent resource name containing project and location, e.g.: projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListReservationsResponse, Reservation>

A pageable sequence of Reservation resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListReservationsResponse, Reservation> response = reservationServiceClient.ListReservations(parent);

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

ListReservationsAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListReservationsResponse, Reservation> ListReservationsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the reservations for the project in the specified location.

Parameters
NameDescription
parentLocationName

Required. The parent resource name containing project and location, e.g.: projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListReservationsResponse, Reservation>

A pageable asynchronous sequence of Reservation resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListReservationsResponse, Reservation> response = reservationServiceClient.ListReservationsAsync(parent);

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

ListReservationsAsync(ListReservationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListReservationsResponse, Reservation> ListReservationsAsync(ListReservationsRequest request, CallSettings callSettings = null)

Lists all the reservations for the project in the specified location.

Parameters
NameDescription
requestListReservationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListReservationsResponse, Reservation>

A pageable asynchronous sequence of Reservation resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
ListReservationsRequest request = new ListReservationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListReservationsResponse, Reservation> response = reservationServiceClient.ListReservationsAsync(request);

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

ListReservationsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListReservationsResponse, Reservation> ListReservationsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists all the reservations for the project in the specified location.

Parameters
NameDescription
parentString

Required. The parent resource name containing project and location, e.g.: projects/myproject/locations/US

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListReservationsResponse, Reservation>

A pageable asynchronous sequence of Reservation resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListReservationsResponse, Reservation> response = reservationServiceClient.ListReservationsAsync(parent);

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

MergeCapacityCommitments(LocationName, IEnumerable<String>, CallSettings)

public virtual CapacityCommitment MergeCapacityCommitments(LocationName parent, IEnumerable<string> capacityCommitmentIds, CallSettings callSettings = null)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
parentLocationName

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

capacityCommitmentIdsIEnumerable<String>

Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
IEnumerable<string> capacityCommitmentIds = new string[] { "", };
// Make the request
CapacityCommitment response = reservationServiceClient.MergeCapacityCommitments(parent, capacityCommitmentIds);

MergeCapacityCommitments(MergeCapacityCommitmentsRequest, CallSettings)

public virtual CapacityCommitment MergeCapacityCommitments(MergeCapacityCommitmentsRequest request, CallSettings callSettings = null)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestMergeCapacityCommitmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
MergeCapacityCommitmentsRequest request = new MergeCapacityCommitmentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CapacityCommitmentIds = { "", },
};
// Make the request
CapacityCommitment response = reservationServiceClient.MergeCapacityCommitments(request);

MergeCapacityCommitments(String, IEnumerable<String>, CallSettings)

public virtual CapacityCommitment MergeCapacityCommitments(string parent, IEnumerable<string> capacityCommitmentIds, CallSettings callSettings = null)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
parentString

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

capacityCommitmentIdsIEnumerable<String>

Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
IEnumerable<string> capacityCommitmentIds = new string[] { "", };
// Make the request
CapacityCommitment response = reservationServiceClient.MergeCapacityCommitments(parent, capacityCommitmentIds);

MergeCapacityCommitmentsAsync(LocationName, IEnumerable<String>, CallSettings)

public virtual Task<CapacityCommitment> MergeCapacityCommitmentsAsync(LocationName parent, IEnumerable<string> capacityCommitmentIds, CallSettings callSettings = null)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
parentLocationName

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

capacityCommitmentIdsIEnumerable<String>

Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
IEnumerable<string> capacityCommitmentIds = new string[] { "", };
// Make the request
CapacityCommitment response = await reservationServiceClient.MergeCapacityCommitmentsAsync(parent, capacityCommitmentIds);

MergeCapacityCommitmentsAsync(LocationName, IEnumerable<String>, CancellationToken)

public virtual Task<CapacityCommitment> MergeCapacityCommitmentsAsync(LocationName parent, IEnumerable<string> capacityCommitmentIds, CancellationToken cancellationToken)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
parentLocationName

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

capacityCommitmentIdsIEnumerable<String>

Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
IEnumerable<string> capacityCommitmentIds = new string[] { "", };
// Make the request
CapacityCommitment response = await reservationServiceClient.MergeCapacityCommitmentsAsync(parent, capacityCommitmentIds);

MergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest, CallSettings)

public virtual Task<CapacityCommitment> MergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest request, CallSettings callSettings = null)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestMergeCapacityCommitmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
MergeCapacityCommitmentsRequest request = new MergeCapacityCommitmentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CapacityCommitmentIds = { "", },
};
// Make the request
CapacityCommitment response = await reservationServiceClient.MergeCapacityCommitmentsAsync(request);

MergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest, CancellationToken)

public virtual Task<CapacityCommitment> MergeCapacityCommitmentsAsync(MergeCapacityCommitmentsRequest request, CancellationToken cancellationToken)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestMergeCapacityCommitmentsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
MergeCapacityCommitmentsRequest request = new MergeCapacityCommitmentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CapacityCommitmentIds = { "", },
};
// Make the request
CapacityCommitment response = await reservationServiceClient.MergeCapacityCommitmentsAsync(request);

MergeCapacityCommitmentsAsync(String, IEnumerable<String>, CallSettings)

public virtual Task<CapacityCommitment> MergeCapacityCommitmentsAsync(string parent, IEnumerable<string> capacityCommitmentIds, CallSettings callSettings = null)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
parentString

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

capacityCommitmentIdsIEnumerable<String>

Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
IEnumerable<string> capacityCommitmentIds = new string[] { "", };
// Make the request
CapacityCommitment response = await reservationServiceClient.MergeCapacityCommitmentsAsync(parent, capacityCommitmentIds);

MergeCapacityCommitmentsAsync(String, IEnumerable<String>, CancellationToken)

public virtual Task<CapacityCommitment> MergeCapacityCommitmentsAsync(string parent, IEnumerable<string> capacityCommitmentIds, CancellationToken cancellationToken)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
parentString

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

capacityCommitmentIdsIEnumerable<String>

Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
IEnumerable<string> capacityCommitmentIds = new string[] { "", };
// Make the request
CapacityCommitment response = await reservationServiceClient.MergeCapacityCommitmentsAsync(parent, capacityCommitmentIds);

MoveAssignment(AssignmentName, ReservationName, CallSettings)

public virtual Assignment MoveAssignment(AssignmentName name, ReservationName destinationId, CallSettings callSettings = null)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
nameAssignmentName

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

destinationIdReservationName

The new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
AssignmentName name = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
ReservationName destinationId = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
Assignment response = reservationServiceClient.MoveAssignment(name, destinationId);

MoveAssignment(MoveAssignmentRequest, CallSettings)

public virtual Assignment MoveAssignment(MoveAssignmentRequest request, CallSettings callSettings = null)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
requestMoveAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
MoveAssignmentRequest request = new MoveAssignmentRequest
{
    AssignmentName = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]"),
    DestinationIdAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Assignment response = reservationServiceClient.MoveAssignment(request);

MoveAssignment(String, String, CallSettings)

public virtual Assignment MoveAssignment(string name, string destinationId, CallSettings callSettings = null)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
nameString

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

destinationIdString

The new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]/assignments/[ASSIGNMENT]";
string destinationId = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
Assignment response = reservationServiceClient.MoveAssignment(name, destinationId);

MoveAssignmentAsync(AssignmentName, ReservationName, CallSettings)

public virtual Task<Assignment> MoveAssignmentAsync(AssignmentName name, ReservationName destinationId, CallSettings callSettings = null)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
nameAssignmentName

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

destinationIdReservationName

The new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
AssignmentName name = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
ReservationName destinationId = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
Assignment response = await reservationServiceClient.MoveAssignmentAsync(name, destinationId);

MoveAssignmentAsync(AssignmentName, ReservationName, CancellationToken)

public virtual Task<Assignment> MoveAssignmentAsync(AssignmentName name, ReservationName destinationId, CancellationToken cancellationToken)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
nameAssignmentName

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

destinationIdReservationName

The new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
AssignmentName name = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
ReservationName destinationId = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]");
// Make the request
Assignment response = await reservationServiceClient.MoveAssignmentAsync(name, destinationId);

MoveAssignmentAsync(MoveAssignmentRequest, CallSettings)

public virtual Task<Assignment> MoveAssignmentAsync(MoveAssignmentRequest request, CallSettings callSettings = null)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
requestMoveAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
MoveAssignmentRequest request = new MoveAssignmentRequest
{
    AssignmentName = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]"),
    DestinationIdAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Assignment response = await reservationServiceClient.MoveAssignmentAsync(request);

MoveAssignmentAsync(MoveAssignmentRequest, CancellationToken)

public virtual Task<Assignment> MoveAssignmentAsync(MoveAssignmentRequest request, CancellationToken cancellationToken)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
requestMoveAssignmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
MoveAssignmentRequest request = new MoveAssignmentRequest
{
    AssignmentName = AssignmentName.FromProjectLocationReservationAssignment("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]"),
    DestinationIdAsReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Assignment response = await reservationServiceClient.MoveAssignmentAsync(request);

MoveAssignmentAsync(String, String, CallSettings)

public virtual Task<Assignment> MoveAssignmentAsync(string name, string destinationId, CallSettings callSettings = null)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
nameString

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

destinationIdString

The new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]/assignments/[ASSIGNMENT]";
string destinationId = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
Assignment response = await reservationServiceClient.MoveAssignmentAsync(name, destinationId);

MoveAssignmentAsync(String, String, CancellationToken)

public virtual Task<Assignment> MoveAssignmentAsync(string name, string destinationId, CancellationToken cancellationToken)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
NameDescription
nameString

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

destinationIdString

The new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]/assignments/[ASSIGNMENT]";
string destinationId = "projects/[PROJECT]/locations/[LOCATION]/reservations/[RESERVATION]";
// Make the request
Assignment response = await reservationServiceClient.MoveAssignmentAsync(name, destinationId);

SearchAllAssignments(LocationName, String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<SearchAllAssignmentsResponse, Assignment> SearchAllAssignments(LocationName parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.
Parameters
NameDescription
parentLocationName

Required. The resource name with location (project name could be the wildcard '-'), e.g.: projects/-/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAllAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string query = "";
// Make the request
PagedEnumerable<SearchAllAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAllAssignments(parent, query);

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

SearchAllAssignments(SearchAllAssignmentsRequest, CallSettings)

public virtual PagedEnumerable<SearchAllAssignmentsResponse, Assignment> SearchAllAssignments(SearchAllAssignmentsRequest request, CallSettings callSettings = null)

Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.
Parameters
NameDescription
requestSearchAllAssignmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAllAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
SearchAllAssignmentsRequest request = new SearchAllAssignmentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Query = "",
};
// Make the request
PagedEnumerable<SearchAllAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAllAssignments(request);

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

SearchAllAssignments(String, String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<SearchAllAssignmentsResponse, Assignment> SearchAllAssignments(string parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.
Parameters
NameDescription
parentString

Required. The resource name with location (project name could be the wildcard '-'), e.g.: projects/-/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAllAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string query = "";
// Make the request
PagedEnumerable<SearchAllAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAllAssignments(parent, query);

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

SearchAllAssignmentsAsync(LocationName, String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment> SearchAllAssignmentsAsync(LocationName parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.
Parameters
NameDescription
parentLocationName

Required. The resource name with location (project name could be the wildcard '-'), e.g.: projects/-/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string query = "";
// Make the request
PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAllAssignmentsAsync(parent, query);

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

SearchAllAssignmentsAsync(SearchAllAssignmentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment> SearchAllAssignmentsAsync(SearchAllAssignmentsRequest request, CallSettings callSettings = null)

Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.
Parameters
NameDescription
requestSearchAllAssignmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
SearchAllAssignmentsRequest request = new SearchAllAssignmentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Query = "",
};
// Make the request
PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAllAssignmentsAsync(request);

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

SearchAllAssignmentsAsync(String, String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment> SearchAllAssignmentsAsync(string parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.
Parameters
NameDescription
parentString

Required. The resource name with location (project name could be the wildcard '-'), e.g.: projects/-/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string query = "";
// Make the request
PagedAsyncEnumerable<SearchAllAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAllAssignmentsAsync(parent, query);

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

SearchAssignments(LocationName, String, String, Nullable<Int32>, CallSettings)

[Obsolete]
public virtual PagedEnumerable<SearchAssignmentsResponse, Assignment> SearchAssignments(LocationName parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentLocationName

Required. The resource name of the admin project(containing project and location), e.g.: projects/myproject/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
            // Create client
            ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
            // Initialize request argument(s)
            LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            string query = "";
            // Make the request
#pragma warning disable CS0612
            PagedEnumerable<SearchAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAssignments(parent, query);
#pragma warning restore CS0612

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

SearchAssignments(SearchAssignmentsRequest, CallSettings)

[Obsolete]
public virtual PagedEnumerable<SearchAssignmentsResponse, Assignment> SearchAssignments(SearchAssignmentsRequest request, CallSettings callSettings = null)

Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
requestSearchAssignmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
            // Create client
            ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
            // Initialize request argument(s)
            SearchAssignmentsRequest request = new SearchAssignmentsRequest
            {
                ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
                Query = "",
            };
            // Make the request
#pragma warning disable CS0612
            PagedEnumerable<SearchAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAssignments(request);
#pragma warning restore CS0612

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

SearchAssignments(String, String, String, Nullable<Int32>, CallSettings)

[Obsolete]
public virtual PagedEnumerable<SearchAssignmentsResponse, Assignment> SearchAssignments(string parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentString

Required. The resource name of the admin project(containing project and location), e.g.: projects/myproject/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAssignmentsResponse, Assignment>

A pageable sequence of Assignment resources.

Example
            // Create client
            ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]";
            string query = "";
            // Make the request
#pragma warning disable CS0612
            PagedEnumerable<SearchAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAssignments(parent, query);
#pragma warning restore CS0612

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

SearchAssignmentsAsync(LocationName, String, String, Nullable<Int32>, CallSettings)

[Obsolete]
public virtual PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment> SearchAssignmentsAsync(LocationName parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentLocationName

Required. The resource name of the admin project(containing project and location), e.g.: projects/myproject/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
            // Create client
            ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
            // Initialize request argument(s)
            LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            string query = "";
            // Make the request
#pragma warning disable CS0612
            PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAssignmentsAsync(parent, query);
#pragma warning restore CS0612

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

SearchAssignmentsAsync(SearchAssignmentsRequest, CallSettings)

[Obsolete]
public virtual PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment> SearchAssignmentsAsync(SearchAssignmentsRequest request, CallSettings callSettings = null)

Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
requestSearchAssignmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
            // Create client
            ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
            // Initialize request argument(s)
            SearchAssignmentsRequest request = new SearchAssignmentsRequest
            {
                ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
                Query = "",
            };
            // Make the request
#pragma warning disable CS0612
            PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAssignmentsAsync(request);
#pragma warning restore CS0612

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

SearchAssignmentsAsync(String, String, String, Nullable<Int32>, CallSettings)

[Obsolete]
public virtual PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment> SearchAssignmentsAsync(string parent, string query, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:

  1. Assignments created on the project will be returned if they exist.
  2. Otherwise assignments created on the closest ancestor will be returned.
  3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior differences:

  1. permission on the assignee will be verified in this API.
  2. Hierarchy lookup (project-&gt;folder-&gt;organization) happens in this API.
  3. Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
NameDescription
parentString

Required. The resource name of the admin project(containing project and location), e.g.: projects/myproject/locations/US.

queryString

Please specify resource name as assignee in the query.

Examples:

  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment>

A pageable asynchronous sequence of Assignment resources.

Example
            // Create client
            ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]";
            string query = "";
            // Make the request
#pragma warning disable CS0612
            PagedAsyncEnumerable<SearchAssignmentsResponse, Assignment> response = reservationServiceClient.SearchAssignmentsAsync(parent, query);
#pragma warning restore CS0612

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

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
TypeDescription
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.

SplitCapacityCommitment(CapacityCommitmentName, Int64, CallSettings)

public virtual SplitCapacityCommitmentResponse SplitCapacityCommitment(CapacityCommitmentName name, long slotCount, CallSettings callSettings = null)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
nameCapacityCommitmentName

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

slotCountInt64

Number of slots in the capacity commitment after the split.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SplitCapacityCommitmentResponse

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
long slotCount = 0L;
// Make the request
SplitCapacityCommitmentResponse response = reservationServiceClient.SplitCapacityCommitment(name, slotCount);

SplitCapacityCommitment(SplitCapacityCommitmentRequest, CallSettings)

public virtual SplitCapacityCommitmentResponse SplitCapacityCommitment(SplitCapacityCommitmentRequest request, CallSettings callSettings = null)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
requestSplitCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SplitCapacityCommitmentResponse

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
SplitCapacityCommitmentRequest request = new SplitCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
    SlotCount = 0L,
};
// Make the request
SplitCapacityCommitmentResponse response = reservationServiceClient.SplitCapacityCommitment(request);

SplitCapacityCommitment(String, Int64, CallSettings)

public virtual SplitCapacityCommitmentResponse SplitCapacityCommitment(string name, long slotCount, CallSettings callSettings = null)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
nameString

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

slotCountInt64

Number of slots in the capacity commitment after the split.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SplitCapacityCommitmentResponse

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
long slotCount = 0L;
// Make the request
SplitCapacityCommitmentResponse response = reservationServiceClient.SplitCapacityCommitment(name, slotCount);

SplitCapacityCommitmentAsync(CapacityCommitmentName, Int64, CallSettings)

public virtual Task<SplitCapacityCommitmentResponse> SplitCapacityCommitmentAsync(CapacityCommitmentName name, long slotCount, CallSettings callSettings = null)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
nameCapacityCommitmentName

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

slotCountInt64

Number of slots in the capacity commitment after the split.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SplitCapacityCommitmentResponse>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
long slotCount = 0L;
// Make the request
SplitCapacityCommitmentResponse response = await reservationServiceClient.SplitCapacityCommitmentAsync(name, slotCount);

SplitCapacityCommitmentAsync(CapacityCommitmentName, Int64, CancellationToken)

public virtual Task<SplitCapacityCommitmentResponse> SplitCapacityCommitmentAsync(CapacityCommitmentName name, long slotCount, CancellationToken cancellationToken)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
nameCapacityCommitmentName

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

slotCountInt64

Number of slots in the capacity commitment after the split.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SplitCapacityCommitmentResponse>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitmentName name = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
long slotCount = 0L;
// Make the request
SplitCapacityCommitmentResponse response = await reservationServiceClient.SplitCapacityCommitmentAsync(name, slotCount);

SplitCapacityCommitmentAsync(SplitCapacityCommitmentRequest, CallSettings)

public virtual Task<SplitCapacityCommitmentResponse> SplitCapacityCommitmentAsync(SplitCapacityCommitmentRequest request, CallSettings callSettings = null)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
requestSplitCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SplitCapacityCommitmentResponse>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
SplitCapacityCommitmentRequest request = new SplitCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
    SlotCount = 0L,
};
// Make the request
SplitCapacityCommitmentResponse response = await reservationServiceClient.SplitCapacityCommitmentAsync(request);

SplitCapacityCommitmentAsync(SplitCapacityCommitmentRequest, CancellationToken)

public virtual Task<SplitCapacityCommitmentResponse> SplitCapacityCommitmentAsync(SplitCapacityCommitmentRequest request, CancellationToken cancellationToken)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
requestSplitCapacityCommitmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SplitCapacityCommitmentResponse>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
SplitCapacityCommitmentRequest request = new SplitCapacityCommitmentRequest
{
    CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"),
    SlotCount = 0L,
};
// Make the request
SplitCapacityCommitmentResponse response = await reservationServiceClient.SplitCapacityCommitmentAsync(request);

SplitCapacityCommitmentAsync(String, Int64, CallSettings)

public virtual Task<SplitCapacityCommitmentResponse> SplitCapacityCommitmentAsync(string name, long slotCount, CallSettings callSettings = null)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
nameString

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

slotCountInt64

Number of slots in the capacity commitment after the split.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SplitCapacityCommitmentResponse>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
long slotCount = 0L;
// Make the request
SplitCapacityCommitmentResponse response = await reservationServiceClient.SplitCapacityCommitmentAsync(name, slotCount);

SplitCapacityCommitmentAsync(String, Int64, CancellationToken)

public virtual Task<SplitCapacityCommitmentResponse> SplitCapacityCommitmentAsync(string name, long slotCount, CancellationToken cancellationToken)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
NameDescription
nameString

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

slotCountInt64

Number of slots in the capacity commitment after the split.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SplitCapacityCommitmentResponse>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/capacityCommitments/[CAPACITY_COMMITMENT]";
long slotCount = 0L;
// Make the request
SplitCapacityCommitmentResponse response = await reservationServiceClient.SplitCapacityCommitmentAsync(name, slotCount);

UpdateAssignment(Assignment, FieldMask, CallSettings)

public virtual Assignment UpdateAssignment(Assignment assignment, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
NameDescription
assignmentAssignment

Content of the assignment to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
Assignment assignment = new Assignment();
FieldMask updateMask = new FieldMask();
// Make the request
Assignment response = reservationServiceClient.UpdateAssignment(assignment, updateMask);

UpdateAssignment(UpdateAssignmentRequest, CallSettings)

public virtual Assignment UpdateAssignment(UpdateAssignmentRequest request, CallSettings callSettings = null)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
NameDescription
requestUpdateAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Assignment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
UpdateAssignmentRequest request = new UpdateAssignmentRequest
{
    Assignment = new Assignment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Assignment response = reservationServiceClient.UpdateAssignment(request);

UpdateAssignmentAsync(Assignment, FieldMask, CallSettings)

public virtual Task<Assignment> UpdateAssignmentAsync(Assignment assignment, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
NameDescription
assignmentAssignment

Content of the assignment to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
Assignment assignment = new Assignment();
FieldMask updateMask = new FieldMask();
// Make the request
Assignment response = await reservationServiceClient.UpdateAssignmentAsync(assignment, updateMask);

UpdateAssignmentAsync(Assignment, FieldMask, CancellationToken)

public virtual Task<Assignment> UpdateAssignmentAsync(Assignment assignment, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
NameDescription
assignmentAssignment

Content of the assignment to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
Assignment assignment = new Assignment();
FieldMask updateMask = new FieldMask();
// Make the request
Assignment response = await reservationServiceClient.UpdateAssignmentAsync(assignment, updateMask);

UpdateAssignmentAsync(UpdateAssignmentRequest, CallSettings)

public virtual Task<Assignment> UpdateAssignmentAsync(UpdateAssignmentRequest request, CallSettings callSettings = null)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
NameDescription
requestUpdateAssignmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAssignmentRequest request = new UpdateAssignmentRequest
{
    Assignment = new Assignment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Assignment response = await reservationServiceClient.UpdateAssignmentAsync(request);

UpdateAssignmentAsync(UpdateAssignmentRequest, CancellationToken)

public virtual Task<Assignment> UpdateAssignmentAsync(UpdateAssignmentRequest request, CancellationToken cancellationToken)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
NameDescription
requestUpdateAssignmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Assignment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAssignmentRequest request = new UpdateAssignmentRequest
{
    Assignment = new Assignment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Assignment response = await reservationServiceClient.UpdateAssignmentAsync(request);

UpdateBiReservation(BiReservation, FieldMask, CallSettings)

public virtual BiReservation UpdateBiReservation(BiReservation biReservation, FieldMask updateMask, CallSettings callSettings = null)

Updates a BI reservation.

Only fields specified in the field_mask are updated.

A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

Parameters
NameDescription
biReservationBiReservation

A reservation to update.

updateMaskFieldMask

A list of fields to be updated in this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BiReservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
BiReservation biReservation = new BiReservation();
FieldMask updateMask = new FieldMask();
// Make the request
BiReservation response = reservationServiceClient.UpdateBiReservation(biReservation, updateMask);

UpdateBiReservation(UpdateBiReservationRequest, CallSettings)

public virtual BiReservation UpdateBiReservation(UpdateBiReservationRequest request, CallSettings callSettings = null)

Updates a BI reservation.

Only fields specified in the field_mask are updated.

A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

Parameters
NameDescription
requestUpdateBiReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BiReservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
UpdateBiReservationRequest request = new UpdateBiReservationRequest
{
    BiReservation = new BiReservation(),
    UpdateMask = new FieldMask(),
};
// Make the request
BiReservation response = reservationServiceClient.UpdateBiReservation(request);

UpdateBiReservationAsync(BiReservation, FieldMask, CallSettings)

public virtual Task<BiReservation> UpdateBiReservationAsync(BiReservation biReservation, FieldMask updateMask, CallSettings callSettings = null)

Updates a BI reservation.

Only fields specified in the field_mask are updated.

A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

Parameters
NameDescription
biReservationBiReservation

A reservation to update.

updateMaskFieldMask

A list of fields to be updated in this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
BiReservation biReservation = new BiReservation();
FieldMask updateMask = new FieldMask();
// Make the request
BiReservation response = await reservationServiceClient.UpdateBiReservationAsync(biReservation, updateMask);

UpdateBiReservationAsync(BiReservation, FieldMask, CancellationToken)

public virtual Task<BiReservation> UpdateBiReservationAsync(BiReservation biReservation, FieldMask updateMask, CancellationToken cancellationToken)

Updates a BI reservation.

Only fields specified in the field_mask are updated.

A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

Parameters
NameDescription
biReservationBiReservation

A reservation to update.

updateMaskFieldMask

A list of fields to be updated in this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
BiReservation biReservation = new BiReservation();
FieldMask updateMask = new FieldMask();
// Make the request
BiReservation response = await reservationServiceClient.UpdateBiReservationAsync(biReservation, updateMask);

UpdateBiReservationAsync(UpdateBiReservationRequest, CallSettings)

public virtual Task<BiReservation> UpdateBiReservationAsync(UpdateBiReservationRequest request, CallSettings callSettings = null)

Updates a BI reservation.

Only fields specified in the field_mask are updated.

A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

Parameters
NameDescription
requestUpdateBiReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBiReservationRequest request = new UpdateBiReservationRequest
{
    BiReservation = new BiReservation(),
    UpdateMask = new FieldMask(),
};
// Make the request
BiReservation response = await reservationServiceClient.UpdateBiReservationAsync(request);

UpdateBiReservationAsync(UpdateBiReservationRequest, CancellationToken)

public virtual Task<BiReservation> UpdateBiReservationAsync(UpdateBiReservationRequest request, CancellationToken cancellationToken)

Updates a BI reservation.

Only fields specified in the field_mask are updated.

A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

Parameters
NameDescription
requestUpdateBiReservationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BiReservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBiReservationRequest request = new UpdateBiReservationRequest
{
    BiReservation = new BiReservation(),
    UpdateMask = new FieldMask(),
};
// Make the request
BiReservation response = await reservationServiceClient.UpdateBiReservationAsync(request);

UpdateCapacityCommitment(CapacityCommitment, FieldMask, CallSettings)

public virtual CapacityCommitment UpdateCapacityCommitment(CapacityCommitment capacityCommitment, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
capacityCommitmentCapacityCommitment

Content of the capacity commitment to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
CapacityCommitment capacityCommitment = new CapacityCommitment();
FieldMask updateMask = new FieldMask();
// Make the request
CapacityCommitment response = reservationServiceClient.UpdateCapacityCommitment(capacityCommitment, updateMask);

UpdateCapacityCommitment(UpdateCapacityCommitmentRequest, CallSettings)

public virtual CapacityCommitment UpdateCapacityCommitment(UpdateCapacityCommitmentRequest request, CallSettings callSettings = null)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestUpdateCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CapacityCommitment

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
UpdateCapacityCommitmentRequest request = new UpdateCapacityCommitmentRequest
{
    CapacityCommitment = new CapacityCommitment(),
    UpdateMask = new FieldMask(),
};
// Make the request
CapacityCommitment response = reservationServiceClient.UpdateCapacityCommitment(request);

UpdateCapacityCommitmentAsync(CapacityCommitment, FieldMask, CallSettings)

public virtual Task<CapacityCommitment> UpdateCapacityCommitmentAsync(CapacityCommitment capacityCommitment, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
capacityCommitmentCapacityCommitment

Content of the capacity commitment to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitment capacityCommitment = new CapacityCommitment();
FieldMask updateMask = new FieldMask();
// Make the request
CapacityCommitment response = await reservationServiceClient.UpdateCapacityCommitmentAsync(capacityCommitment, updateMask);

UpdateCapacityCommitmentAsync(CapacityCommitment, FieldMask, CancellationToken)

public virtual Task<CapacityCommitment> UpdateCapacityCommitmentAsync(CapacityCommitment capacityCommitment, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
capacityCommitmentCapacityCommitment

Content of the capacity commitment to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
CapacityCommitment capacityCommitment = new CapacityCommitment();
FieldMask updateMask = new FieldMask();
// Make the request
CapacityCommitment response = await reservationServiceClient.UpdateCapacityCommitmentAsync(capacityCommitment, updateMask);

UpdateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest, CallSettings)

public virtual Task<CapacityCommitment> UpdateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest request, CallSettings callSettings = null)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestUpdateCapacityCommitmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCapacityCommitmentRequest request = new UpdateCapacityCommitmentRequest
{
    CapacityCommitment = new CapacityCommitment(),
    UpdateMask = new FieldMask(),
};
// Make the request
CapacityCommitment response = await reservationServiceClient.UpdateCapacityCommitmentAsync(request);

UpdateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest, CancellationToken)

public virtual Task<CapacityCommitment> UpdateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest request, CancellationToken cancellationToken)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
NameDescription
requestUpdateCapacityCommitmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CapacityCommitment>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCapacityCommitmentRequest request = new UpdateCapacityCommitmentRequest
{
    CapacityCommitment = new CapacityCommitment(),
    UpdateMask = new FieldMask(),
};
// Make the request
CapacityCommitment response = await reservationServiceClient.UpdateCapacityCommitmentAsync(request);

UpdateReservation(Reservation, FieldMask, CallSettings)

public virtual Reservation UpdateReservation(Reservation reservation, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing reservation resource.

Parameters
NameDescription
reservationReservation

Content of the reservation to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
Reservation reservation = new Reservation();
FieldMask updateMask = new FieldMask();
// Make the request
Reservation response = reservationServiceClient.UpdateReservation(reservation, updateMask);

UpdateReservation(UpdateReservationRequest, CallSettings)

public virtual Reservation UpdateReservation(UpdateReservationRequest request, CallSettings callSettings = null)

Updates an existing reservation resource.

Parameters
NameDescription
requestUpdateReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Reservation

The RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
UpdateReservationRequest request = new UpdateReservationRequest
{
    Reservation = new Reservation(),
    UpdateMask = new FieldMask(),
};
// Make the request
Reservation response = reservationServiceClient.UpdateReservation(request);

UpdateReservationAsync(Reservation, FieldMask, CallSettings)

public virtual Task<Reservation> UpdateReservationAsync(Reservation reservation, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing reservation resource.

Parameters
NameDescription
reservationReservation

Content of the reservation to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
Reservation reservation = new Reservation();
FieldMask updateMask = new FieldMask();
// Make the request
Reservation response = await reservationServiceClient.UpdateReservationAsync(reservation, updateMask);

UpdateReservationAsync(Reservation, FieldMask, CancellationToken)

public virtual Task<Reservation> UpdateReservationAsync(Reservation reservation, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing reservation resource.

Parameters
NameDescription
reservationReservation

Content of the reservation to update.

updateMaskFieldMask

Standard field mask for the set of fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
Reservation reservation = new Reservation();
FieldMask updateMask = new FieldMask();
// Make the request
Reservation response = await reservationServiceClient.UpdateReservationAsync(reservation, updateMask);

UpdateReservationAsync(UpdateReservationRequest, CallSettings)

public virtual Task<Reservation> UpdateReservationAsync(UpdateReservationRequest request, CallSettings callSettings = null)

Updates an existing reservation resource.

Parameters
NameDescription
requestUpdateReservationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateReservationRequest request = new UpdateReservationRequest
{
    Reservation = new Reservation(),
    UpdateMask = new FieldMask(),
};
// Make the request
Reservation response = await reservationServiceClient.UpdateReservationAsync(request);

UpdateReservationAsync(UpdateReservationRequest, CancellationToken)

public virtual Task<Reservation> UpdateReservationAsync(UpdateReservationRequest request, CancellationToken cancellationToken)

Updates an existing reservation resource.

Parameters
NameDescription
requestUpdateReservationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Reservation>

A Task containing the RPC response.

Example
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateReservationRequest request = new UpdateReservationRequest
{
    Reservation = new Reservation(),
    UpdateMask = new FieldMask(),
};
// Make the request
Reservation response = await reservationServiceClient.UpdateReservationAsync(request);