ahas_openapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointMap map[string]string

EndpointMap Endpoint Data

View Source
var EndpointType = "regional"

EndpointType regional or central

Functions

func GetEndpointMap

func GetEndpointMap() map[string]string

GetEndpointMap Get Endpoint Data Map

func GetEndpointType

func GetEndpointType() string

GetEndpointType Get Endpoint Type Value

func SetClientProperty

func SetClientProperty(client *Client, propertyName string, propertyValue interface{})

SetClientProperty Set Property by Reflect

func SetEndpointDataToClient

func SetEndpointDataToClient(client *Client)

SetEndpointDataToClient Set EndpointMap and ENdpointType

Types

type Client

type Client struct {
	sdk.Client
}

Client is the sdk client struct, each func corresponds to an OpenAPI

func NewClient

func NewClient() (client *Client, err error)

NewClient creates a sdk client with environment variables

func NewClientWithAccessKey

func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)

NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithEcsRamRole

func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)

NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithOptions

func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)

NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential this is the common api to create a sdk client

func NewClientWithProvider

func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)

NewClientWithProvider creates a sdk client with providers usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRamRoleArn

func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRamRoleArnAndPolicy

func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRsaKeyPair

func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)

NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithStsToken

func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)

NewClientWithStsToken is a shortcut to create sdk client with sts token usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func (*Client) DescribeRegions

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

DescribeRegions invokes the ahas_openapi.DescribeRegions API synchronously api document: https://help.aliyun.com/api/ahas-openapi/describeregions.html

func (*Client) DescribeRegionsWithCallback

func (client *Client) DescribeRegionsWithCallback(request *DescribeRegionsRequest, callback func(response *DescribeRegionsResponse, err error)) <-chan int

DescribeRegionsWithCallback invokes the ahas_openapi.DescribeRegions API asynchronously api document: https://help.aliyun.com/api/ahas-openapi/describeregions.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DescribeRegionsWithChan

func (client *Client) DescribeRegionsWithChan(request *DescribeRegionsRequest) (<-chan *DescribeRegionsResponse, <-chan error)

DescribeRegionsWithChan invokes the ahas_openapi.DescribeRegions API asynchronously api document: https://help.aliyun.com/api/ahas-openapi/describeregions.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetSentinelAppSumMetric

func (client *Client) GetSentinelAppSumMetric(request *GetSentinelAppSumMetricRequest) (response *GetSentinelAppSumMetricResponse, err error)

GetSentinelAppSumMetric invokes the ahas_openapi.GetSentinelAppSumMetric API synchronously api document: https://help.aliyun.com/api/ahas-openapi/getsentinelappsummetric.html

func (*Client) GetSentinelAppSumMetricWithCallback

func (client *Client) GetSentinelAppSumMetricWithCallback(request *GetSentinelAppSumMetricRequest, callback func(response *GetSentinelAppSumMetricResponse, err error)) <-chan int

GetSentinelAppSumMetricWithCallback invokes the ahas_openapi.GetSentinelAppSumMetric API asynchronously api document: https://help.aliyun.com/api/ahas-openapi/getsentinelappsummetric.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetSentinelAppSumMetricWithChan

func (client *Client) GetSentinelAppSumMetricWithChan(request *GetSentinelAppSumMetricRequest) (<-chan *GetSentinelAppSumMetricResponse, <-chan error)

GetSentinelAppSumMetricWithChan invokes the ahas_openapi.GetSentinelAppSumMetric API asynchronously api document: https://help.aliyun.com/api/ahas-openapi/getsentinelappsummetric.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type Data

type Data struct {
	RegionId       string `json:"RegionId" xml:"RegionId"`
	RegionEndpoint string `json:"RegionEndpoint" xml:"RegionEndpoint"`
	LocalName      string `json:"LocalName" xml:"LocalName"`
}

Data is a nested struct in ahas_openapi response

type DescribeRegionsRequest

type DescribeRegionsRequest struct {
	*requests.RpcRequest
	AcceptLanguage string `position:"Query" name:"AcceptLanguage"`
}

DescribeRegionsRequest is the request struct for api DescribeRegions

func CreateDescribeRegionsRequest

func CreateDescribeRegionsRequest() (request *DescribeRegionsRequest)

CreateDescribeRegionsRequest creates a request to invoke DescribeRegions API

type DescribeRegionsResponse

type DescribeRegionsResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Code      string `json:"Code" xml:"Code"`
	Success   bool   `json:"Success" xml:"Success"`
	Message   string `json:"Message" xml:"Message"`
	Regions   []Data `json:"Regions" xml:"Regions"`
}

DescribeRegionsResponse is the response struct for api DescribeRegions

func CreateDescribeRegionsResponse

func CreateDescribeRegionsResponse() (response *DescribeRegionsResponse)

CreateDescribeRegionsResponse creates a response to parse from DescribeRegions response

type GetSentinelAppSumMetricRequest

type GetSentinelAppSumMetricRequest struct {
	*requests.RpcRequest
	EndTime        string `position:"Query" name:"EndTime"`
	StartTime      string `position:"Query" name:"StartTime"`
	AppName        string `position:"Query" name:"AppName"`
	AcceptLanguage string `position:"Query" name:"AcceptLanguage"`
	Namespace      string `position:"Query" name:"Namespace"`
}

GetSentinelAppSumMetricRequest is the request struct for api GetSentinelAppSumMetric

func CreateGetSentinelAppSumMetricRequest

func CreateGetSentinelAppSumMetricRequest() (request *GetSentinelAppSumMetricRequest)

CreateGetSentinelAppSumMetricRequest creates a request to invoke GetSentinelAppSumMetric API

type GetSentinelAppSumMetricResponse

type GetSentinelAppSumMetricResponse struct {
	*responses.BaseResponse
	RequestId  string     `json:"RequestId" xml:"RequestId"`
	Code       string     `json:"Code" xml:"Code"`
	Success    bool       `json:"Success" xml:"Success"`
	Message    string     `json:"Message" xml:"Message"`
	MetricData MetricData `json:"MetricData" xml:"MetricData"`
}

GetSentinelAppSumMetricResponse is the response struct for api GetSentinelAppSumMetric

func CreateGetSentinelAppSumMetricResponse

func CreateGetSentinelAppSumMetricResponse() (response *GetSentinelAppSumMetricResponse)

CreateGetSentinelAppSumMetricResponse creates a response to parse from GetSentinelAppSumMetric response

type MetricData

type MetricData struct {
	UserId       string  `json:"UserId" xml:"UserId"`
	Namespace    string  `json:"Namespace" xml:"Namespace"`
	AppName      string  `json:"AppName" xml:"AppName"`
	PassCount    float64 `json:"PassCount" xml:"PassCount"`
	BlockCount   float64 `json:"BlockCount" xml:"BlockCount"`
	TotalCount   float64 `json:"TotalCount" xml:"TotalCount"`
	AvgRt        float64 `json:"AvgRt" xml:"AvgRt"`
	MachineCount int64   `json:"MachineCount" xml:"MachineCount"`
}

MetricData is a nested struct in ahas_openapi response

type Regions

type Regions struct {
	Data []Data `json:"Data" xml:"Data"`
}

Regions is a nested struct in ahas_openapi response

Jump to

Keyboard shortcuts

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