Documentation ¶
Index ¶
- func GenReqDefForBatchCreateKmsTags() *def.HttpRequestDef
- func GenReqDefForCancelGrant() *def.HttpRequestDef
- func GenReqDefForCancelKeyDeletion() *def.HttpRequestDef
- func GenReqDefForCancelSelfGrant() *def.HttpRequestDef
- func GenReqDefForCreateDatakey() *def.HttpRequestDef
- func GenReqDefForCreateDatakeyWithoutPlaintext() *def.HttpRequestDef
- func GenReqDefForCreateGrant() *def.HttpRequestDef
- func GenReqDefForCreateKey() *def.HttpRequestDef
- func GenReqDefForCreateKmsTag() *def.HttpRequestDef
- func GenReqDefForCreateParametersForImport() *def.HttpRequestDef
- func GenReqDefForCreateRandom() *def.HttpRequestDef
- func GenReqDefForCreateSecret() *def.HttpRequestDef
- func GenReqDefForCreateSecretVersion() *def.HttpRequestDef
- func GenReqDefForDecryptData() *def.HttpRequestDef
- func GenReqDefForDecryptDatakey() *def.HttpRequestDef
- func GenReqDefForDeleteImportedKeyMaterial() *def.HttpRequestDef
- func GenReqDefForDeleteKey() *def.HttpRequestDef
- func GenReqDefForDeleteSecret() *def.HttpRequestDef
- func GenReqDefForDeleteSecretForSchedule() *def.HttpRequestDef
- func GenReqDefForDeleteSecretStage() *def.HttpRequestDef
- func GenReqDefForDeleteTag() *def.HttpRequestDef
- func GenReqDefForDisableKey() *def.HttpRequestDef
- func GenReqDefForDisableKeyRotation() *def.HttpRequestDef
- func GenReqDefForEnableKey() *def.HttpRequestDef
- func GenReqDefForEnableKeyRotation() *def.HttpRequestDef
- func GenReqDefForEncryptData() *def.HttpRequestDef
- func GenReqDefForEncryptDatakey() *def.HttpRequestDef
- func GenReqDefForImportKeyMaterial() *def.HttpRequestDef
- func GenReqDefForListGrants() *def.HttpRequestDef
- func GenReqDefForListKeyDetail() *def.HttpRequestDef
- func GenReqDefForListKeys() *def.HttpRequestDef
- func GenReqDefForListKmsByTags() *def.HttpRequestDef
- func GenReqDefForListKmsTags() *def.HttpRequestDef
- func GenReqDefForListRetirableGrants() *def.HttpRequestDef
- func GenReqDefForListSecretStage() *def.HttpRequestDef
- func GenReqDefForListSecretVersions() *def.HttpRequestDef
- func GenReqDefForListSecrets() *def.HttpRequestDef
- func GenReqDefForRestoreSecret() *def.HttpRequestDef
- func GenReqDefForShowKeyRotationStatus() *def.HttpRequestDef
- func GenReqDefForShowKmsTags() *def.HttpRequestDef
- func GenReqDefForShowPublicKey() *def.HttpRequestDef
- func GenReqDefForShowSecret() *def.HttpRequestDef
- func GenReqDefForShowSecretVersion() *def.HttpRequestDef
- func GenReqDefForShowUserInstances() *def.HttpRequestDef
- func GenReqDefForShowUserQuotas() *def.HttpRequestDef
- func GenReqDefForShowVersion() *def.HttpRequestDef
- func GenReqDefForShowVersions() *def.HttpRequestDef
- func GenReqDefForSign() *def.HttpRequestDef
- func GenReqDefForUpdateKeyAlias() *def.HttpRequestDef
- func GenReqDefForUpdateKeyDescription() *def.HttpRequestDef
- func GenReqDefForUpdateKeyRotationInterval() *def.HttpRequestDef
- func GenReqDefForUpdateSecret() *def.HttpRequestDef
- func GenReqDefForUpdateSecretStage() *def.HttpRequestDef
- func GenReqDefForValidateSignature() *def.HttpRequestDef
- func KmsClientBuilder() *http_client.HcHttpClientBuilder
- type KmsClient
- func (c *KmsClient) BatchCreateKmsTags(request *model.BatchCreateKmsTagsRequest) (*model.BatchCreateKmsTagsResponse, error)
- func (c *KmsClient) CancelGrant(request *model.CancelGrantRequest) (*model.CancelGrantResponse, error)
- func (c *KmsClient) CancelKeyDeletion(request *model.CancelKeyDeletionRequest) (*model.CancelKeyDeletionResponse, error)
- func (c *KmsClient) CancelSelfGrant(request *model.CancelSelfGrantRequest) (*model.CancelSelfGrantResponse, error)
- func (c *KmsClient) CreateDatakey(request *model.CreateDatakeyRequest) (*model.CreateDatakeyResponse, error)
- func (c *KmsClient) CreateDatakeyWithoutPlaintext(request *model.CreateDatakeyWithoutPlaintextRequest) (*model.CreateDatakeyWithoutPlaintextResponse, error)
- func (c *KmsClient) CreateGrant(request *model.CreateGrantRequest) (*model.CreateGrantResponse, error)
- func (c *KmsClient) CreateKey(request *model.CreateKeyRequest) (*model.CreateKeyResponse, error)
- func (c *KmsClient) CreateKmsTag(request *model.CreateKmsTagRequest) (*model.CreateKmsTagResponse, error)
- func (c *KmsClient) CreateParametersForImport(request *model.CreateParametersForImportRequest) (*model.CreateParametersForImportResponse, error)
- func (c *KmsClient) CreateRandom(request *model.CreateRandomRequest) (*model.CreateRandomResponse, error)
- func (c *KmsClient) CreateSecret(request *model.CreateSecretRequest) (*model.CreateSecretResponse, error)
- func (c *KmsClient) CreateSecretVersion(request *model.CreateSecretVersionRequest) (*model.CreateSecretVersionResponse, error)
- func (c *KmsClient) DecryptData(request *model.DecryptDataRequest) (*model.DecryptDataResponse, error)
- func (c *KmsClient) DecryptDatakey(request *model.DecryptDatakeyRequest) (*model.DecryptDatakeyResponse, error)
- func (c *KmsClient) DeleteImportedKeyMaterial(request *model.DeleteImportedKeyMaterialRequest) (*model.DeleteImportedKeyMaterialResponse, error)
- func (c *KmsClient) DeleteKey(request *model.DeleteKeyRequest) (*model.DeleteKeyResponse, error)
- func (c *KmsClient) DeleteSecret(request *model.DeleteSecretRequest) (*model.DeleteSecretResponse, error)
- func (c *KmsClient) DeleteSecretForSchedule(request *model.DeleteSecretForScheduleRequest) (*model.DeleteSecretForScheduleResponse, error)
- func (c *KmsClient) DeleteSecretStage(request *model.DeleteSecretStageRequest) (*model.DeleteSecretStageResponse, error)
- func (c *KmsClient) DeleteTag(request *model.DeleteTagRequest) (*model.DeleteTagResponse, error)
- func (c *KmsClient) DisableKey(request *model.DisableKeyRequest) (*model.DisableKeyResponse, error)
- func (c *KmsClient) DisableKeyRotation(request *model.DisableKeyRotationRequest) (*model.DisableKeyRotationResponse, error)
- func (c *KmsClient) EnableKey(request *model.EnableKeyRequest) (*model.EnableKeyResponse, error)
- func (c *KmsClient) EnableKeyRotation(request *model.EnableKeyRotationRequest) (*model.EnableKeyRotationResponse, error)
- func (c *KmsClient) EncryptData(request *model.EncryptDataRequest) (*model.EncryptDataResponse, error)
- func (c *KmsClient) EncryptDatakey(request *model.EncryptDatakeyRequest) (*model.EncryptDatakeyResponse, error)
- func (c *KmsClient) ImportKeyMaterial(request *model.ImportKeyMaterialRequest) (*model.ImportKeyMaterialResponse, error)
- func (c *KmsClient) ListGrants(request *model.ListGrantsRequest) (*model.ListGrantsResponse, error)
- func (c *KmsClient) ListKeyDetail(request *model.ListKeyDetailRequest) (*model.ListKeyDetailResponse, error)
- func (c *KmsClient) ListKeys(request *model.ListKeysRequest) (*model.ListKeysResponse, error)
- func (c *KmsClient) ListKmsByTags(request *model.ListKmsByTagsRequest) (*model.ListKmsByTagsResponse, error)
- func (c *KmsClient) ListKmsTags(request *model.ListKmsTagsRequest) (*model.ListKmsTagsResponse, error)
- func (c *KmsClient) ListRetirableGrants(request *model.ListRetirableGrantsRequest) (*model.ListRetirableGrantsResponse, error)
- func (c *KmsClient) ListSecretStage(request *model.ListSecretStageRequest) (*model.ListSecretStageResponse, error)
- func (c *KmsClient) ListSecretVersions(request *model.ListSecretVersionsRequest) (*model.ListSecretVersionsResponse, error)
- func (c *KmsClient) ListSecrets(request *model.ListSecretsRequest) (*model.ListSecretsResponse, error)
- func (c *KmsClient) RestoreSecret(request *model.RestoreSecretRequest) (*model.RestoreSecretResponse, error)
- func (c *KmsClient) ShowKeyRotationStatus(request *model.ShowKeyRotationStatusRequest) (*model.ShowKeyRotationStatusResponse, error)
- func (c *KmsClient) ShowKmsTags(request *model.ShowKmsTagsRequest) (*model.ShowKmsTagsResponse, error)
- func (c *KmsClient) ShowPublicKey(request *model.ShowPublicKeyRequest) (*model.ShowPublicKeyResponse, error)
- func (c *KmsClient) ShowSecret(request *model.ShowSecretRequest) (*model.ShowSecretResponse, error)
- func (c *KmsClient) ShowSecretVersion(request *model.ShowSecretVersionRequest) (*model.ShowSecretVersionResponse, error)
- func (c *KmsClient) ShowUserInstances(request *model.ShowUserInstancesRequest) (*model.ShowUserInstancesResponse, error)
- func (c *KmsClient) ShowUserQuotas(request *model.ShowUserQuotasRequest) (*model.ShowUserQuotasResponse, error)
- func (c *KmsClient) ShowVersion(request *model.ShowVersionRequest) (*model.ShowVersionResponse, error)
- func (c *KmsClient) ShowVersions(request *model.ShowVersionsRequest) (*model.ShowVersionsResponse, error)
- func (c *KmsClient) Sign(request *model.SignRequest) (*model.SignResponse, error)
- func (c *KmsClient) UpdateKeyAlias(request *model.UpdateKeyAliasRequest) (*model.UpdateKeyAliasResponse, error)
- func (c *KmsClient) UpdateKeyDescription(request *model.UpdateKeyDescriptionRequest) (*model.UpdateKeyDescriptionResponse, error)
- func (c *KmsClient) UpdateKeyRotationInterval(request *model.UpdateKeyRotationIntervalRequest) (*model.UpdateKeyRotationIntervalResponse, error)
- func (c *KmsClient) UpdateSecret(request *model.UpdateSecretRequest) (*model.UpdateSecretResponse, error)
- func (c *KmsClient) UpdateSecretStage(request *model.UpdateSecretStageRequest) (*model.UpdateSecretStageResponse, error)
- func (c *KmsClient) ValidateSignature(request *model.ValidateSignatureRequest) (*model.ValidateSignatureResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenReqDefForBatchCreateKmsTags ¶
func GenReqDefForBatchCreateKmsTags() *def.HttpRequestDef
func GenReqDefForCancelGrant ¶
func GenReqDefForCancelGrant() *def.HttpRequestDef
func GenReqDefForCancelKeyDeletion ¶
func GenReqDefForCancelKeyDeletion() *def.HttpRequestDef
func GenReqDefForCancelSelfGrant ¶
func GenReqDefForCancelSelfGrant() *def.HttpRequestDef
func GenReqDefForCreateDatakey ¶
func GenReqDefForCreateDatakey() *def.HttpRequestDef
func GenReqDefForCreateDatakeyWithoutPlaintext ¶
func GenReqDefForCreateDatakeyWithoutPlaintext() *def.HttpRequestDef
func GenReqDefForCreateGrant ¶
func GenReqDefForCreateGrant() *def.HttpRequestDef
func GenReqDefForCreateKey ¶
func GenReqDefForCreateKey() *def.HttpRequestDef
func GenReqDefForCreateKmsTag ¶
func GenReqDefForCreateKmsTag() *def.HttpRequestDef
func GenReqDefForCreateParametersForImport ¶
func GenReqDefForCreateParametersForImport() *def.HttpRequestDef
func GenReqDefForCreateRandom ¶
func GenReqDefForCreateRandom() *def.HttpRequestDef
func GenReqDefForCreateSecret ¶
func GenReqDefForCreateSecret() *def.HttpRequestDef
func GenReqDefForCreateSecretVersion ¶
func GenReqDefForCreateSecretVersion() *def.HttpRequestDef
func GenReqDefForDecryptData ¶
func GenReqDefForDecryptData() *def.HttpRequestDef
func GenReqDefForDecryptDatakey ¶
func GenReqDefForDecryptDatakey() *def.HttpRequestDef
func GenReqDefForDeleteImportedKeyMaterial ¶
func GenReqDefForDeleteImportedKeyMaterial() *def.HttpRequestDef
func GenReqDefForDeleteKey ¶
func GenReqDefForDeleteKey() *def.HttpRequestDef
func GenReqDefForDeleteSecret ¶
func GenReqDefForDeleteSecret() *def.HttpRequestDef
func GenReqDefForDeleteSecretForSchedule ¶
func GenReqDefForDeleteSecretForSchedule() *def.HttpRequestDef
func GenReqDefForDeleteSecretStage ¶
func GenReqDefForDeleteSecretStage() *def.HttpRequestDef
func GenReqDefForDeleteTag ¶
func GenReqDefForDeleteTag() *def.HttpRequestDef
func GenReqDefForDisableKey ¶
func GenReqDefForDisableKey() *def.HttpRequestDef
func GenReqDefForDisableKeyRotation ¶
func GenReqDefForDisableKeyRotation() *def.HttpRequestDef
func GenReqDefForEnableKey ¶
func GenReqDefForEnableKey() *def.HttpRequestDef
func GenReqDefForEnableKeyRotation ¶
func GenReqDefForEnableKeyRotation() *def.HttpRequestDef
func GenReqDefForEncryptData ¶
func GenReqDefForEncryptData() *def.HttpRequestDef
func GenReqDefForEncryptDatakey ¶
func GenReqDefForEncryptDatakey() *def.HttpRequestDef
func GenReqDefForImportKeyMaterial ¶
func GenReqDefForImportKeyMaterial() *def.HttpRequestDef
func GenReqDefForListGrants ¶
func GenReqDefForListGrants() *def.HttpRequestDef
func GenReqDefForListKeyDetail ¶
func GenReqDefForListKeyDetail() *def.HttpRequestDef
func GenReqDefForListKeys ¶
func GenReqDefForListKeys() *def.HttpRequestDef
func GenReqDefForListKmsByTags ¶
func GenReqDefForListKmsByTags() *def.HttpRequestDef
func GenReqDefForListKmsTags ¶
func GenReqDefForListKmsTags() *def.HttpRequestDef
func GenReqDefForListRetirableGrants ¶
func GenReqDefForListRetirableGrants() *def.HttpRequestDef
func GenReqDefForListSecretStage ¶
func GenReqDefForListSecretStage() *def.HttpRequestDef
func GenReqDefForListSecretVersions ¶
func GenReqDefForListSecretVersions() *def.HttpRequestDef
func GenReqDefForListSecrets ¶
func GenReqDefForListSecrets() *def.HttpRequestDef
func GenReqDefForRestoreSecret ¶
func GenReqDefForRestoreSecret() *def.HttpRequestDef
func GenReqDefForShowKeyRotationStatus ¶
func GenReqDefForShowKeyRotationStatus() *def.HttpRequestDef
func GenReqDefForShowKmsTags ¶
func GenReqDefForShowKmsTags() *def.HttpRequestDef
func GenReqDefForShowPublicKey ¶ added in v0.0.60
func GenReqDefForShowPublicKey() *def.HttpRequestDef
func GenReqDefForShowSecret ¶
func GenReqDefForShowSecret() *def.HttpRequestDef
func GenReqDefForShowSecretVersion ¶
func GenReqDefForShowSecretVersion() *def.HttpRequestDef
func GenReqDefForShowUserInstances ¶
func GenReqDefForShowUserInstances() *def.HttpRequestDef
func GenReqDefForShowUserQuotas ¶
func GenReqDefForShowUserQuotas() *def.HttpRequestDef
func GenReqDefForShowVersion ¶
func GenReqDefForShowVersion() *def.HttpRequestDef
func GenReqDefForShowVersions ¶
func GenReqDefForShowVersions() *def.HttpRequestDef
func GenReqDefForSign ¶ added in v0.0.60
func GenReqDefForSign() *def.HttpRequestDef
func GenReqDefForUpdateKeyAlias ¶
func GenReqDefForUpdateKeyAlias() *def.HttpRequestDef
func GenReqDefForUpdateKeyDescription ¶
func GenReqDefForUpdateKeyDescription() *def.HttpRequestDef
func GenReqDefForUpdateKeyRotationInterval ¶
func GenReqDefForUpdateKeyRotationInterval() *def.HttpRequestDef
func GenReqDefForUpdateSecret ¶
func GenReqDefForUpdateSecret() *def.HttpRequestDef
func GenReqDefForUpdateSecretStage ¶
func GenReqDefForUpdateSecretStage() *def.HttpRequestDef
func GenReqDefForValidateSignature ¶ added in v0.0.60
func GenReqDefForValidateSignature() *def.HttpRequestDef
func KmsClientBuilder ¶
func KmsClientBuilder() *http_client.HcHttpClientBuilder
Types ¶
type KmsClient ¶
type KmsClient struct {
HcClient *http_client.HcHttpClient
}
func NewKmsClient ¶
func NewKmsClient(hcClient *http_client.HcHttpClient) *KmsClient
func (*KmsClient) BatchCreateKmsTags ¶
func (c *KmsClient) BatchCreateKmsTags(request *model.BatchCreateKmsTagsRequest) (*model.BatchCreateKmsTagsResponse, error)
批量添加删除密钥标签
- 功能介绍:批量添加删除密钥标签。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CancelGrant ¶
func (c *KmsClient) CancelGrant(request *model.CancelGrantRequest) (*model.CancelGrantResponse, error)
撤销授权
- 功能介绍:撤销授权,授权用户撤销被授权用户操作密钥的权限。 - 说明:
- 创建密钥的用户才能撤销该密钥授权。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CancelKeyDeletion ¶
func (c *KmsClient) CancelKeyDeletion(request *model.CancelKeyDeletionRequest) (*model.CancelKeyDeletionResponse, error)
取消计划删除密钥
- 功能介绍:取消计划删除密钥。
- 说明:密钥处于“计划删除”状态才能取消计划删除密钥。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CancelSelfGrant ¶
func (c *KmsClient) CancelSelfGrant(request *model.CancelSelfGrantRequest) (*model.CancelSelfGrantResponse, error)
退役授权
- 功能介绍:退役授权,表示被授权用户不再具有授权密钥的操作权。 例如:用户A授权用户B可以操作密钥A/key,同时授权用户C可以撤销该授权, 那么用户A、B、C均可退役该授权,退役授权后,用户B不再可以使用A/key。
- 须知: 可执行退役授权的主体包括:
- 创建授权的用户;
- 授权中retiring_principal指向的用户;
- 当授权的操作列表中包含retire-grant时,grantee_principal指向的用户。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateDatakey ¶
func (c *KmsClient) CreateDatakey(request *model.CreateDatakeyRequest) (*model.CreateDatakeyResponse, error)
创建数据密钥
- 功能介绍:创建数据密钥,返回结果包含明文和密文。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateDatakeyWithoutPlaintext ¶
func (c *KmsClient) CreateDatakeyWithoutPlaintext(request *model.CreateDatakeyWithoutPlaintextRequest) (*model.CreateDatakeyWithoutPlaintextResponse, error)
创建不含明文数据密钥
- 功能介绍:创建数据密钥,返回结果只包含密文。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateGrant ¶
func (c *KmsClient) CreateGrant(request *model.CreateGrantRequest) (*model.CreateGrantResponse, error)
创建授权
- 功能介绍:创建授权,被授权用户可以对授权密钥进行操作。 - 说明:
- 服务默认主密钥(密钥别名后缀为“/default”)不可以授权。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateKey ¶
func (c *KmsClient) CreateKey(request *model.CreateKeyRequest) (*model.CreateKeyResponse, error)
创建密钥
创建用户主密钥,用户主密钥可以为对称密钥或非对称密钥。 - 对称密钥为长度为256位AES密钥,可用于小量数据的加密或者用于加密数据密钥。 - 非对称密钥可以为RSA密钥对或者ECC密钥对,可用于数字签名及验签。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateKmsTag ¶
func (c *KmsClient) CreateKmsTag(request *model.CreateKmsTagRequest) (*model.CreateKmsTagResponse, error)
添加密钥标签
- 功能介绍:添加密钥标签。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateParametersForImport ¶
func (c *KmsClient) CreateParametersForImport(request *model.CreateParametersForImportRequest) (*model.CreateParametersForImportResponse, error)
获取密钥导入参数
- 功能介绍:获取导入密钥的必要参数,包括密钥导入令牌和密钥加密公钥。 - 说明:返回的公钥类型默认为RSA_2048。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateRandom ¶
func (c *KmsClient) CreateRandom(request *model.CreateRandomRequest) (*model.CreateRandomResponse, error)
创建随机数
- 功能介绍: 生成8~8192bit范围内的随机数。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateSecret ¶
func (c *KmsClient) CreateSecret(request *model.CreateSecretRequest) (*model.CreateSecretResponse, error)
创建凭据
创建新的凭据,并将凭据值存入凭据的初始版本。
凭据管理服务将凭据值加密后,存储在凭据对象下的版本中。每个版本可与多个凭据版本状态相关联,凭据版本状态用于标识凭据版本处于的阶段,没有版本状态标记的版本视为已弃用,可用凭据管理服务自动删除。
初始版本的状态被标记为SYSCURRENT。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) CreateSecretVersion ¶
func (c *KmsClient) CreateSecretVersion(request *model.CreateSecretVersionRequest) (*model.CreateSecretVersionResponse, error)
创建凭据版本
在指定的凭据中,创建一个新的凭据版本,用于加密保管新的凭据值。默认情况下,新创建的凭据版本被标记为SYSCURRENT状态,而SYSCURRENT标记的前一个凭据版本被标记为SYSPREVIOUS状态。您可以通过指定VersionStage参数来覆盖默认行为。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DecryptData ¶
func (c *KmsClient) DecryptData(request *model.DecryptDataRequest) (*model.DecryptDataResponse, error)
解密数据
- 功能介绍:解密数据。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DecryptDatakey ¶
func (c *KmsClient) DecryptDatakey(request *model.DecryptDatakeyRequest) (*model.DecryptDatakeyResponse, error)
解密数据密钥
- 功能介绍:解密数据密钥,用指定的主密钥解密数据密钥。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DeleteImportedKeyMaterial ¶
func (c *KmsClient) DeleteImportedKeyMaterial(request *model.DeleteImportedKeyMaterialRequest) (*model.DeleteImportedKeyMaterialResponse, error)
删除密钥材料
- 功能介绍:删除密钥材料信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DeleteKey ¶
func (c *KmsClient) DeleteKey(request *model.DeleteKeyRequest) (*model.DeleteKeyResponse, error)
计划删除密钥
- 功能介绍:计划多少天后删除密钥,可设置7天~1096天内删除密钥。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DeleteSecret ¶
func (c *KmsClient) DeleteSecret(request *model.DeleteSecretRequest) (*model.DeleteSecretResponse, error)
立即删除凭据
立即删除指定的凭据,且无法恢复。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DeleteSecretForSchedule ¶
func (c *KmsClient) DeleteSecretForSchedule(request *model.DeleteSecretForScheduleRequest) (*model.DeleteSecretForScheduleResponse, error)
创建凭据的定时删除任务
指定延迟删除时间,创建删除凭据的定时任务,可设置7~30天的的延迟删除时间。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DeleteSecretStage ¶
func (c *KmsClient) DeleteSecretStage(request *model.DeleteSecretStageRequest) (*model.DeleteSecretStageResponse, error)
删除凭据的版本状态
删除指定的凭据版本状态。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DeleteTag ¶
func (c *KmsClient) DeleteTag(request *model.DeleteTagRequest) (*model.DeleteTagResponse, error)
删除密钥标签
- 功能介绍:删除密钥标签。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DisableKey ¶
func (c *KmsClient) DisableKey(request *model.DisableKeyRequest) (*model.DisableKeyResponse, error)
禁用密钥
- 功能介绍:禁用密钥,密钥禁用后不可以使用。
- 说明:密钥为启用状态才能禁用密钥。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) DisableKeyRotation ¶
func (c *KmsClient) DisableKeyRotation(request *model.DisableKeyRotationRequest) (*model.DisableKeyRotationResponse, error)
关闭密钥轮换
- 功能介绍:关闭用户主密钥轮换。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) EnableKey ¶
func (c *KmsClient) EnableKey(request *model.EnableKeyRequest) (*model.EnableKeyResponse, error)
启用密钥
- 功能介绍:启用密钥,密钥启用后才可以使用。
- 说明:密钥为禁用状态才能启用密钥。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) EnableKeyRotation ¶
func (c *KmsClient) EnableKeyRotation(request *model.EnableKeyRotationRequest) (*model.EnableKeyRotationResponse, error)
开启密钥轮换
- 功能介绍:开启用户主密钥轮换。 - 说明:
- 开启密钥轮换后,默认轮询间隔时间为365天。
- 默认主密钥及外部导入密钥不支持轮换操作。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) EncryptData ¶
func (c *KmsClient) EncryptData(request *model.EncryptDataRequest) (*model.EncryptDataResponse, error)
加密数据
- 功能介绍:加密数据,用指定的用户主密钥加密数据。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) EncryptDatakey ¶
func (c *KmsClient) EncryptDatakey(request *model.EncryptDatakeyRequest) (*model.EncryptDatakeyResponse, error)
加密数据密钥
- 功能介绍:加密数据密钥,用指定的主密钥加密数据密钥。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ImportKeyMaterial ¶
func (c *KmsClient) ImportKeyMaterial(request *model.ImportKeyMaterialRequest) (*model.ImportKeyMaterialResponse, error)
导入密钥材料
- 功能介绍:导入密钥材料。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListGrants ¶
func (c *KmsClient) ListGrants(request *model.ListGrantsRequest) (*model.ListGrantsResponse, error)
查询授权列表
- 功能介绍:查询密钥的授权列表。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListKeyDetail ¶
func (c *KmsClient) ListKeyDetail(request *model.ListKeyDetailRequest) (*model.ListKeyDetailResponse, error)
查询密钥信息
- 功能介绍:查询密钥详细信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListKeys ¶
func (c *KmsClient) ListKeys(request *model.ListKeysRequest) (*model.ListKeysResponse, error)
查询密钥列表
- 功能介绍:查询用户所有密钥列表。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListKmsByTags ¶
func (c *KmsClient) ListKmsByTags(request *model.ListKmsByTagsRequest) (*model.ListKmsByTagsResponse, error)
查询密钥实例
- 功能介绍:查询密钥实例。通过标签过滤,查询指定用户主密钥的详细信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListKmsTags ¶
func (c *KmsClient) ListKmsTags(request *model.ListKmsTagsRequest) (*model.ListKmsTagsResponse, error)
查询项目标签
- 功能介绍:查询用户在指定项目下的所有标签集合。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListRetirableGrants ¶
func (c *KmsClient) ListRetirableGrants(request *model.ListRetirableGrantsRequest) (*model.ListRetirableGrantsResponse, error)
查询可退役授权列表
- 功能介绍:查询用户可以退役的授权列表。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListSecretStage ¶
func (c *KmsClient) ListSecretStage(request *model.ListSecretStageRequest) (*model.ListSecretStageResponse, error)
查询凭据的版本状态
查询指定凭据版本状态标记的版本信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListSecretVersions ¶
func (c *KmsClient) ListSecretVersions(request *model.ListSecretVersionsRequest) (*model.ListSecretVersionsResponse, error)
查询凭据的版本列表
查询指定凭据下的版本列表信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ListSecrets ¶
func (c *KmsClient) ListSecrets(request *model.ListSecretsRequest) (*model.ListSecretsResponse, error)
查询凭据列表
查询当前用户在本项目下创建的所有凭据。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) RestoreSecret ¶
func (c *KmsClient) RestoreSecret(request *model.RestoreSecretRequest) (*model.RestoreSecretResponse, error)
取消凭据的定时删除任务
取消凭据的定时删除任务,凭据对象恢复可使用状态。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowKeyRotationStatus ¶
func (c *KmsClient) ShowKeyRotationStatus(request *model.ShowKeyRotationStatusRequest) (*model.ShowKeyRotationStatusResponse, error)
查询密钥轮换状态
- 功能介绍:查询用户主密钥轮换状态。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowKmsTags ¶
func (c *KmsClient) ShowKmsTags(request *model.ShowKmsTagsRequest) (*model.ShowKmsTagsResponse, error)
查询密钥标签
- 功能介绍:查询密钥标签。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowPublicKey ¶ added in v0.0.60
func (c *KmsClient) ShowPublicKey(request *model.ShowPublicKeyRequest) (*model.ShowPublicKeyResponse, error)
查询公钥信息
- 查询用户指定非对称密钥的公钥信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowSecret ¶
func (c *KmsClient) ShowSecret(request *model.ShowSecretRequest) (*model.ShowSecretResponse, error)
查询凭据
查询指定凭据的信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowSecretVersion ¶
func (c *KmsClient) ShowSecretVersion(request *model.ShowSecretVersionRequest) (*model.ShowSecretVersionResponse, error)
查询凭据的版本与凭据值
查询指定凭据版本的信息和版本中的明文凭据值,只能查询ENABLED状态的凭据。 通过/v1/{project_id}/secrets/{secret_id}/versions/latest可访问凭据最新版本的凭据值。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowUserInstances ¶
func (c *KmsClient) ShowUserInstances(request *model.ShowUserInstancesRequest) (*model.ShowUserInstancesResponse, error)
查询实例数
- 功能介绍:查询实例数,获取用户已经创建的用户主密钥数量。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowUserQuotas ¶
func (c *KmsClient) ShowUserQuotas(request *model.ShowUserQuotasRequest) (*model.ShowUserQuotasResponse, error)
查询配额
- 功能介绍:查询配额,查询用户可以创建的用户主密钥配额总数及当前使用量信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowVersion ¶
func (c *KmsClient) ShowVersion(request *model.ShowVersionRequest) (*model.ShowVersionResponse, error)
查询指定版本信息
- 功能介绍:查指定API版本信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ShowVersions ¶
func (c *KmsClient) ShowVersions(request *model.ShowVersionsRequest) (*model.ShowVersionsResponse, error)
查询版本信息列表
- 功能介绍:查询API版本信息列表。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) Sign ¶ added in v0.0.60
func (c *KmsClient) Sign(request *model.SignRequest) (*model.SignResponse, error)
签名数据
- 功能介绍:使用非对称密钥的私钥对消息或消息摘要进行数字签名。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) UpdateKeyAlias ¶
func (c *KmsClient) UpdateKeyAlias(request *model.UpdateKeyAliasRequest) (*model.UpdateKeyAliasResponse, error)
修改密钥别名
- 功能介绍:修改用户主密钥别名。 - 说明:
- 服务默认主密钥(密钥别名后缀为“/default”)不可以修改。
- 密钥处于“计划删除”状态,密钥别名不可以修改。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) UpdateKeyDescription ¶
func (c *KmsClient) UpdateKeyDescription(request *model.UpdateKeyDescriptionRequest) (*model.UpdateKeyDescriptionResponse, error)
修改密钥描述
- 功能介绍:修改用户主密钥描述信息。 - 说明:
- 服务默认主密钥(密钥别名后缀为“/default”)不可以修改。
- 密钥处于“计划删除”状态,密钥描述不可以修改。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) UpdateKeyRotationInterval ¶
func (c *KmsClient) UpdateKeyRotationInterval(request *model.UpdateKeyRotationIntervalRequest) (*model.UpdateKeyRotationIntervalResponse, error)
修改密钥轮换周期
- 功能介绍:修改用户主密钥轮换周期。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) UpdateSecret ¶
func (c *KmsClient) UpdateSecret(request *model.UpdateSecretRequest) (*model.UpdateSecretResponse, error)
更新凭据
更新指定凭据的元数据信息。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) UpdateSecretStage ¶
func (c *KmsClient) UpdateSecretStage(request *model.UpdateSecretStageRequest) (*model.UpdateSecretStageResponse, error)
更新凭据的版本状态
更新凭据的版本状态。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.
func (*KmsClient) ValidateSignature ¶ added in v0.0.60
func (c *KmsClient) ValidateSignature(request *model.ValidateSignatureRequest) (*model.ValidateSignatureResponse, error)
验证签名
- 功能介绍:使用非对称密钥的私钥对消息或消息摘要进行数字签名。
详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.