/// <summary>Snippet for CreateCapacityCommitment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateCapacityCommitmentResourceNames()
 {
     // 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);
 }
Esempio n. 2
0
 /// <summary>Snippet for CreateCapacityCommitment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateCapacityCommitment()
 {
     // 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);
 }
Esempio n. 3
0
 /// <summary>Snippet for CreateCapacityCommitment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateCapacityCommitmentRequestObject()
 {
     // Create client
     ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
     // Initialize request argument(s)
     CreateCapacityCommitmentRequest request = new CreateCapacityCommitmentRequest
     {
         ParentAsLocationName            = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
         CapacityCommitment              = new CapacityCommitment(),
         EnforceSingleAdminProjectPerOrg = false,
     };
     // Make the request
     CapacityCommitment response = reservationServiceClient.CreateCapacityCommitment(request);
 }