beta

package
v1.84.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2026 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package billingbudgets defines functions and types for handling billingbudgets GCP resources.

Copyright 2026 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2026 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2026 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2026 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2026 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package beta defines operations in the declarative SDK.

Index

Constants

View Source
const BudgetMaxPage = -1

Variables

View Source
var YAML_budget []byte

Functions

func DCLBudgetSchema added in v1.10.3

func DCLBudgetSchema() *dcl.Schema

Types

type Budget

type Budget struct {
	Name           *string                `json:"name"`
	DisplayName    *string                `json:"displayName"`
	BudgetFilter   *BudgetBudgetFilter    `json:"budgetFilter"`
	Amount         *BudgetAmount          `json:"amount"`
	ThresholdRules []BudgetThresholdRules `json:"thresholdRules"`
	Etag           *string                `json:"etag"`
	AllUpdatesRule *BudgetAllUpdatesRule  `json:"allUpdatesRule"`
	BillingAccount *string                `json:"billingAccount"`
}

func (*Budget) Describe

func (r *Budget) Describe() dcl.ServiceTypeVersion

Describe returns a simple description of this resource to ensure that automated tools can identify it.

func (*Budget) ID

func (r *Budget) ID() (string, error)

func (*Budget) String

func (r *Budget) String() string

type BudgetAllUpdatesRule

type BudgetAllUpdatesRule struct {
	PubsubTopic                    *string  `json:"pubsubTopic"`
	SchemaVersion                  *string  `json:"schemaVersion"`
	MonitoringNotificationChannels []string `json:"monitoringNotificationChannels"`
	DisableDefaultIamRecipients    *bool    `json:"disableDefaultIamRecipients"`
	// contains filtered or unexported fields
}
var EmptyBudgetAllUpdatesRule *BudgetAllUpdatesRule = &BudgetAllUpdatesRule{empty: true}

This object is used to assert a desired state where this BudgetAllUpdatesRule is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetAllUpdatesRule) Empty

func (r *BudgetAllUpdatesRule) Empty() bool

func (*BudgetAllUpdatesRule) HashCode

func (r *BudgetAllUpdatesRule) HashCode() string

func (*BudgetAllUpdatesRule) String

func (r *BudgetAllUpdatesRule) String() string

func (*BudgetAllUpdatesRule) UnmarshalJSON

func (r *BudgetAllUpdatesRule) UnmarshalJSON(data []byte) error

type BudgetAmount

type BudgetAmount struct {
	SpecifiedAmount  *BudgetAmountSpecifiedAmount  `json:"specifiedAmount"`
	LastPeriodAmount *BudgetAmountLastPeriodAmount `json:"lastPeriodAmount"`
	// contains filtered or unexported fields
}
var EmptyBudgetAmount *BudgetAmount = &BudgetAmount{empty: true}

This object is used to assert a desired state where this BudgetAmount is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetAmount) Empty

func (r *BudgetAmount) Empty() bool

func (*BudgetAmount) HashCode

func (r *BudgetAmount) HashCode() string

func (*BudgetAmount) String

func (r *BudgetAmount) String() string

func (*BudgetAmount) UnmarshalJSON

func (r *BudgetAmount) UnmarshalJSON(data []byte) error

type BudgetAmountLastPeriodAmount

type BudgetAmountLastPeriodAmount struct {
	// contains filtered or unexported fields
}
var EmptyBudgetAmountLastPeriodAmount *BudgetAmountLastPeriodAmount = &BudgetAmountLastPeriodAmount{empty: true}

This object is used to assert a desired state where this BudgetAmountLastPeriodAmount is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetAmountLastPeriodAmount) Empty

func (*BudgetAmountLastPeriodAmount) HashCode

func (r *BudgetAmountLastPeriodAmount) HashCode() string

func (*BudgetAmountLastPeriodAmount) String

func (*BudgetAmountLastPeriodAmount) UnmarshalJSON

func (r *BudgetAmountLastPeriodAmount) UnmarshalJSON(data []byte) error

type BudgetAmountSpecifiedAmount

type BudgetAmountSpecifiedAmount struct {
	CurrencyCode *string `json:"currencyCode"`
	Units        *int64  `json:"units"`
	Nanos        *int64  `json:"nanos"`
	// contains filtered or unexported fields
}
var EmptyBudgetAmountSpecifiedAmount *BudgetAmountSpecifiedAmount = &BudgetAmountSpecifiedAmount{empty: true}

This object is used to assert a desired state where this BudgetAmountSpecifiedAmount is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetAmountSpecifiedAmount) Empty

func (r *BudgetAmountSpecifiedAmount) Empty() bool

func (*BudgetAmountSpecifiedAmount) HashCode

func (r *BudgetAmountSpecifiedAmount) HashCode() string

func (*BudgetAmountSpecifiedAmount) String

func (r *BudgetAmountSpecifiedAmount) String() string

