Exemple #1
0
        /// <summary>Snippet for GetIamPolicyAsync</summary>
        public async Task GetIamPolicyAsync()
        {
            // Snippet: GetIamPolicyAsync(string, string, string, CallSettings)
            // Additional: GetIamPolicyAsync(string, string, string, CancellationToken)
            // Create client
            NodeGroupsClient nodeGroupsClient = await NodeGroupsClient.CreateAsync();

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

            // End snippet
        }
Exemple #2
0
        /// <summary>Snippet for GetIamPolicyAsync</summary>
        public async Task GetIamPolicyRequestObjectAsync()
        {
            // Snippet: GetIamPolicyAsync(GetIamPolicyNodeGroupRequest, CallSettings)
            // Additional: GetIamPolicyAsync(GetIamPolicyNodeGroupRequest, CancellationToken)
            // Create client
            NodeGroupsClient nodeGroupsClient = await NodeGroupsClient.CreateAsync();

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

            // End snippet
        }