- Notifications
You must be signed in to change notification settings - Fork266
The Alibaba Cloud V1.0 Go SDK has entered End-of-Support (March 1, 2025) and is no longer recommended for use.
License
aliyun/alibaba-cloud-sdk-go
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The Alibaba Cloud V1.0 Go SDK has entered End-of-Support (March 1, 2025) and is no longer recommended for use. New users should directly use the V2.0 Go SDK; users who have already integrated the V1.0 Go SDK are also advised to migrate to the V2.0 Go SDK.
Troubleshoot Provide OpenAPI diagnosis service to help developers locate quickly and provide solutions for developers throughRequestID
orerror message
.
Alibaba Cloud OpenAPI Developer Portal provides the ability to call the cloud product OpenAPI online, and dynamically generate SDK Example code and quick retrieval interface, which can significantly reduce the difficulty of using the cloud API.
- It's necessary for you to make sure your system meet theRequirements, such as installing a Go environment which is new than 1.13.x.
Usego get
to install SDK:
go get -u github.com/aliyun/alibaba-cloud-sdk-go/sdk
Before you begin, you need to sign up for an Alibaba Cloud account and retrieve yourCredentials.
package mainimport"github.com/aliyun/alibaba-cloud-sdk-go/sdk"funcmain() {client,err:=sdk.NewClientWithAccessKey("REGION_ID","ACCESS_KEY_ID","ACCESS_KEY_SECRET")iferr!=nil {// Handle exceptionspanic(err) }}
package mainimport"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"funcmain() {request:=requests.NewCommonRequest()// Make a common requestrequest.Method="GET"// Set request methodrequest.Product="CS"// Specify productrequest.Domain="cs.aliyuncs.com"// Location Service will not be enabled if the host is specified. For example, service with aCertification type-Bearer Token should be specifiedrequest.Version="2015-12-15"// Specify product versionrequest.PathPattern="/clusters/[ClusterId]"// Specify path rule with ROA-stylerequest.Scheme="https"// Set request scheme. Default: httprequest.ApiName="DescribeCluster"// Specify product interfacerequest.QueryParams["ClusterId"]="123456"// Assign values to parameters in the pathrequest.QueryParams["RegionId"]="region_id"// Specify the requested regionId, if not specified, use the client regionId, then default regionIdrequest.TransToAcsRequest()// Trans commonrequest to acsRequest, which is used by client.}
package mainimport"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"funcmain() {request:=requests.NewCommonRequest()// Make a common requestrequest.Method="POST"// Set request methodrequest.Product="Ecs"// Specify productrequest.Domain="ecs.aliyuncs.com"// Location Service will not be enabled if the host is specified. For example, service with a Certification type-Bearer Token should be specifiedrequest.Version="2014-05-26"// Specify product versionrequest.Scheme="https"// Set request scheme. Default: httprequest.ApiName="CreateInstance"// Specify product interfacerequest.QueryParams["InstanceType"]="ecs.g5.large"// Assign values to parameters in the pathrequest.QueryParams["RegionId"]="region_id"// Specify the requested regionId, if not specified, use the client regionId, then default regionIdrequest.TransToAcsRequest()// Trans commonrequest to acsRequest, which is used by client.}
- Requirements
- Installation
- Client & Credentials
- SSL Verify
- Proxy
- Timeout
- Debug
- Logger
- Concurrent
- Asynchronous Call
- Package Management
- Endpoint
Opening an Issue, Issues not conforming to the guidelines may be closed immediately.
Please make sure to read theContributing Guide before making a pull request.
About
The Alibaba Cloud V1.0 Go SDK has entered End-of-Support (March 1, 2025) and is no longer recommended for use.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.