2.11.0 (latest) 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.2.0 1.1.0 1.0.0-beta02

    public abstract class BackupDrProtectionSummaryClient

Reference documentation and code samples for the Backup and DR Service v1 API class BackupDrProtectionSummaryClient.

BackupDrProtectionSummary client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> BackupDrProtectionSummaryClient

## 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

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

## Namespace

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

## Assembly

Google.Cloud.BackupDR.V1.dll

## Remarks

The Protection Summary service.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

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

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default BackupDrProtectionSummary scopes.

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

**Remarks** The default BackupDrProtectionSummary scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

### GrpcClient

    public virtual BackupDrProtectionSummary.BackupDrProtectionSummaryClient GrpcClient { get; }

The underlying gRPC BackupDrProtectionSummary client

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

### IAMPolicyClient

    public virtual IAMPolicyClient IAMPolicyClient { get; }

The [IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.md.txt) associated with this client.

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

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.md.txt) associated with this client.

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

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

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

## Methods

### Create()

    public static BackupDrProtectionSummaryClient Create()

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

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

### CreateAsync(CancellationToken)

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

Asynchronously creates a [BackupDrProtectionSummaryClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.BackupDrProtectionSummaryClient.md.txt) using the default credentials,
endpoint and settings. To specify custom credentials or other settings, use
[BackupDrProtectionSummaryClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.BackupDrProtectionSummaryClientBuilder.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** |
| `TaskBackupDrProtectionSummaryClient` | The task representing the created [BackupDrProtectionSummaryClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.BackupDrProtectionSummaryClient.md.txt). |

### ListResourceBackupConfigs(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> ListResourceBackupConfigs(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ResourceBackupConfigs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. The project and location for which to retrieve resource backup configs. Format: 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = BackupDrProtectionSummaryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> response = backupDrProtectionSummaryClient.ListResourceBackupConfigs(parent);

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

### ListResourceBackupConfigs(ListResourceBackupConfigsRequest, CallSettings)

    public virtual PagedEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> ListResourceBackupConfigs(ListResourceBackupConfigsRequest request, CallSettings callSettings = null)

Lists ResourceBackupConfigs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListResourceBackupConfigsRequest` 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** |
| `PagedEnumerableListResourceBackupConfigsResponseResourceBackupConfig` | A pageable sequence of [ResourceBackupConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.ResourceBackupConfig.md.txt) resources. |

**Example**

```cs
// Create client
BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = BackupDrProtectionSummaryClient.Create();
// Initialize request argument(s)
ListResourceBackupConfigsRequest request = new ListResourceBackupConfigsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> response = backupDrProtectionSummaryClient.ListResourceBackupConfigs(request);

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

### ListResourceBackupConfigs(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> ListResourceBackupConfigs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ResourceBackupConfigs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The project and location for which to retrieve resource backup configs. Format: 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = BackupDrProtectionSummaryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> response = backupDrProtectionSummaryClient.ListResourceBackupConfigs(parent);

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

### ListResourceBackupConfigsAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> ListResourceBackupConfigsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ResourceBackupConfigs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. The project and location for which to retrieve resource backup configs. Format: 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = await BackupDrProtectionSummaryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> response = backupDrProtectionSummaryClient.ListResourceBackupConfigsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ResourceBackupConfig item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListResourceBackupConfigsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceBackupConfig 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<ResourceBackupConfig> 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 (ResourceBackupConfig 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;
```

### ListResourceBackupConfigsAsync(ListResourceBackupConfigsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> ListResourceBackupConfigsAsync(ListResourceBackupConfigsRequest request, CallSettings callSettings = null)

Lists ResourceBackupConfigs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListResourceBackupConfigsRequest` 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** |
| `PagedAsyncEnumerableListResourceBackupConfigsResponseResourceBackupConfig` | A pageable asynchronous sequence of [ResourceBackupConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.ResourceBackupConfig.md.txt) resources. |

**Example**

```cs
// Create client
BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = await BackupDrProtectionSummaryClient.CreateAsync();
// Initialize request argument(s)
ListResourceBackupConfigsRequest request = new ListResourceBackupConfigsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> response = backupDrProtectionSummaryClient.ListResourceBackupConfigsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ResourceBackupConfig item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListResourceBackupConfigsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceBackupConfig 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<ResourceBackupConfig> 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 (ResourceBackupConfig 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;
```

### ListResourceBackupConfigsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> ListResourceBackupConfigsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ResourceBackupConfigs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The project and location for which to retrieve resource backup configs. Format: 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = await BackupDrProtectionSummaryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListResourceBackupConfigsResponse, ResourceBackupConfig> response = backupDrProtectionSummaryClient.ListResourceBackupConfigsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ResourceBackupConfig item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListResourceBackupConfigsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceBackupConfig 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<ResourceBackupConfig> 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 (ResourceBackupConfig 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.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.BackupDrProtectionSummaryClient.md.txt#Google_Cloud_BackupDR_V1_BackupDrProtectionSummaryClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.BackupDrProtectionSummaryClient.md.txt#Google_Cloud_BackupDR_V1_BackupDrProtectionSummaryClient_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.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.BackupDrProtectionSummaryClient.md.txt#Google_Cloud_BackupDR_V1_BackupDrProtectionSummaryClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.BackupDrProtectionSummaryClient.md.txt#Google_Cloud_BackupDR_V1_BackupDrProtectionSummaryClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.