Install KMS instance SDK (Go)

更新时间:
复制 MD 格式

The KMS instance SDK lets you run cryptographic operations and retrieve secret values using keys managed by Key Management Service (KMS). This guide walks you through installing the Go SDK.

Prerequisites

Before you begin, make sure you have:

Network requirements

Your application must be able to reach the KMS instance VPC address: <KMS_INSTANCE_ID>.cryptoservice.kms.aliyuncs.com.

How you set this up depends on where your application runs:

Install the SDK

Choose either method.

Method 1: go get

go get -u github.com/aliyun/alibabacloud-dkms-gcs-go-sdk

Method 2: go.mod

Add the dependency to your go.mod file:

require (
    github.com/aliyun/alibabacloud-dkms-gcs-go-sdk <VERSION>
)

Replace <VERSION> with the latest version. To find the current version, check the open-source repository.

What's next