Example #1
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertAsync()
        {
            // Snippet: InsertAsync(string, string, NodeTemplate, CallSettings)
            // Additional: InsertAsync(string, string, NodeTemplate, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            string       project = "";
            string       region  = "";
            NodeTemplate nodeTemplateResource = new NodeTemplate();
            // Make the request
            lro::Operation <Operation, Operation> response = await nodeTemplatesClient.InsertAsync(project, region, nodeTemplateResource);

            // Poll until the returned long-running operation is complete
            lro::Operation <Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            Operation result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            lro::Operation <Operation, Operation> retrievedResponse = await nodeTemplatesClient.PollOnceInsertAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Operation retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
Example #2
0
        /// <summary>Snippet for Delete</summary>
        public void Delete()
        {
            // Snippet: Delete(string, string, string, CallSettings)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
            // Initialize request argument(s)
            string project      = "";
            string region       = "";
            string nodeTemplate = "";
            // Make the request
            lro::Operation <Operation, Operation> response = nodeTemplatesClient.Delete(project, region, nodeTemplate);

            // Poll until the returned long-running operation is complete
            lro::Operation <Operation, Operation> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Operation result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            lro::Operation <Operation, Operation> retrievedResponse = nodeTemplatesClient.PollOnceDelete(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Operation retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
Example #3
0
        /// <summary>Snippet for Insert</summary>
        public void InsertRequestObject()
        {
            // Snippet: Insert(InsertNodeTemplateRequest, CallSettings)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
            // Initialize request argument(s)
            InsertNodeTemplateRequest request = new InsertNodeTemplateRequest
            {
                RequestId            = "",
                NodeTemplateResource = new NodeTemplate(),
                Region  = "",
                Project = "",
            };
            // Make the request
            lro::Operation <Operation, Operation> response = nodeTemplatesClient.Insert(request);

            // Poll until the returned long-running operation is complete
            lro::Operation <Operation, Operation> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Operation result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            lro::Operation <Operation, Operation> retrievedResponse = nodeTemplatesClient.PollOnceInsert(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Operation retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
 /// <summary>Snippet for AggregatedList</summary>
 public void AggregatedList()
 {
     // Snippet: AggregatedList(string, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     string project = "";
     // Make the request
     NodeTemplateAggregatedList response = nodeTemplatesClient.AggregatedList(project);
     // End snippet
 }
Example #5
0
        /// <summary>Snippet for AggregatedListAsync</summary>
        public async Task AggregatedListRequestObjectAsync()
        {
            // Snippet: AggregatedListAsync(AggregatedListNodeTemplatesRequest, CallSettings)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            AggregatedListNodeTemplatesRequest request = new AggregatedListNodeTemplatesRequest
            {
                OrderBy              = "",
                Project              = "",
                Filter               = "",
                IncludeAllScopes     = false,
                ReturnPartialSuccess = false,
            };
            // Make the request
            PagedAsyncEnumerable <NodeTemplateAggregatedList, KeyValuePair <string, NodeTemplatesScopedList> > response = nodeTemplatesClient.AggregatedListAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((KeyValuePair <string, NodeTemplatesScopedList> 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((NodeTemplateAggregatedList page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (KeyValuePair <string, NodeTemplatesScopedList> 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 <KeyValuePair <string, NodeTemplatesScopedList> > 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 (KeyValuePair <string, NodeTemplatesScopedList> 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
        }
Example #6
0
 /// <summary>Snippet for Delete</summary>
 public void Delete()
 {
     // Snippet: Delete(string, string, string, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     string project      = "";
     string region       = "";
     string nodeTemplate = "";
     // Make the request
     Operation response = nodeTemplatesClient.Delete(project, region, nodeTemplate);
     // End snippet
 }
Example #7
0
 /// <summary>Snippet for Insert</summary>
 public void Insert()
 {
     // Snippet: Insert(string, string, NodeTemplate, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     string       project = "";
     string       region  = "";
     NodeTemplate nodeTemplateResource = new NodeTemplate();
     // Make the request
     Operation response = nodeTemplatesClient.Insert(project, region, nodeTemplateResource);
     // End snippet
 }
Example #8
0
 /// <summary>Snippet for GetIamPolicy</summary>
 public void GetIamPolicy()
 {
     // Snippet: GetIamPolicy(string, string, string, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     string project  = "";
     string region   = "";
     string resource = "";
     // Make the request
     Policy response = nodeTemplatesClient.GetIamPolicy(project, region, resource);
     // End snippet
 }
Example #9
0
        /// <summary>Snippet for List</summary>
        public void ListRequestObject()
        {
            // Snippet: List(ListNodeTemplatesRequest, CallSettings)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
            // Initialize request argument(s)
            ListNodeTemplatesRequest request = new ListNodeTemplatesRequest
            {
                Region  = "",
                OrderBy = "",
                Project = "",
                Filter  = "",
                ReturnPartialSuccess = false,
            };
            // Make the request
            PagedEnumerable <NodeTemplateList, NodeTemplate> response = nodeTemplatesClient.List(request);

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

            // Initialize request argument(s)
            string project = "";
            // Make the request
            NodeTemplateAggregatedList response = await nodeTemplatesClient.AggregatedListAsync(project);

            // End snippet
        }
Example #11
0
 /// <summary>Snippet for TestIamPermissions</summary>
 public void TestIamPermissions()
 {
     // Snippet: TestIamPermissions(string, string, string, TestPermissionsRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     string project  = "";
     string region   = "";
     string resource = "";
     TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
     // Make the request
     TestPermissionsResponse response = nodeTemplatesClient.TestIamPermissions(project, region, resource, testPermissionsRequestResource);
     // End snippet
 }
Example #12
0
 /// <summary>Snippet for Get</summary>
 public void GetRequestObject()
 {
     // Snippet: Get(GetNodeTemplateRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     GetNodeTemplateRequest request = new GetNodeTemplateRequest
     {
         Region       = "",
         Project      = "",
         NodeTemplate = "",
     };
     // Make the request
     NodeTemplate response = nodeTemplatesClient.Get(request);
     // End snippet
 }
Example #13
0
        /// <summary>Snippet for DeleteAsync</summary>
        public async Task DeleteAsync()
        {
            // Snippet: DeleteAsync(string, string, string, CallSettings)
            // Additional: DeleteAsync(string, string, string, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            string project      = "";
            string region       = "";
            string nodeTemplate = "";
            // Make the request
            Operation response = await nodeTemplatesClient.DeleteAsync(project, region, nodeTemplate);

            // End snippet
        }
Example #14
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertAsync()
        {
            // Snippet: InsertAsync(string, string, NodeTemplate, CallSettings)
            // Additional: InsertAsync(string, string, NodeTemplate, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            string       project = "";
            string       region  = "";
            NodeTemplate nodeTemplateResource = new NodeTemplate();
            // Make the request
            Operation response = await nodeTemplatesClient.InsertAsync(project, region, nodeTemplateResource);

            // End snippet
        }
Example #15
0
        /// <summary>Snippet for GetIamPolicyAsync</summary>
        public async Task GetIamPolicyAsync()
        {
            // Snippet: GetIamPolicyAsync(string, string, string, CallSettings)
            // Additional: GetIamPolicyAsync(string, string, string, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            string project  = "";
            string region   = "";
            string resource = "";
            // Make the request
            Policy response = await nodeTemplatesClient.GetIamPolicyAsync(project, region, resource);

            // End snippet
        }
Example #16
0
 /// <summary>Snippet for GetIamPolicy</summary>
 public void GetIamPolicyRequestObject()
 {
     // Snippet: GetIamPolicy(GetIamPolicyNodeTemplateRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     GetIamPolicyNodeTemplateRequest request = new GetIamPolicyNodeTemplateRequest
     {
         Region   = "",
         Resource = "",
         Project  = "",
         OptionsRequestedPolicyVersion = 0,
     };
     // Make the request
     Policy response = nodeTemplatesClient.GetIamPolicy(request);
     // End snippet
 }
Example #17
0
 /// <summary>Snippet for Delete</summary>
 public void DeleteRequestObject()
 {
     // Snippet: Delete(DeleteNodeTemplateRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     DeleteNodeTemplateRequest request = new DeleteNodeTemplateRequest
     {
         RequestId    = "",
         Region       = "",
         Project      = "",
         NodeTemplate = "",
     };
     // Make the request
     Operation response = nodeTemplatesClient.Delete(request);
     // End snippet
 }
Example #18
0
 /// <summary>Snippet for Insert</summary>
 public void InsertRequestObject()
 {
     // Snippet: Insert(InsertNodeTemplateRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     InsertNodeTemplateRequest request = new InsertNodeTemplateRequest
     {
         RequestId            = "",
         NodeTemplateResource = new NodeTemplate(),
         Region  = "",
         Project = "",
     };
     // Make the request
     Operation response = nodeTemplatesClient.Insert(request);
     // End snippet
 }
Example #19
0
        /// <summary>Snippet for TestIamPermissionsAsync</summary>
        public async Task TestIamPermissionsAsync()
        {
            // Snippet: TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CallSettings)
            // Additional: TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            string project  = "";
            string region   = "";
            string resource = "";
            TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
            // Make the request
            TestPermissionsResponse response = await nodeTemplatesClient.TestIamPermissionsAsync(project, region, resource, testPermissionsRequestResource);

            // End snippet
        }
Example #20
0
 /// <summary>Snippet for TestIamPermissions</summary>
 public void TestIamPermissionsRequestObject()
 {
     // Snippet: TestIamPermissions(TestIamPermissionsNodeTemplateRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     TestIamPermissionsNodeTemplateRequest request = new TestIamPermissionsNodeTemplateRequest
     {
         Region   = "",
         Resource = "",
         Project  = "",
         TestPermissionsRequestResource = new TestPermissionsRequest(),
     };
     // Make the request
     TestPermissionsResponse response = nodeTemplatesClient.TestIamPermissions(request);
     // End snippet
 }
Example #21
0
 /// <summary>Snippet for SetIamPolicy</summary>
 public void SetIamPolicyRequestObject()
 {
     // Snippet: SetIamPolicy(SetIamPolicyNodeTemplateRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     SetIamPolicyNodeTemplateRequest request = new SetIamPolicyNodeTemplateRequest
     {
         Region   = "",
         Resource = "",
         Project  = "",
         RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
     };
     // Make the request
     Policy response = nodeTemplatesClient.SetIamPolicy(request);
     // End snippet
 }
Example #22
0
        /// <summary>Snippet for ListAsync</summary>
        public async Task ListAsync()
        {
            // Snippet: ListAsync(string, string, string, int?, CallSettings)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            string project = "";
            string region  = "";
            // Make the request
            PagedAsyncEnumerable <NodeTemplateList, NodeTemplate> response = nodeTemplatesClient.ListAsync(project, region);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((NodeTemplate 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((NodeTemplateList page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (NodeTemplate 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 <NodeTemplate> 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 (NodeTemplate 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
        }
Example #23
0
        /// <summary>Snippet for AggregatedList</summary>
        public void AggregatedList()
        {
            // Snippet: AggregatedList(string, string, int?, CallSettings)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
            // Initialize request argument(s)
            string project = "";
            // Make the request
            PagedEnumerable <NodeTemplateAggregatedList, KeyValuePair <string, NodeTemplatesScopedList> > response = nodeTemplatesClient.AggregatedList(project);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (KeyValuePair <string, NodeTemplatesScopedList> 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 (NodeTemplateAggregatedList page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (KeyValuePair <string, NodeTemplatesScopedList> 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 <KeyValuePair <string, NodeTemplatesScopedList> > 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 (KeyValuePair <string, NodeTemplatesScopedList> 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
        }
Example #24
0
        /// <summary>Snippet for GetAsync</summary>
        public async Task GetRequestObjectAsync()
        {
            // Snippet: GetAsync(GetNodeTemplateRequest, CallSettings)
            // Additional: GetAsync(GetNodeTemplateRequest, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            GetNodeTemplateRequest request = new GetNodeTemplateRequest
            {
                Region       = "",
                Project      = "",
                NodeTemplate = "",
            };
            // Make the request
            NodeTemplate response = await nodeTemplatesClient.GetAsync(request);

            // End snippet
        }
 /// <summary>Snippet for AggregatedList</summary>
 public void AggregatedListRequestObject()
 {
     // Snippet: AggregatedList(AggregatedListNodeTemplatesRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     AggregatedListNodeTemplatesRequest request = new AggregatedListNodeTemplatesRequest
     {
         PageToken            = "",
         MaxResults           = 0U,
         OrderBy              = "",
         Project              = "",
         Filter               = "",
         IncludeAllScopes     = false,
         ReturnPartialSuccess = false,
     };
     // Make the request
     NodeTemplateAggregatedList response = nodeTemplatesClient.AggregatedList(request);
     // End snippet
 }
Example #26
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertRequestObjectAsync()
        {
            // Snippet: InsertAsync(InsertNodeTemplateRequest, CallSettings)
            // Additional: InsertAsync(InsertNodeTemplateRequest, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            InsertNodeTemplateRequest request = new InsertNodeTemplateRequest
            {
                RequestId            = "",
                NodeTemplateResource = new NodeTemplate(),
                Region  = "",
                Project = "",
            };
            // Make the request
            Operation response = await nodeTemplatesClient.InsertAsync(request);

            // End snippet
        }
Example #27
0
        /// <summary>Snippet for TestIamPermissionsAsync</summary>
        public async Task TestIamPermissionsRequestObjectAsync()
        {
            // Snippet: TestIamPermissionsAsync(TestIamPermissionsNodeTemplateRequest, CallSettings)
            // Additional: TestIamPermissionsAsync(TestIamPermissionsNodeTemplateRequest, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            TestIamPermissionsNodeTemplateRequest request = new TestIamPermissionsNodeTemplateRequest
            {
                Region   = "",
                Resource = "",
                Project  = "",
                TestPermissionsRequestResource = new TestPermissionsRequest(),
            };
            // Make the request
            TestPermissionsResponse response = await nodeTemplatesClient.TestIamPermissionsAsync(request);

            // End snippet
        }
Example #28
0
        /// <summary>Snippet for SetIamPolicyAsync</summary>
        public async Task SetIamPolicyRequestObjectAsync()
        {
            // Snippet: SetIamPolicyAsync(SetIamPolicyNodeTemplateRequest, CallSettings)
            // Additional: SetIamPolicyAsync(SetIamPolicyNodeTemplateRequest, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            SetIamPolicyNodeTemplateRequest request = new SetIamPolicyNodeTemplateRequest
            {
                Region   = "",
                Resource = "",
                Project  = "",
                RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
            };
            // Make the request
            Policy response = await nodeTemplatesClient.SetIamPolicyAsync(request);

            // End snippet
        }
 /// <summary>Snippet for List</summary>
 public void ListRequestObject()
 {
     // Snippet: List(ListNodeTemplatesRequest, CallSettings)
     // Create client
     NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.Create();
     // Initialize request argument(s)
     ListNodeTemplatesRequest request = new ListNodeTemplatesRequest
     {
         PageToken            = "",
         MaxResults           = 0U,
         Region               = "",
         OrderBy              = "",
         Project              = "",
         Filter               = "",
         ReturnPartialSuccess = false,
     };
     // Make the request
     NodeTemplateList response = nodeTemplatesClient.List(request);
     // End snippet
 }
Example #30
0
        /// <summary>Snippet for GetIamPolicyAsync</summary>
        public async Task GetIamPolicyRequestObjectAsync()
        {
            // Snippet: GetIamPolicyAsync(GetIamPolicyNodeTemplateRequest, CallSettings)
            // Additional: GetIamPolicyAsync(GetIamPolicyNodeTemplateRequest, CancellationToken)
            // Create client
            NodeTemplatesClient nodeTemplatesClient = await NodeTemplatesClient.CreateAsync();

            // Initialize request argument(s)
            GetIamPolicyNodeTemplateRequest request = new GetIamPolicyNodeTemplateRequest
            {
                Region   = "",
                Resource = "",
                Project  = "",
                OptionsRequestedPolicyVersion = 0,
            };
            // Make the request
            Policy response = await nodeTemplatesClient.GetIamPolicyAsync(request);

            // End snippet
        }