api

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddrBSS = "https://business.aliyuncs.com"

	// Algorithm https://help.aliyun.com/zh/sdk/product-overview/v3-request-structure-and-signature
	Algorithm = "ACS3-HMAC-SHA256"
)

Variables

This section is empty.

Functions

func Exec

func Exec[T any](r *resty.Request, method, addr, path, action, version string, args ...any) (t T, _ error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(account config.Account) *Client

func (*Client) DescribeInstanceBill added in v1.0.9

func (c *Client) DescribeInstanceBill(req *DescribeInstanceBillReq) ([]*DescribeInstanceBillItem, error)

func (*Client) QueryAccountBalance

func (c *Client) QueryAccountBalance() (*QueryAccountBalanceData, error)

func (*Client) QueryAccountBill added in v1.0.6

func (c *Client) QueryAccountBill(req *QueryAccountBillReq) ([]*QueryAccountBillItem, error)

func (*Client) R

func (c *Client) R() *resty.Request

type DescribeInstanceBillData added in v1.0.9

type DescribeInstanceBillData struct {
	NextToken  string `json:"NextToken"`
	MaxResults int    `json:"MaxResults"`
	TotalCount int    `json:"TotalCount"`

	AccountID    string `json:"AccountID"`
	AccountName  string `json:"AccountName"`
	BillingCycle string `json:"BillingCycle"`

	Items []*DescribeInstanceBillItem `json:"Items"`
}

type DescribeInstanceBillItem added in v1.0.9

type DescribeInstanceBillItem struct {
	ProductCode  string  `json:"ProductCode"`
	ProductName  string  `json:"ProductName"`
	Usage        string  `json:"Usage"`
	UsageUnit    string  `json:"UsageUnit"`
	PretaxAmount float64 `json:"PretaxAmount"`
}

type DescribeInstanceBillReq added in v1.0.9

type DescribeInstanceBillReq struct {
	NextToken  string `json:"NextToken,omitempty"`
	MaxResults string `json:"MaxResults"`

	BillingCycle     string `json:"BillingCycle"`
	ProductCode      string `json:"ProductCode"`
	Granularity      string `json:"Granularity"`
	IsBillingItem    bool   `json:"IsBillingItem"`
	IsHideZeroCharge bool   `json:"IsHideZeroCharge"`
}

type QueryAccountBalanceData

type QueryAccountBalanceData struct {
	AvailableCashAmount string `json:"AvailableCashAmount"`
	MybankCreditAmount  string `json:"MybankCreditAmount"`
	Currency            string `json:"Currency"`
	AvailableAmount     string `json:"AvailableAmount"`
	CreditAmount        string `json:"CreditAmount"`
	QuotaLimit          string `json:"QuotaLimit"`
}

type QueryAccountBillData added in v1.0.6

type QueryAccountBillData struct {
	PageNum    int `json:"PageNum"`
	PageSize   int `json:"PageSize"`
	TotalCount int `json:"TotalCount"`

	AccountID    string `json:"AccountID"`
	AccountName  string `json:"AccountName"`
	BillingCycle string `json:"BillingCycle"`

	Items *QueryAccountBillItems `json:"Items"`
}

type QueryAccountBillItem added in v1.0.6

type QueryAccountBillItem struct {
	BillingDate  string  `json:"BillingDate"`
	ProductCode  string  `json:"ProductCode"`
	ProductName  string  `json:"ProductName"`
	PretaxAmount float64 `json:"PretaxAmount"`
}

type QueryAccountBillItems added in v1.0.6

type QueryAccountBillItems struct {
	Item []*QueryAccountBillItem `json:"Item"`
}

type QueryAccountBillReq added in v1.0.6

type QueryAccountBillReq struct {
	PageNum  int `json:"PageNum"`
	PageSize int `json:"PageSize"`

	BillingCycle     string `json:"BillingCycle"`
	IsGroupByProduct bool   `json:"IsGroupByProduct"`
	Granularity      string `json:"Granularity"` // MONTHLY or DAILY
	BillingDate      string `json:"BillingDate"`
}

Jump to

Keyboard shortcuts

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