v20220627

package
v3.0.1303+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// Parameter error.
	INVALIDPARAMETER = "InvalidParameter"

	// Parameter error.
	INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"

	// Too many and frequent requests.
	REQUESTLIMITEXCEEDED = "RequestLimitExceeded"

	// The operation is not supported.
	UNSUPPORTEDOPERATION = "UnsupportedOperation"
)
View Source
const APIVersion = "2022-06-27"

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) DescribeProducts

func (c *Client) DescribeProducts(request *DescribeProductsRequest) (response *DescribeProductsResponse, err error)

DescribeProducts This interface (DescribeProducts) is used for querying product information in each supported region list.

func (*Client) DescribeProductsWithContext

func (c *Client) DescribeProductsWithContext(ctx context.Context, request *DescribeProductsRequest) (response *DescribeProductsResponse, err error)

DescribeProducts This interface (DescribeProducts) is used for querying product information in each supported region list.

func (*Client) DescribeRegions

func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error)

DescribeRegions This interface (DescribeRegions) is used for querying the supported regions of each product.

error code that may be returned:

INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"

func (*Client) DescribeRegionsWithContext

func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error)

DescribeRegions This interface (DescribeRegions) is used for querying the supported regions of each product.

error code that may be returned:

INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"

func (*Client) DescribeZones

func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error)

DescribeZones This interface (DescribeZones) is used for querying product availability zone information.

error code that may be returned:

INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
UNSUPPORTEDOPERATION = "UnsupportedOperation"

func (*Client) DescribeZonesWithContext

func (c *Client) DescribeZonesWithContext(ctx context.Context, request *DescribeZonesRequest) (response *DescribeZonesResponse, err error)

DescribeZones This interface (DescribeZones) is used for querying product availability zone information.

error code that may be returned:

INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
UNSUPPORTEDOPERATION = "UnsupportedOperation"

type DescribeProductsRequest

type DescribeProductsRequest struct {
	*tchttp.BaseRequest

	// Number of returned results, defaults to 20, maximum value is 100.
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset. default value: 0.
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
}

func NewDescribeProductsRequest

func NewDescribeProductsRequest() (request *DescribeProductsRequest)

func (*DescribeProductsRequest) FromJsonString

func (r *DescribeProductsRequest) 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 (*DescribeProductsRequest) ToJsonString

func (r *DescribeProductsRequest) ToJsonString() string

type DescribeProductsRequestParams

type DescribeProductsRequestParams struct {
	// Number of returned results, defaults to 20, maximum value is 100.
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset. default value: 0.
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
}

Predefined struct for user

type DescribeProductsResponse

type DescribeProductsResponse struct {
	*tchttp.BaseResponse
	Response *DescribeProductsResponseParams `json:"Response"`
}

func NewDescribeProductsResponse

func NewDescribeProductsResponse() (response *DescribeProductsResponse)

func (*DescribeProductsResponse) FromJsonString

func (r *DescribeProductsResponse) 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 (*DescribeProductsResponse) ToJsonString

func (r *DescribeProductsResponse) ToJsonString() string

type DescribeProductsResponseParams

