/// <summary>Snippet for GetCapacityCommitment</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetCapacityCommitmentResourceNames() { // 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); }
/// <summary>Snippet for DeleteCapacityCommitmentAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task DeleteCapacityCommitmentResourceNamesAsync() { // 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); }
/// <summary>Snippet for SplitCapacityCommitmentAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task SplitCapacityCommitmentResourceNamesAsync() { // 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); }
/// <summary>Snippet for GetCapacityCommitmentAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetCapacityCommitmentRequestObjectAsync() { // 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); }
/// <summary>Snippet for DeleteCapacityCommitment</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DeleteCapacityCommitmentRequestObject() { // Create client ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create(); // Initialize request argument(s) DeleteCapacityCommitmentRequest request = new DeleteCapacityCommitmentRequest { CapacityCommitmentName = CapacityCommitmentName.FromProjectLocationCapacityCommitment("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]"), }; // Make the request reservationServiceClient.DeleteCapacityCommitment(request); }
/// <summary>Snippet for SplitCapacityCommitment</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void SplitCapacityCommitmentRequestObject() { // 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); }