Beispiel #1
0
        /// <summary>Snippet for TestIamPermissionsAsync</summary>
        public async Task TestIamPermissionsAsync()
        {
            // Snippet: TestIamPermissionsAsync(IamResourceNameOneof,IEnumerable<string>,CallSettings)
            // Additional: TestIamPermissionsAsync(IamResourceNameOneof,IEnumerable<string>,CancellationToken)
            // Create client
            ContainerAnalysisV1Beta1Client containerAnalysisV1Beta1Client = await ContainerAnalysisV1Beta1Client.CreateAsync();

            // Initialize request argument(s)
            IamResourceNameOneof resource    = IamResourceNameOneof.From(new NoteName("[PROJECT]", "[NOTE]"));
            IEnumerable <string> permissions = new List <string>();
            // Make the request
            TestIamPermissionsResponse response = await containerAnalysisV1Beta1Client.TestIamPermissionsAsync(resource, permissions);

            // End snippet
        }
Beispiel #2
0
        /// <summary>Snippet for TestIamPermissionsAsync</summary>
        public async Task TestIamPermissionsAsync_RequestObject()
        {
            // Snippet: TestIamPermissionsAsync(TestIamPermissionsRequest,CallSettings)
            // Additional: TestIamPermissionsAsync(TestIamPermissionsRequest,CancellationToken)
            // Create client
            ContainerAnalysisV1Beta1Client containerAnalysisV1Beta1Client = await ContainerAnalysisV1Beta1Client.CreateAsync();

            // Initialize request argument(s)
            TestIamPermissionsRequest request = new TestIamPermissionsRequest
            {
                ResourceAsIamResourceNameOneof = IamResourceNameOneof.From(new NoteName("[PROJECT]", "[NOTE]")),
                Permissions = { },
            };
            // Make the request
            TestIamPermissionsResponse response = await containerAnalysisV1Beta1Client.TestIamPermissionsAsync(request);

            // End snippet
        }