Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

cms.CreateCursorRequest() 在最新版本里面没有 #590

@zerophpchina

Description

@zerophpchina
  • 产品和接口: "github.com/aliyun/alibaba-cloud-sdk-go/services/cms"

  • 平台: golang

  • 最小代码:

  • import (
    "fmt"
    "github.com/aliyun/alibaba-cloud-sdk-go/sdk"
    "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
    "github.com/aliyun/alibaba-cloud-sdk-go/services/cms"
    "os"

    "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
    )
    func main() {
    config := sdk.NewConfig()

    // Please ensure that the environment variables ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set.
    credential := credentials.NewAccessKeyCredential(os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"), os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"))
    /* use STS Token
    credential := credentials.NewStsTokenCredential(os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"), os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"), os.Getenv("ALIBABA_CLOUD_SECURITY_TOKEN"))
    */
    client, err := cms.NewClientWithOptions("cn-hangzhou", config, credential)
    if err != nil {
    panic(err)
    }

    request := cms.CreateCursorRequest()

    request.Scheme = "https"

    request.Namespace = "acs_rds_dashboard"
    request.Metric = "ConnectionUsage"
    request.Period = requests.NewInteger(60)
    request.StartTime = "1641627000000"
    request.EndTime = "1641645000000"

    response, err := client.Cursor(request)
    if err != nil {
    fmt.Print(err.Error())
    }
    fmt.Printf("response is %#v\n", response)
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions