v20241204

package
v3.0.1285+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Alarm rule does not exist.
	RESOURCENOTFOUND_ALARMNOTEXIST = "ResourceNotFound.AlarmNotExist"

	// Member not in organization.
	RESOURCENOTFOUND_MEMBERNOTEXIST = "ResourceNotFound.MemberNotExist"

	// Product is not exist.
	RESOURCENOTFOUND_PRODUCTNOTEXIST = "ResourceNotFound.ProductNotExist"

	// UserQuota is not exist.
	RESOURCENOTFOUND_USERQUOTANOTEXIST = "ResourceNotFound.UserQuotaNotExist"

	// Unauthorized operation.
	UNAUTHORIZEDOPERATION = "UnauthorizedOperation"

	// Alarm name is exist.
	UNSUPPORTEDOPERATION_ALARMISEXIST = "UnsupportedOperation.AlarmIsExist"
)
View Source
const APIVersion = "2024-12-04"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) CreateAlarm

func (c *Client) CreateAlarm(request *CreateAlarmRequest) (response *CreateAlarmResponse, err error)

CreateAlarm Add alarm rules

error code that may be returned:

RESOURCENOTFOUND_ALARMNOTEXIST = "ResourceNotFound.AlarmNotExist"
RESOURCENOTFOUND_MEMBERNOTEXIST = "ResourceNotFound.MemberNotExist"
RESOURCENOTFOUND_PRODUCTNOTEXIST = "ResourceNotFound.ProductNotExist"
RESOURCENOTFOUND_USERQUOTANOTEXIST = "ResourceNotFound.UserQuotaNotExist"
UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
UNSUPPORTEDOPERATION_ALARMISEXIST = "UnsupportedOperation.AlarmIsExist"

func (*Client) CreateAlarmWithContext

func (c *Client) CreateAlarmWithContext(ctx context.Context, request *CreateAlarmRequest) (response *CreateAlarmResponse, err error)

CreateAlarm Add alarm rules

error code that may be returned:

RESOURCENOTFOUND_ALARMNOTEXIST = "ResourceNotFound.AlarmNotExist"
RESOURCENOTFOUND_MEMBERNOTEXIST = "ResourceNotFound.MemberNotExist"
RESOURCENOTFOUND_PRODUCTNOTEXIST = "ResourceNotFound.ProductNotExist"
RESOURCENOTFOUND_USERQUOTANOTEXIST = "ResourceNotFound.UserQuotaNotExist"
UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
UNSUPPORTEDOPERATION_ALARMISEXIST = "UnsupportedOperation.AlarmIsExist"

type CreateAlarmRequest

type CreateAlarmRequest struct {
	*tchttp.BaseRequest

	// Alarm rule name. specifies the name of the Alarm rule.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Alert metrics 1: quota usage 2: quota usage rate 3: remaining quota 4: remaining quota rate.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Specifies the Alarm threshold. value range: 0-100.
	Threshold *int64 `json:"Threshold,omitnil,omitempty" name:"Threshold"`

	// Alarm frequency.
	Frequency *int64 `json:"Frequency,omitnil,omitempty" name:"Frequency"`

	//   Member UIN
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

func NewCreateAlarmRequest

func NewCreateAlarmRequest() (request *CreateAlarmRequest)

func (*CreateAlarmRequest) FromJsonString

func (r *CreateAlarmRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*CreateAlarmRequest) ToJsonString

func (r *CreateAlarmRequest) ToJsonString() string

type CreateAlarmRequestParams

type CreateAlarmRequestParams struct {
	// Alarm rule name. specifies the name of the Alarm rule.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Alert metrics 1: quota usage 2: quota usage rate 3: remaining quota 4: remaining quota rate.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Specifies the Alarm threshold. value range: 0-100.
	Threshold *int64 `json:"Threshold,omitnil,omitempty" name:"Threshold"`

	// Alarm frequency.
	Frequency *int64 `json:"Frequency,omitnil,omitempty" name:"Frequency"`

	//   Member UIN
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

Predefined struct for user

type CreateAlarmResponse

type CreateAlarmResponse struct {
	*tchttp.BaseResponse
	Response *CreateAlarmResponseParams `json:"Response"`
}

func NewCreateAlarmResponse

func NewCreateAlarmResponse() (response *CreateAlarmResponse)

func (*CreateAlarmResponse) FromJsonString

func (r *CreateAlarmResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*CreateAlarmResponse) ToJsonString

func (r *CreateAlarmResponse) ToJsonString() string

type CreateAlarmResponseParams

type CreateAlarmResponseParams struct {
	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

Jump to

Keyboard shortcuts

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