# Cloud Billing Budget v1beta1 API - Class BudgetServiceClient (2.0.0-beta07)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-beta07 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient)
- [2.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/2.0.0-beta06/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient)
- [1.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/1.0.0-beta05/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient)

    public abstract class BudgetServiceClient

Reference documentation and code samples for the Cloud Billing Budget v1beta1 API class BudgetServiceClient.

BudgetService client wrapper, for convenient use.

## Inheritance

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

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

[BudgetServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClientImpl)

## Namespace

[Google.Cloud.Billing.Budgets.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1)

## Assembly

Google.Cloud.Billing.Budgets.V1Beta1.dll

## Remarks

BudgetService stores Cloud Billing budgets, which define a
budget plan and rules to execute as we track spend against that plan.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default BudgetService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default BudgetService scopes are:

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

<br />

### GrpcClient

    public virtual BudgetService.BudgetServiceClient GrpcClient { get; }

The underlying gRPC BudgetService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetService.BudgetServiceClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### Create()

    public static BudgetServiceClient Create()

Synchronously creates a [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [BudgetServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient` | The created [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [BudgetServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClientBuilder).

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient` | The task representing the created [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient). |

### CreateBudget(CreateBudgetRequest, CallSettings)

    public virtual Budget CreateBudget(CreateBudgetRequest request, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.CreateBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | The RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
    // Initialize request argument(s)
    CreateBudgetRequest request = new CreateBudgetRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        Budget = new Budget(),
    };
    // Make the request
    Budget response = budgetServiceClient.CreateBudget(request);

### CreateBudgetAsync(CreateBudgetRequest, CallSettings)

    public virtual Task<Budget> CreateBudgetAsync(CreateBudgetRequest request, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.CreateBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateBudgetRequest request = new CreateBudgetRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        Budget = new Budget(),
    };
    // Make the request
    Budget response = await budgetServiceClient.CreateBudgetAsync(request);

### CreateBudgetAsync(CreateBudgetRequest, CancellationToken)

    public virtual Task<Budget> CreateBudgetAsync(CreateBudgetRequest request, CancellationToken cancellationToken)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.CreateBudgetRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateBudgetRequest request = new CreateBudgetRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        Budget = new Budget(),
    };
    // Make the request
    Budget response = await budgetServiceClient.CreateBudgetAsync(request);

### DeleteBudget(DeleteBudgetRequest, CallSettings)

    public virtual void DeleteBudget(DeleteBudgetRequest request, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.DeleteBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
    // Initialize request argument(s)
    DeleteBudgetRequest request = new DeleteBudgetRequest
    {
        BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
    };
    // Make the request
    budgetServiceClient.DeleteBudget(request);

### DeleteBudgetAsync(DeleteBudgetRequest, CallSettings)

    public virtual Task DeleteBudgetAsync(DeleteBudgetRequest request, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.DeleteBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteBudgetRequest request = new DeleteBudgetRequest
    {
        BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
    };
    // Make the request
    await budgetServiceClient.DeleteBudgetAsync(request);

### DeleteBudgetAsync(DeleteBudgetRequest, CancellationToken)

    public virtual Task DeleteBudgetAsync(DeleteBudgetRequest request, CancellationToken cancellationToken)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.DeleteBudgetRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteBudgetRequest request = new DeleteBudgetRequest
    {
        BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
    };
    // Make the request
    await budgetServiceClient.DeleteBudgetAsync(request);

### GetBudget(GetBudgetRequest, CallSettings)

    public virtual Budget GetBudget(GetBudgetRequest request, CallSettings callSettings = null)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. When reading from the API, you will not
see these fields in the return value, though they may have been set
in the Cloud Console.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.GetBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | The RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
    // Initialize request argument(s)
    GetBudgetRequest request = new GetBudgetRequest
    {
        BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
    };
    // Make the request
    Budget response = budgetServiceClient.GetBudget(request);

### GetBudgetAsync(GetBudgetRequest, CallSettings)

    public virtual Task<Budget> GetBudgetAsync(GetBudgetRequest request, CallSettings callSettings = null)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. When reading from the API, you will not
see these fields in the return value, though they may have been set
in the Cloud Console.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.GetBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetBudgetRequest request = new GetBudgetRequest
    {
        BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
    };
    // Make the request
    Budget response = await budgetServiceClient.GetBudgetAsync(request);

### GetBudgetAsync(GetBudgetRequest, CancellationToken)

    public virtual Task<Budget> GetBudgetAsync(GetBudgetRequest request, CancellationToken cancellationToken)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. When reading from the API, you will not
see these fields in the return value, though they may have been set
in the Cloud Console.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.GetBudgetRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetBudgetRequest request = new GetBudgetRequest
    {
        BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
    };
    // Make the request
    Budget response = await budgetServiceClient.GetBudgetAsync(request);

### ListBudgets(ListBudgetsRequest, CallSettings)

    public virtual PagedEnumerable<ListBudgetsResponse, Budget> ListBudgets(ListBudgetsRequest request, CallSettings callSettings = null)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. When reading from the API, you will not
see these fields in the return value, though they may have been set
in the Cloud Console.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.ListBudgetsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.ListBudgetsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A pageable sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget) resources. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
    // Initialize request argument(s)
    ListBudgetsRequest request = new ListBudgetsRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        Scope = "",
    };
    // Make the request
    PagedEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgets(request);

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

### ListBudgetsAsync(ListBudgetsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListBudgetsResponse, Budget> ListBudgetsAsync(ListBudgetsRequest request, CallSettings callSettings = null)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. When reading from the API, you will not
see these fields in the return value, though they may have been set
in the Cloud Console.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.ListBudgetsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.ListBudgetsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A pageable asynchronous sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget) resources. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListBudgetsRequest request = new ListBudgetsRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        Scope = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgetsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Budget 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((ListBudgetsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Budget 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<Budget> 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 (Budget 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.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient#Google_Cloud_Billing_Budgets_V1Beta1_BudgetServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient#Google_Cloud_Billing_Budgets_V1Beta1_BudgetServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.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.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient#Google_Cloud_Billing_Budgets_V1Beta1_BudgetServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.BudgetServiceClient#Google_Cloud_Billing_Budgets_V1Beta1_BudgetServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateBudget(UpdateBudgetRequest, CallSettings)

    public virtual Budget UpdateBudget(UpdateBudgetRequest request, CallSettings callSettings = null)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. Budget fields that are not exposed in
this API will not be changed by this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.UpdateBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | The RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
    // Initialize request argument(s)
    UpdateBudgetRequest request = new UpdateBudgetRequest
    {
        Budget = new Budget(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Budget response = budgetServiceClient.UpdateBudget(request);

### UpdateBudgetAsync(UpdateBudgetRequest, CallSettings)

    public virtual Task<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, CallSettings callSettings = null)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. Budget fields that are not exposed in
this API will not be changed by this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.UpdateBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateBudgetRequest request = new UpdateBudgetRequest
    {
        Budget = new Budget(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Budget response = await budgetServiceClient.UpdateBudgetAsync(request);

### UpdateBudgetAsync(UpdateBudgetRequest, CancellationToken)

    public virtual Task<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, CancellationToken cancellationToken)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that
aren't available on this API. Budget fields that are not exposed in
this API will not be changed by this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.UpdateBudgetRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1Beta1/latest/Google.Cloud.Billing.Budgets.V1Beta1.Budget` | A Task containing the RPC response. |

**Example**

    // Create client
    BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateBudgetRequest request = new UpdateBudgetRequest
    {
        Budget = new Budget(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Budget response = await budgetServiceClient.UpdateBudgetAsync(request);