2.5.0 (latest) 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.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](https://learn.microsoft.com/dotnet/api/system.object) \> AuthorizedDomainsClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[AuthorizedDomainsClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClientImpl.md.txt)

## Namespace

[Google.Cloud.AppEngine.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.md.txt)

## 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](https://www.google.com/webmasters/verification/home).

## 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** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default AuthorizedDomains scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `IReadOnlyListstring` |   |

**Remarks** The default AuthorizedDomains scopes are:

- <https://www.googleapis.com/auth/appengine.admin>
- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/cloud-platform.read-only>

<br />

### GrpcClient

    public virtual AuthorizedDomains.AuthorizedDomainsClient GrpcClient { get; }

The underlying gRPC AuthorizedDomains client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `AuthorizedDomainsAuthorizedDomainsClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ServiceMetadata` |   |

## Methods

### Create()

    public static AuthorizedDomainsClient Create()

Synchronously creates a [AuthorizedDomainsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [AuthorizedDomainsClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClientBuilder.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AuthorizedDomainsClient` | The created [AuthorizedDomainsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [AuthorizedDomainsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [AuthorizedDomainsClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClientBuilder.md.txt).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `CancellationToken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskAuthorizedDomainsClient` | The task representing the created [AuthorizedDomainsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt). |

### ListAuthorizedDomains(ListAuthorizedDomainsRequest, CallSettings)

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

Lists all domains the user is authorized to administer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListAuthorizedDomainsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListAuthorizedDomainsResponseAuthorizedDomain` | A pageable sequence of [AuthorizedDomain](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomain.md.txt) resources. |

**Example**

```cs
// 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** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListAuthorizedDomainsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListAuthorizedDomainsResponseAuthorizedDomain` | A pageable asynchronous sequence of [AuthorizedDomain](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomain.md.txt) resources. |

**Example**

```cs
// 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()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt#Google_Cloud_AppEngine_V1_AuthorizedDomainsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt#Google_Cloud_AppEngine_V1_AuthorizedDomainsClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt#Google_Cloud_AppEngine_V1_AuthorizedDomainsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt#Google_Cloud_AppEngine_V1_AuthorizedDomainsClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.