/// <summary>Snippet for GetTenantAsync</summary>
        public async Task GetTenantAsync()
        {
            // Snippet: GetTenantAsync(string, CallSettings)
            // Additional: GetTenantAsync(string, CancellationToken)
            // Create client
            TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/tenants/[TENANT]";
            // Make the request
            Tenant response = await tenantServiceClient.GetTenantAsync(name);

            // End snippet
        }
        /// <summary>Snippet for GetTenantAsync</summary>
        public async Task GetTenantResourceNamesAsync()
        {
            // Snippet: GetTenantAsync(TenantName, CallSettings)
            // Additional: GetTenantAsync(TenantName, CancellationToken)
            // Create client
            TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();

            // Initialize request argument(s)
            TenantName name = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
            // Make the request
            Tenant response = await tenantServiceClient.GetTenantAsync(name);

            // End snippet
        }
예제 #3
0
        /// <summary>Snippet for GetTenantAsync</summary>
        public async Task GetTenantAsync_RequestObject()
        {
            // Snippet: GetTenantAsync(GetTenantRequest,CallSettings)
            // Additional: GetTenantAsync(GetTenantRequest,CancellationToken)
            // Create client
            TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetTenantRequest request = new GetTenantRequest
            {
                TenantName = new TenantName("[PROJECT]", "[TENANT]"),
            };
            // Make the request
            Tenant response = await tenantServiceClient.GetTenantAsync(request);

            // End snippet
        }