public abstract class CloudBillingClient
CloudBilling client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Billing.V1Assembly
Google.Cloud.Billing.V1.dll
Remarks
Retrieves GCP Console billing accounts and associates them with projects.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the CloudBilling service, which is a host of "cloudbilling.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default CloudBilling scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default CloudBilling scopes are:
GrpcClient
public virtual CloudBilling.CloudBillingClient GrpcClient { get; }
The underlying gRPC CloudBilling client
Property Value | |
---|---|
Type | Description |
CloudBilling.CloudBillingClient |
Methods
Create()
public static CloudBillingClient Create()
Synchronously creates a CloudBillingClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudBillingClientBuilder.
Returns | |
---|---|
Type | Description |
CloudBillingClient | The created CloudBillingClient. |
CreateAsync(CancellationToken)
public static Task<CloudBillingClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a CloudBillingClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudBillingClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<CloudBillingClient> | The task representing the created CloudBillingClient. |
CreateBillingAccount(BillingAccount, CallSettings)
public virtual BillingAccount CreateBillingAccount(BillingAccount billingAccount, CallSettings callSettings = null)
Creates a billing account.
This method can only be used to create
billing subaccounts
by GCP resellers.
When creating a subaccount, the current authenticated user must have the
billing.accounts.update
IAM permission on the master account, which is
typically given to billing account
administrators.
This method will return an error if the master account has not been
provisioned as a reseller account.
Parameters | |
---|---|
Name | Description |
billingAccount | BillingAccount Required. The billing account resource to create. Currently CreateBillingAccount only supports subaccount creation, so any created billing accounts must be under a provided master billing account. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
BillingAccount billingAccount = new BillingAccount();
// Make the request
BillingAccount response = cloudBillingClient.CreateBillingAccount(billingAccount);
CreateBillingAccount(CreateBillingAccountRequest, CallSettings)
public virtual BillingAccount CreateBillingAccount(CreateBillingAccountRequest request, CallSettings callSettings = null)
Creates a billing account.
This method can only be used to create
billing subaccounts
by GCP resellers.
When creating a subaccount, the current authenticated user must have the
billing.accounts.update
IAM permission on the master account, which is
typically given to billing account
administrators.
This method will return an error if the master account has not been
provisioned as a reseller account.
Parameters | |
---|---|
Name | Description |
request | CreateBillingAccountRequest 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 |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
CreateBillingAccountRequest request = new CreateBillingAccountRequest
{
BillingAccount = new BillingAccount(),
};
// Make the request
BillingAccount response = cloudBillingClient.CreateBillingAccount(request);
CreateBillingAccountAsync(BillingAccount, CallSettings)
public virtual Task<BillingAccount> CreateBillingAccountAsync(BillingAccount billingAccount, CallSettings callSettings = null)
Creates a billing account.
This method can only be used to create
billing subaccounts
by GCP resellers.
When creating a subaccount, the current authenticated user must have the
billing.accounts.update
IAM permission on the master account, which is
typically given to billing account
administrators.
This method will return an error if the master account has not been
provisioned as a reseller account.
Parameters | |
---|---|
Name | Description |
billingAccount | BillingAccount Required. The billing account resource to create. Currently CreateBillingAccount only supports subaccount creation, so any created billing accounts must be under a provided master billing account. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
BillingAccount billingAccount = new BillingAccount();
// Make the request
BillingAccount response = await cloudBillingClient.CreateBillingAccountAsync(billingAccount);
CreateBillingAccountAsync(BillingAccount, CancellationToken)
public virtual Task<BillingAccount> CreateBillingAccountAsync(BillingAccount billingAccount, CancellationToken cancellationToken)
Creates a billing account.
This method can only be used to create
billing subaccounts
by GCP resellers.
When creating a subaccount, the current authenticated user must have the
billing.accounts.update
IAM permission on the master account, which is
typically given to billing account
administrators.
This method will return an error if the master account has not been
provisioned as a reseller account.
Parameters | |
---|---|
Name | Description |
billingAccount | BillingAccount Required. The billing account resource to create. Currently CreateBillingAccount only supports subaccount creation, so any created billing accounts must be under a provided master billing account. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
BillingAccount billingAccount = new BillingAccount();
// Make the request
BillingAccount response = await cloudBillingClient.CreateBillingAccountAsync(billingAccount);
CreateBillingAccountAsync(CreateBillingAccountRequest, CallSettings)
public virtual Task<BillingAccount> CreateBillingAccountAsync(CreateBillingAccountRequest request, CallSettings callSettings = null)
Creates a billing account.
This method can only be used to create
billing subaccounts
by GCP resellers.
When creating a subaccount, the current authenticated user must have the
billing.accounts.update
IAM permission on the master account, which is
typically given to billing account
administrators.
This method will return an error if the master account has not been
provisioned as a reseller account.
Parameters | |
---|---|
Name | Description |
request | CreateBillingAccountRequest 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 |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
CreateBillingAccountRequest request = new CreateBillingAccountRequest
{
BillingAccount = new BillingAccount(),
};
// Make the request
BillingAccount response = await cloudBillingClient.CreateBillingAccountAsync(request);
CreateBillingAccountAsync(CreateBillingAccountRequest, CancellationToken)
public virtual Task<BillingAccount> CreateBillingAccountAsync(CreateBillingAccountRequest request, CancellationToken cancellationToken)
Creates a billing account.
This method can only be used to create
billing subaccounts
by GCP resellers.
When creating a subaccount, the current authenticated user must have the
billing.accounts.update
IAM permission on the master account, which is
typically given to billing account
administrators.
This method will return an error if the master account has not been
provisioned as a reseller account.
Parameters | |
---|---|
Name | Description |
request | CreateBillingAccountRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
CreateBillingAccountRequest request = new CreateBillingAccountRequest
{
BillingAccount = new BillingAccount(),
};
// Make the request
BillingAccount response = await cloudBillingClient.CreateBillingAccountAsync(request);
GetBillingAccount(BillingAccountName, CallSettings)
public virtual BillingAccount GetBillingAccount(BillingAccountName name, CallSettings callSettings = null)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The resource name of the billing account to retrieve. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
// Make the request
BillingAccount response = cloudBillingClient.GetBillingAccount(name);
GetBillingAccount(GetBillingAccountRequest, CallSettings)
public virtual BillingAccount GetBillingAccount(GetBillingAccountRequest request, CallSettings callSettings = null)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
request | GetBillingAccountRequest 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 |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
GetBillingAccountRequest request = new GetBillingAccountRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
};
// Make the request
BillingAccount response = cloudBillingClient.GetBillingAccount(request);
GetBillingAccount(String, CallSettings)
public virtual BillingAccount GetBillingAccount(string name, CallSettings callSettings = null)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the billing account to retrieve. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
// Make the request
BillingAccount response = cloudBillingClient.GetBillingAccount(name);
GetBillingAccountAsync(BillingAccountName, CallSettings)
public virtual Task<BillingAccount> GetBillingAccountAsync(BillingAccountName name, CallSettings callSettings = null)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The resource name of the billing account to retrieve. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
// Make the request
BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(name);
GetBillingAccountAsync(BillingAccountName, CancellationToken)
public virtual Task<BillingAccount> GetBillingAccountAsync(BillingAccountName name, CancellationToken cancellationToken)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The resource name of the billing account to retrieve. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
// Make the request
BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(name);
GetBillingAccountAsync(GetBillingAccountRequest, CallSettings)
public virtual Task<BillingAccount> GetBillingAccountAsync(GetBillingAccountRequest request, CallSettings callSettings = null)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
request | GetBillingAccountRequest 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 |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
GetBillingAccountRequest request = new GetBillingAccountRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
};
// Make the request
BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(request);
GetBillingAccountAsync(GetBillingAccountRequest, CancellationToken)
public virtual Task<BillingAccount> GetBillingAccountAsync(GetBillingAccountRequest request, CancellationToken cancellationToken)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
request | GetBillingAccountRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
GetBillingAccountRequest request = new GetBillingAccountRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
};
// Make the request
BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(request);
GetBillingAccountAsync(String, CallSettings)
public virtual Task<BillingAccount> GetBillingAccountAsync(string name, CallSettings callSettings = null)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the billing account to retrieve. For example,
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
// Make the request
BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(name);
GetBillingAccountAsync(String, CancellationToken)
public virtual Task<BillingAccount> GetBillingAccountAsync(string name, CancellationToken cancellationToken)
Gets information about a billing account. The current authenticated user must be a viewer of the billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the billing account to retrieve. For example,
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
// Make the request
BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(name);
GetIamPolicy(IResourceName, CallSettings)
public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = cloudBillingClient.GetIamPolicy(resource);
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest 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 |
Policy | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = cloudBillingClient.GetIamPolicy(request);
GetIamPolicy(String, CallSettings)
public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = cloudBillingClient.GetIamPolicy(resource);
GetIamPolicyAsync(IResourceName, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await cloudBillingClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(IResourceName, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await cloudBillingClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest 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 |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await cloudBillingClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await cloudBillingClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(String, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await cloudBillingClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(String, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)
Gets the access control policy for a billing account.
The caller must have the billing.accounts.getIamPolicy
permission on the
account, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await cloudBillingClient.GetIamPolicyAsync(resource);
GetProjectBillingInfo(GetProjectBillingInfoRequest, CallSettings)
public virtual ProjectBillingInfo GetProjectBillingInfo(GetProjectBillingInfoRequest request, CallSettings callSettings = null)
Gets the billing information for a project. The current authenticated user must have permission to view the project.
Parameters | |
---|---|
Name | Description |
request | GetProjectBillingInfoRequest 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 |
ProjectBillingInfo | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
GetProjectBillingInfoRequest request = new GetProjectBillingInfoRequest { Name = "", };
// Make the request
ProjectBillingInfo response = cloudBillingClient.GetProjectBillingInfo(request);
GetProjectBillingInfo(String, CallSettings)
public virtual ProjectBillingInfo GetProjectBillingInfo(string name, CallSettings callSettings = null)
Gets the billing information for a project. The current authenticated user must have permission to view the project.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the project for which billing information is
retrieved. For example, |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ProjectBillingInfo | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
ProjectBillingInfo response = cloudBillingClient.GetProjectBillingInfo(name);
GetProjectBillingInfoAsync(GetProjectBillingInfoRequest, CallSettings)
public virtual Task<ProjectBillingInfo> GetProjectBillingInfoAsync(GetProjectBillingInfoRequest request, CallSettings callSettings = null)
Gets the billing information for a project. The current authenticated user must have permission to view the project.
Parameters | |
---|---|
Name | Description |
request | GetProjectBillingInfoRequest 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 |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
GetProjectBillingInfoRequest request = new GetProjectBillingInfoRequest { Name = "", };
// Make the request
ProjectBillingInfo response = await cloudBillingClient.GetProjectBillingInfoAsync(request);
GetProjectBillingInfoAsync(GetProjectBillingInfoRequest, CancellationToken)
public virtual Task<ProjectBillingInfo> GetProjectBillingInfoAsync(GetProjectBillingInfoRequest request, CancellationToken cancellationToken)
Gets the billing information for a project. The current authenticated user must have permission to view the project.
Parameters | |
---|---|
Name | Description |
request | GetProjectBillingInfoRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
GetProjectBillingInfoRequest request = new GetProjectBillingInfoRequest { Name = "", };
// Make the request
ProjectBillingInfo response = await cloudBillingClient.GetProjectBillingInfoAsync(request);
GetProjectBillingInfoAsync(String, CallSettings)
public virtual Task<ProjectBillingInfo> GetProjectBillingInfoAsync(string name, CallSettings callSettings = null)
Gets the billing information for a project. The current authenticated user must have permission to view the project.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the project for which billing information is
retrieved. For example, |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
ProjectBillingInfo response = await cloudBillingClient.GetProjectBillingInfoAsync(name);
GetProjectBillingInfoAsync(String, CancellationToken)
public virtual Task<ProjectBillingInfo> GetProjectBillingInfoAsync(string name, CancellationToken cancellationToken)
Gets the billing information for a project. The current authenticated user must have permission to view the project.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the project for which billing information is
retrieved. For example, |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
ProjectBillingInfo response = await cloudBillingClient.GetProjectBillingInfoAsync(name);
ListBillingAccounts(ListBillingAccountsRequest, CallSettings)
public virtual PagedEnumerable<ListBillingAccountsResponse, BillingAccount> ListBillingAccounts(ListBillingAccountsRequest request, CallSettings callSettings = null)
Lists the billing accounts that the current authenticated user has permission to view.
Parameters | |
---|---|
Name | Description |
request | ListBillingAccountsRequest 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 |
PagedEnumerable<ListBillingAccountsResponse, BillingAccount> | A pageable sequence of BillingAccount resources. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
ListBillingAccountsRequest request = new ListBillingAccountsRequest { Filter = "", };
// Make the request
PagedEnumerable<ListBillingAccountsResponse, BillingAccount> response = cloudBillingClient.ListBillingAccounts(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (BillingAccount 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 (ListBillingAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BillingAccount 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<BillingAccount> 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 (BillingAccount 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;
ListBillingAccounts(String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListBillingAccountsResponse, BillingAccount> ListBillingAccounts(string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists the billing accounts that the current authenticated user has permission to view.
Parameters | |
---|---|
Name | Description |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListBillingAccountsResponse, BillingAccount> | A pageable sequence of BillingAccount resources. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Make the request
PagedEnumerable<ListBillingAccountsResponse, BillingAccount> response = cloudBillingClient.ListBillingAccounts();
// Iterate over all response items, lazily performing RPCs as required
foreach (BillingAccount 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 (ListBillingAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BillingAccount 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<BillingAccount> 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 (BillingAccount 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;
ListBillingAccountsAsync(ListBillingAccountsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListBillingAccountsResponse, BillingAccount> ListBillingAccountsAsync(ListBillingAccountsRequest request, CallSettings callSettings = null)
Lists the billing accounts that the current authenticated user has permission to view.
Parameters | |
---|---|
Name | Description |
request | ListBillingAccountsRequest 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 |
PagedAsyncEnumerable<ListBillingAccountsResponse, BillingAccount> | A pageable asynchronous sequence of BillingAccount resources. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
ListBillingAccountsRequest request = new ListBillingAccountsRequest { Filter = "", };
// Make the request
PagedAsyncEnumerable<ListBillingAccountsResponse, BillingAccount> response = cloudBillingClient.ListBillingAccountsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BillingAccount 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((ListBillingAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BillingAccount 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<BillingAccount> 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 (BillingAccount 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;
ListBillingAccountsAsync(String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListBillingAccountsResponse, BillingAccount> ListBillingAccountsAsync(string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists the billing accounts that the current authenticated user has permission to view.
Parameters | |
---|---|
Name | Description |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListBillingAccountsResponse, BillingAccount> | A pageable asynchronous sequence of BillingAccount resources. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Make the request
PagedAsyncEnumerable<ListBillingAccountsResponse, BillingAccount> response = cloudBillingClient.ListBillingAccountsAsync();
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BillingAccount 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((ListBillingAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BillingAccount 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<BillingAccount> 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 (BillingAccount 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;
ListProjectBillingInfo(BillingAccountName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> ListProjectBillingInfo(BillingAccountName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists the projects associated with a billing account. The current
authenticated user must have the billing.resourceAssociations.list
IAM
permission, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The resource name of the billing account associated with the projects that
you want to list. For example, |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> | A pageable sequence of ProjectBillingInfo resources. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
// Make the request
PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfo(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (ProjectBillingInfo 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 (ListProjectBillingInfoResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ProjectBillingInfo 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<ProjectBillingInfo> 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 (ProjectBillingInfo 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;
ListProjectBillingInfo(ListProjectBillingInfoRequest, CallSettings)
public virtual PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> ListProjectBillingInfo(ListProjectBillingInfoRequest request, CallSettings callSettings = null)
Lists the projects associated with a billing account. The current
authenticated user must have the billing.resourceAssociations.list
IAM
permission, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
request | ListProjectBillingInfoRequest 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 |
PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> | A pageable sequence of ProjectBillingInfo resources. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
ListProjectBillingInfoRequest request = new ListProjectBillingInfoRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
};
// Make the request
PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfo(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ProjectBillingInfo 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 (ListProjectBillingInfoResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ProjectBillingInfo 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<ProjectBillingInfo> 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 (ProjectBillingInfo 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;
ListProjectBillingInfo(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> ListProjectBillingInfo(string name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists the projects associated with a billing account. The current
authenticated user must have the billing.resourceAssociations.list
IAM
permission, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the billing account associated with the projects that
you want to list. For example, |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> | A pageable sequence of ProjectBillingInfo resources. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
// Make the request
PagedEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfo(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (ProjectBillingInfo 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 (ListProjectBillingInfoResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ProjectBillingInfo 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<ProjectBillingInfo> 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 (ProjectBillingInfo 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;
ListProjectBillingInfoAsync(BillingAccountName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> ListProjectBillingInfoAsync(BillingAccountName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists the projects associated with a billing account. The current
authenticated user must have the billing.resourceAssociations.list
IAM
permission, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The resource name of the billing account associated with the projects that
you want to list. For example, |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> | A pageable asynchronous sequence of ProjectBillingInfo resources. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfoAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ProjectBillingInfo 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((ListProjectBillingInfoResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ProjectBillingInfo 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<ProjectBillingInfo> 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 (ProjectBillingInfo 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;
ListProjectBillingInfoAsync(ListProjectBillingInfoRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> ListProjectBillingInfoAsync(ListProjectBillingInfoRequest request, CallSettings callSettings = null)
Lists the projects associated with a billing account. The current
authenticated user must have the billing.resourceAssociations.list
IAM
permission, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
request | ListProjectBillingInfoRequest 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 |
PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> | A pageable asynchronous sequence of ProjectBillingInfo resources. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
ListProjectBillingInfoRequest request = new ListProjectBillingInfoRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
};
// Make the request
PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfoAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ProjectBillingInfo 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((ListProjectBillingInfoResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ProjectBillingInfo 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<ProjectBillingInfo> 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 (ProjectBillingInfo 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;
ListProjectBillingInfoAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> ListProjectBillingInfoAsync(string name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists the projects associated with a billing account. The current
authenticated user must have the billing.resourceAssociations.list
IAM
permission, which is often given to billing account
viewers.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the billing account associated with the projects that
you want to list. For example, |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> | A pageable asynchronous sequence of ProjectBillingInfo resources. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfoAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ProjectBillingInfo 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((ListProjectBillingInfoResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ProjectBillingInfo 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<ProjectBillingInfo> 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 (ProjectBillingInfo 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;
SetIamPolicy(IResourceName, Policy, CallSettings)
public virtual Policy SetIamPolicy(IResourceName resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = cloudBillingClient.SetIamPolicy(resource, policy);
SetIamPolicy(SetIamPolicyRequest, CallSettings)
public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest 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 |
Policy | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
};
// Make the request
Policy response = cloudBillingClient.SetIamPolicy(request);
SetIamPolicy(String, Policy, CallSettings)
public virtual Policy SetIamPolicy(string resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = cloudBillingClient.SetIamPolicy(resource, policy);
SetIamPolicyAsync(IResourceName, Policy, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await cloudBillingClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(IResourceName, Policy, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CancellationToken cancellationToken)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await cloudBillingClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest 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 |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
};
// Make the request
Policy response = await cloudBillingClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
};
// Make the request
Policy response = await cloudBillingClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(String, Policy, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CallSettings callSettings = null)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await cloudBillingClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(String, Policy, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CancellationToken cancellationToken)
Sets the access control policy for a billing account. Replaces any existing
policy.
The caller must have the billing.accounts.setIamPolicy
permission on the
account, which is often given to billing account
administrators.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await cloudBillingClient.SetIamPolicyAsync(resource, policy);
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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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.
TestIamPermissions(IResourceName, IEnumerable<String>, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = cloudBillingClient.TestIamPermissions(resource, permissions);
TestIamPermissions(TestIamPermissionsRequest, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest 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 |
TestIamPermissionsResponse | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = cloudBillingClient.TestIamPermissions(request);
TestIamPermissions(String, IEnumerable<String>, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = cloudBillingClient.TestIamPermissions(resource, permissions);
TestIamPermissionsAsync(IResourceName, IEnumerable<String>, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await cloudBillingClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(IResourceName, IEnumerable<String>, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await cloudBillingClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest 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 |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await cloudBillingClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await cloudBillingClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(String, IEnumerable<String>, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await cloudBillingClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(String, IEnumerable<String>, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)
Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await cloudBillingClient.TestIamPermissionsAsync(resource, permissions);
UpdateBillingAccount(BillingAccountName, BillingAccount, CallSettings)
public virtual BillingAccount UpdateBillingAccount(BillingAccountName name, BillingAccount account, CallSettings callSettings = null)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The name of the billing account resource to be updated. |
account | BillingAccount Required. The billing account resource to replace the resource on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
BillingAccount account = new BillingAccount();
// Make the request
BillingAccount response = cloudBillingClient.UpdateBillingAccount(name, account);
UpdateBillingAccount(UpdateBillingAccountRequest, CallSettings)
public virtual BillingAccount UpdateBillingAccount(UpdateBillingAccountRequest request, CallSettings callSettings = null)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
request | UpdateBillingAccountRequest 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 |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
UpdateBillingAccountRequest request = new UpdateBillingAccountRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
Account = new BillingAccount(),
UpdateMask = new FieldMask(),
};
// Make the request
BillingAccount response = cloudBillingClient.UpdateBillingAccount(request);
UpdateBillingAccount(String, BillingAccount, CallSettings)
public virtual BillingAccount UpdateBillingAccount(string name, BillingAccount account, CallSettings callSettings = null)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the billing account resource to be updated. |
account | BillingAccount Required. The billing account resource to replace the resource on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BillingAccount | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
BillingAccount account = new BillingAccount();
// Make the request
BillingAccount response = cloudBillingClient.UpdateBillingAccount(name, account);
UpdateBillingAccountAsync(BillingAccountName, BillingAccount, CallSettings)
public virtual Task<BillingAccount> UpdateBillingAccountAsync(BillingAccountName name, BillingAccount account, CallSettings callSettings = null)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The name of the billing account resource to be updated. |
account | BillingAccount Required. The billing account resource to replace the resource on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
BillingAccount account = new BillingAccount();
// Make the request
BillingAccount response = await cloudBillingClient.UpdateBillingAccountAsync(name, account);
UpdateBillingAccountAsync(BillingAccountName, BillingAccount, CancellationToken)
public virtual Task<BillingAccount> UpdateBillingAccountAsync(BillingAccountName name, BillingAccount account, CancellationToken cancellationToken)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
name | BillingAccountName Required. The name of the billing account resource to be updated. |
account | BillingAccount Required. The billing account resource to replace the resource on the server. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
BillingAccount account = new BillingAccount();
// Make the request
BillingAccount response = await cloudBillingClient.UpdateBillingAccountAsync(name, account);
UpdateBillingAccountAsync(UpdateBillingAccountRequest, CallSettings)
public virtual Task<BillingAccount> UpdateBillingAccountAsync(UpdateBillingAccountRequest request, CallSettings callSettings = null)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
request | UpdateBillingAccountRequest 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 |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
UpdateBillingAccountRequest request = new UpdateBillingAccountRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
Account = new BillingAccount(),
UpdateMask = new FieldMask(),
};
// Make the request
BillingAccount response = await cloudBillingClient.UpdateBillingAccountAsync(request);
UpdateBillingAccountAsync(UpdateBillingAccountRequest, CancellationToken)
public virtual Task<BillingAccount> UpdateBillingAccountAsync(UpdateBillingAccountRequest request, CancellationToken cancellationToken)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
request | UpdateBillingAccountRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
UpdateBillingAccountRequest request = new UpdateBillingAccountRequest
{
BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
Account = new BillingAccount(),
UpdateMask = new FieldMask(),
};
// Make the request
BillingAccount response = await cloudBillingClient.UpdateBillingAccountAsync(request);
UpdateBillingAccountAsync(String, BillingAccount, CallSettings)
public virtual Task<BillingAccount> UpdateBillingAccountAsync(string name, BillingAccount account, CallSettings callSettings = null)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the billing account resource to be updated. |
account | BillingAccount Required. The billing account resource to replace the resource on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
BillingAccount account = new BillingAccount();
// Make the request
BillingAccount response = await cloudBillingClient.UpdateBillingAccountAsync(name, account);
UpdateBillingAccountAsync(String, BillingAccount, CancellationToken)
public virtual Task<BillingAccount> UpdateBillingAccountAsync(string name, BillingAccount account, CancellationToken cancellationToken)
Updates a billing account's fields.
Currently the only field that can be edited is display_name
.
The current authenticated user must have the billing.accounts.update
IAM permission, which is typically given to the
administrator
of the billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the billing account resource to be updated. |
account | BillingAccount Required. The billing account resource to replace the resource on the server. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<BillingAccount> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]";
BillingAccount account = new BillingAccount();
// Make the request
BillingAccount response = await cloudBillingClient.UpdateBillingAccountAsync(name, account);
UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest, CallSettings)
public virtual ProjectBillingInfo UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest request, CallSettings callSettings = null)
Sets or updates the billing account associated with a project. You specify
the new billing account by setting the billing_account_name
in the
ProjectBillingInfo
resource to the resource name of a billing account.
Associating a project with an open billing account enables billing on the
project and allows charges for resource usage. If the project already had a
billing account, this method changes the billing account used for resource
usage charges.
Note: Incurred charges that have not yet been reported in the transaction history of the GCP Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.
The current authenticated user must have ownership privileges for both the project and the billing account.
You can disable billing on the project by setting the
billing_account_name
field to empty. This action disassociates the
current billing account from the project. Any billable activity of your
in-use services will stop, and your application could stop functioning as
expected. Any unbilled charges to date will be billed to the previously
associated account. The current authenticated user must be either an owner
of the project or an owner of the billing account for the project.
Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.
Parameters | |
---|---|
Name | Description |
request | UpdateProjectBillingInfoRequest 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 |
ProjectBillingInfo | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
UpdateProjectBillingInfoRequest request = new UpdateProjectBillingInfoRequest
{
Name = "",
ProjectBillingInfo = new ProjectBillingInfo(),
};
// Make the request
ProjectBillingInfo response = cloudBillingClient.UpdateProjectBillingInfo(request);
UpdateProjectBillingInfo(String, ProjectBillingInfo, CallSettings)
public virtual ProjectBillingInfo UpdateProjectBillingInfo(string name, ProjectBillingInfo projectBillingInfo, CallSettings callSettings = null)
Sets or updates the billing account associated with a project. You specify
the new billing account by setting the billing_account_name
in the
ProjectBillingInfo
resource to the resource name of a billing account.
Associating a project with an open billing account enables billing on the
project and allows charges for resource usage. If the project already had a
billing account, this method changes the billing account used for resource
usage charges.
Note: Incurred charges that have not yet been reported in the transaction history of the GCP Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.
The current authenticated user must have ownership privileges for both the project and the billing account.
You can disable billing on the project by setting the
billing_account_name
field to empty. This action disassociates the
current billing account from the project. Any billable activity of your
in-use services will stop, and your application could stop functioning as
expected. Any unbilled charges to date will be billed to the previously
associated account. The current authenticated user must be either an owner
of the project or an owner of the billing account for the project.
Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the project associated with the billing information
that you want to update. For example, |
projectBillingInfo | ProjectBillingInfo The new billing information for the project. Read-only fields are ignored;
thus, you can leave empty all fields except |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ProjectBillingInfo | The RPC response. |
// Create client
CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
// Initialize request argument(s)
string name = "";
ProjectBillingInfo projectBillingInfo = new ProjectBillingInfo();
// Make the request
ProjectBillingInfo response = cloudBillingClient.UpdateProjectBillingInfo(name, projectBillingInfo);
UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest, CallSettings)
public virtual Task<ProjectBillingInfo> UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest request, CallSettings callSettings = null)
Sets or updates the billing account associated with a project. You specify
the new billing account by setting the billing_account_name
in the
ProjectBillingInfo
resource to the resource name of a billing account.
Associating a project with an open billing account enables billing on the
project and allows charges for resource usage. If the project already had a
billing account, this method changes the billing account used for resource
usage charges.
Note: Incurred charges that have not yet been reported in the transaction history of the GCP Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.
The current authenticated user must have ownership privileges for both the project and the billing account.
You can disable billing on the project by setting the
billing_account_name
field to empty. This action disassociates the
current billing account from the project. Any billable activity of your
in-use services will stop, and your application could stop functioning as
expected. Any unbilled charges to date will be billed to the previously
associated account. The current authenticated user must be either an owner
of the project or an owner of the billing account for the project.
Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.
Parameters | |
---|---|
Name | Description |
request | UpdateProjectBillingInfoRequest 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 |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
UpdateProjectBillingInfoRequest request = new UpdateProjectBillingInfoRequest
{
Name = "",
ProjectBillingInfo = new ProjectBillingInfo(),
};
// Make the request
ProjectBillingInfo response = await cloudBillingClient.UpdateProjectBillingInfoAsync(request);
UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest, CancellationToken)
public virtual Task<ProjectBillingInfo> UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest request, CancellationToken cancellationToken)
Sets or updates the billing account associated with a project. You specify
the new billing account by setting the billing_account_name
in the
ProjectBillingInfo
resource to the resource name of a billing account.
Associating a project with an open billing account enables billing on the
project and allows charges for resource usage. If the project already had a
billing account, this method changes the billing account used for resource
usage charges.
Note: Incurred charges that have not yet been reported in the transaction history of the GCP Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.
The current authenticated user must have ownership privileges for both the project and the billing account.
You can disable billing on the project by setting the
billing_account_name
field to empty. This action disassociates the
current billing account from the project. Any billable activity of your
in-use services will stop, and your application could stop functioning as
expected. Any unbilled charges to date will be billed to the previously
associated account. The current authenticated user must be either an owner
of the project or an owner of the billing account for the project.
Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.
Parameters | |
---|---|
Name | Description |
request | UpdateProjectBillingInfoRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
UpdateProjectBillingInfoRequest request = new UpdateProjectBillingInfoRequest
{
Name = "",
ProjectBillingInfo = new ProjectBillingInfo(),
};
// Make the request
ProjectBillingInfo response = await cloudBillingClient.UpdateProjectBillingInfoAsync(request);
UpdateProjectBillingInfoAsync(String, ProjectBillingInfo, CallSettings)
public virtual Task<ProjectBillingInfo> UpdateProjectBillingInfoAsync(string name, ProjectBillingInfo projectBillingInfo, CallSettings callSettings = null)
Sets or updates the billing account associated with a project. You specify
the new billing account by setting the billing_account_name
in the
ProjectBillingInfo
resource to the resource name of a billing account.
Associating a project with an open billing account enables billing on the
project and allows charges for resource usage. If the project already had a
billing account, this method changes the billing account used for resource
usage charges.
Note: Incurred charges that have not yet been reported in the transaction history of the GCP Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.
The current authenticated user must have ownership privileges for both the project and the billing account.
You can disable billing on the project by setting the
billing_account_name
field to empty. This action disassociates the
current billing account from the project. Any billable activity of your
in-use services will stop, and your application could stop functioning as
expected. Any unbilled charges to date will be billed to the previously
associated account. The current authenticated user must be either an owner
of the project or an owner of the billing account for the project.
Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the project associated with the billing information
that you want to update. For example, |
projectBillingInfo | ProjectBillingInfo The new billing information for the project. Read-only fields are ignored;
thus, you can leave empty all fields except |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "";
ProjectBillingInfo projectBillingInfo = new ProjectBillingInfo();
// Make the request
ProjectBillingInfo response = await cloudBillingClient.UpdateProjectBillingInfoAsync(name, projectBillingInfo);
UpdateProjectBillingInfoAsync(String, ProjectBillingInfo, CancellationToken)
public virtual Task<ProjectBillingInfo> UpdateProjectBillingInfoAsync(string name, ProjectBillingInfo projectBillingInfo, CancellationToken cancellationToken)
Sets or updates the billing account associated with a project. You specify
the new billing account by setting the billing_account_name
in the
ProjectBillingInfo
resource to the resource name of a billing account.
Associating a project with an open billing account enables billing on the
project and allows charges for resource usage. If the project already had a
billing account, this method changes the billing account used for resource
usage charges.
Note: Incurred charges that have not yet been reported in the transaction history of the GCP Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.
The current authenticated user must have ownership privileges for both the project and the billing account.
You can disable billing on the project by setting the
billing_account_name
field to empty. This action disassociates the
current billing account from the project. Any billable activity of your
in-use services will stop, and your application could stop functioning as
expected. Any unbilled charges to date will be billed to the previously
associated account. The current authenticated user must be either an owner
of the project or an owner of the billing account for the project.
Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the project associated with the billing information
that you want to update. For example, |
projectBillingInfo | ProjectBillingInfo The new billing information for the project. Read-only fields are ignored;
thus, you can leave empty all fields except |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ProjectBillingInfo> | A Task containing the RPC response. |
// Create client
CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
// Initialize request argument(s)
string name = "";
ProjectBillingInfo projectBillingInfo = new ProjectBillingInfo();
// Make the request
ProjectBillingInfo response = await cloudBillingClient.UpdateProjectBillingInfoAsync(name, projectBillingInfo);