App Engine v1 API - Class AuthorizedDomainsClient (2.3.0)

public abstract class AuthorizedDomainsClient

Reference documentation and code samples for the App Engine v1 API class AuthorizedDomainsClient.

AuthorizedDomains client wrapper, for convenient use.

Inheritance

object > AuthorizedDomainsClient

Namespace

Google.Cloud.AppEngine.V1

Assembly

Google.Cloud.AppEngine.V1.dll

Remarks

Manages domains a user is authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the AuthorizedDomains service, which is a host of "appengine.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AuthorizedDomains scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

GrpcClient

public virtual AuthorizedDomains.AuthorizedDomainsClient GrpcClient { get; }

The underlying gRPC AuthorizedDomains client

Property Value
TypeDescription
AuthorizedDomainsAuthorizedDomainsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static AuthorizedDomainsClient Create()

Synchronously creates a AuthorizedDomainsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AuthorizedDomainsClientBuilder.

Returns
TypeDescription
AuthorizedDomainsClient

The created AuthorizedDomainsClient.

CreateAsync(CancellationToken)

public static Task<AuthorizedDomainsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a AuthorizedDomainsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AuthorizedDomainsClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskAuthorizedDomainsClient

The task representing the created AuthorizedDomainsClient.

ListAuthorizedDomains(ListAuthorizedDomainsRequest, CallSettings)

public virtual PagedEnumerable<ListAuthorizedDomainsResponse, AuthorizedDomain> ListAuthorizedDomains(ListAuthorizedDomainsRequest request, CallSettings callSettings = null)

Lists all domains the user is authorized to administer.

Parameters
NameDescription
requestListAuthorizedDomainsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListAuthorizedDomainsResponseAuthorizedDomain

A pageable sequence of AuthorizedDomain resources.

Example
// Create client
AuthorizedDomainsClient authorizedDomainsClient = AuthorizedDomainsClient.Create();
// Initialize request argument(s)
ListAuthorizedDomainsRequest request = new ListAuthorizedDomainsRequest { Parent = "", };
// Make the request
PagedEnumerable<ListAuthorizedDomainsResponse, AuthorizedDomain> response = authorizedDomainsClient.ListAuthorizedDomains(request);

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

ListAuthorizedDomainsAsync(ListAuthorizedDomainsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAuthorizedDomainsResponse, AuthorizedDomain> ListAuthorizedDomainsAsync(ListAuthorizedDomainsRequest request, CallSettings callSettings = null)

Lists all domains the user is authorized to administer.

Parameters
NameDescription
requestListAuthorizedDomainsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListAuthorizedDomainsResponseAuthorizedDomain

A pageable asynchronous sequence of AuthorizedDomain resources.

Example
// Create client
AuthorizedDomainsClient authorizedDomainsClient = await AuthorizedDomainsClient.CreateAsync();
// Initialize request argument(s)
ListAuthorizedDomainsRequest request = new ListAuthorizedDomainsRequest { Parent = "", };
// Make the request
PagedAsyncEnumerable<ListAuthorizedDomainsResponse, AuthorizedDomain> response = authorizedDomainsClient.ListAuthorizedDomainsAsync(request);

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

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.