func (*BudgetAmountSpecifiedAmount) UnmarshalJSON

func (r *BudgetAmountSpecifiedAmount) UnmarshalJSON(data []byte) error

type BudgetBudgetFilter

type BudgetBudgetFilter struct {
	Projects             []string                                    `json:"projects"`
	CreditTypes          []string                                    `json:"creditTypes"`
	CreditTypesTreatment *BudgetBudgetFilterCreditTypesTreatmentEnum `json:"creditTypesTreatment"`
	Services             []string                                    `json:"services"`
	Subaccounts          []string                                    `json:"subaccounts"`
	Labels               map[string]BudgetBudgetFilterLabels         `json:"labels"`
	CalendarPeriod       *BudgetBudgetFilterCalendarPeriodEnum       `json:"calendarPeriod"`
	CustomPeriod         *BudgetBudgetFilterCustomPeriod             `json:"customPeriod"`
	// contains filtered or unexported fields
}
var EmptyBudgetBudgetFilter *BudgetBudgetFilter = &BudgetBudgetFilter{empty: true}

This object is used to assert a desired state where this BudgetBudgetFilter is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetBudgetFilter) Empty

func (r *BudgetBudgetFilter) Empty() bool

func (*BudgetBudgetFilter) HashCode

func (r *BudgetBudgetFilter) HashCode() string

func (*BudgetBudgetFilter) String

func (r *BudgetBudgetFilter) String() string

func (*BudgetBudgetFilter) UnmarshalJSON

func (r *BudgetBudgetFilter) UnmarshalJSON(data []byte) error

type BudgetBudgetFilterCalendarPeriodEnum

type BudgetBudgetFilterCalendarPeriodEnum string

The enum BudgetBudgetFilterCalendarPeriodEnum.

func BudgetBudgetFilterCalendarPeriodEnumRef

func BudgetBudgetFilterCalendarPeriodEnumRef(s string) *BudgetBudgetFilterCalendarPeriodEnum

BudgetBudgetFilterCalendarPeriodEnumRef returns a *BudgetBudgetFilterCalendarPeriodEnum with the value of string s If the empty string is provided, nil is returned.

func (BudgetBudgetFilterCalendarPeriodEnum) Validate

type BudgetBudgetFilterCreditTypesTreatmentEnum

type BudgetBudgetFilterCreditTypesTreatmentEnum string

The enum BudgetBudgetFilterCreditTypesTreatmentEnum.

func BudgetBudgetFilterCreditTypesTreatmentEnumRef

func BudgetBudgetFilterCreditTypesTreatmentEnumRef(s string) *BudgetBudgetFilterCreditTypesTreatmentEnum

BudgetBudgetFilterCreditTypesTreatmentEnumRef returns a *BudgetBudgetFilterCreditTypesTreatmentEnum with the value of string s If the empty string is provided, nil is returned.

func (BudgetBudgetFilterCreditTypesTreatmentEnum) Validate

type BudgetBudgetFilterCustomPeriod

type BudgetBudgetFilterCustomPeriod struct {
	StartDate *BudgetBudgetFilterCustomPeriodStartDate `json:"startDate"`
	EndDate   *BudgetBudgetFilterCustomPeriodEndDate   `json:"endDate"`
	// contains filtered or unexported fields
}
var EmptyBudgetBudgetFilterCustomPeriod *BudgetBudgetFilterCustomPeriod = &BudgetBudgetFilterCustomPeriod{empty: true}

This object is used to assert a desired state where this BudgetBudgetFilterCustomPeriod is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetBudgetFilterCustomPeriod) Empty

func (*BudgetBudgetFilterCustomPeriod) HashCode

func (r *BudgetBudgetFilterCustomPeriod) HashCode() string

func (*BudgetBudgetFilterCustomPeriod) String

func (*BudgetBudgetFilterCustomPeriod) UnmarshalJSON

func (r *BudgetBudgetFilterCustomPeriod) UnmarshalJSON(data []byte) error

type BudgetBudgetFilterCustomPeriodEndDate

type BudgetBudgetFilterCustomPeriodEndDate struct {
	Year  *int64 `json:"year"`
	Month *int64 `json:"month"`
	Day   *int64 `json:"day"`
	// contains filtered or unexported fields
}
var EmptyBudgetBudgetFilterCustomPeriodEndDate *BudgetBudgetFilterCustomPeriodEndDate = &BudgetBudgetFilterCustomPeriodEndDate{empty: true}

This object is used to assert a desired state where this BudgetBudgetFilterCustomPeriodEndDate is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetBudgetFilterCustomPeriodEndDate) Empty

func (*BudgetBudgetFilterCustomPeriodEndDate) HashCode

func (*BudgetBudgetFilterCustomPeriodEndDate) String

func (*BudgetBudgetFilterCustomPeriodEndDate) UnmarshalJSON

func (r *BudgetBudgetFilterCustomPeriodEndDate) UnmarshalJSON(data []byte) error

