Show / Hide Table of Contents

Class BillingAccountsResource

The "billingAccounts" collection of methods.

Inheritance
System.Object
BillingAccountsResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.Cloudbilling.v1
Assembly: Google.Apis.Cloudbilling.v1.dll
Syntax
public class BillingAccountsResource

Constructors

BillingAccountsResource(IClientService)

Constructs a new resource.

Declaration
public BillingAccountsResource(IClientService service)
Parameters
Type Name Description
Google.Apis.Services.IClientService service

Properties

Projects

Gets the Projects resource.

Declaration
public virtual BillingAccountsResource.ProjectsResource Projects { get; }
Property Value
Type Description
BillingAccountsResource.ProjectsResource

Methods

Create(BillingAccount)

This method creates billing subaccounts. Google Cloud resellers should use the Channel Services APIs, accounts.customers.create and accounts.customers.entitlements.create. When creating a subaccount, the current authenticated user must have the billing.accounts.update IAM permission on the parent account, which is typically given to billing account administrators. This method will return an error if the parent account has not been provisioned as a reseller account.

Declaration
public virtual BillingAccountsResource.CreateRequest Create(BillingAccount body)
Parameters
Type Name Description
BillingAccount body

The body of the request.

Returns
Type Description
BillingAccountsResource.CreateRequest

Get(String)

Gets information about a billing account. The current authenticated user must be a viewer of the billing account.

Declaration
public virtual BillingAccountsResource.GetRequest Get(string name)
Parameters
Type Name Description
System.String name

Required. The resource name of the billing account to retrieve. For example, billingAccounts/012345-567890-ABCDEF.

Returns
Type Description
BillingAccountsResource.GetRequest

GetIamPolicy(String)

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.

Declaration
public virtual BillingAccountsResource.GetIamPolicyRequest GetIamPolicy(string resource)
Parameters
Type Name Description
System.String resource

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
Type Description
BillingAccountsResource.GetIamPolicyRequest

List()

Lists the billing accounts that the current authenticated user has permission to view.

Declaration
public virtual BillingAccountsResource.ListRequest List()
Returns
Type Description
BillingAccountsResource.ListRequest

Patch(BillingAccount, String)

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.

Declaration
public virtual BillingAccountsResource.PatchRequest Patch(BillingAccount body, string name)
Parameters
Type Name Description
BillingAccount body

The body of the request.

System.String name

Required. The name of the billing account resource to be updated.

Returns
Type Description
BillingAccountsResource.PatchRequest

SetIamPolicy(SetIamPolicyRequest, String)

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.

Declaration
public virtual BillingAccountsResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type Name Description
SetIamPolicyRequest body

The body of the request.

System.String resource

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

Returns
Type Description
BillingAccountsResource.SetIamPolicyRequest

TestIamPermissions(TestIamPermissionsRequest, String)

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.

Declaration
public virtual BillingAccountsResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type Name Description
TestIamPermissionsRequest body

The body of the request.

System.String resource

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

Returns
Type Description
BillingAccountsResource.TestIamPermissionsRequest
In This Article
Back to top