Documentation ¶
Overview ¶
Package cm provides the client and types for making API requests to Cloud Monitor.
欢迎使用云服务器(Cloud Virtual Machine)
腾讯云服务器(Cloud Virtual Machine,以下又称CVM)运行在腾讯数据中心,它提供了可以弹性伸缩的计算服务,可以根据业务需要来构建和托管软件系统。
云服务器向用户提供弹性的计算、存储和网络资源。用户可以使用本文档介绍的 API,并参照相应的示例,对云服务器进行相关操作:如创建、销毁、更改带宽、重启等;支持的全部操作可参见API概览页 (https://cloud.tencent.com/document/api/213/569)。
See cm package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/cm/
Using the Client ¶
To contact Cloud Monitor with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See sdf.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the Cloud Monitor client CM for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/cm/#New
Index ¶
- Constants
- type CM
- func (c *CM) DescribeBaseMetrics(input *DescribeBaseMetricsInput) (*DescribeBaseMetricsOutput, error)
- func (c *CM) DescribeBaseMetricsRequest(input *DescribeBaseMetricsInput) (req *request.Request, output *DescribeBaseMetricsOutput)
- func (c *CM) DescribeBaseMetricsWithContext(ctx sdf.Context, input *DescribeBaseMetricsInput, opts ...request.Option) (*DescribeBaseMetricsOutput, error)
- func (c *CM) GetMonitorData(input *GetMonitorDataInput) (*GetMonitorDataOutput, error)
- func (c *CM) GetMonitorDataRequest(input *GetMonitorDataInput) (req *request.Request, output *GetMonitorDataOutput)
- func (c *CM) GetMonitorDataWithContext(ctx sdf.Context, input *GetMonitorDataInput, opts ...request.Option) (*GetMonitorDataOutput, error)
- type DescribeBaseMetricsInput
- func (s DescribeBaseMetricsInput) GoString() string
- func (s *DescribeBaseMetricsInput) SetMetricName(v string) *DescribeBaseMetricsInput
- func (s *DescribeBaseMetricsInput) SetNamespace(v string) *DescribeBaseMetricsInput
- func (s *DescribeBaseMetricsInput) SetRegion(v string) *DescribeBaseMetricsInput
- func (s DescribeBaseMetricsInput) String() string
- func (s *DescribeBaseMetricsInput) Validate() error
- type DescribeBaseMetricsOutput
- func (s DescribeBaseMetricsOutput) GoString() string
- func (s *DescribeBaseMetricsOutput) SetCode(v int64) *DescribeBaseMetricsOutput
- func (s *DescribeBaseMetricsOutput) SetCodeDesc(v string) *DescribeBaseMetricsOutput
- func (s *DescribeBaseMetricsOutput) SetMessage(v string) *DescribeBaseMetricsOutput
- func (s *DescribeBaseMetricsOutput) SetMetricSet(v []*Metric) *DescribeBaseMetricsOutput
- func (s DescribeBaseMetricsOutput) String() string
- type DimensionsFilter
- type GetMonitorDataInput
- func (s GetMonitorDataInput) GoString() string
- func (s *GetMonitorDataInput) SetEndTime(v string) *GetMonitorDataInput
- func (s *GetMonitorDataInput) SetFilters(v []*DimensionsFilter) *GetMonitorDataInput
- func (s *GetMonitorDataInput) SetMetricName(v string) *GetMonitorDataInput
- func (s *GetMonitorDataInput) SetNamespace(v string) *GetMonitorDataInput
- func (s *GetMonitorDataInput) SetPeriod(v int64) *GetMonitorDataInput
- func (s *GetMonitorDataInput) SetRegion(v string) *GetMonitorDataInput
- func (s *GetMonitorDataInput) SetStartTime(v string) *GetMonitorDataInput
- func (s GetMonitorDataInput) String() string
- type GetMonitorDataOutput
- func (s GetMonitorDataOutput) GoString() string
- func (s *GetMonitorDataOutput) SetCode(v int64) *GetMonitorDataOutput
- func (s *GetMonitorDataOutput) SetCodeDesc(v string) *GetMonitorDataOutput
- func (s *GetMonitorDataOutput) SetDataPoints(v []*float64) *GetMonitorDataOutput
- func (s *GetMonitorDataOutput) SetEndTime(v string) *GetMonitorDataOutput
- func (s *GetMonitorDataOutput) SetMessage(v string) *GetMonitorDataOutput
- func (s *GetMonitorDataOutput) SetMetricName(v string) *GetMonitorDataOutput
- func (s *GetMonitorDataOutput) SetPeriod(v int64) *GetMonitorDataOutput
- func (s *GetMonitorDataOutput) SetStartTime(v string) *GetMonitorDataOutput
- func (s GetMonitorDataOutput) String() string
- type Metric
- func (s Metric) GoString() string
- func (s *Metric) SetDimensions(v string) *Metric
- func (s *Metric) SetMetricCName(v string) *Metric
- func (s *Metric) SetMetricName(v string) *Metric
- func (s *Metric) SetNamespace(v string) *Metric
- func (s *Metric) SetPeriod(v []*int64) *Metric
- func (s *Metric) SetUnit(v string) *Metric
- func (s *Metric) SetUnitCname(v string) *Metric
- func (s Metric) String() string
Constants ¶
const ( // RegionEnumApBeijing is a RegionEnum enum value RegionEnumApBeijing = "ap-beijing" // RegionEnumApChengdu is a RegionEnum enum value RegionEnumApChengdu = "ap-chengdu" // RegionEnumApGuangzhou is a RegionEnum enum value RegionEnumApGuangzhou = "ap-guangzhou" // RegionEnumApGuangzhouOpen is a RegionEnum enum value RegionEnumApGuangzhouOpen = "ap-guangzhou-open" // RegionEnumApHongkong is a RegionEnum enum value RegionEnumApHongkong = "ap-hongkong" // RegionEnumApShanghai is a RegionEnum enum value RegionEnumApShanghai = "ap-shanghai" // RegionEnumApSingapore is a RegionEnum enum value RegionEnumApSingapore = "ap-singapore" // RegionEnumEuFrankfurt is a RegionEnum enum value RegionEnumEuFrankfurt = "eu-frankfurt" // RegionEnumNaSiliconvalley is a RegionEnum enum value RegionEnumNaSiliconvalley = "na-siliconvalley" // RegionEnumNaToronto is a RegionEnum enum value RegionEnumNaToronto = "na-toronto" // RegionEnumApShanghaiFsi is a RegionEnum enum value RegionEnumApShanghaiFsi = "ap-shanghai-fsi" // RegionEnumApShenzhenFsi is a RegionEnum enum value RegionEnumApShenzhenFsi = "ap-shenzhen-fsi" )
const ( ServiceName = "monitor" // Service endpoint prefix API calls made to. EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CM ¶
CM provides the API operation methods for making requests to Cloud Monitor. See this package's package overview docs for details on the service.
CM methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*sdf.Config) *CM
New creates a new instance of the CM client with a session. If additional configuration is needed for the client instance use the optional sdf.Config parameter to add your extra config.
Example:
// Create a CM client from just a session. svc := cm.New(mySession) // Create a CM client with additional configuration svc := cm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*CM) DescribeBaseMetrics ¶
func (c *CM) DescribeBaseMetrics(input *DescribeBaseMetricsInput) (*DescribeBaseMetricsOutput, error)
DescribeBaseMetrics API operation for Cloud Monitor.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Cloud Monitor's API operation DescribeBaseMetrics for usage and error information.
func (*CM) DescribeBaseMetricsRequest ¶
func (c *CM) DescribeBaseMetricsRequest(input *DescribeBaseMetricsInput) (req *request.Request, output *DescribeBaseMetricsOutput)
DescribeBaseMetricsRequest generates a "aws/request.Request" representing the client's request for the DescribeBaseMetrics operation. The "output" return value will be populated with the request's response once the request completes successfuly.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See DescribeBaseMetrics for more information on using the DescribeBaseMetrics API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the DescribeBaseMetricsRequest method. req, resp := client.DescribeBaseMetricsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
func (*CM) DescribeBaseMetricsWithContext ¶
func (c *CM) DescribeBaseMetricsWithContext(ctx sdf.Context, input *DescribeBaseMetricsInput, opts ...request.Option) (*DescribeBaseMetricsOutput, error)
DescribeBaseMetricsWithContext is the same as DescribeBaseMetrics with the addition of the ability to pass a context and additional request options.
See DescribeBaseMetrics for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*CM) GetMonitorData ¶
func (c *CM) GetMonitorData(input *GetMonitorDataInput) (*GetMonitorDataOutput, error)
GetMonitorData API operation for Cloud Monitor.
本接口 (DescribeInstances) 用于查询一个或多个实例的详细信息。
接口请求域名:cvm.api.qcloud.com
- 可以根据实例ID、实例名称或者实例计费模式等信息来查询实例的详细信息。过滤信息详细请见过滤器Filter。
- 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的实例。
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Cloud Monitor's API operation GetMonitorData for usage and error information.
func (*CM) GetMonitorDataRequest ¶
func (c *CM) GetMonitorDataRequest(input *GetMonitorDataInput) (req *request.Request, output *GetMonitorDataOutput)
GetMonitorDataRequest generates a "aws/request.Request" representing the client's request for the GetMonitorData operation. The "output" return value will be populated with the request's response once the request completes successfuly.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See GetMonitorData for more information on using the GetMonitorData API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the GetMonitorDataRequest method. req, resp := client.GetMonitorDataRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
func (*CM) GetMonitorDataWithContext ¶
func (c *CM) GetMonitorDataWithContext(ctx sdf.Context, input *GetMonitorDataInput, opts ...request.Option) (*GetMonitorDataOutput, error)
GetMonitorDataWithContext is the same as GetMonitorData with the addition of the ability to pass a context and additional request options.
See GetMonitorData for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type DescribeBaseMetricsInput ¶
type DescribeBaseMetricsInput struct { MetricName *string `locationName:"metricName" type:"string"` // Namespace is a required field Namespace *string `locationName:"namespace" type:"string" required:"true"` Region *string `type:"string" enum:"RegionEnum"` // contains filtered or unexported fields }
func (DescribeBaseMetricsInput) GoString ¶
func (s DescribeBaseMetricsInput) GoString() string
GoString returns the string representation
func (*DescribeBaseMetricsInput) SetMetricName ¶
func (s *DescribeBaseMetricsInput) SetMetricName(v string) *DescribeBaseMetricsInput
SetMetricName sets the MetricName field's value.
func (*DescribeBaseMetricsInput) SetNamespace ¶
func (s *DescribeBaseMetricsInput) SetNamespace(v string) *DescribeBaseMetricsInput
SetNamespace sets the Namespace field's value.
func (*DescribeBaseMetricsInput) SetRegion ¶
func (s *DescribeBaseMetricsInput) SetRegion(v string) *DescribeBaseMetricsInput
SetRegion sets the Region field's value.
func (DescribeBaseMetricsInput) String ¶
func (s DescribeBaseMetricsInput) String() string
String returns the string representation
func (*DescribeBaseMetricsInput) Validate ¶
func (s *DescribeBaseMetricsInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type DescribeBaseMetricsOutput ¶
type DescribeBaseMetricsOutput struct { Code *int64 `locationName:"code" type:"integer"` CodeDesc *string `locationName:"codeDesc" type:"string"` Message *string `locationName:"message" type:"string"` MetricSet []*Metric `locationName:"metricSet" type:"list"` // contains filtered or unexported fields }
func (DescribeBaseMetricsOutput) GoString ¶
func (s DescribeBaseMetricsOutput) GoString() string
GoString returns the string representation
func (*DescribeBaseMetricsOutput) SetCode ¶
func (s *DescribeBaseMetricsOutput) SetCode(v int64) *DescribeBaseMetricsOutput
SetCode sets the Code field's value.
func (*DescribeBaseMetricsOutput) SetCodeDesc ¶
func (s *DescribeBaseMetricsOutput) SetCodeDesc(v string) *DescribeBaseMetricsOutput
SetCodeDesc sets the CodeDesc field's value.
func (*DescribeBaseMetricsOutput) SetMessage ¶
func (s *DescribeBaseMetricsOutput) SetMessage(v string) *DescribeBaseMetricsOutput
SetMessage sets the Message field's value.
func (*DescribeBaseMetricsOutput) SetMetricSet ¶
func (s *DescribeBaseMetricsOutput) SetMetricSet(v []*Metric) *DescribeBaseMetricsOutput
SetMetricSet sets the MetricSet field's value.
func (DescribeBaseMetricsOutput) String ¶
func (s DescribeBaseMetricsOutput) String() string
String returns the string representation
type DimensionsFilter ¶
type DimensionsFilter struct { Name *string `locationName:"name" type:"string"` Values *string `locationName:"value" type:"string"` // contains filtered or unexported fields }
func (DimensionsFilter) GoString ¶
func (s DimensionsFilter) GoString() string
GoString returns the string representation
func (*DimensionsFilter) SetName ¶
func (s *DimensionsFilter) SetName(v string) *DimensionsFilter
SetName sets the Name field's value.
func (*DimensionsFilter) SetValues ¶
func (s *DimensionsFilter) SetValues(v string) *DimensionsFilter
SetValues sets the Values field's value.
func (DimensionsFilter) String ¶
func (s DimensionsFilter) String() string
String returns the string representation
type GetMonitorDataInput ¶
type GetMonitorDataInput struct { EndTime *string `locationName:"endTime" type:"string"` Filters []*DimensionsFilter `locationName:"dimensions" type:"list" flattened:"true"` MetricName *string `locationName:"metricName" type:"string"` Namespace *string `locationName:"namespace" type:"string"` Period *int64 `locationName:"period" type:"integer"` Region *string `type:"string" enum:"RegionEnum"` StartTime *string `locationName:"startTime" type:"string"` // contains filtered or unexported fields }
func (GetMonitorDataInput) GoString ¶
func (s GetMonitorDataInput) GoString() string
GoString returns the string representation
func (*GetMonitorDataInput) SetEndTime ¶
func (s *GetMonitorDataInput) SetEndTime(v string) *GetMonitorDataInput
SetEndTime sets the EndTime field's value.
func (*GetMonitorDataInput) SetFilters ¶
func (s *GetMonitorDataInput) SetFilters(v []*DimensionsFilter) *GetMonitorDataInput
SetFilters sets the Filters field's value.
func (*GetMonitorDataInput) SetMetricName ¶
func (s *GetMonitorDataInput) SetMetricName(v string) *GetMonitorDataInput
SetMetricName sets the MetricName field's value.
func (*GetMonitorDataInput) SetNamespace ¶
func (s *GetMonitorDataInput) SetNamespace(v string) *GetMonitorDataInput
SetNamespace sets the Namespace field's value.
func (*GetMonitorDataInput) SetPeriod ¶
func (s *GetMonitorDataInput) SetPeriod(v int64) *GetMonitorDataInput
SetPeriod sets the Period field's value.
func (*GetMonitorDataInput) SetRegion ¶
func (s *GetMonitorDataInput) SetRegion(v string) *GetMonitorDataInput
SetRegion sets the Region field's value.
func (*GetMonitorDataInput) SetStartTime ¶
func (s *GetMonitorDataInput) SetStartTime(v string) *GetMonitorDataInput
SetStartTime sets the StartTime field's value.
func (GetMonitorDataInput) String ¶
func (s GetMonitorDataInput) String() string
String returns the string representation
type GetMonitorDataOutput ¶
type GetMonitorDataOutput struct { Code *int64 `locationName:"code" type:"integer"` CodeDesc *string `locationName:"codeDesc" type:"string"` DataPoints []*float64 `locationName:"dataPoints" type:"list"` EndTime *string `locationName:"endTime" type:"string"` Message *string `locationName:"message" type:"string"` MetricName *string `locationName:"metricName" type:"string"` Period *int64 `locationName:"period" type:"integer"` StartTime *string `locationName:"startTime" type:"string"` // contains filtered or unexported fields }
func (GetMonitorDataOutput) GoString ¶
func (s GetMonitorDataOutput) GoString() string
GoString returns the string representation
func (*GetMonitorDataOutput) SetCode ¶
func (s *GetMonitorDataOutput) SetCode(v int64) *GetMonitorDataOutput
SetCode sets the Code field's value.
func (*GetMonitorDataOutput) SetCodeDesc ¶
func (s *GetMonitorDataOutput) SetCodeDesc(v string) *GetMonitorDataOutput
SetCodeDesc sets the CodeDesc field's value.
func (*GetMonitorDataOutput) SetDataPoints ¶
func (s *GetMonitorDataOutput) SetDataPoints(v []*float64) *GetMonitorDataOutput
SetDataPoints sets the DataPoints field's value.
func (*GetMonitorDataOutput) SetEndTime ¶
func (s *GetMonitorDataOutput) SetEndTime(v string) *GetMonitorDataOutput
SetEndTime sets the EndTime field's value.
func (*GetMonitorDataOutput) SetMessage ¶
func (s *GetMonitorDataOutput) SetMessage(v string) *GetMonitorDataOutput
SetMessage sets the Message field's value.
func (*GetMonitorDataOutput) SetMetricName ¶
func (s *GetMonitorDataOutput) SetMetricName(v string) *GetMonitorDataOutput
SetMetricName sets the MetricName field's value.
func (*GetMonitorDataOutput) SetPeriod ¶
func (s *GetMonitorDataOutput) SetPeriod(v int64) *GetMonitorDataOutput
SetPeriod sets the Period field's value.
func (*GetMonitorDataOutput) SetStartTime ¶
func (s *GetMonitorDataOutput) SetStartTime(v string) *GetMonitorDataOutput
SetStartTime sets the StartTime field's value.
func (GetMonitorDataOutput) String ¶
func (s GetMonitorDataOutput) String() string
String returns the string representation
type Metric ¶
type Metric struct { Dimensions *string `locationName:"dimensions" type:"string"` MetricCName *string `locationName:"metricCname" type:"string"` MetricName *string `locationName:"metricName" type:"string"` Namespace *string `locationName:"namespace" type:"string"` Period []*int64 `locationName:"period" type:"list"` Unit *string `locationName:"unit" type:"string"` UnitCname *string `locationName:"unitCname" type:"string"` // contains filtered or unexported fields }
func (*Metric) SetDimensions ¶
SetDimensions sets the Dimensions field's value.
func (*Metric) SetMetricCName ¶
SetMetricCName sets the MetricCName field's value.
func (*Metric) SetMetricName ¶
SetMetricName sets the MetricName field's value.
func (*Metric) SetNamespace ¶
SetNamespace sets the Namespace field's value.
func (*Metric) SetUnitCname ¶
SetUnitCname sets the UnitCname field's value.