type BudgetBudgetFilterCustomPeriodStartDate

type BudgetBudgetFilterCustomPeriodStartDate struct {
	Year  *int64 `json:"year"`
	Month *int64 `json:"month"`
	Day   *int64 `json:"day"`
	// contains filtered or unexported fields
}
var EmptyBudgetBudgetFilterCustomPeriodStartDate *BudgetBudgetFilterCustomPeriodStartDate = &BudgetBudgetFilterCustomPeriodStartDate{empty: true}

This object is used to assert a desired state where this BudgetBudgetFilterCustomPeriodStartDate is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetBudgetFilterCustomPeriodStartDate) Empty

func (*BudgetBudgetFilterCustomPeriodStartDate) HashCode

func (*BudgetBudgetFilterCustomPeriodStartDate) String

func (*BudgetBudgetFilterCustomPeriodStartDate) UnmarshalJSON

func (r *BudgetBudgetFilterCustomPeriodStartDate) UnmarshalJSON(data []byte) error

type BudgetBudgetFilterLabels

type BudgetBudgetFilterLabels struct {
	Values []string `json:"values"`
	// contains filtered or unexported fields
}
var EmptyBudgetBudgetFilterLabels *BudgetBudgetFilterLabels = &BudgetBudgetFilterLabels{empty: true}

This object is used to assert a desired state where this BudgetBudgetFilterLabels is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetBudgetFilterLabels) Empty

func (r *BudgetBudgetFilterLabels) Empty() bool

func (*BudgetBudgetFilterLabels) HashCode

func (r *BudgetBudgetFilterLabels) HashCode() string

func (*BudgetBudgetFilterLabels) String

func (r *BudgetBudgetFilterLabels) String() string

func (*BudgetBudgetFilterLabels) UnmarshalJSON

func (r *BudgetBudgetFilterLabels) UnmarshalJSON(data []byte) error

type BudgetList

type BudgetList struct {
	Items []*Budget
	// contains filtered or unexported fields
}

func (*BudgetList) HasNext

func (l *BudgetList) HasNext() bool

func (*BudgetList) Next

func (l *BudgetList) Next(ctx context.Context, c *Client) error

type BudgetThresholdRules

type BudgetThresholdRules struct {
	ThresholdPercent *float64                            `json:"thresholdPercent"`
	SpendBasis       *BudgetThresholdRulesSpendBasisEnum `json:"spendBasis"`
	// contains filtered or unexported fields
}
var EmptyBudgetThresholdRules *BudgetThresholdRules = &BudgetThresholdRules{empty: true}

This object is used to assert a desired state where this BudgetThresholdRules is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*BudgetThresholdRules) Empty

func (r *BudgetThresholdRules) Empty() bool

func (*BudgetThresholdRules) HashCode

func (r *BudgetThresholdRules) HashCode() string

func (*BudgetThresholdRules) String

func (r *BudgetThresholdRules) String() string

func (*BudgetThresholdRules) UnmarshalJSON

func (r *BudgetThresholdRules) UnmarshalJSON(data []byte) error

type BudgetThresholdRulesSpendBasisEnum

type BudgetThresholdRulesSpendBasisEnum string

The enum BudgetThresholdRulesSpendBasisEnum.

func BudgetThresholdRulesSpendBasisEnumRef

func BudgetThresholdRulesSpendBasisEnumRef(s string) *BudgetThresholdRulesSpendBasisEnum

BudgetThresholdRulesSpendBasisEnumRef returns a *BudgetThresholdRulesSpendBasisEnum with the value of string s If the empty string is provided, nil is returned.

func (BudgetThresholdRulesSpendBasisEnum) Validate

type Client

type Client struct {
	Config *dcl.Config
}

The Client is the base struct of all operations. This will receive the Get, Delete, List, and Apply operations on all resources.

func NewClient

func NewClient(c *dcl.Config) *Client

NewClient creates a client that retries all operations a few times each.

func (*Client) ApplyBudget

func (c *Client) ApplyBudget(ctx context.Context, rawDesired *Budget, opts ...dcl.ApplyOption) (*Budget, error)

func (*Client) DeleteAllBudget

func (c *Client) DeleteAllBudget(ctx context.Context, billingAccount string, filter func(*Budget) bool) error

DeleteAllBudget deletes all resources that the filter functions returns true on.

func (*Client) DeleteBudget

func (c *Client) DeleteBudget(ctx context.Context, r *Budget) error

func (*Client) GetBudget

func (c *Client) GetBudget(ctx context.Context, r *Budget) (*Budget, error)

func (*Client) ListBudget

func (c *Client) ListBudget(ctx context.Context, billingAccount string) (*BudgetList, error)

func (*Client) ListBudgetWithMaxResults

func (c *Client) ListBudgetWithMaxResults(ctx context.Context, billingAccount string, pageSize int32) (*BudgetList, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL