Documentation ¶
Index ¶
- type KmsClient
- func (c *KmsClient) CancelKeyDeletion(request *kms.CancelKeyDeletionRequest) (*kms.CancelKeyDeletionResponse, error)
- func (c *KmsClient) CancelKeyVersionDeletion(request *kms.CancelKeyVersionDeletionRequest) (*kms.CancelKeyVersionDeletionResponse, error)
- func (c *KmsClient) CreateKey(request *kms.CreateKeyRequest) (*kms.CreateKeyResponse, error)
- func (c *KmsClient) CreateSecret(request *kms.CreateSecretRequest) (*kms.CreateSecretResponse, error)
- func (c *KmsClient) CreateSecretVersion(request *kms.CreateSecretVersionRequest) (*kms.CreateSecretVersionResponse, error)
- func (c *KmsClient) Decrypt(request *kms.DecryptRequest) (*kms.DecryptResponse, error)
- func (c *KmsClient) DeleteSecret(request *kms.DeleteSecretRequest) (*kms.DeleteSecretResponse, error)
- func (c *KmsClient) DeleteSecretVersion(request *kms.DeleteSecretVersionRequest) (*kms.DeleteSecretVersionResponse, error)
- func (c *KmsClient) DescribeKey(request *kms.DescribeKeyRequest) (*kms.DescribeKeyResponse, error)
- func (c *KmsClient) DescribeKeyDetail(request *kms.DescribeKeyDetailRequest) (*kms.DescribeKeyDetailResponse, error)
- func (c *KmsClient) DescribeKeyList(request *kms.DescribeKeyListRequest) (*kms.DescribeKeyListResponse, error)
- func (c *KmsClient) DescribeSecretList(request *kms.DescribeSecretListRequest) (*kms.DescribeSecretListResponse, error)
- func (c *KmsClient) DescribeSecretVersionInfo(request *kms.DescribeSecretVersionInfoRequest) (*kms.DescribeSecretVersionInfoResponse, error)
- func (c *KmsClient) DescribeSecretVersionList(request *kms.DescribeSecretVersionListRequest) (*kms.DescribeSecretVersionListResponse, error)
- func (c *KmsClient) DisableKey(request *kms.DisableKeyRequest) (*kms.DisableKeyResponse, error)
- func (c *KmsClient) DisableKeyVersion(request *kms.DisableKeyVersionRequest) (*kms.DisableKeyVersionResponse, error)
- func (c *KmsClient) DisableLogger()
- func (c *KmsClient) DisableSecret(request *kms.DisableSecretRequest) (*kms.DisableSecretResponse, error)
- func (c *KmsClient) DisableSecretVersion(request *kms.DisableSecretVersionRequest) (*kms.DisableSecretVersionResponse, error)
- func (c *KmsClient) EnableKey(request *kms.EnableKeyRequest) (*kms.EnableKeyResponse, error)
- func (c *KmsClient) EnableKeyVersion(request *kms.EnableKeyVersionRequest) (*kms.EnableKeyVersionResponse, error)
- func (c *KmsClient) EnableSecret(request *kms.EnableSecretRequest) (*kms.EnableSecretResponse, error)
- func (c *KmsClient) EnableSecretVersion(request *kms.EnableSecretVersionRequest) (*kms.EnableSecretVersionResponse, error)
- func (c *KmsClient) Encrypt(request *kms.EncryptRequest) (*kms.EncryptResponse, error)
- func (c *KmsClient) ExportSecret(request *kms.ExportSecretRequest) (*kms.ExportSecretResponse, error)
- func (c *KmsClient) GenerateDataKey(request *kms.GenerateDataKeyRequest) (*kms.GenerateDataKeyResponse, error)
- func (c *KmsClient) GetPublicKey(request *kms.GetPublicKeyRequest) (*kms.GetPublicKeyResponse, error)
- func (c *KmsClient) ImportSecret(request *kms.ImportSecretRequest) (*kms.ImportSecretResponse, error)
- func (c *KmsClient) KeyRotation(request *kms.KeyRotationRequest) (*kms.KeyRotationResponse, error)
- func (c *KmsClient) ScheduleKeyDeletion(request *kms.ScheduleKeyDeletionRequest) (*kms.ScheduleKeyDeletionResponse, error)
- func (c *KmsClient) ScheduleKeyVersionDeletion(request *kms.ScheduleKeyVersionDeletionRequest) (*kms.ScheduleKeyVersionDeletionResponse, error)
- func (c *KmsClient) SetConfig(config *core.Config)
- func (c *KmsClient) SetLogger(logger core.Logger)
- func (c *KmsClient) Sign(request *kms.SignRequest) (*kms.SignResponse, error)
- func (c *KmsClient) UpdateKeyDescription(request *kms.UpdateKeyDescriptionRequest) (*kms.UpdateKeyDescriptionResponse, error)
- func (c *KmsClient) UpdateSecret(request *kms.UpdateSecretRequest) (*kms.UpdateSecretResponse, error)
- func (c *KmsClient) UpdateSecretVersion(request *kms.UpdateSecretVersionRequest) (*kms.UpdateSecretVersionResponse, error)
- func (c *KmsClient) Validate(request *kms.ValidateRequest) (*kms.ValidateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KmsClient ¶
type KmsClient struct {
core.JDCloudClient
}
func NewKmsClient ¶
func NewKmsClient(credential *core.Credential) *KmsClient
func (*KmsClient) CancelKeyDeletion ¶
func (c *KmsClient) CancelKeyDeletion(request *kms.CancelKeyDeletionRequest) (*kms.CancelKeyDeletionResponse, error)
取消删除密钥
func (*KmsClient) CancelKeyVersionDeletion ¶
func (c *KmsClient) CancelKeyVersionDeletion(request *kms.CancelKeyVersionDeletionRequest) (*kms.CancelKeyVersionDeletionResponse, error)
取消删除指定版本密钥
func (*KmsClient) CreateKey ¶
func (c *KmsClient) CreateKey(request *kms.CreateKeyRequest) (*kms.CreateKeyResponse, error)
创建一个CMK(用户主密钥),默认为启用状态
func (*KmsClient) CreateSecret ¶
func (c *KmsClient) CreateSecret(request *kms.CreateSecretRequest) (*kms.CreateSecretResponse, error)
创建机密
func (*KmsClient) CreateSecretVersion ¶
func (c *KmsClient) CreateSecretVersion(request *kms.CreateSecretVersionRequest) (*kms.CreateSecretVersionResponse, error)
创建机密新的版本,默认为已启用状态
func (*KmsClient) Decrypt ¶
func (c *KmsClient) Decrypt(request *kms.DecryptRequest) (*kms.DecryptResponse, error)
使用密钥对数据进行解密,针对非对称密钥:使用私钥进行加密
func (*KmsClient) DeleteSecret ¶
func (c *KmsClient) DeleteSecret(request *kms.DeleteSecretRequest) (*kms.DeleteSecretResponse, error)
删除机密
func (*KmsClient) DeleteSecretVersion ¶
func (c *KmsClient) DeleteSecretVersion(request *kms.DeleteSecretVersionRequest) (*kms.DeleteSecretVersionResponse, error)
删除指定版本机密
func (*KmsClient) DescribeKey ¶
func (c *KmsClient) DescribeKey(request *kms.DescribeKeyRequest) (*kms.DescribeKeyResponse, error)
获取密钥详情
func (*KmsClient) DescribeKeyDetail ¶
func (c *KmsClient) DescribeKeyDetail(request *kms.DescribeKeyDetailRequest) (*kms.DescribeKeyDetailResponse, error)
获取版本详情
func (*KmsClient) DescribeKeyList ¶
func (c *KmsClient) DescribeKeyList(request *kms.DescribeKeyListRequest) (*kms.DescribeKeyListResponse, error)
获取密钥列表
func (*KmsClient) DescribeSecretList ¶
func (c *KmsClient) DescribeSecretList(request *kms.DescribeSecretListRequest) (*kms.DescribeSecretListResponse, error)
获取机密列表
func (*KmsClient) DescribeSecretVersionInfo ¶
func (c *KmsClient) DescribeSecretVersionInfo(request *kms.DescribeSecretVersionInfoRequest) (*kms.DescribeSecretVersionInfoResponse, error)
获取指定机密版本的详细信息
func (*KmsClient) DescribeSecretVersionList ¶
func (c *KmsClient) DescribeSecretVersionList(request *kms.DescribeSecretVersionListRequest) (*kms.DescribeSecretVersionListResponse, error)
获取机密详情
func (*KmsClient) DisableKey ¶
func (c *KmsClient) DisableKey(request *kms.DisableKeyRequest) (*kms.DisableKeyResponse, error)
禁用当前状态为`已启用`的密钥
func (*KmsClient) DisableKeyVersion ¶
func (c *KmsClient) DisableKeyVersion(request *kms.DisableKeyVersionRequest) (*kms.DisableKeyVersionResponse, error)
禁用指定版本密钥
func (*KmsClient) DisableLogger ¶ added in v1.13.0
func (c *KmsClient) DisableLogger()
func (*KmsClient) DisableSecret ¶
func (c *KmsClient) DisableSecret(request *kms.DisableSecretRequest) (*kms.DisableSecretResponse, error)
禁用机密
func (*KmsClient) DisableSecretVersion ¶
func (c *KmsClient) DisableSecretVersion(request *kms.DisableSecretVersionRequest) (*kms.DisableSecretVersionResponse, error)
禁用指定版本机密
func (*KmsClient) EnableKey ¶
func (c *KmsClient) EnableKey(request *kms.EnableKeyRequest) (*kms.EnableKeyResponse, error)
启用当前状态为`已禁用`的密钥
func (*KmsClient) EnableKeyVersion ¶
func (c *KmsClient) EnableKeyVersion(request *kms.EnableKeyVersionRequest) (*kms.EnableKeyVersionResponse, error)
启用指定版本密钥
func (*KmsClient) EnableSecret ¶
func (c *KmsClient) EnableSecret(request *kms.EnableSecretRequest) (*kms.EnableSecretResponse, error)
启用机密
func (*KmsClient) EnableSecretVersion ¶
func (c *KmsClient) EnableSecretVersion(request *kms.EnableSecretVersionRequest) (*kms.EnableSecretVersionResponse, error)
启用指定版本机密
func (*KmsClient) Encrypt ¶
func (c *KmsClient) Encrypt(request *kms.EncryptRequest) (*kms.EncryptResponse, error)
使用密钥对数据进行加密,针对非对称密钥:使用公钥进行加密,仅支持RSA_PKCS1_PADDING填充方式,最大加密数据长度为245字节
func (*KmsClient) ExportSecret ¶
func (c *KmsClient) ExportSecret(request *kms.ExportSecretRequest) (*kms.ExportSecretResponse, error)
导出机密
func (*KmsClient) GenerateDataKey ¶
func (c *KmsClient) GenerateDataKey(request *kms.GenerateDataKeyRequest) (*kms.GenerateDataKeyResponse, error)
从KMS中获取一对数据密钥的明文/密文
func (*KmsClient) GetPublicKey ¶ added in v1.13.0
func (c *KmsClient) GetPublicKey(request *kms.GetPublicKeyRequest) (*kms.GetPublicKeyResponse, error)
获取非对称密钥的公钥
func (*KmsClient) ImportSecret ¶
func (c *KmsClient) ImportSecret(request *kms.ImportSecretRequest) (*kms.ImportSecretResponse, error)
导入机密
func (*KmsClient) KeyRotation ¶
func (c *KmsClient) KeyRotation(request *kms.KeyRotationRequest) (*kms.KeyRotationResponse, error)
立即轮换密钥,自动轮换周期顺延-支持对称密钥
func (*KmsClient) ScheduleKeyDeletion ¶
func (c *KmsClient) ScheduleKeyDeletion(request *kms.ScheduleKeyDeletionRequest) (*kms.ScheduleKeyDeletionResponse, error)
计划在以后的是个时间点删除密钥,默认为7天
func (*KmsClient) ScheduleKeyVersionDeletion ¶
func (c *KmsClient) ScheduleKeyVersionDeletion(request *kms.ScheduleKeyVersionDeletionRequest) (*kms.ScheduleKeyVersionDeletionResponse, error)
计划在以后的是个时间点删除指定版本密钥,默认为7天
func (*KmsClient) Sign ¶ added in v1.13.0
func (c *KmsClient) Sign(request *kms.SignRequest) (*kms.SignResponse, error)
使用非对称密钥的私钥签名,签名算法仅支持RSA_PKCS1_PADDING填充方式,最大签名数据长度为4K字节
func (*KmsClient) UpdateKeyDescription ¶
func (c *KmsClient) UpdateKeyDescription(request *kms.UpdateKeyDescriptionRequest) (*kms.UpdateKeyDescriptionResponse, error)
- 修改对称密钥配置,包括key的名称、用途、是否自动轮换和轮换周期等;
- 修改非对称密钥配置,包括key的名称、用途等。
func (*KmsClient) UpdateSecret ¶
func (c *KmsClient) UpdateSecret(request *kms.UpdateSecretRequest) (*kms.UpdateSecretResponse, error)
修改机密描述
func (*KmsClient) UpdateSecretVersion ¶
func (c *KmsClient) UpdateSecretVersion(request *kms.UpdateSecretVersionRequest) (*kms.UpdateSecretVersionResponse, error)
修改机密指定版本配置
func (*KmsClient) Validate ¶ added in v1.13.0
func (c *KmsClient) Validate(request *kms.ValidateRequest) (*kms.ValidateResponse, error)
使用非对称密钥的公钥验证签名
Click to show internal directories.
Click to hide internal directories.