resources

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(client *golangsdk.ServiceClient, alarmId string, opts AddOpts) error

Add adds resources to an alarm rule in batches.

func Delete

func Delete(client *golangsdk.ServiceClient, alarmId string, opts DeleteOpts) error

Delete deletes resources from an alarm rule in batches.

Types

type AddOpts

type AddOpts struct {
	// Specifies the list of resources to add.
	// A maximum of 1000 resources can be added at a time.
	Resources [][]Dimension `json:"resources" required:"true"`
}

AddOpts contains the options for adding resources to an alarm rule.

type DeleteOpts

type DeleteOpts struct {
	// Specifies the list of resources to delete.
	// A maximum of 1000 resources can be deleted at a time.
	Resources [][]Dimension `json:"resources" required:"true"`
}

DeleteOpts contains the options for deleting resources from an alarm rule.

type Dimension

type Dimension struct {
	// Specifies the dimension name.
	Name string `json:"name" required:"true"`
	// Specifies the dimension value.
	Value string `json:"value,omitempty"`
}

Dimension represents a metric dimension.

type ListOpts

type ListOpts struct {
	// Specifies the pagination offset. Default: 0
	Offset int `q:"offset"`
	// Specifies the number of records on each page. Default: 10, Max: 100
	Limit int `q:"limit"`
}

ListOpts contains the options for querying resources in an alarm rule.

type ListResponse

type ListResponse struct {
	// Specifies the list of resources.
	Resources [][]Dimension `json:"resources"`
	// Specifies the total number of resources.
	Count int `json:"count"`
}

ListResponse contains the response from the List request.

func List

func List(client *golangsdk.ServiceClient, alarmId string, opts ListOpts) (*ListResponse, error)

List returns a list of resources in an alarm rule.

Jump to

Keyboard shortcuts

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