/// <summary>Snippet for ListInstancesAsync</summary> public async Task ListInstancesRequestObjectAsync() { // Snippet: ListInstancesAsync(ListInstancesInstanceGroupsRequest, CallSettings) // Additional: ListInstancesAsync(ListInstancesInstanceGroupsRequest, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) ListInstancesInstanceGroupsRequest request = new ListInstancesInstanceGroupsRequest { Zone = "", PageToken = "", MaxResults = 0U, InstanceGroup = "", OrderBy = "", Project = "", Filter = "", InstanceGroupsListInstancesRequestResource = new InstanceGroupsListInstancesRequest(), ReturnPartialSuccess = false, }; // Make the request InstanceGroupsListInstances response = await instanceGroupsClient.ListInstancesAsync(request); // End snippet }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedList() { // Snippet: AggregatedList(string, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) string project = ""; // Make the request InstanceGroupAggregatedList response = instanceGroupsClient.AggregatedList(project); // End snippet }
/// <summary>Snippet for ListInstancesAsync</summary> public async Task ListInstancesRequestObjectAsync() { // Snippet: ListInstancesAsync(ListInstancesInstanceGroupsRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) ListInstancesInstanceGroupsRequest request = new ListInstancesInstanceGroupsRequest { Zone = "", InstanceGroup = "", OrderBy = "", Project = "", Filter = "", InstanceGroupsListInstancesRequestResource = new InstanceGroupsListInstancesRequest(), ReturnPartialSuccess = false, }; // Make the request PagedAsyncEnumerable <InstanceGroupsListInstances, InstanceWithNamedPorts> response = instanceGroupsClient.ListInstancesAsync(request); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((InstanceWithNamedPorts 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((InstanceGroupsListInstances page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (InstanceWithNamedPorts 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 <InstanceWithNamedPorts> 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 (InstanceWithNamedPorts 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; // End snippet }
/// <summary>Snippet for List</summary> public void List() { // Snippet: List(string, string, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) string project = ""; string zone = ""; // Make the request InstanceGroupList response = instanceGroupsClient.List(project, zone); // End snippet }
/// <summary>Snippet for Delete</summary> public void Delete() { // Snippet: Delete(string, string, string, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) string project = ""; string zone = ""; string instanceGroup = ""; // Make the request Operation response = instanceGroupsClient.Delete(project, zone, instanceGroup); // End snippet }
/// <summary>Snippet for Insert</summary> public void Insert() { // Snippet: Insert(string, string, InstanceGroup, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) string project = ""; string zone = ""; InstanceGroup instanceGroupResource = new InstanceGroup(); // Make the request Operation response = instanceGroupsClient.Insert(project, zone, instanceGroupResource); // End snippet }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListInstanceGroupsRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) ListInstanceGroupsRequest request = new ListInstanceGroupsRequest { Zone = "", OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request PagedEnumerable <InstanceGroupList, InstanceGroup> response = instanceGroupsClient.List(request); // Iterate over all response items, lazily performing RPCs as required foreach (InstanceGroup 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 (InstanceGroupList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (InstanceGroup 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 <InstanceGroup> 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 (InstanceGroup 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; // End snippet }
/// <summary>Snippet for AggregatedListAsync</summary> public async Task AggregatedListAsync() { // Snippet: AggregatedListAsync(string, CallSettings) // Additional: AggregatedListAsync(string, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) string project = ""; // Make the request InstanceGroupAggregatedList response = await instanceGroupsClient.AggregatedListAsync(project); // End snippet }
/// <summary>Snippet for SetNamedPorts</summary> public void SetNamedPorts() { // Snippet: SetNamedPorts(string, string, string, InstanceGroupsSetNamedPortsRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) string project = ""; string zone = ""; string instanceGroup = ""; InstanceGroupsSetNamedPortsRequest instanceGroupsSetNamedPortsRequestResource = new InstanceGroupsSetNamedPortsRequest(); // Make the request Operation response = instanceGroupsClient.SetNamedPorts(project, zone, instanceGroup, instanceGroupsSetNamedPortsRequestResource); // End snippet }
/// <summary>Snippet for Get</summary> public void GetRequestObject() { // Snippet: Get(GetInstanceGroupRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) GetInstanceGroupRequest request = new GetInstanceGroupRequest { Zone = "", InstanceGroup = "", Project = "", }; // Make the request InstanceGroup response = instanceGroupsClient.Get(request); // End snippet }
/// <summary>Snippet for InsertAsync</summary> public async Task InsertAsync() { // Snippet: InsertAsync(string, string, InstanceGroup, CallSettings) // Additional: InsertAsync(string, string, InstanceGroup, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) string project = ""; string zone = ""; InstanceGroup instanceGroupResource = new InstanceGroup(); // Make the request Operation response = await instanceGroupsClient.InsertAsync(project, zone, instanceGroupResource); // End snippet }
/// <summary>Snippet for GetAsync</summary> public async Task GetAsync() { // Snippet: GetAsync(string, string, string, CallSettings) // Additional: GetAsync(string, string, string, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) string project = ""; string zone = ""; string instanceGroup = ""; // Make the request InstanceGroup response = await instanceGroupsClient.GetAsync(project, zone, instanceGroup); // End snippet }
/// <summary>Snippet for ListInstances</summary> public void ListInstances() { // Snippet: ListInstances(string, string, string, InstanceGroupsListInstancesRequest, string, int?, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) string project = ""; string zone = ""; string instanceGroup = ""; InstanceGroupsListInstancesRequest instanceGroupsListInstancesRequestResource = new InstanceGroupsListInstancesRequest(); // Make the request PagedEnumerable <InstanceGroupsListInstances, InstanceWithNamedPorts> response = instanceGroupsClient.ListInstances(project, zone, instanceGroup, instanceGroupsListInstancesRequestResource); // Iterate over all response items, lazily performing RPCs as required foreach (InstanceWithNamedPorts 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 (InstanceGroupsListInstances page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (InstanceWithNamedPorts 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 <InstanceWithNamedPorts> 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 (InstanceWithNamedPorts 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; // End snippet }
/// <summary>Snippet for ListInstancesAsync</summary> public async Task ListInstancesAsync() { // Snippet: ListInstancesAsync(string, string, string, InstanceGroupsListInstancesRequest, CallSettings) // Additional: ListInstancesAsync(string, string, string, InstanceGroupsListInstancesRequest, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) string project = ""; string zone = ""; string instanceGroup = ""; InstanceGroupsListInstancesRequest instanceGroupsListInstancesRequestResource = new InstanceGroupsListInstancesRequest(); // Make the request InstanceGroupsListInstances response = await instanceGroupsClient.ListInstancesAsync(project, zone, instanceGroup, instanceGroupsListInstancesRequestResource); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListAsync() { // Snippet: ListAsync(string, string, string, int?, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) string project = ""; string zone = ""; // Make the request PagedAsyncEnumerable <InstanceGroupList, InstanceGroup> response = instanceGroupsClient.ListAsync(project, zone); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((InstanceGroup 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((InstanceGroupList page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (InstanceGroup 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 <InstanceGroup> 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 (InstanceGroup 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; // End snippet }
/// <summary>Snippet for Insert</summary> public void InsertRequestObject() { // Snippet: Insert(InsertInstanceGroupRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) InsertInstanceGroupRequest request = new InsertInstanceGroupRequest { Zone = "", RequestId = "", Project = "", InstanceGroupResource = new InstanceGroup(), }; // Make the request Operation response = instanceGroupsClient.Insert(request); // End snippet }
/// <summary>Snippet for Delete</summary> public void DeleteRequestObject() { // Snippet: Delete(DeleteInstanceGroupRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) DeleteInstanceGroupRequest request = new DeleteInstanceGroupRequest { Zone = "", RequestId = "", InstanceGroup = "", Project = "", }; // Make the request Operation response = instanceGroupsClient.Delete(request); // End snippet }
/// <summary>Snippet for RemoveInstances</summary> public void RemoveInstancesRequestObject() { // Snippet: RemoveInstances(RemoveInstancesInstanceGroupRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) RemoveInstancesInstanceGroupRequest request = new RemoveInstancesInstanceGroupRequest { Zone = "", RequestId = "", InstanceGroup = "", InstanceGroupsRemoveInstancesRequestResource = new InstanceGroupsRemoveInstancesRequest(), Project = "", }; // Make the request Operation response = instanceGroupsClient.RemoveInstances(request); // End snippet }
/// <summary>Snippet for SetNamedPorts</summary> public void SetNamedPortsRequestObject() { // Snippet: SetNamedPorts(SetNamedPortsInstanceGroupRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) SetNamedPortsInstanceGroupRequest request = new SetNamedPortsInstanceGroupRequest { Zone = "", RequestId = "", InstanceGroup = "", Project = "", InstanceGroupsSetNamedPortsRequestResource = new InstanceGroupsSetNamedPortsRequest(), }; // Make the request Operation response = instanceGroupsClient.SetNamedPorts(request); // End snippet }
/// <summary>Snippet for GetAsync</summary> public async Task GetRequestObjectAsync() { // Snippet: GetAsync(GetInstanceGroupRequest, CallSettings) // Additional: GetAsync(GetInstanceGroupRequest, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) GetInstanceGroupRequest request = new GetInstanceGroupRequest { Zone = "", InstanceGroup = "", Project = "", }; // Make the request InstanceGroup response = await instanceGroupsClient.GetAsync(request); // End snippet }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListInstanceGroupsRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) ListInstanceGroupsRequest request = new ListInstanceGroupsRequest { Zone = "", PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request InstanceGroupList response = instanceGroupsClient.List(request); // End snippet }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedListRequestObject() { // Snippet: AggregatedList(AggregatedListInstanceGroupsRequest, CallSettings) // Create client InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.Create(); // Initialize request argument(s) AggregatedListInstanceGroupsRequest request = new AggregatedListInstanceGroupsRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", IncludeAllScopes = false, ReturnPartialSuccess = false, }; // Make the request InstanceGroupAggregatedList response = instanceGroupsClient.AggregatedList(request); // End snippet }
/// <summary>Snippet for InsertAsync</summary> public async Task InsertRequestObjectAsync() { // Snippet: InsertAsync(InsertInstanceGroupRequest, CallSettings) // Additional: InsertAsync(InsertInstanceGroupRequest, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) InsertInstanceGroupRequest request = new InsertInstanceGroupRequest { Zone = "", RequestId = "", Project = "", InstanceGroupResource = new InstanceGroup(), }; // Make the request Operation response = await instanceGroupsClient.InsertAsync(request); // End snippet }
/// <summary>Snippet for DeleteAsync</summary> public async Task DeleteRequestObjectAsync() { // Snippet: DeleteAsync(DeleteInstanceGroupRequest, CallSettings) // Additional: DeleteAsync(DeleteInstanceGroupRequest, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) DeleteInstanceGroupRequest request = new DeleteInstanceGroupRequest { Zone = "", RequestId = "", InstanceGroup = "", Project = "", }; // Make the request Operation response = await instanceGroupsClient.DeleteAsync(request); // End snippet }
/// <summary>Snippet for SetNamedPortsAsync</summary> public async Task SetNamedPortsRequestObjectAsync() { // Snippet: SetNamedPortsAsync(SetNamedPortsInstanceGroupRequest, CallSettings) // Additional: SetNamedPortsAsync(SetNamedPortsInstanceGroupRequest, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) SetNamedPortsInstanceGroupRequest request = new SetNamedPortsInstanceGroupRequest { Zone = "", RequestId = "", InstanceGroup = "", InstanceGroupsSetNamedPortsRequestResource = new InstanceGroupsSetNamedPortsRequest(), Project = "", }; // Make the request Operation response = await instanceGroupsClient.SetNamedPortsAsync(request); // End snippet }
/// <summary>Snippet for AggregatedListAsync</summary> public async Task AggregatedListRequestObjectAsync() { // Snippet: AggregatedListAsync(AggregatedListInstanceGroupsRequest, CallSettings) // Additional: AggregatedListAsync(AggregatedListInstanceGroupsRequest, CancellationToken) // Create client InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync(); // Initialize request argument(s) AggregatedListInstanceGroupsRequest request = new AggregatedListInstanceGroupsRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", IncludeAllScopes = false, ReturnPartialSuccess = false, }; // Make the request InstanceGroupAggregatedList response = await instanceGroupsClient.AggregatedListAsync(request); // End snippet }