type DescribeProductsResponseParams struct {
	// Product detailed information list.
	Products []*RegionProduct `json:"Products,omitnil,omitempty" name:"Products"`

	// Total number of products.
	TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`

	// 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

type DescribeRegionsRequest

type DescribeRegionsRequest struct {
	*tchttp.BaseRequest

	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// Not passed or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no business allowlist is found.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

func NewDescribeRegionsRequest

func NewDescribeRegionsRequest() (request *DescribeRegionsRequest)

func (*DescribeRegionsRequest) FromJsonString

func (r *DescribeRegionsRequest) 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 (*DescribeRegionsRequest) ToJsonString

func (r *DescribeRegionsRequest) ToJsonString() string

type DescribeRegionsRequestParams

type DescribeRegionsRequestParams struct {
	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// Not passed or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no business allowlist is found.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

Predefined struct for user

type DescribeRegionsResponse

type DescribeRegionsResponse struct {
	*tchttp.BaseResponse
	Response *DescribeRegionsResponseParams `json:"Response"`
}

func NewDescribeRegionsResponse

func NewDescribeRegionsResponse() (response *DescribeRegionsResponse)

func (*DescribeRegionsResponse) FromJsonString

func (r *DescribeRegionsResponse) 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 (*DescribeRegionsResponse) ToJsonString

func (r *DescribeRegionsResponse) ToJsonString() string

type DescribeRegionsResponseParams

type DescribeRegionsResponseParams struct {
	// Number of Regions
	TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`

	// List Information of Region
	RegionSet []*RegionInfo `json:"RegionSet,omitnil,omitempty" name:"RegionSet"`

	// 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

type DescribeZonesRequest

type DescribeZonesRequest struct {
	*tchttp.BaseRequest

	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// No input or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no result is found in the business allowlist.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

func NewDescribeZonesRequest

func NewDescribeZonesRequest() (request *DescribeZonesRequest)

func (*DescribeZonesRequest) FromJsonString

func (r *DescribeZonesRequest) 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 (*DescribeZonesRequest) ToJsonString

func (r *DescribeZonesRequest) ToJsonString() string

type DescribeZonesRequestParams

type DescribeZonesRequestParams struct {
	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// No input or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no result is found in the business allowlist.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

Predefined struct for user

type DescribeZonesResponse

type DescribeZonesResponse struct {
	*tchttp.BaseResponse
	Response *DescribeZonesResponseParams `json:"Response"`
}

func NewDescribeZonesResponse

func NewDescribeZonesResponse() (response *DescribeZonesResponse)

func (*DescribeZonesResponse) FromJsonString

func (r *DescribeZonesResponse) 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 (*DescribeZonesResponse) ToJsonString

func (r *DescribeZonesResponse) ToJsonString() string

type DescribeZonesResponseParams

type DescribeZonesResponseParams struct {
	// Number of availability zones.
	TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`

	// Availability zone list information.
	ZoneSet []*ZoneInfo `json:"ZoneSet,omitnil,omitempty" name:"ZoneSet"`

	// 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

type RegionInfo

type RegionInfo struct {
	// Region name, such as ap-guangzhou.
	Region *string `json:"Region,omitnil,omitempty" name:"Region"`

	// Region description, for example, South China (Guangzhou).
	RegionName *string `json:"RegionName,omitnil,omitempty" name:"RegionName"`

	// Whether the region is in an available state.
	RegionState *string `json:"RegionState,omitnil,omitempty" name:"RegionState"`

	// Console type. defaults to null when called via api.
	// Note: This field may return null, indicating that no valid values can be obtained.
	RegionTypeMC *int64 `json:"RegionTypeMC,omitnil,omitempty" name:"RegionTypeMC"`

	// Region for different languages.
	// Note: This field may return null, indicating that no valid values can be obtained.
	LocationMC *string `json:"LocationMC,omitnil,omitempty" name:"LocationMC"`

	// Region description on console display.
	// Note: This field may return null, indicating that no valid values can be obtained.
	RegionNameMC *string `json:"RegionNameMC,omitnil,omitempty" name:"RegionNameMC"`

	// 1
	// Note: This field may return null, indicating that no valid values can be obtained.
	RegionIdMC *string `json:"RegionIdMC,omitnil,omitempty" name:"RegionIdMC"`
}

type RegionProduct

type RegionProduct struct {
	// Product name, for example cvm.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`
}

type ZoneInfo

type ZoneInfo struct {
	// Availability zone name, for example, ap-guangzhou-3.
	//
	// The names of availability zones across the network are as follows:.
	// <li> ap-chongqing-1 </li>
	// <li> ap-seoul-1 </li>
	// <li> ap-seoul-2 </li>
	// <li> ap-chengdu-1 </li>
	// <li> ap-chengdu-2 </li>
	// <li> ap-hongkong-1 </li>
	// <li> ap-hongkong-2 </li>
	// <li> ap-shenzhen-fsi-1 </li>
	// <li> ap-shenzhen-fsi-2 </li>
	// <li> ap-shenzhen-fsi-3 </li>
	// <Li> ap-guangzhou-1 (sold-out)</li>.
	// <Li> ap-guangzhou-2 (resource out of stock)</li>.
	// <li> ap-guangzhou-3 </li>
	// <li> ap-guangzhou-4 </li>
	// <li> ap-guangzhou-6 </li>
	// <li> ap-tokyo-1 </li>
	// <li> ap-singapore-1 </li>
	// <li> ap-singapore-2 </li>
	// <li> ap-shanghai-fsi-1 </li>
	// <li> ap-shanghai-fsi-2 </li>
	// <li> ap-shanghai-fsi-3 </li>
	// <li> ap-bangkok-1 </li>
	// <Li> ap-shanghai-1 (resource out of stock) </li>.
	// <li> ap-shanghai-2 </li>
	// <li> ap-shanghai-3 </li>
	// <li> ap-shanghai-4 </li>
	// <li> ap-shanghai-5 </li>
	// <li> ap-mumbai-1 </li>
	// <li> ap-mumbai-2 </li>
	// <li> ap-beijing-1 </li>
	// <li> ap-beijing-2 </li>
	// <li> ap-beijing-3 </li>
	// <li> ap-beijing-4 </li>
	// <li> ap-beijing-5 </li>
	// <li> na-siliconvalley-1 </li>
	// <li> na-siliconvalley-2 </li>
	// <li> eu-frankfurt-1 </li>
	// <li> na-ashburn-1 </li>
	// <li> na-ashburn-2 </li>
	// <li> ap-nanjing-1 </li>
	// <li> ap-nanjing-2 </li>
	Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"`

	// Availability zone description, such as Guangzhou Zone 3.
	ZoneName *string `json:"ZoneName,omitnil,omitempty" name:"ZoneName"`

	// AZ ID
	ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`

	// Availability zone status, including AVAILABLE and UNAVAILABLE. AVAILABLE indicates available, and UNAVAILABLE indicates unavailable.
	ZoneState *string `json:"ZoneState,omitnil,omitempty" name:"ZoneState"`

	// Parent zone.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ParentZone *string `json:"ParentZone,omitnil,omitempty" name:"ParentZone"`

	// Parent availability zone ID.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ParentZoneId *string `json:"ParentZoneId,omitnil,omitempty" name:"ParentZoneId"`

	// Describes the parent availability zone.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ParentZoneName *string `json:"ParentZoneName,omitnil,omitempty" name:"ParentZoneName"`

	// zone type.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ZoneType *string `json:"ZoneType,omitnil,omitempty" name:"ZoneType"`

	// Console type.
	// Note: This field may return null, indicating that no valid values can be obtained.
	MachineRoomTypeMC *string `json:"MachineRoomTypeMC,omitnil,omitempty" name:"MachineRoomTypeMC"`

	// Same as ZoneId. suitable for console invocation.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ZoneIdMC *string `json:"ZoneIdMC,omitnil,omitempty" name:"ZoneIdMC"`
}

Jump to

Keyboard shortcuts

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