All Products
Search
Document Center

Key Management Service:Install KMS instance SDK (C#)

Last Updated:Feb 11, 2025

You can integrate the Key Management Service (KMS) instance SDK to perform cryptographic operations and obtain secret values using keys. This topic describes how to install the KMS instance SDK (C#).

Network environment description

Ensure the application's runtime environment has network access to the KMS instance VPC address <KMS_INSTANCE_ID>.cryptoservice.kms.aliyuncs.com.

  • If the application's runtime environment and the KMS instance are in both the same region and VPC, they are connected by default with no additional configuration required.

  • If the application runtime environment and the KMS instance are in the same region but different VPCs, you must associate the VPC of the application with the KMS instance. For instructions, see how to access the KMS instance from multiple VPCs in the same region.

  • If the application's runtime environment is within a local IDC, refer to this guide for configuring network connectivity to ensure access to the KMS instance without using domain names.

Prerequisites

Environment preparation

Version requirements: .NET Framework 5.0 or later, or .NET Standard 2.0 or later.

Install the SDK

Install the SDK using the .NET command-line interface (CLI).

dotnet add package AlibabaCloud.Dkms.Gcs.Sdk
Note

We recommend using the latest version of the SDK. For version details, see the open source code repository.