cloudbilling
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package cloudbilling provides access to the Cloud Billing API.
For product documentation, see:https://cloud.google.com/billing/docs/apis
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/cloudbilling/v1"...ctx := context.Background()cloudbillingService, err := cloudbilling.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:
cloudbillingService, err := cloudbilling.NewService(ctx, option.WithScopes(cloudbilling.CloudPlatformScope))
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
cloudbillingService, err := cloudbilling.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)cloudbillingService, err := cloudbilling.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type APIService
- type AggregationInfo
- type AuditConfig
- type AuditLogConfig
- type BillingAccount
- type BillingAccountsCreateCall
- func (c *BillingAccountsCreateCall) Context(ctx context.Context) *BillingAccountsCreateCall
- func (c *BillingAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error)
- func (c *BillingAccountsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsCreateCall
- func (c *BillingAccountsCreateCall) Header() http.Header
- func (c *BillingAccountsCreateCall) Parent(parent string) *BillingAccountsCreateCall
- type BillingAccountsGetCall
- func (c *BillingAccountsGetCall) Context(ctx context.Context) *BillingAccountsGetCall
- func (c *BillingAccountsGetCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error)
- func (c *BillingAccountsGetCall) Fields(s ...googleapi.Field) *BillingAccountsGetCall
- func (c *BillingAccountsGetCall) Header() http.Header
- func (c *BillingAccountsGetCall) IfNoneMatch(entityTag string) *BillingAccountsGetCall
- type BillingAccountsGetIamPolicyCall
- func (c *BillingAccountsGetIamPolicyCall) Context(ctx context.Context) *BillingAccountsGetIamPolicyCall
- func (c *BillingAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error)
- func (c *BillingAccountsGetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsGetIamPolicyCall
- func (c *BillingAccountsGetIamPolicyCall) Header() http.Header
- func (c *BillingAccountsGetIamPolicyCall) IfNoneMatch(entityTag string) *BillingAccountsGetIamPolicyCall
- func (c *BillingAccountsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BillingAccountsGetIamPolicyCall
- type BillingAccountsListCall
- func (c *BillingAccountsListCall) Context(ctx context.Context) *BillingAccountsListCall
- func (c *BillingAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBillingAccountsResponse, error)
- func (c *BillingAccountsListCall) Fields(s ...googleapi.Field) *BillingAccountsListCall
- func (c *BillingAccountsListCall) Filter(filter string) *BillingAccountsListCall
- func (c *BillingAccountsListCall) Header() http.Header
- func (c *BillingAccountsListCall) IfNoneMatch(entityTag string) *BillingAccountsListCall
- func (c *BillingAccountsListCall) PageSize(pageSize int64) *BillingAccountsListCall
- func (c *BillingAccountsListCall) PageToken(pageToken string) *BillingAccountsListCall
- func (c *BillingAccountsListCall) Pages(ctx context.Context, f func(*ListBillingAccountsResponse) error) error
- func (c *BillingAccountsListCall) Parent(parent string) *BillingAccountsListCall
- type BillingAccountsMoveCall
- func (c *BillingAccountsMoveCall) Context(ctx context.Context) *BillingAccountsMoveCall
- func (c *BillingAccountsMoveCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error)
- func (c *BillingAccountsMoveCall) Fields(s ...googleapi.Field) *BillingAccountsMoveCall
- func (c *BillingAccountsMoveCall) Header() http.Header
- type BillingAccountsPatchCall
- func (c *BillingAccountsPatchCall) Context(ctx context.Context) *BillingAccountsPatchCall
- func (c *BillingAccountsPatchCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error)
- func (c *BillingAccountsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsPatchCall
- func (c *BillingAccountsPatchCall) Header() http.Header
- func (c *BillingAccountsPatchCall) UpdateMask(updateMask string) *BillingAccountsPatchCall
- type BillingAccountsProjectsListCall
- func (c *BillingAccountsProjectsListCall) Context(ctx context.Context) *BillingAccountsProjectsListCall
- func (c *BillingAccountsProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectBillingInfoResponse, error)
- func (c *BillingAccountsProjectsListCall) Fields(s ...googleapi.Field) *BillingAccountsProjectsListCall
- func (c *BillingAccountsProjectsListCall) Header() http.Header
- func (c *BillingAccountsProjectsListCall) IfNoneMatch(entityTag string) *BillingAccountsProjectsListCall
- func (c *BillingAccountsProjectsListCall) PageSize(pageSize int64) *BillingAccountsProjectsListCall
- func (c *BillingAccountsProjectsListCall) PageToken(pageToken string) *BillingAccountsProjectsListCall
- func (c *BillingAccountsProjectsListCall) Pages(ctx context.Context, f func(*ListProjectBillingInfoResponse) error) error
- type BillingAccountsProjectsService
- type BillingAccountsService
- func (r *BillingAccountsService) Create(billingaccount *BillingAccount) *BillingAccountsCreateCall
- func (r *BillingAccountsService) Get(name string) *BillingAccountsGetCall
- func (r *BillingAccountsService) GetIamPolicy(resource string) *BillingAccountsGetIamPolicyCall
- func (r *BillingAccountsService) List() *BillingAccountsListCall
- func (r *BillingAccountsService) Move(name string, movebillingaccountrequest *MoveBillingAccountRequest) *BillingAccountsMoveCall
- func (r *BillingAccountsService) Patch(name string, billingaccount *BillingAccount) *BillingAccountsPatchCall
- func (r *BillingAccountsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *BillingAccountsSetIamPolicyCall
- func (r *BillingAccountsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *BillingAccountsTestIamPermissionsCall
- type BillingAccountsSetIamPolicyCall
- func (c *BillingAccountsSetIamPolicyCall) Context(ctx context.Context) *BillingAccountsSetIamPolicyCall
- func (c *BillingAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error)
- func (c *BillingAccountsSetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsSetIamPolicyCall
- func (c *BillingAccountsSetIamPolicyCall) Header() http.Header
- type BillingAccountsSubAccountsCreateCall
- func (c *BillingAccountsSubAccountsCreateCall) Context(ctx context.Context) *BillingAccountsSubAccountsCreateCall
- func (c *BillingAccountsSubAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error)
- func (c *BillingAccountsSubAccountsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsSubAccountsCreateCall
- func (c *BillingAccountsSubAccountsCreateCall) Header() http.Header
- type BillingAccountsSubAccountsListCall
- func (c *BillingAccountsSubAccountsListCall) Context(ctx context.Context) *BillingAccountsSubAccountsListCall
- func (c *BillingAccountsSubAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBillingAccountsResponse, error)
- func (c *BillingAccountsSubAccountsListCall) Fields(s ...googleapi.Field) *BillingAccountsSubAccountsListCall
- func (c *BillingAccountsSubAccountsListCall) Filter(filter string) *BillingAccountsSubAccountsListCall
- func (c *BillingAccountsSubAccountsListCall) Header() http.Header
- func (c *BillingAccountsSubAccountsListCall) IfNoneMatch(entityTag string) *BillingAccountsSubAccountsListCall
- func (c *BillingAccountsSubAccountsListCall) PageSize(pageSize int64) *BillingAccountsSubAccountsListCall
- func (c *BillingAccountsSubAccountsListCall) PageToken(pageToken string) *BillingAccountsSubAccountsListCall
- func (c *BillingAccountsSubAccountsListCall) Pages(ctx context.Context, f func(*ListBillingAccountsResponse) error) error
- type BillingAccountsSubAccountsService
- type BillingAccountsTestIamPermissionsCall
- func (c *BillingAccountsTestIamPermissionsCall) Context(ctx context.Context) *BillingAccountsTestIamPermissionsCall
- func (c *BillingAccountsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error)
- func (c *BillingAccountsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BillingAccountsTestIamPermissionsCall
- func (c *BillingAccountsTestIamPermissionsCall) Header() http.Header
- type Binding
- type Category
- type Expr
- type GeoTaxonomy
- type ListBillingAccountsResponse
- type ListProjectBillingInfoResponse
- type ListServicesResponse
- type ListSkusResponse
- type Money
- type MoveBillingAccountRequest
- type OrganizationsBillingAccountsCreateCall
- func (c *OrganizationsBillingAccountsCreateCall) Context(ctx context.Context) *OrganizationsBillingAccountsCreateCall
- func (c *OrganizationsBillingAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error)
- func (c *OrganizationsBillingAccountsCreateCall) Fields(s ...googleapi.Field) *OrganizationsBillingAccountsCreateCall
- func (c *OrganizationsBillingAccountsCreateCall) Header() http.Header
- type OrganizationsBillingAccountsListCall
- func (c *OrganizationsBillingAccountsListCall) Context(ctx context.Context) *OrganizationsBillingAccountsListCall
- func (c *OrganizationsBillingAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBillingAccountsResponse, error)
- func (c *OrganizationsBillingAccountsListCall) Fields(s ...googleapi.Field) *OrganizationsBillingAccountsListCall
- func (c *OrganizationsBillingAccountsListCall) Filter(filter string) *OrganizationsBillingAccountsListCall
- func (c *OrganizationsBillingAccountsListCall) Header() http.Header
- func (c *OrganizationsBillingAccountsListCall) IfNoneMatch(entityTag string) *OrganizationsBillingAccountsListCall
- func (c *OrganizationsBillingAccountsListCall) PageSize(pageSize int64) *OrganizationsBillingAccountsListCall
- func (c *OrganizationsBillingAccountsListCall) PageToken(pageToken string) *OrganizationsBillingAccountsListCall
- func (c *OrganizationsBillingAccountsListCall) Pages(ctx context.Context, f func(*ListBillingAccountsResponse) error) error
- type OrganizationsBillingAccountsMoveCall
- func (c *OrganizationsBillingAccountsMoveCall) Context(ctx context.Context) *OrganizationsBillingAccountsMoveCall
- func (c *OrganizationsBillingAccountsMoveCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error)
- func (c *OrganizationsBillingAccountsMoveCall) Fields(s ...googleapi.Field) *OrganizationsBillingAccountsMoveCall
- func (c *OrganizationsBillingAccountsMoveCall) Header() http.Header
- func (c *OrganizationsBillingAccountsMoveCall) IfNoneMatch(entityTag string) *OrganizationsBillingAccountsMoveCall
- type OrganizationsBillingAccountsService
- func (r *OrganizationsBillingAccountsService) Create(parent string, billingaccount *BillingAccount) *OrganizationsBillingAccountsCreateCall
- func (r *OrganizationsBillingAccountsService) List(parent string) *OrganizationsBillingAccountsListCall
- func (r *OrganizationsBillingAccountsService) Move(destinationParent string, name string) *OrganizationsBillingAccountsMoveCall
- type OrganizationsService
- type Policy
- type PricingExpression
- type PricingInfo
- type ProjectBillingInfo
- type ProjectsGetBillingInfoCall
- func (c *ProjectsGetBillingInfoCall) Context(ctx context.Context) *ProjectsGetBillingInfoCall
- func (c *ProjectsGetBillingInfoCall) Do(opts ...googleapi.CallOption) (*ProjectBillingInfo, error)
- func (c *ProjectsGetBillingInfoCall) Fields(s ...googleapi.Field) *ProjectsGetBillingInfoCall
- func (c *ProjectsGetBillingInfoCall) Header() http.Header
- func (c *ProjectsGetBillingInfoCall) IfNoneMatch(entityTag string) *ProjectsGetBillingInfoCall
- type ProjectsService
- type ProjectsUpdateBillingInfoCall
- func (c *ProjectsUpdateBillingInfoCall) Context(ctx context.Context) *ProjectsUpdateBillingInfoCall
- func (c *ProjectsUpdateBillingInfoCall) Do(opts ...googleapi.CallOption) (*ProjectBillingInfo, error)
- func (c *ProjectsUpdateBillingInfoCall) Fields(s ...googleapi.Field) *ProjectsUpdateBillingInfoCall
- func (c *ProjectsUpdateBillingInfoCall) Header() http.Header
- type Service
- type ServicesListCall
- func (c *ServicesListCall) Context(ctx context.Context) *ServicesListCall
- func (c *ServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error)
- func (c *ServicesListCall) Fields(s ...googleapi.Field) *ServicesListCall
- func (c *ServicesListCall) Header() http.Header
- func (c *ServicesListCall) IfNoneMatch(entityTag string) *ServicesListCall
- func (c *ServicesListCall) PageSize(pageSize int64) *ServicesListCall
- func (c *ServicesListCall) PageToken(pageToken string) *ServicesListCall
- func (c *ServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error
- type ServicesService
- type ServicesSkusListCall
- func (c *ServicesSkusListCall) Context(ctx context.Context) *ServicesSkusListCall
- func (c *ServicesSkusListCall) CurrencyCode(currencyCode string) *ServicesSkusListCall
- func (c *ServicesSkusListCall) Do(opts ...googleapi.CallOption) (*ListSkusResponse, error)
- func (c *ServicesSkusListCall) EndTime(endTime string) *ServicesSkusListCall
- func (c *ServicesSkusListCall) Fields(s ...googleapi.Field) *ServicesSkusListCall
- func (c *ServicesSkusListCall) Header() http.Header
- func (c *ServicesSkusListCall) IfNoneMatch(entityTag string) *ServicesSkusListCall
- func (c *ServicesSkusListCall) PageSize(pageSize int64) *ServicesSkusListCall
- func (c *ServicesSkusListCall) PageToken(pageToken string) *ServicesSkusListCall
- func (c *ServicesSkusListCall) Pages(ctx context.Context, f func(*ListSkusResponse) error) error
- func (c *ServicesSkusListCall) StartTime(startTime string) *ServicesSkusListCall
- type ServicesSkusService
- type SetIamPolicyRequest
- type Sku
- type TestIamPermissionsRequest
- type TestIamPermissionsResponse
- type TierRate
Constants¶
const (// View and manage your Google Cloud Platform billing accountsCloudBillingScope = "https://www.googleapis.com/auth/cloud-billing"// View your Google Cloud Platform billing accountsCloudBillingReadonlyScope = "https://www.googleapis.com/auth/cloud-billing.readonly"// See, edit, configure, and delete your Google Cloud data and see the email// address for your Google Account.CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAPIService¶
type APIService struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentBillingAccounts *BillingAccountsServiceOrganizations *OrganizationsServiceProjects *ProjectsServiceServices *ServicesService// contains filtered or unexported fields} funcNewdeprecated
func New(client *http.Client) (*APIService,error)
New creates a new APIService. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶added inv0.3.0
func NewService(ctxcontext.Context, opts ...option.ClientOption) (*APIService,error)
NewService creates a new APIService.
typeAggregationInfo¶
type AggregationInfo struct {// AggregationCount: The number of intervals to aggregate over. Example: If// aggregation_level is "DAILY" and aggregation_count is 14, aggregation will// be over 14 days.AggregationCountint64 `json:"aggregationCount,omitempty"`// Possible values:// "AGGREGATION_INTERVAL_UNSPECIFIED"// "DAILY"// "MONTHLY"AggregationIntervalstring `json:"aggregationInterval,omitempty"`// Possible values:// "AGGREGATION_LEVEL_UNSPECIFIED"// "ACCOUNT"// "PROJECT"AggregationLevelstring `json:"aggregationLevel,omitempty"`// ForceSendFields is a list of field names (e.g. "AggregationCount") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AggregationCount") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AggregationInfo: Represents the aggregation level and interval for pricingof a single SKU.
func (AggregationInfo)MarshalJSON¶
func (sAggregationInfo) MarshalJSON() ([]byte,error)
typeAuditConfig¶
type AuditConfig struct {// AuditLogConfigs: The configuration for logging of each type of permission.AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`// Service: Specifies a service that will be enabled for audit logging. For// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`// is a special value that covers all services.Servicestring `json:"service,omitempty"`// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AuditConfig: Specifies the audit configuration for a service. Theconfiguration determines which permission types are logged, and whatidentities, if any, are exempted from logging. An AuditConfig must have oneor more AuditLogConfigs. If there are AuditConfigs for both `allServices`and a specific service, the union of the two AuditConfigs is used for thatservice: the log_types specified in each AuditConfig are enabled, and theexempted_members in each AuditLogConfig are exempted. Example Policy withmultiple AuditConfigs: { "audit_configs": [ { "service": "allServices","audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": ["user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":"ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com","audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":"DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } Forsampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READlogging. It also exempts `jose@example.com` from DATA_READ logging, and`aliya@example.com` from DATA_WRITE logging.
func (AuditConfig)MarshalJSON¶
func (sAuditConfig) MarshalJSON() ([]byte,error)
typeAuditLogConfig¶
type AuditLogConfig struct {// ExemptedMembers: Specifies the identities that do not cause logging for this// type of permission. Follows the same format of Binding.members.ExemptedMembers []string `json:"exemptedMembers,omitempty"`// LogType: The log type that this config enables.//// Possible values:// "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.// "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy// "DATA_WRITE" - Data writes. Example: CloudSQL Users create// "DATA_READ" - Data reads. Example: CloudSQL Users listLogTypestring `json:"logType,omitempty"`// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ExemptedMembers") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AuditLogConfig: Provides the configuration for logging a type ofpermissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ","exempted_members": [ "user:jose@example.com" ] }, { "log_type":"DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, whileexempting jose@example.com from DATA_READ logging.
func (AuditLogConfig)MarshalJSON¶
func (sAuditLogConfig) MarshalJSON() ([]byte,error)
typeBillingAccount¶
type BillingAccount struct {// CurrencyCode: Optional. The currency in which the billing account is billed// and charged, represented as an ISO 4217 code such as `USD`. Billing account// currency is determined at the time of billing account creation and cannot be// updated subsequently, so this field should not be set on update requests. In// addition, a subaccount always matches the currency of its parent billing// account, so this field should not be set on subaccount creation requests.// Clients can read this field to determine the currency of an existing billing// account.CurrencyCodestring `json:"currencyCode,omitempty"`// DisplayName: The display name given to the billing account, such as `My// Billing Account`. This name is displayed in the Google Cloud Console.DisplayNamestring `json:"displayName,omitempty"`// MasterBillingAccount: If this account is a subaccount// (https://cloud.google.com/billing/docs/concepts), then this will be the// resource name of the parent billing account that it is being resold through.// Otherwise this will be empty.MasterBillingAccountstring `json:"masterBillingAccount,omitempty"`// Name: Output only. The resource name of the billing account. The resource// name has the form `billingAccounts/{billing_account_id}`. For example,// `billingAccounts/012345-567890-ABCDEF` would be the resource name for// billing account `012345-567890-ABCDEF`.Namestring `json:"name,omitempty"`// Open: Output only. True if the billing account is open, and will therefore// be charged for any usage on associated projects. False if the billing// account is closed, and therefore projects associated with it are unable to// use paid services.Openbool `json:"open,omitempty"`// Parent: Output only. The billing account's parent resource identifier. Use// the `MoveBillingAccount` method to update the account's parent resource if// it is a organization. Format: - `organizations/{organization_id}`, for// example, `organizations/12345678` - `billingAccounts/{billing_account_id}`,// for example, `billingAccounts/012345-567890-ABCDEF`Parentstring `json:"parent,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CurrencyCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CurrencyCode") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}BillingAccount: A billing account in the Google Cloud Console(https://console.cloud.google.com/). You can assign a billing account to oneor more projects.
func (BillingAccount)MarshalJSON¶
func (sBillingAccount) MarshalJSON() ([]byte,error)
typeBillingAccountsCreateCall¶
type BillingAccountsCreateCall struct {// contains filtered or unexported fields}func (*BillingAccountsCreateCall)Context¶
func (c *BillingAccountsCreateCall) Context(ctxcontext.Context) *BillingAccountsCreateCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsCreateCall)Do¶
func (c *BillingAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount,error)
Do executes the "cloudbilling.billingAccounts.create" call.Any non-2xx status code is an error. Response headers are in either*BillingAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*BillingAccountsCreateCall)Fields¶
func (c *BillingAccountsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsCreateCall)Header¶
func (c *BillingAccountsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*BillingAccountsCreateCall)Parent¶added inv0.149.0
func (c *BillingAccountsCreateCall) Parent(parentstring) *BillingAccountsCreateCall
Parent sets the optional parameter "parent": The parent to create a billingaccount from. Format: - `billingAccounts/{billing_account_id}`, for example,`billingAccounts/012345-567890-ABCDEF`
typeBillingAccountsGetCall¶
type BillingAccountsGetCall struct {// contains filtered or unexported fields}func (*BillingAccountsGetCall)Context¶
func (c *BillingAccountsGetCall) Context(ctxcontext.Context) *BillingAccountsGetCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsGetCall)Do¶
func (c *BillingAccountsGetCall) Do(opts ...googleapi.CallOption) (*BillingAccount,error)
Do executes the "cloudbilling.billingAccounts.get" call.Any non-2xx status code is an error. Response headers are in either*BillingAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*BillingAccountsGetCall)Fields¶
func (c *BillingAccountsGetCall) Fields(s ...googleapi.Field) *BillingAccountsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsGetCall)Header¶
func (c *BillingAccountsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*BillingAccountsGetCall)IfNoneMatch¶
func (c *BillingAccountsGetCall) IfNoneMatch(entityTagstring) *BillingAccountsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeBillingAccountsGetIamPolicyCall¶
type BillingAccountsGetIamPolicyCall struct {// contains filtered or unexported fields}func (*BillingAccountsGetIamPolicyCall)Context¶
func (c *BillingAccountsGetIamPolicyCall) Context(ctxcontext.Context) *BillingAccountsGetIamPolicyCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsGetIamPolicyCall)Do¶
func (c *BillingAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy,error)
Do executes the "cloudbilling.billingAccounts.getIamPolicy" call.Any non-2xx status code is an error. Response headers are in either*Policy.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*BillingAccountsGetIamPolicyCall)Fields¶
func (c *BillingAccountsGetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsGetIamPolicyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsGetIamPolicyCall)Header¶
func (c *BillingAccountsGetIamPolicyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*BillingAccountsGetIamPolicyCall)IfNoneMatch¶
func (c *BillingAccountsGetIamPolicyCall) IfNoneMatch(entityTagstring) *BillingAccountsGetIamPolicyCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*BillingAccountsGetIamPolicyCall)OptionsRequestedPolicyVersion¶added inv0.8.0
func (c *BillingAccountsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersionint64) *BillingAccountsGetIamPolicyCall
OptionsRequestedPolicyVersion sets the optional parameter"options.requestedPolicyVersion": The maximum policy version that will beused to format the policy. Valid values are 0, 1, and 3. Requests specifyingan invalid value will be rejected. Requests for policies with anyconditional role bindings must specify version 3. Policies with noconditional role bindings may specify any valid value or leave the fieldunset. The policy in the response might use the policy version that youspecified, or it might use a lower policy version. For example, if youspecify version 3, but the policy has no conditional role bindings, theresponse uses version 1. To learn which resources support conditions intheir IAM policies, see the IAM documentation(https://cloud.google.com/iam/help/conditions/resource-policies).
typeBillingAccountsListCall¶
type BillingAccountsListCall struct {// contains filtered or unexported fields}func (*BillingAccountsListCall)Context¶
func (c *BillingAccountsListCall) Context(ctxcontext.Context) *BillingAccountsListCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsListCall)Do¶
func (c *BillingAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBillingAccountsResponse,error)
Do executes the "cloudbilling.billingAccounts.list" call.Any non-2xx status code is an error. Response headers are in either*ListBillingAccountsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*BillingAccountsListCall)Fields¶
func (c *BillingAccountsListCall) Fields(s ...googleapi.Field) *BillingAccountsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsListCall)Filter¶
func (c *BillingAccountsListCall) Filter(filterstring) *BillingAccountsListCall
Filter sets the optional parameter "filter": Options for how to filter thereturned billing accounts. This only supports filtering for subaccounts(https://cloud.google.com/billing/docs/concepts) under a single providedparent billing account. (for example,`master_billing_account=billingAccounts/012345-678901-ABCDEF`). Booleanalgebra and other fields are not currently supported.
func (*BillingAccountsListCall)Header¶
func (c *BillingAccountsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*BillingAccountsListCall)IfNoneMatch¶
func (c *BillingAccountsListCall) IfNoneMatch(entityTagstring) *BillingAccountsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*BillingAccountsListCall)PageSize¶
func (c *BillingAccountsListCall) PageSize(pageSizeint64) *BillingAccountsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Themaximum page size is 100; this is also the default.
func (*BillingAccountsListCall)PageToken¶
func (c *BillingAccountsListCall) PageToken(pageTokenstring) *BillingAccountsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results to return. This should be a `next_page_token` value returnedfrom a previous `ListBillingAccounts` call. If unspecified, the first pageof results is returned.
func (*BillingAccountsListCall)Pages¶
func (c *BillingAccountsListCall) Pages(ctxcontext.Context, f func(*ListBillingAccountsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*BillingAccountsListCall)Parent¶added inv0.149.0
func (c *BillingAccountsListCall) Parent(parentstring) *BillingAccountsListCall
Parent sets the optional parameter "parent": The parent resource to listbilling accounts from. Format: - `organizations/{organization_id}`, forexample, `organizations/12345678` - `billingAccounts/{billing_account_id}`,for example, `billingAccounts/012345-567890-ABCDEF`
typeBillingAccountsMoveCall¶added inv0.149.0
type BillingAccountsMoveCall struct {// contains filtered or unexported fields}func (*BillingAccountsMoveCall)Context¶added inv0.149.0
func (c *BillingAccountsMoveCall) Context(ctxcontext.Context) *BillingAccountsMoveCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsMoveCall)Do¶added inv0.149.0
func (c *BillingAccountsMoveCall) Do(opts ...googleapi.CallOption) (*BillingAccount,error)
Do executes the "cloudbilling.billingAccounts.move" call.Any non-2xx status code is an error. Response headers are in either*BillingAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*BillingAccountsMoveCall)Fields¶added inv0.149.0
func (c *BillingAccountsMoveCall) Fields(s ...googleapi.Field) *BillingAccountsMoveCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsMoveCall)Header¶added inv0.149.0
func (c *BillingAccountsMoveCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeBillingAccountsPatchCall¶
type BillingAccountsPatchCall struct {// contains filtered or unexported fields}func (*BillingAccountsPatchCall)Context¶
func (c *BillingAccountsPatchCall) Context(ctxcontext.Context) *BillingAccountsPatchCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsPatchCall)Do¶
func (c *BillingAccountsPatchCall) Do(opts ...googleapi.CallOption) (*BillingAccount,error)
Do executes the "cloudbilling.billingAccounts.patch" call.Any non-2xx status code is an error. Response headers are in either*BillingAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*BillingAccountsPatchCall)Fields¶
func (c *BillingAccountsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsPatchCall)Header¶
func (c *BillingAccountsPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*BillingAccountsPatchCall)UpdateMask¶
func (c *BillingAccountsPatchCall) UpdateMask(updateMaskstring) *BillingAccountsPatchCall
UpdateMask sets the optional parameter "updateMask": The update mask appliedto the resource. Only "display_name" is currently supported.
typeBillingAccountsProjectsListCall¶
type BillingAccountsProjectsListCall struct {// contains filtered or unexported fields}func (*BillingAccountsProjectsListCall)Context¶
func (c *BillingAccountsProjectsListCall) Context(ctxcontext.Context) *BillingAccountsProjectsListCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsProjectsListCall)Do¶
func (c *BillingAccountsProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectBillingInfoResponse,error)
Do executes the "cloudbilling.billingAccounts.projects.list" call.Any non-2xx status code is an error. Response headers are in either*ListProjectBillingInfoResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*BillingAccountsProjectsListCall)Fields¶
func (c *BillingAccountsProjectsListCall) Fields(s ...googleapi.Field) *BillingAccountsProjectsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsProjectsListCall)Header¶
func (c *BillingAccountsProjectsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*BillingAccountsProjectsListCall)IfNoneMatch¶
func (c *BillingAccountsProjectsListCall) IfNoneMatch(entityTagstring) *BillingAccountsProjectsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*BillingAccountsProjectsListCall)PageSize¶
func (c *BillingAccountsProjectsListCall) PageSize(pageSizeint64) *BillingAccountsProjectsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Themaximum page size is 100; this is also the default.
func (*BillingAccountsProjectsListCall)PageToken¶
func (c *BillingAccountsProjectsListCall) PageToken(pageTokenstring) *BillingAccountsProjectsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results to be returned. This should be a `next_page_token` valuereturned from a previous `ListProjectBillingInfo` call. If unspecified, thefirst page of results is returned.
func (*BillingAccountsProjectsListCall)Pages¶
func (c *BillingAccountsProjectsListCall) Pages(ctxcontext.Context, f func(*ListProjectBillingInfoResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeBillingAccountsProjectsService¶
type BillingAccountsProjectsService struct {// contains filtered or unexported fields}funcNewBillingAccountsProjectsService¶
func NewBillingAccountsProjectsService(s *APIService) *BillingAccountsProjectsService
func (*BillingAccountsProjectsService)List¶
func (r *BillingAccountsProjectsService) List(namestring) *BillingAccountsProjectsListCall
List: Lists the projects associated with a billing account. The currentauthenticated user must have the `billing.resourceAssociations.list` IAMpermission, which is often given to billing account viewers(https://cloud.google.com/billing/docs/how-to/billing-access).
- name: The resource name of the billing account associated with theprojects that you want to list. For example,`billingAccounts/012345-567890-ABCDEF`.
typeBillingAccountsService¶
type BillingAccountsService struct {Projects *BillingAccountsProjectsServiceSubAccounts *BillingAccountsSubAccountsService// contains filtered or unexported fields}funcNewBillingAccountsService¶
func NewBillingAccountsService(s *APIService) *BillingAccountsService
func (*BillingAccountsService)Create¶
func (r *BillingAccountsService) Create(billingaccount *BillingAccount) *BillingAccountsCreateCall
Create: This method creates billing subaccounts(https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloudresellers should use the Channel Services APIs, accounts.customers.create(https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)and accounts.customers.entitlements.create(https://cloud.google.com/channel/docs/reference/rest/v1/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 istypically given to billing account administrators(https://cloud.google.com/billing/docs/how-to/billing-access). This methodwill return an error if the parent account has not been provisioned forsubaccounts.
func (*BillingAccountsService)Get¶
func (r *BillingAccountsService) Get(namestring) *BillingAccountsGetCall
Get: Gets information about a billing account. The current authenticateduser must be a viewer of the billing account(https://cloud.google.com/billing/docs/how-to/billing-access).
- name: The resource name of the billing account to retrieve. For example,`billingAccounts/012345-567890-ABCDEF`.
func (*BillingAccountsService)GetIamPolicy¶
func (r *BillingAccountsService) GetIamPolicy(resourcestring) *BillingAccountsGetIamPolicyCall
GetIamPolicy: Gets the access control policy for a billing account. Thecaller must have the `billing.accounts.getIamPolicy` permission on theaccount, which is often given to billing account viewers(https://cloud.google.com/billing/docs/how-to/billing-access).
- resource: REQUIRED: The resource for which the policy is being requested.See Resource names (https://cloud.google.com/apis/design/resource_names)for the appropriate value for this field.
func (*BillingAccountsService)List¶
func (r *BillingAccountsService) List() *BillingAccountsListCall
List: Lists the billing accounts that the current authenticated user haspermission to view(https://cloud.google.com/billing/docs/how-to/billing-access).
func (*BillingAccountsService)Move¶added inv0.149.0
func (r *BillingAccountsService) Move(namestring, movebillingaccountrequest *MoveBillingAccountRequest) *BillingAccountsMoveCall
Move: Changes which parent organization a billing account belongs to.
- name: The resource name of the billing account to move. Must be of theform `billingAccounts/{billing_account_id}`. The specified billing accountcannot be a subaccount, since a subaccount always belongs to the sameorganization as its parent account.
func (*BillingAccountsService)Patch¶
func (r *BillingAccountsService) Patch(namestring, billingaccount *BillingAccount) *BillingAccountsPatchCall
Patch: Updates a billing account's fields. Currently the only field that canbe edited is `display_name`. The current authenticated user must have the`billing.accounts.update` IAM permission, which is typically given to theadministrator (https://cloud.google.com/billing/docs/how-to/billing-access)of the billing account.
- name: The name of the billing account resource to be updated.
func (*BillingAccountsService)SetIamPolicy¶
func (r *BillingAccountsService) SetIamPolicy(resourcestring, setiampolicyrequest *SetIamPolicyRequest) *BillingAccountsSetIamPolicyCall
SetIamPolicy: Sets the access control policy for a billing account. Replacesany existing policy. The caller must have the`billing.accounts.setIamPolicy` permission on the account, which is oftengiven to billing account administrators(https://cloud.google.com/billing/docs/how-to/billing-access).
- resource: REQUIRED: The resource for which the policy is being specified.See Resource names (https://cloud.google.com/apis/design/resource_names)for the appropriate value for this field.
func (*BillingAccountsService)TestIamPermissions¶
func (r *BillingAccountsService) TestIamPermissions(resourcestring, testiampermissionsrequest *TestIamPermissionsRequest) *BillingAccountsTestIamPermissionsCall
TestIamPermissions: Tests the access control policy for a billing account.This method takes the resource and a set of permissions as input and returnsthe subset of the input permissions that the caller is allowed for thatresource.
- resource: REQUIRED: The resource for which the policy detail is beingrequested. See Resource names(https://cloud.google.com/apis/design/resource_names) for the appropriatevalue for this field.
typeBillingAccountsSetIamPolicyCall¶
type BillingAccountsSetIamPolicyCall struct {// contains filtered or unexported fields}func (*BillingAccountsSetIamPolicyCall)Context¶
func (c *BillingAccountsSetIamPolicyCall) Context(ctxcontext.Context) *BillingAccountsSetIamPolicyCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsSetIamPolicyCall)Do¶
func (c *BillingAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy,error)
Do executes the "cloudbilling.billingAccounts.setIamPolicy" call.Any non-2xx status code is an error. Response headers are in either*Policy.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*BillingAccountsSetIamPolicyCall)Fields¶
func (c *BillingAccountsSetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsSetIamPolicyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsSetIamPolicyCall)Header¶
func (c *BillingAccountsSetIamPolicyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeBillingAccountsSubAccountsCreateCall¶added inv0.149.0
type BillingAccountsSubAccountsCreateCall struct {// contains filtered or unexported fields}func (*BillingAccountsSubAccountsCreateCall)Context¶added inv0.149.0
func (c *BillingAccountsSubAccountsCreateCall) Context(ctxcontext.Context) *BillingAccountsSubAccountsCreateCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsSubAccountsCreateCall)Do¶added inv0.149.0
func (c *BillingAccountsSubAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount,error)
Do executes the "cloudbilling.billingAccounts.subAccounts.create" call.Any non-2xx status code is an error. Response headers are in either*BillingAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*BillingAccountsSubAccountsCreateCall)Fields¶added inv0.149.0
func (c *BillingAccountsSubAccountsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsSubAccountsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsSubAccountsCreateCall)Header¶added inv0.149.0
func (c *BillingAccountsSubAccountsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeBillingAccountsSubAccountsListCall¶added inv0.149.0
type BillingAccountsSubAccountsListCall struct {// contains filtered or unexported fields}func (*BillingAccountsSubAccountsListCall)Context¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) Context(ctxcontext.Context) *BillingAccountsSubAccountsListCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsSubAccountsListCall)Do¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBillingAccountsResponse,error)
Do executes the "cloudbilling.billingAccounts.subAccounts.list" call.Any non-2xx status code is an error. Response headers are in either*ListBillingAccountsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*BillingAccountsSubAccountsListCall)Fields¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) Fields(s ...googleapi.Field) *BillingAccountsSubAccountsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsSubAccountsListCall)Filter¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) Filter(filterstring) *BillingAccountsSubAccountsListCall
Filter sets the optional parameter "filter": Options for how to filter thereturned billing accounts. This only supports filtering for subaccounts(https://cloud.google.com/billing/docs/concepts) under a single providedparent billing account. (for example,`master_billing_account=billingAccounts/012345-678901-ABCDEF`). Booleanalgebra and other fields are not currently supported.
func (*BillingAccountsSubAccountsListCall)Header¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*BillingAccountsSubAccountsListCall)IfNoneMatch¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) IfNoneMatch(entityTagstring) *BillingAccountsSubAccountsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*BillingAccountsSubAccountsListCall)PageSize¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) PageSize(pageSizeint64) *BillingAccountsSubAccountsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Themaximum page size is 100; this is also the default.
func (*BillingAccountsSubAccountsListCall)PageToken¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) PageToken(pageTokenstring) *BillingAccountsSubAccountsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results to return. This should be a `next_page_token` value returnedfrom a previous `ListBillingAccounts` call. If unspecified, the first pageof results is returned.
func (*BillingAccountsSubAccountsListCall)Pages¶added inv0.149.0
func (c *BillingAccountsSubAccountsListCall) Pages(ctxcontext.Context, f func(*ListBillingAccountsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeBillingAccountsSubAccountsService¶added inv0.149.0
type BillingAccountsSubAccountsService struct {// contains filtered or unexported fields}funcNewBillingAccountsSubAccountsService¶added inv0.149.0
func NewBillingAccountsSubAccountsService(s *APIService) *BillingAccountsSubAccountsService
func (*BillingAccountsSubAccountsService)Create¶added inv0.149.0
func (r *BillingAccountsSubAccountsService) Create(parentstring, billingaccount *BillingAccount) *BillingAccountsSubAccountsCreateCall
Create: This method creates billing subaccounts(https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloudresellers should use the Channel Services APIs, accounts.customers.create(https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)and accounts.customers.entitlements.create(https://cloud.google.com/channel/docs/reference/rest/v1/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 istypically given to billing account administrators(https://cloud.google.com/billing/docs/how-to/billing-access). This methodwill return an error if the parent account has not been provisioned forsubaccounts.
- parent: Optional. The parent to create a billing account from. Format: -`billingAccounts/{billing_account_id}`, for example,`billingAccounts/012345-567890-ABCDEF`.
func (*BillingAccountsSubAccountsService)List¶added inv0.149.0
func (r *BillingAccountsSubAccountsService) List(parentstring) *BillingAccountsSubAccountsListCall
List: Lists the billing accounts that the current authenticated user haspermission to view(https://cloud.google.com/billing/docs/how-to/billing-access).
- parent: Optional. The parent resource to list billing accounts from.Format: - `organizations/{organization_id}`, for example,`organizations/12345678` - `billingAccounts/{billing_account_id}`, forexample, `billingAccounts/012345-567890-ABCDEF`.
typeBillingAccountsTestIamPermissionsCall¶
type BillingAccountsTestIamPermissionsCall struct {// contains filtered or unexported fields}func (*BillingAccountsTestIamPermissionsCall)Context¶
func (c *BillingAccountsTestIamPermissionsCall) Context(ctxcontext.Context) *BillingAccountsTestIamPermissionsCall
Context sets the context to be used in this call's Do method.
func (*BillingAccountsTestIamPermissionsCall)Do¶
func (c *BillingAccountsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse,error)
Do executes the "cloudbilling.billingAccounts.testIamPermissions" call.Any non-2xx status code is an error. Response headers are in either*TestIamPermissionsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*BillingAccountsTestIamPermissionsCall)Fields¶
func (c *BillingAccountsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BillingAccountsTestIamPermissionsCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*BillingAccountsTestIamPermissionsCall)Header¶
func (c *BillingAccountsTestIamPermissionsCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeBinding¶
type Binding struct {// Condition: The condition that is associated with this binding. If the// condition evaluates to `true`, then this binding applies to the current// request. If the condition evaluates to `false`, then this binding does not// apply to the current request. However, a different role binding might grant// the same role to one or more of the principals in this binding. To learn// which resources support conditions in their IAM policies, see the IAM// documentation// (https://cloud.google.com/iam/help/conditions/resource-policies).Condition *Expr `json:"condition,omitempty"`// Members: Specifies the principals requesting access for a Google Cloud// resource. `members` can have the following values: * `allUsers`: A special// identifier that represents anyone who is on the internet; with or without a// Google account. * `allAuthenticatedUsers`: A special identifier that// represents anyone who is authenticated with a Google account or a service// account. Does not include identities that come from external identity// providers (IdPs) through identity federation. * `user:{emailid}`: An email// address that represents a specific Google account. For example,// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that// represents a Google service account. For example,// `my-other-app@appspot.gserviceaccount.com`. *// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An// identifier for a Kubernetes service account// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *// `group:{emailid}`: An email address that represents a Google group. For// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain// (primary) that represents all the users of that domain. For example,// `google.com` or `example.com`. *// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub// ject/{subject_attribute_value}`: A single identity in a workforce identity// pool. *// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/// group/{group_id}`: All workforce identities in a group. *// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/// attribute.{attribute_name}/{attribute_value}`: All workforce identities with// a specific attribute value. *// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/// *`: All identities in a workforce identity pool. *// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single// identity in a workload identity pool. *// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool// group. *// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}// `: All identities in a workload identity pool with a certain attribute. *// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus// unique identifier) representing a user that has been recently deleted. For// example, `alice@example.com?uid=123456789012345678901`. If the user is// recovered, this value reverts to `user:{emailid}` and the recovered user// retains the role in the binding. *// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus// unique identifier) representing a service account that has been recently// deleted. For example,// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the// service account is undeleted, this value reverts to// `serviceAccount:{emailid}` and the undeleted service account retains the// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email// address (plus unique identifier) representing a Google group that has been// recently deleted. For example,// `admins@example.com?uid=123456789012345678901`. If the group is recovered,// this value reverts to `group:{emailid}` and the recovered group retains the// role in the binding. *// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool// _id}/subject/{subject_attribute_value}`: Deleted single identity in a// workforce identity pool. For example,// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po// ol-id/subject/my-subject-attribute-value`.Members []string `json:"members,omitempty"`// Role: Role that is assigned to the list of `members`, or principals. For// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview// of the IAM roles and permissions, see the IAM documentation// (https://cloud.google.com/iam/docs/roles-overview). For a list of the// available pre-defined roles, see here// (https://cloud.google.com/iam/docs/understanding-roles).Rolestring `json:"role,omitempty"`// ForceSendFields is a list of field names (e.g. "Condition") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Condition") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Binding: Associates `members`, or principals, with a `role`.
func (Binding)MarshalJSON¶
typeCategory¶
type Category struct {// ResourceFamily: The type of product the SKU refers to. Example: "Compute",// "Storage", "Network", "ApplicationServices" etc.ResourceFamilystring `json:"resourceFamily,omitempty"`// ResourceGroup: A group classification for related SKUs. Example: "RAM",// "GPU", "Prediction", "Ops", "GoogleEgress" etc.ResourceGroupstring `json:"resourceGroup,omitempty"`// ServiceDisplayName: The display name of the service this SKU belongs to.ServiceDisplayNamestring `json:"serviceDisplayName,omitempty"`// UsageType: Represents how the SKU is consumed. Example: "OnDemand",// "Preemptible", "Commit1Mo", "Commit1Yr" etc.UsageTypestring `json:"usageType,omitempty"`// ForceSendFields is a list of field names (e.g. "ResourceFamily") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ResourceFamily") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Category: Represents the category hierarchy of a SKU.
func (Category)MarshalJSON¶
typeExpr¶
type Expr struct {// Description: Optional. Description of the expression. This is a longer text// which describes the expression, e.g. when hovered over it in a UI.Descriptionstring `json:"description,omitempty"`// Expression: Textual representation of an expression in Common Expression// Language syntax.Expressionstring `json:"expression,omitempty"`// Location: Optional. String indicating the location of the expression for// error reporting, e.g. a file name and a position in the file.Locationstring `json:"location,omitempty"`// Title: Optional. Title for the expression, i.e. a short string describing// its purpose. This can be used e.g. in UIs which allow to enter the// expression.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g. "Description") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Description") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Expr: Represents a textual expression in the Common Expression Language(CEL) syntax. CEL is a C-like expression language. The syntax and semanticsof CEL are documented athttps://github.com/google/cel-spec. Example(Comparison): title: "Summary size limit" description: "Determines if asummary is less than 100 chars" expression: "document.summary.size() < 100"Example (Equality): title: "Requestor is owner" description: "Determines ifrequestor is the document owner" expression: "document.owner ==request.auth.claims.email" Example (Logic): title: "Public documents"description: "Determine whether the document should be publicly visible"expression: "document.type != 'private' && document.type != 'internal'"Example (Data Manipulation): title: "Notification string" description:"Create a notification string with a timestamp." expression: "'New messagereceived at ' + string(document.create_time)" The exact variables andfunctions that may be referenced within an expression are determined by theservice that evaluates it. See the service documentation for additionalinformation.
func (Expr)MarshalJSON¶
typeGeoTaxonomy¶added inv0.29.0
type GeoTaxonomy struct {// Regions: The list of regions associated with a sku. Empty for Global skus,// which are associated with all Google Cloud regions.Regions []string `json:"regions,omitempty"`// Type: The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.//// Possible values:// "TYPE_UNSPECIFIED" - The type is not specified.// "GLOBAL" - The sku is global in nature, e.g. a license sku. Global skus// are available in all regions, and so have an empty region list.// "REGIONAL" - The sku is available in a specific region, e.g. "us-west2".// "MULTI_REGIONAL" - The sku is associated with multiple regions, e.g.// "us-west2" and "us-east1".Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Regions") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Regions") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GeoTaxonomy: Encapsulates the geographic taxonomy data for a sku.
func (GeoTaxonomy)MarshalJSON¶added inv0.29.0
func (sGeoTaxonomy) MarshalJSON() ([]byte,error)
typeListBillingAccountsResponse¶
type ListBillingAccountsResponse struct {// BillingAccounts: A list of billing accounts.BillingAccounts []*BillingAccount `json:"billingAccounts,omitempty"`// NextPageToken: A token to retrieve the next page of results. To retrieve the// next page, call `ListBillingAccounts` again with the `page_token` field set// to this value. This field is empty if there are no more results to retrieve.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "BillingAccounts") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BillingAccounts") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListBillingAccountsResponse: Response message for `ListBillingAccounts`.
func (ListBillingAccountsResponse)MarshalJSON¶
func (sListBillingAccountsResponse) MarshalJSON() ([]byte,error)
typeListProjectBillingInfoResponse¶
type ListProjectBillingInfoResponse struct {// NextPageToken: A token to retrieve the next page of results. To retrieve the// next page, call `ListProjectBillingInfo` again with the `page_token` field// set to this value. This field is empty if there are no more results to// retrieve.NextPageTokenstring `json:"nextPageToken,omitempty"`// ProjectBillingInfo: A list of `ProjectBillingInfo` resources representing// the projects associated with the billing account.ProjectBillingInfo []*ProjectBillingInfo `json:"projectBillingInfo,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListProjectBillingInfoResponse: Request message for`ListProjectBillingInfoResponse`.
func (ListProjectBillingInfoResponse)MarshalJSON¶
func (sListProjectBillingInfoResponse) MarshalJSON() ([]byte,error)
typeListServicesResponse¶
type ListServicesResponse struct {// NextPageToken: A token to retrieve the next page of results. To retrieve the// next page, call `ListServices` again with the `page_token` field set to this// value. This field is empty if there are no more results to retrieve.NextPageTokenstring `json:"nextPageToken,omitempty"`// Services: A list of services.Services []*Service `json:"services,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListServicesResponse: Response message for `ListServices`.
func (ListServicesResponse)MarshalJSON¶
func (sListServicesResponse) MarshalJSON() ([]byte,error)
typeListSkusResponse¶
type ListSkusResponse struct {// NextPageToken: A token to retrieve the next page of results. To retrieve the// next page, call `ListSkus` again with the `page_token` field set to this// value. This field is empty if there are no more results to retrieve.NextPageTokenstring `json:"nextPageToken,omitempty"`// Skus: The list of public SKUs of the given service.Skus []*Sku `json:"skus,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListSkusResponse: Response message for `ListSkus`.
func (ListSkusResponse)MarshalJSON¶
func (sListSkusResponse) MarshalJSON() ([]byte,error)
typeMoney¶
type Money struct {// CurrencyCode: The three-letter currency code defined in ISO 4217.CurrencyCodestring `json:"currencyCode,omitempty"`// Nanos: Number of nano (10^-9) units of the amount. The value must be between// -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`// must be positive or zero. If `units` is zero, `nanos` can be positive, zero,// or negative. If `units` is negative, `nanos` must be negative or zero. For// example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.Nanosint64 `json:"nanos,omitempty"`// Units: The whole units of the amount. For example if `currencyCode` is// "USD", then 1 unit is one US dollar.Unitsint64 `json:"units,omitempty,string"`// ForceSendFields is a list of field names (e.g. "CurrencyCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CurrencyCode") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Money: Represents an amount of money with its currency type.
func (Money)MarshalJSON¶
typeMoveBillingAccountRequest¶added inv0.149.0
type MoveBillingAccountRequest struct {// DestinationParent: Required. The resource name of the Organization to move// the billing account under. Must be of the form// `organizations/{organization_id}`.DestinationParentstring `json:"destinationParent,omitempty"`// ForceSendFields is a list of field names (e.g. "DestinationParent") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DestinationParent") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}MoveBillingAccountRequest: Request message for `MoveBillingAccount` RPC.
func (MoveBillingAccountRequest)MarshalJSON¶added inv0.149.0
func (sMoveBillingAccountRequest) MarshalJSON() ([]byte,error)
typeOrganizationsBillingAccountsCreateCall¶added inv0.149.0
type OrganizationsBillingAccountsCreateCall struct {// contains filtered or unexported fields}func (*OrganizationsBillingAccountsCreateCall)Context¶added inv0.149.0
func (c *OrganizationsBillingAccountsCreateCall) Context(ctxcontext.Context) *OrganizationsBillingAccountsCreateCall
Context sets the context to be used in this call's Do method.
func (*OrganizationsBillingAccountsCreateCall)Do¶added inv0.149.0
func (c *OrganizationsBillingAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount,error)
Do executes the "cloudbilling.organizations.billingAccounts.create" call.Any non-2xx status code is an error. Response headers are in either*BillingAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*OrganizationsBillingAccountsCreateCall)Fields¶added inv0.149.0
func (c *OrganizationsBillingAccountsCreateCall) Fields(s ...googleapi.Field) *OrganizationsBillingAccountsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*OrganizationsBillingAccountsCreateCall)Header¶added inv0.149.0
func (c *OrganizationsBillingAccountsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeOrganizationsBillingAccountsListCall¶added inv0.149.0
type OrganizationsBillingAccountsListCall struct {// contains filtered or unexported fields}func (*OrganizationsBillingAccountsListCall)Context¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) Context(ctxcontext.Context) *OrganizationsBillingAccountsListCall
Context sets the context to be used in this call's Do method.
func (*OrganizationsBillingAccountsListCall)Do¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBillingAccountsResponse,error)
Do executes the "cloudbilling.organizations.billingAccounts.list" call.Any non-2xx status code is an error. Response headers are in either*ListBillingAccountsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*OrganizationsBillingAccountsListCall)Fields¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) Fields(s ...googleapi.Field) *OrganizationsBillingAccountsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*OrganizationsBillingAccountsListCall)Filter¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) Filter(filterstring) *OrganizationsBillingAccountsListCall
Filter sets the optional parameter "filter": Options for how to filter thereturned billing accounts. This only supports filtering for subaccounts(https://cloud.google.com/billing/docs/concepts) under a single providedparent billing account. (for example,`master_billing_account=billingAccounts/012345-678901-ABCDEF`). Booleanalgebra and other fields are not currently supported.
func (*OrganizationsBillingAccountsListCall)Header¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*OrganizationsBillingAccountsListCall)IfNoneMatch¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) IfNoneMatch(entityTagstring) *OrganizationsBillingAccountsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*OrganizationsBillingAccountsListCall)PageSize¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) PageSize(pageSizeint64) *OrganizationsBillingAccountsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Themaximum page size is 100; this is also the default.
func (*OrganizationsBillingAccountsListCall)PageToken¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) PageToken(pageTokenstring) *OrganizationsBillingAccountsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results to return. This should be a `next_page_token` value returnedfrom a previous `ListBillingAccounts` call. If unspecified, the first pageof results is returned.
func (*OrganizationsBillingAccountsListCall)Pages¶added inv0.149.0
func (c *OrganizationsBillingAccountsListCall) Pages(ctxcontext.Context, f func(*ListBillingAccountsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeOrganizationsBillingAccountsMoveCall¶added inv0.149.0
type OrganizationsBillingAccountsMoveCall struct {// contains filtered or unexported fields}func (*OrganizationsBillingAccountsMoveCall)Context¶added inv0.149.0
func (c *OrganizationsBillingAccountsMoveCall) Context(ctxcontext.Context) *OrganizationsBillingAccountsMoveCall
Context sets the context to be used in this call's Do method.
func (*OrganizationsBillingAccountsMoveCall)Do¶added inv0.149.0
func (c *OrganizationsBillingAccountsMoveCall) Do(opts ...googleapi.CallOption) (*BillingAccount,error)
Do executes the "cloudbilling.organizations.billingAccounts.move" call.Any non-2xx status code is an error. Response headers are in either*BillingAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*OrganizationsBillingAccountsMoveCall)Fields¶added inv0.149.0
func (c *OrganizationsBillingAccountsMoveCall) Fields(s ...googleapi.Field) *OrganizationsBillingAccountsMoveCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*OrganizationsBillingAccountsMoveCall)Header¶added inv0.149.0
func (c *OrganizationsBillingAccountsMoveCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*OrganizationsBillingAccountsMoveCall)IfNoneMatch¶added inv0.149.0
func (c *OrganizationsBillingAccountsMoveCall) IfNoneMatch(entityTagstring) *OrganizationsBillingAccountsMoveCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeOrganizationsBillingAccountsService¶added inv0.149.0
type OrganizationsBillingAccountsService struct {// contains filtered or unexported fields}funcNewOrganizationsBillingAccountsService¶added inv0.149.0
func NewOrganizationsBillingAccountsService(s *APIService) *OrganizationsBillingAccountsService
func (*OrganizationsBillingAccountsService)Create¶added inv0.149.0
func (r *OrganizationsBillingAccountsService) Create(parentstring, billingaccount *BillingAccount) *OrganizationsBillingAccountsCreateCall
Create: This method creates billing subaccounts(https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloudresellers should use the Channel Services APIs, accounts.customers.create(https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)and accounts.customers.entitlements.create(https://cloud.google.com/channel/docs/reference/rest/v1/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 istypically given to billing account administrators(https://cloud.google.com/billing/docs/how-to/billing-access). This methodwill return an error if the parent account has not been provisioned forsubaccounts.
- parent: Optional. The parent to create a billing account from. Format: -`billingAccounts/{billing_account_id}`, for example,`billingAccounts/012345-567890-ABCDEF`.
func (*OrganizationsBillingAccountsService)List¶added inv0.149.0
func (r *OrganizationsBillingAccountsService) List(parentstring) *OrganizationsBillingAccountsListCall
List: Lists the billing accounts that the current authenticated user haspermission to view(https://cloud.google.com/billing/docs/how-to/billing-access).
- parent: Optional. The parent resource to list billing accounts from.Format: - `organizations/{organization_id}`, for example,`organizations/12345678` - `billingAccounts/{billing_account_id}`, forexample, `billingAccounts/012345-567890-ABCDEF`.
func (*OrganizationsBillingAccountsService)Move¶added inv0.149.0
func (r *OrganizationsBillingAccountsService) Move(destinationParentstring, namestring) *OrganizationsBillingAccountsMoveCall
Move: Changes which parent organization a billing account belongs to.
- destinationParent: The resource name of the Organization to move thebilling account under. Must be of the form`organizations/{organization_id}`.
- name: The resource name of the billing account to move. Must be of theform `billingAccounts/{billing_account_id}`. The specified billing accountcannot be a subaccount, since a subaccount always belongs to the sameorganization as its parent account.
typeOrganizationsService¶added inv0.149.0
type OrganizationsService struct {BillingAccounts *OrganizationsBillingAccountsService// contains filtered or unexported fields}funcNewOrganizationsService¶added inv0.149.0
func NewOrganizationsService(s *APIService) *OrganizationsService
typePolicy¶
type Policy struct {// AuditConfigs: Specifies cloud audit logging configuration for this policy.AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`// Bindings: Associates a list of `members`, or principals, with a `role`.// Optionally, may specify a `condition` that determines how and when the// `bindings` are applied. Each of the `bindings` must contain at least one// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;// up to 250 of these principals can be Google groups. Each occurrence of a// principal counts towards these limits. For example, if the `bindings` grant// 50 different roles to `user:alice@example.com`, and not to any other// principal, then you can add another 1,450 principals to the `bindings` in// the `Policy`.Bindings []*Binding `json:"bindings,omitempty"`// Etag: `etag` is used for optimistic concurrency control as a way to help// prevent simultaneous updates of a policy from overwriting each other. It is// strongly suggested that systems make use of the `etag` in the// read-modify-write cycle to perform policy updates in order to avoid race// conditions: An `etag` is returned in the response to `getIamPolicy`, and// systems are expected to put that etag in the request to `setIamPolicy` to// ensure that their change will be applied to the same version of the policy.// **Important:** If you use IAM Conditions, you must include the `etag` field// whenever you call `setIamPolicy`. If you omit this field, then IAM allows// you to overwrite a version `3` policy with a version `1` policy, and all of// the conditions in the version `3` policy are lost.Etagstring `json:"etag,omitempty"`// Version: Specifies the format of the policy. Valid values are `0`, `1`, and// `3`. Requests that specify an invalid value are rejected. Any operation that// affects conditional role bindings must specify version `3`. This requirement// applies to the following operations: * Getting a policy that includes a// conditional role binding * Adding a conditional role binding to a policy *// Changing a conditional role binding in a policy * Removing any role binding,// with or without a condition, from a policy that includes conditions// **Important:** If you use IAM Conditions, you must include the `etag` field// whenever you call `setIamPolicy`. If you omit this field, then IAM allows// you to overwrite a version `3` policy with a version `1` policy, and all of// the conditions in the version `3` policy are lost. If a policy does not// include any conditions, operations on that policy may specify any valid// version or leave the field unset. To learn which resources support// conditions in their IAM policies, see the IAM documentation// (https://cloud.google.com/iam/help/conditions/resource-policies).Versionint64 `json:"version,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AuditConfigs") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AuditConfigs") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Policy: An Identity and Access Management (IAM) policy, which specifiesaccess controls for Google Cloud resources. A `Policy` is a collection of`bindings`. A `binding` binds one or more `members`, or principals, to asingle `role`. Principals can be user accounts, service accounts, Googlegroups, and domains (such as G Suite). A `role` is a named list ofpermissions; each `role` can be an IAM predefined role or a user-createdcustom role. For some types of Google Cloud resources, a `binding` can alsospecify a `condition`, which is a logical expression that allows access to aresource only if the expression evaluates to `true`. A condition can addconstraints based on attributes of the request, the resource, or both. Tolearn which resources support conditions in their IAM policies, see the IAMdocumentation(https://cloud.google.com/iam/help/conditions/resource-policies). **JSONexample:** ``` { "bindings": [ { "role":"roles/resourcemanager.organizationAdmin", "members": ["user:mike@example.com", "group:admins@example.com", "domain:google.com","serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":"roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com" ], "condition": { "title": "expirable access","description": "Does not grant access after Sep 2020", "expression":"request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":"BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -members: - user:mike@example.com - group:admins@example.com -domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.comrole: roles/resourcemanager.organizationAdmin - members: -user:eve@example.com role: roles/resourcemanager.organizationViewercondition: title: expirable access description: Does not grant access afterSep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,see the IAM documentation (https://cloud.google.com/iam/docs/).
func (Policy)MarshalJSON¶
typePricingExpression¶
type PricingExpression struct {// BaseUnit: The base unit for the SKU which is the unit used in usage exports.// Example: "By"BaseUnitstring `json:"baseUnit,omitempty"`// BaseUnitConversionFactor: Conversion factor for converting from price per// usage_unit to price per base_unit, and start_usage_amount to// start_usage_amount in base_unit. unit_price / base_unit_conversion_factor =// price per base_unit. start_usage_amount * base_unit_conversion_factor =// start_usage_amount in base_unit.BaseUnitConversionFactorfloat64 `json:"baseUnitConversionFactor,omitempty"`// BaseUnitDescription: The base unit in human readable form. Example: "byte".BaseUnitDescriptionstring `json:"baseUnitDescription,omitempty"`// DisplayQuantity: The recommended quantity of units for displaying pricing// info. When displaying pricing info it is recommended to display: (unit_price// * display_quantity) per display_quantity usage_unit. This field does not// affect the pricing formula and is for display purposes only. Example: If the// unit_price is "0.0001 USD", the usage_unit is "GB" and the display_quantity// is "1000" then the recommended way of displaying the pricing info is "0.10// USD per 1000 GB"DisplayQuantityfloat64 `json:"displayQuantity,omitempty"`// TieredRates: The list of tiered rates for this pricing. The total cost is// computed by applying each of the tiered rates on usage. This repeated list// is sorted by ascending order of start_usage_amount.TieredRates []*TierRate `json:"tieredRates,omitempty"`// UsageUnit: The short hand for unit of usage this pricing is specified in.// Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".UsageUnitstring `json:"usageUnit,omitempty"`// UsageUnitDescription: The unit of usage in human readable form. Example:// "gibi byte".UsageUnitDescriptionstring `json:"usageUnitDescription,omitempty"`// ForceSendFields is a list of field names (e.g. "BaseUnit") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BaseUnit") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}PricingExpression: Expresses a mathematical pricing formula. For Example:-`usage_unit: GBy` `tiered_rates:` `[start_usage_amount: 20, unit_price:$10]` `[start_usage_amount: 100, unit_price: $5]` The above expresses apricing formula where the first 20GB is free, the next 80GB is priced at $10per GB followed by $5 per GB for additional usage.
func (PricingExpression)MarshalJSON¶
func (sPricingExpression) MarshalJSON() ([]byte,error)
func (*PricingExpression)UnmarshalJSON¶
func (s *PricingExpression) UnmarshalJSON(data []byte)error
typePricingInfo¶
type PricingInfo struct {// AggregationInfo: Aggregation Info. This can be left unspecified if the// pricing expression doesn't require aggregation.AggregationInfo *AggregationInfo `json:"aggregationInfo,omitempty"`// CurrencyConversionRate: Conversion rate used for currency conversion, from// USD to the currency specified in the request. This includes any surcharge// collected for billing in non USD currency. If a currency is not specified in// the request this defaults to 1.0. Example: USD * currency_conversion_rate =// JPYCurrencyConversionRatefloat64 `json:"currencyConversionRate,omitempty"`// EffectiveTime: The timestamp from which this pricing was effective within// the requested time range. This is guaranteed to be greater than or equal to// the start_time field in the request and less than the end_time field in the// request. If a time range was not specified in the request this field will be// equivalent to a time within the last 12 hours, indicating the latest pricing// info.EffectiveTimestring `json:"effectiveTime,omitempty"`// PricingExpression: Expresses the pricing formula. See `PricingExpression`// for an example.PricingExpression *PricingExpression `json:"pricingExpression,omitempty"`// Summary: An optional human readable summary of the pricing information, has// a maximum length of 256 characters.Summarystring `json:"summary,omitempty"`// ForceSendFields is a list of field names (e.g. "AggregationInfo") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AggregationInfo") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}PricingInfo: Represents the pricing information for a SKU at a single pointof time.
func (PricingInfo)MarshalJSON¶
func (sPricingInfo) MarshalJSON() ([]byte,error)
func (*PricingInfo)UnmarshalJSON¶
func (s *PricingInfo) UnmarshalJSON(data []byte)error
typeProjectBillingInfo¶
type ProjectBillingInfo struct {// BillingAccountName: The resource name of the billing account associated with// the project, if any. For example, `billingAccounts/012345-567890-ABCDEF`.BillingAccountNamestring `json:"billingAccountName,omitempty"`// BillingEnabled: Output only. True if the project is associated with an open// billing account, to which usage on the project is charged. False if the// project is associated with a closed billing account, or no billing account// at all, and therefore cannot use paid services.BillingEnabledbool `json:"billingEnabled,omitempty"`// Name: Output only. The resource name for the `ProjectBillingInfo`; has the// form `projects/{project_id}/billingInfo`. For example, the resource name for// the billing information for project `tokyo-rain-123` would be// `projects/tokyo-rain-123/billingInfo`.Namestring `json:"name,omitempty"`// ProjectId: Output only. The ID of the project that this `ProjectBillingInfo`// represents, such as `tokyo-rain-123`. This is a convenience field so that// you don't need to parse the `name` field to obtain a project ID.ProjectIdstring `json:"projectId,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "BillingAccountName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BillingAccountName") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ProjectBillingInfo: Encapsulation of billing information for a Google CloudConsole project. A project has at most one associated billing account at atime (but a billing account can be assigned to multiple projects).
func (ProjectBillingInfo)MarshalJSON¶
func (sProjectBillingInfo) MarshalJSON() ([]byte,error)
typeProjectsGetBillingInfoCall¶
type ProjectsGetBillingInfoCall struct {// contains filtered or unexported fields}func (*ProjectsGetBillingInfoCall)Context¶
func (c *ProjectsGetBillingInfoCall) Context(ctxcontext.Context) *ProjectsGetBillingInfoCall
Context sets the context to be used in this call's Do method.
func (*ProjectsGetBillingInfoCall)Do¶
func (c *ProjectsGetBillingInfoCall) Do(opts ...googleapi.CallOption) (*ProjectBillingInfo,error)
Do executes the "cloudbilling.projects.getBillingInfo" call.Any non-2xx status code is an error. Response headers are in either*ProjectBillingInfo.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsGetBillingInfoCall)Fields¶
func (c *ProjectsGetBillingInfoCall) Fields(s ...googleapi.Field) *ProjectsGetBillingInfoCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsGetBillingInfoCall)Header¶
func (c *ProjectsGetBillingInfoCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsGetBillingInfoCall)IfNoneMatch¶
func (c *ProjectsGetBillingInfoCall) IfNoneMatch(entityTagstring) *ProjectsGetBillingInfoCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsService¶
type ProjectsService struct {// contains filtered or unexported fields}funcNewProjectsService¶
func NewProjectsService(s *APIService) *ProjectsService
func (*ProjectsService)GetBillingInfo¶
func (r *ProjectsService) GetBillingInfo(namestring) *ProjectsGetBillingInfoCall
GetBillingInfo: Gets the billing information for a project. The currentauthenticated user must have the `resourcemanager.projects.get` permissionfor the project, which can be granted by assigning the Project Viewer(https://cloud.google.com/iam/docs/understanding-roles#predefined_roles)role.
- name: The resource name of the project for which billing information isretrieved. For example, `projects/tokyo-rain-123`.
func (*ProjectsService)UpdateBillingInfo¶
func (r *ProjectsService) UpdateBillingInfo(namestring, projectbillinginfo *ProjectBillingInfo) *ProjectsUpdateBillingInfoCall
UpdateBillingInfo: Sets or updates the billing account associated with aproject. You specify the new billing account by setting the`billing_account_name` in the `ProjectBillingInfo` resource to the resourcename of a billing account. Associating a project with an open billingaccount enables billing on the project and allows charges for resourceusage. If the project already had a billing account, this method changes thebilling account used for resource usage charges. *Note:* Incurred chargesthat have not yet been reported in the transaction history of the GoogleCloud Console might be billed to the new billing account, even if the chargeoccurred before the new billing account was assigned to the project. Thecurrent authenticated user must have ownership privileges for both theproject (https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo )and the billing account(https://cloud.google.com/billing/docs/how-to/billing-access). You candisable billing on the project by setting the `billing_account_name` fieldto empty. This action disassociates the current billing account from theproject. Any billable activity of your in-use services will stop, and yourapplication could stop functioning as expected. Any unbilled charges to datewill be billed to the previously associated account. The currentauthenticated user must be either an owner of the project or an owner of thebilling account for the project. Note that associating a project with a*closed* billing account will have much the same effect as disabling billingon 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 methodwith the name of an *open* billing account.
- name: The resource name of the project associated with the billinginformation that you want to update. For example,`projects/tokyo-rain-123`.
typeProjectsUpdateBillingInfoCall¶
type ProjectsUpdateBillingInfoCall struct {// contains filtered or unexported fields}func (*ProjectsUpdateBillingInfoCall)Context¶
func (c *ProjectsUpdateBillingInfoCall) Context(ctxcontext.Context) *ProjectsUpdateBillingInfoCall
Context sets the context to be used in this call's Do method.
func (*ProjectsUpdateBillingInfoCall)Do¶
func (c *ProjectsUpdateBillingInfoCall) Do(opts ...googleapi.CallOption) (*ProjectBillingInfo,error)
Do executes the "cloudbilling.projects.updateBillingInfo" call.Any non-2xx status code is an error. Response headers are in either*ProjectBillingInfo.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsUpdateBillingInfoCall)Fields¶
func (c *ProjectsUpdateBillingInfoCall) Fields(s ...googleapi.Field) *ProjectsUpdateBillingInfoCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsUpdateBillingInfoCall)Header¶
func (c *ProjectsUpdateBillingInfoCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeService¶
type Service struct {// BusinessEntityName: The business under which the service is offered. Ex.// "businessEntities/GCP", "businessEntities/Maps"BusinessEntityNamestring `json:"businessEntityName,omitempty"`// DisplayName: A human readable display name for this service.DisplayNamestring `json:"displayName,omitempty"`// Name: The resource name for the service. Example: "services/6F81-5844-456A"Namestring `json:"name,omitempty"`// ServiceId: The identifier for the service. Example: "6F81-5844-456A"ServiceIdstring `json:"serviceId,omitempty"`// ForceSendFields is a list of field names (e.g. "BusinessEntityName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BusinessEntityName") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Service: Encapsulates a single service in Google Cloud Platform.
func (Service)MarshalJSON¶
typeServicesListCall¶
type ServicesListCall struct {// contains filtered or unexported fields}func (*ServicesListCall)Context¶
func (c *ServicesListCall) Context(ctxcontext.Context) *ServicesListCall
Context sets the context to be used in this call's Do method.
func (*ServicesListCall)Do¶
func (c *ServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse,error)
Do executes the "cloudbilling.services.list" call.Any non-2xx status code is an error. Response headers are in either*ListServicesResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ServicesListCall)Fields¶
func (c *ServicesListCall) Fields(s ...googleapi.Field) *ServicesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ServicesListCall)Header¶
func (c *ServicesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ServicesListCall)IfNoneMatch¶
func (c *ServicesListCall) IfNoneMatch(entityTagstring) *ServicesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ServicesListCall)PageSize¶
func (c *ServicesListCall) PageSize(pageSizeint64) *ServicesListCall
PageSize sets the optional parameter "pageSize": Requested page size.Defaults to 5000.
func (*ServicesListCall)PageToken¶
func (c *ServicesListCall) PageToken(pageTokenstring) *ServicesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results to return. This should be a `next_page_token` value returnedfrom a previous `ListServices` call. If unspecified, the first page ofresults is returned.
func (*ServicesListCall)Pages¶
func (c *ServicesListCall) Pages(ctxcontext.Context, f func(*ListServicesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeServicesService¶
type ServicesService struct {Skus *ServicesSkusService// contains filtered or unexported fields}funcNewServicesService¶
func NewServicesService(s *APIService) *ServicesService
func (*ServicesService)List¶
func (r *ServicesService) List() *ServicesListCall
List: Lists all public cloud services.
typeServicesSkusListCall¶
type ServicesSkusListCall struct {// contains filtered or unexported fields}func (*ServicesSkusListCall)Context¶
func (c *ServicesSkusListCall) Context(ctxcontext.Context) *ServicesSkusListCall
Context sets the context to be used in this call's Do method.
func (*ServicesSkusListCall)CurrencyCode¶
func (c *ServicesSkusListCall) CurrencyCode(currencyCodestring) *ServicesSkusListCall
CurrencyCode sets the optional parameter "currencyCode": The ISO 4217currency code for the pricing info in the response proto. Will use theconversion rate as of start_time. If not specified USD will be used.
func (*ServicesSkusListCall)Do¶
func (c *ServicesSkusListCall) Do(opts ...googleapi.CallOption) (*ListSkusResponse,error)
Do executes the "cloudbilling.services.skus.list" call.Any non-2xx status code is an error. Response headers are in either*ListSkusResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ServicesSkusListCall)EndTime¶
func (c *ServicesSkusListCall) EndTime(endTimestring) *ServicesSkusListCall
EndTime sets the optional parameter "endTime": Optional exclusive end timeof the time range for which the pricing versions will be returned.Timestamps in the future are not allowed. The time range has to be within asingle calendar month in America/Los_Angeles timezone. Time range as a wholeis optional. If not specified, the latest pricing will be returned (up to 12hours old at most).
func (*ServicesSkusListCall)Fields¶
func (c *ServicesSkusListCall) Fields(s ...googleapi.Field) *ServicesSkusListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ServicesSkusListCall)Header¶
func (c *ServicesSkusListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ServicesSkusListCall)IfNoneMatch¶
func (c *ServicesSkusListCall) IfNoneMatch(entityTagstring) *ServicesSkusListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ServicesSkusListCall)PageSize¶
func (c *ServicesSkusListCall) PageSize(pageSizeint64) *ServicesSkusListCall
PageSize sets the optional parameter "pageSize": Requested page size.Defaults to 5000.
func (*ServicesSkusListCall)PageToken¶
func (c *ServicesSkusListCall) PageToken(pageTokenstring) *ServicesSkusListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results to return. This should be a `next_page_token` value returnedfrom a previous `ListSkus` call. If unspecified, the first page of resultsis returned.
func (*ServicesSkusListCall)Pages¶
func (c *ServicesSkusListCall) Pages(ctxcontext.Context, f func(*ListSkusResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*ServicesSkusListCall)StartTime¶
func (c *ServicesSkusListCall) StartTime(startTimestring) *ServicesSkusListCall
StartTime sets the optional parameter "startTime": Optional inclusive starttime of the time range for which the pricing versions will be returned.Timestamps in the future are not allowed. The time range has to be within asingle calendar month in America/Los_Angeles timezone. Time range as a wholeis optional. If not specified, the latest pricing will be returned (up to 12hours old at most).
typeServicesSkusService¶
type ServicesSkusService struct {// contains filtered or unexported fields}funcNewServicesSkusService¶
func NewServicesSkusService(s *APIService) *ServicesSkusService
func (*ServicesSkusService)List¶
func (r *ServicesSkusService) List(parentstring) *ServicesSkusListCall
List: Lists all publicly available SKUs for a given cloud service.
- parent: The name of the service. Example: "services/6F81-5844-456A".
typeSetIamPolicyRequest¶
type SetIamPolicyRequest struct {// Policy: REQUIRED: The complete policy to be applied to the `resource`. The// size of the policy is limited to a few 10s of KB. An empty policy is a valid// policy but certain Google Cloud services (such as Projects) might reject// them.Policy *Policy `json:"policy,omitempty"`// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to// modify. Only the fields in the mask will be modified. If no mask is// provided, the following default mask is used: `paths: "bindings, etag"UpdateMaskstring `json:"updateMask,omitempty"`// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Policy") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}SetIamPolicyRequest: Request message for `SetIamPolicy` method.
func (SetIamPolicyRequest)MarshalJSON¶
func (sSetIamPolicyRequest) MarshalJSON() ([]byte,error)
typeSku¶
type Sku struct {// Category: The category hierarchy of this SKU, purely for organizational// purpose.Category *Category `json:"category,omitempty"`// Description: A human readable description of the SKU, has a maximum length// of 256 characters.Descriptionstring `json:"description,omitempty"`// GeoTaxonomy: The geographic taxonomy for this sku.GeoTaxonomy *GeoTaxonomy `json:"geoTaxonomy,omitempty"`// Name: The resource name for the SKU. Example:// "services/6F81-5844-456A/skus/D041-B8A1-6E0B"Namestring `json:"name,omitempty"`// PricingInfo: A timeline of pricing info for this SKU in chronological order.PricingInfo []*PricingInfo `json:"pricingInfo,omitempty"`// ServiceProviderName: Identifies the service provider. This is 'Google' for// first party services in Google Cloud Platform.ServiceProviderNamestring `json:"serviceProviderName,omitempty"`// ServiceRegions: List of service regions this SKU is offered at. Example:// "asia-east1" Service regions can be found at//https://cloud.google.com/about/locations/ServiceRegions []string `json:"serviceRegions,omitempty"`// SkuId: The identifier for the SKU. Example: "D041-B8A1-6E0B"SkuIdstring `json:"skuId,omitempty"`// ForceSendFields is a list of field names (e.g. "Category") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Category") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Sku: Encapsulates a single SKU in Google Cloud
func (Sku)MarshalJSON¶
typeTestIamPermissionsRequest¶
type TestIamPermissionsRequest struct {// Permissions: The set of permissions to check for the `resource`. Permissions// with wildcards (such as `*` or `storage.*`) are not allowed. For more// information see IAM Overview// (https://cloud.google.com/iam/docs/overview#permissions).Permissions []string `json:"permissions,omitempty"`// ForceSendFields is a list of field names (e.g. "Permissions") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Permissions") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
func (TestIamPermissionsRequest)MarshalJSON¶
func (sTestIamPermissionsRequest) MarshalJSON() ([]byte,error)
typeTestIamPermissionsResponse¶
type TestIamPermissionsResponse struct {// Permissions: A subset of `TestPermissionsRequest.permissions` that the// caller is allowed.Permissions []string `json:"permissions,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Permissions") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Permissions") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TestIamPermissionsResponse: Response message for `TestIamPermissions`method.
func (TestIamPermissionsResponse)MarshalJSON¶
func (sTestIamPermissionsResponse) MarshalJSON() ([]byte,error)
typeTierRate¶
type TierRate struct {// StartUsageAmount: Usage is priced at this rate only after this amount.// Example: start_usage_amount of 10 indicates that the usage will be priced at// the unit_price after the first 10 usage_units.StartUsageAmountfloat64 `json:"startUsageAmount,omitempty"`// UnitPrice: The price per unit of usage. Example: unit_price of amount $10// indicates that each unit will cost $10.UnitPrice *Money `json:"unitPrice,omitempty"`// ForceSendFields is a list of field names (e.g. "StartUsageAmount") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "StartUsageAmount") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TierRate: The price rate indicating starting usage and its correspondingprice.