Class BillingAccountsResource
The "billingAccounts" collection of methods.
Inherited Members
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 |
---|---|---|
IClientService | service |
Properties
Projects
Gets the Projects resource.
Declaration
public virtual BillingAccountsResource.ProjectsResource Projects { get; }
Property Value
Type | Description |
---|---|
BillingAccountsResource.ProjectsResource |
SubAccounts
Gets the SubAccounts resource.
Declaration
public virtual BillingAccountsResource.SubAccountsResource SubAccounts { get; }
Property Value
Type | Description |
---|---|
BillingAccountsResource.SubAccountsResource |
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 for subaccounts.
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 |
---|---|---|
string | name | Required. The resource name of the billing account to retrieve. For example,
|
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 |
---|---|---|
string | resource | REQUIRED: The resource for which the policy is being requested. See Resource names 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 |
Move(MoveBillingAccountRequest, string)
Changes which parent organization a billing account belongs to.
Declaration
public virtual BillingAccountsResource.MoveRequest Move(MoveBillingAccountRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
MoveBillingAccountRequest | body | The body of the request. |
string | name | Required. The resource name of the billing account to move. Must be of the form
|
Returns
Type | Description |
---|---|
BillingAccountsResource.MoveRequest |
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. |
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. |
string | resource | REQUIRED: The resource for which the policy is being specified. See Resource names 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. |
string | resource | REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
BillingAccountsResource.TestIamPermissionsRequest |