Esempio n. 1
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
            ResourcePoliciesClient resourcePoliciesClient = await ResourcePoliciesClient.CreateAsync();

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

            // End snippet
        }
Esempio n. 2
0
        /// <summary>Snippet for TestIamPermissionsAsync</summary>
        public async Task TestIamPermissionsRequestObjectAsync()
        {
            // Snippet: TestIamPermissionsAsync(TestIamPermissionsResourcePolicyRequest, CallSettings)
            // Additional: TestIamPermissionsAsync(TestIamPermissionsResourcePolicyRequest, CancellationToken)
            // Create client
            ResourcePoliciesClient resourcePoliciesClient = await ResourcePoliciesClient.CreateAsync();

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

            // End snippet
        }