v20190118

package
v3.0.233+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2019-01-18"

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmInfo

type AlgorithmInfo struct {

	// 算法的标识
	KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"`

	// 算法的名称
	Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"`
}

type AsymmetricRsaDecryptRequest

type AsymmetricRsaDecryptRequest struct {
	*tchttp.BaseRequest

	// CMK的唯一标识
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 使用PublicKey加密的密文,Base64编码
	Ciphertext *string `json:"Ciphertext,omitempty" name:"Ciphertext"`

	// 在使用公钥加密时对应的算法:当前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256
	Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"`
}

func NewAsymmetricRsaDecryptRequest

func NewAsymmetricRsaDecryptRequest() (request *AsymmetricRsaDecryptRequest)

func (*AsymmetricRsaDecryptRequest) FromJsonString

func (r *AsymmetricRsaDecryptRequest) FromJsonString(s string) error

func (*AsymmetricRsaDecryptRequest) ToJsonString

func (r *AsymmetricRsaDecryptRequest) ToJsonString() string

type AsymmetricRsaDecryptResponse

type AsymmetricRsaDecryptResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的唯一标识
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 解密后的明文,base64编码
		Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewAsymmetricRsaDecryptResponse

func NewAsymmetricRsaDecryptResponse() (response *AsymmetricRsaDecryptResponse)

func (*AsymmetricRsaDecryptResponse) FromJsonString

func (r *AsymmetricRsaDecryptResponse) FromJsonString(s string) error

func (*AsymmetricRsaDecryptResponse) ToJsonString

func (r *AsymmetricRsaDecryptResponse) ToJsonString() string

type AsymmetricSm2DecryptRequest

type AsymmetricSm2DecryptRequest struct {
	*tchttp.BaseRequest

	// CMK的唯一标识
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 使用PublicKey加密的密文,Base64编码。密文长度不能超过256字节。
	Ciphertext *string `json:"Ciphertext,omitempty" name:"Ciphertext"`
}

func NewAsymmetricSm2DecryptRequest

func NewAsymmetricSm2DecryptRequest() (request *AsymmetricSm2DecryptRequest)

func (*AsymmetricSm2DecryptRequest) FromJsonString

func (r *AsymmetricSm2DecryptRequest) FromJsonString(s string) error

func (*AsymmetricSm2DecryptRequest) ToJsonString

func (r *AsymmetricSm2DecryptRequest) ToJsonString() string

type AsymmetricSm2DecryptResponse

type AsymmetricSm2DecryptResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的唯一标识
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 解密后的明文,base64编码
		Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewAsymmetricSm2DecryptResponse

func NewAsymmetricSm2DecryptResponse() (response *AsymmetricSm2DecryptResponse)

func (*AsymmetricSm2DecryptResponse) FromJsonString

func (r *AsymmetricSm2DecryptResponse) FromJsonString(s string) error

func (*AsymmetricSm2DecryptResponse) ToJsonString

func (r *AsymmetricSm2DecryptResponse) ToJsonString() string

type BindCloudResourceRequest

type BindCloudResourceRequest struct {
	*tchttp.BaseRequest

	// cmk的ID
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 云产品的唯一性标识符
	ProductId *string `json:"ProductId,omitempty" name:"ProductId"`

	// 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。
	ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"`
}

func NewBindCloudResourceRequest

func NewBindCloudResourceRequest() (request *BindCloudResourceRequest)

func (*BindCloudResourceRequest) FromJsonString

func (r *BindCloudResourceRequest) FromJsonString(s string) error

func (*BindCloudResourceRequest) ToJsonString

func (r *BindCloudResourceRequest) ToJsonString() string

type BindCloudResourceResponse

type BindCloudResourceResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewBindCloudResourceResponse

func NewBindCloudResourceResponse() (response *BindCloudResourceResponse)

func (*BindCloudResourceResponse) FromJsonString

func (r *BindCloudResourceResponse) FromJsonString(s string) error

func (*BindCloudResourceResponse) ToJsonString

func (r *BindCloudResourceResponse) ToJsonString() string

type CancelKeyDeletionRequest

type CancelKeyDeletionRequest struct {
	*tchttp.BaseRequest

	// 需要被取消删除的CMK的唯一标志
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewCancelKeyDeletionRequest

func NewCancelKeyDeletionRequest() (request *CancelKeyDeletionRequest)

func (*CancelKeyDeletionRequest) FromJsonString

func (r *CancelKeyDeletionRequest) FromJsonString(s string) error

func (*CancelKeyDeletionRequest) ToJsonString

func (r *CancelKeyDeletionRequest) ToJsonString() string

type CancelKeyDeletionResponse

type CancelKeyDeletionResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一标志被取消删除的CMK。
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewCancelKeyDeletionResponse

func NewCancelKeyDeletionResponse() (response *CancelKeyDeletionResponse)

func (*CancelKeyDeletionResponse) FromJsonString

func (r *CancelKeyDeletionResponse) FromJsonString(s string) error

func (*CancelKeyDeletionResponse) ToJsonString

func (r *CancelKeyDeletionResponse) ToJsonString() string

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) AsymmetricRsaDecrypt

func (c *Client) AsymmetricRsaDecrypt(request *AsymmetricRsaDecryptRequest) (response *AsymmetricRsaDecryptResponse, err error)

使用指定的RSA非对称密钥的私钥进行数据解密,密文必须是使用对应公钥加密的。处于Enabled 状态的非对称密钥才能进行解密操作。

func (*Client) AsymmetricSm2Decrypt

func (c *Client) AsymmetricSm2Decrypt(request *AsymmetricSm2DecryptRequest) (response *AsymmetricSm2DecryptResponse, err error)

使用指定的SM2非对称密钥的私钥进行数据解密,密文必须是使用对应公钥加密的。处于Enabled 状态的非对称密钥才能进行解密操作。传入的密文的长度不能超过256字节。

func (*Client) BindCloudResource

func (c *Client) BindCloudResource(request *BindCloudResourceRequest) (response *BindCloudResourceResponse, err error)

记录当前key被哪个云产品的那个资源所使用。如果当前key设置了自动过期,则取消该设置,确保当前key不会自动失效。如果当前关联关系已经创建,也返回成功。

func (*Client) CancelKeyDeletion

func (c *Client) CancelKeyDeletion(request *CancelKeyDeletionRequest) (response *CancelKeyDeletionResponse, err error)

取消CMK的计划删除操作

func (*Client) CreateKey

func (c *Client) CreateKey(request *CreateKeyRequest) (response *CreateKeyResponse, err error)

创建用户管理数据密钥的主密钥CMK(Custom Master Key)。

func (*Client) CreateWhiteBoxKey

func (c *Client) CreateWhiteBoxKey(request *CreateWhiteBoxKeyRequest) (response *CreateWhiteBoxKeyResponse, err error)

创建白盒密钥。 密钥个数的上限为 50。

func (*Client) Decrypt

func (c *Client) Decrypt(request *DecryptRequest) (response *DecryptResponse, err error)

本接口用于解密密文,得到明文数据。

func (*Client) DeleteImportedKeyMaterial

func (c *Client) DeleteImportedKeyMaterial(request *DeleteImportedKeyMaterialRequest) (response *DeleteImportedKeyMaterialResponse, err error)

用于删除导入的密钥材料,仅对EXTERNAL类型的CMK有效,该接口将CMK设置为PendingImport 状态,并不会删除CMK,在重新进行密钥导入后可继续使用。彻底删除CMK请使用 ScheduleKeyDeletion 接口。

func (*Client) DeleteWhiteBoxKey

func (c *Client) DeleteWhiteBoxKey(request *DeleteWhiteBoxKeyRequest) (response *DeleteWhiteBoxKeyResponse, err error)

删除白盒密钥, 注意:必须先禁用后,才可以删除。

func (*Client) DescribeKey

func (c *Client) DescribeKey(request *DescribeKeyRequest) (response *DescribeKeyResponse, err error)

用于获取指定KeyId的主密钥属性详情信息。

func (*Client) DescribeKeys

func (c *Client) DescribeKeys(request *DescribeKeysRequest) (response *DescribeKeysResponse, err error)

该接口用于批量获取主密钥属性信息。

func (*Client) DescribeWhiteBoxDecryptKey

func (c *Client) DescribeWhiteBoxDecryptKey(request *DescribeWhiteBoxDecryptKeyRequest) (response *DescribeWhiteBoxDecryptKeyResponse, err error)

获取白盒解密密钥

func (*Client) DescribeWhiteBoxDeviceFingerprints

func (c *Client) DescribeWhiteBoxDeviceFingerprints(request *DescribeWhiteBoxDeviceFingerprintsRequest) (response *DescribeWhiteBoxDeviceFingerprintsResponse, err error)

获取指定密钥的设备指纹列表

func (*Client) DescribeWhiteBoxKey

func (c *Client) DescribeWhiteBoxKey(request *DescribeWhiteBoxKeyRequest) (response *DescribeWhiteBoxKeyResponse, err error)

展示白盒密钥的信息

func (*Client) DescribeWhiteBoxKeyDetails

func (c *Client) DescribeWhiteBoxKeyDetails(request *DescribeWhiteBoxKeyDetailsRequest) (response *DescribeWhiteBoxKeyDetailsResponse, err error)

获取白盒密钥列表

func (*Client) DescribeWhiteBoxServiceStatus

func (c *Client) DescribeWhiteBoxServiceStatus(request *DescribeWhiteBoxServiceStatusRequest) (response *DescribeWhiteBoxServiceStatusResponse, err error)

获取白盒密钥服务状态

func (*Client) DisableKey

func (c *Client) DisableKey(request *DisableKeyRequest) (response *DisableKeyResponse, err error)

本接口用于禁用一个主密钥,处于禁用状态的Key无法用于加密、解密操作。

func (*Client) DisableKeyRotation

func (c *Client) DisableKeyRotation(request *DisableKeyRotationRequest) (response *DisableKeyRotationResponse, err error)

对指定的CMK禁止密钥轮换功能。

func (*Client) DisableKeys

func (c *Client) DisableKeys(request *DisableKeysRequest) (response *DisableKeysResponse, err error)

该接口用于批量禁止CMK的使用。

func (*Client) DisableWhiteBoxKey

func (c *Client) DisableWhiteBoxKey(request *DisableWhiteBoxKeyRequest) (response *DisableWhiteBoxKeyResponse, err error)

禁用白盒密钥

func (*Client) DisableWhiteBoxKeys

func (c *Client) DisableWhiteBoxKeys(request *DisableWhiteBoxKeysRequest) (response *DisableWhiteBoxKeysResponse, err error)

批量禁用白盒密钥

func (*Client) EnableKey

func (c *Client) EnableKey(request *EnableKeyRequest) (response *EnableKeyResponse, err error)

用于启用一个指定的CMK。

func (*Client) EnableKeyRotation

func (c *Client) EnableKeyRotation(request *EnableKeyRotationRequest) (response *EnableKeyRotationResponse, err error)

对指定的CMK开启密钥轮换功能。

func (*Client) EnableKeys

func (c *Client) EnableKeys(request *EnableKeysRequest) (response *EnableKeysResponse, err error)

该接口用于批量启用CMK。

func (*Client) EnableWhiteBoxKey

func (c *Client) EnableWhiteBoxKey(request *EnableWhiteBoxKeyRequest) (response *EnableWhiteBoxKeyResponse, err error)

启用白盒密钥

func (*Client) EnableWhiteBoxKeys

func (c *Client) EnableWhiteBoxKeys(request *EnableWhiteBoxKeysRequest) (response *EnableWhiteBoxKeysResponse, err error)

批量启用白盒密钥

func (*Client) Encrypt

func (c *Client) Encrypt(request *EncryptRequest) (response *EncryptResponse, err error)

本接口用于加密最多为4KB任意数据,可用于加密数据库密码,RSA Key,或其它较小的敏感信息。对于应用的数据加密,使用GenerateDataKey生成的DataKey进行本地数据的加解密操作

func (*Client) EncryptByWhiteBox

func (c *Client) EncryptByWhiteBox(request *EncryptByWhiteBoxRequest) (response *EncryptByWhiteBoxResponse, err error)

使用白盒密钥进行加密

func (*Client) GenerateDataKey

func (c *Client) GenerateDataKey(request *GenerateDataKeyRequest) (response *GenerateDataKeyResponse, err error)

本接口生成一个数据密钥,您可以用这个密钥进行本地数据的加密。

func (*Client) GenerateRandom

func (c *Client) GenerateRandom(request *GenerateRandomRequest) (response *GenerateRandomResponse, err error)

随机数生成接口。

func (*Client) GetKeyRotationStatus

func (c *Client) GetKeyRotationStatus(request *GetKeyRotationStatusRequest) (response *GetKeyRotationStatusResponse, err error)

查询指定的CMK是否开启了密钥轮换功能。

func (*Client) GetParametersForImport

func (c *Client) GetParametersForImport(request *GetParametersForImportRequest) (response *GetParametersForImportResponse, err error)

获取导入主密钥(CMK)材料的参数,返回的Token作为执行ImportKeyMaterial的参数之一,返回的PublicKey用于对自主导入密钥材料进行加密。返回的Token和PublicKey 24小时后失效,失效后如需重新导入,需要再次调用该接口获取新的Token和PublicKey。

func (*Client) GetPublicKey

func (c *Client) GetPublicKey(request *GetPublicKeyRequest) (response *GetPublicKeyResponse, err error)

该接口用户获取 KeyUsage为ASYMMETRIC_DECRYPT_RSA_2048 和 ASYMMETRIC_DECRYPT_SM2 的非对称密钥的公钥信息,使用该公钥用户可在本地进行数据加密,使用该公钥加密的数据只能通过KMS使用对应的私钥进行解密。只有处于Enabled状态的非对称密钥才可能获取公钥。

func (*Client) GetServiceStatus

func (c *Client) GetServiceStatus(request *GetServiceStatusRequest) (response *GetServiceStatusResponse, err error)

用于查询该用户是否已开通KMS服务

func (*Client) ImportKeyMaterial

func (c *Client) ImportKeyMaterial(request *ImportKeyMaterialRequest) (response *ImportKeyMaterialResponse, err error)

用于导入密钥材料。只有类型为EXTERNAL 的CMK 才可以导入,导入的密钥材料使用 GetParametersForImport 获取的密钥进行加密。可以为指定的 CMK 重新导入密钥材料,并重新指定过期时间,但必须导入相同的密钥材料。CMK 密钥材料导入后不可以更换密钥材料。导入的密钥材料过期或者被删除后,指定的CMK将无法使用,需要再次导入相同的密钥材料才能正常使用。CMK是独立的,同样的密钥材料可导入不同的 CMK 中,但使用其中一个 CMK 加密的数据无法使用另一个 CMK解密。 只有Enabled 和 PendingImport状态的CMK可以导入密钥材料。

func (*Client) ListAlgorithms

func (c *Client) ListAlgorithms(request *ListAlgorithmsRequest) (response *ListAlgorithmsResponse, err error)

列出当前Region支持的加密方式

func (*Client) ListKeyDetail

func (c *Client) ListKeyDetail(request *ListKeyDetailRequest) (response *ListKeyDetailResponse, err error)

根据指定Offset和Limit获取主密钥列表详情。

func (*Client) ListKeys

func (c *Client) ListKeys(request *ListKeysRequest) (response *ListKeysResponse, err error)

列出账号下面状态为Enabled, Disabled 和 PendingImport 的CMK KeyId 列表

func (*Client) OverwriteWhiteBoxDeviceFingerprints

func (c *Client) OverwriteWhiteBoxDeviceFingerprints(request *OverwriteWhiteBoxDeviceFingerprintsRequest) (response *OverwriteWhiteBoxDeviceFingerprintsResponse, err error)

覆盖指定密钥的设备指纹信息

func (*Client) ReEncrypt

func (c *Client) ReEncrypt(request *ReEncryptRequest) (response *ReEncryptResponse, err error)

使用指定CMK对密文重新加密。

func (*Client) ScheduleKeyDeletion

func (c *Client) ScheduleKeyDeletion(request *ScheduleKeyDeletionRequest) (response *ScheduleKeyDeletionResponse, err error)

CMK计划删除接口,用于指定CMK删除的时间,可选时间区间为[7,30]天

func (*Client) UnbindCloudResource

func (c *Client) UnbindCloudResource(request *UnbindCloudResourceRequest) (response *UnbindCloudResourceResponse, err error)

删除指定(key, 资源,云产品)的记录,以表明:指定的云产品的资源已不再使用当前的key。

func (*Client) UpdateAlias

func (c *Client) UpdateAlias(request *UpdateAliasRequest) (response *UpdateAliasResponse, err error)

用于修改CMK的别名。对于处于PendingDelete状态的CMK禁止修改。

func (*Client) UpdateKeyDescription

func (c *Client) UpdateKeyDescription(request *UpdateKeyDescriptionRequest) (response *UpdateKeyDescriptionResponse, err error)

该接口用于对指定的cmk修改描述信息。对于处于PendingDelete状态的CMK禁止修改。

type CreateKeyRequest

type CreateKeyRequest struct {
	*tchttp.BaseRequest

	// 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
	Alias *string `json:"Alias,omitempty" name:"Alias"`

	// CMK 的描述,最大1024字节
	Description *string `json:"Description,omitempty" name:"Description"`

	// 指定key的用途,默认为  "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥
	KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"`

	// 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
	Type *uint64 `json:"Type,omitempty" name:"Type"`

	// 标签列表
	Tags []*Tag `json:"Tags,omitempty" name:"Tags" list`
}

func NewCreateKeyRequest

func NewCreateKeyRequest() (request *CreateKeyRequest)

func (*CreateKeyRequest) FromJsonString

func (r *CreateKeyRequest) FromJsonString(s string) error

func (*CreateKeyRequest) ToJsonString

func (r *CreateKeyRequest) ToJsonString() string

type CreateKeyResponse

type CreateKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的全局唯一标识符
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 作为密钥更容易辨识,更容易被人看懂的别名
		Alias *string `json:"Alias,omitempty" name:"Alias"`

		// 密钥创建时间,unix时间戳
		CreateTime *uint64 `json:"CreateTime,omitempty" name:"CreateTime"`

		// CMK的描述
		// 注意:此字段可能返回 null,表示取不到有效值。
		Description *string `json:"Description,omitempty" name:"Description"`

		// CMK的状态
		KeyState *string `json:"KeyState,omitempty" name:"KeyState"`

		// CMK的用途
		KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"`

		// 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误
		// 注意:此字段可能返回 null,表示取不到有效值。
		TagCode *uint64 `json:"TagCode,omitempty" name:"TagCode"`

		// 标签操作的返回信息
		// 注意:此字段可能返回 null,表示取不到有效值。
		TagMsg *string `json:"TagMsg,omitempty" name:"TagMsg"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewCreateKeyResponse

func NewCreateKeyResponse() (response *CreateKeyResponse)

func (*CreateKeyResponse) FromJsonString

func (r *CreateKeyResponse) FromJsonString(s string) error

func (*CreateKeyResponse) ToJsonString

func (r *CreateKeyResponse) ToJsonString() string

type CreateWhiteBoxKeyRequest

type CreateWhiteBoxKeyRequest struct {
	*tchttp.BaseRequest

	// 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。Alias不可重复。
	Alias *string `json:"Alias,omitempty" name:"Alias"`

	// 创建密钥所有的算法类型,支持的取值:AES_256,SM4
	Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"`

	// 密钥的描述,最大1024字节
	Description *string `json:"Description,omitempty" name:"Description"`

	// 标签列表
	Tags []*Tag `json:"Tags,omitempty" name:"Tags" list`
}

func NewCreateWhiteBoxKeyRequest

func NewCreateWhiteBoxKeyRequest() (request *CreateWhiteBoxKeyRequest)

func (*CreateWhiteBoxKeyRequest) FromJsonString

func (r *CreateWhiteBoxKeyRequest) FromJsonString(s string) error

func (*CreateWhiteBoxKeyRequest) ToJsonString

func (r *CreateWhiteBoxKeyRequest) ToJsonString() string

type CreateWhiteBoxKeyResponse

type CreateWhiteBoxKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 用于加密的密钥,base64编码
		EncryptKey *string `json:"EncryptKey,omitempty" name:"EncryptKey"`

		// 用于解密的密钥,base64编码
		DecryptKey *string `json:"DecryptKey,omitempty" name:"DecryptKey"`

		// 白盒密钥的全局唯一标识符
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误
		// 注意:此字段可能返回 null,表示取不到有效值。
		TagCode *uint64 `json:"TagCode,omitempty" name:"TagCode"`

		// 标签操作的返回信息
		// 注意:此字段可能返回 null,表示取不到有效值。
		TagMsg *string `json:"TagMsg,omitempty" name:"TagMsg"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewCreateWhiteBoxKeyResponse

func NewCreateWhiteBoxKeyResponse() (response *CreateWhiteBoxKeyResponse)

func (*CreateWhiteBoxKeyResponse) FromJsonString

func (r *CreateWhiteBoxKeyResponse) FromJsonString(s string) error

func (*CreateWhiteBoxKeyResponse) ToJsonString

func (r *CreateWhiteBoxKeyResponse) ToJsonString() string

type DecryptRequest

type DecryptRequest struct {
	*tchttp.BaseRequest

	// 待解密的密文数据
	CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"`

	// key/value对的json字符串,如果Encrypt指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024字符
	EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"`
}

func NewDecryptRequest

func NewDecryptRequest() (request *DecryptRequest)

func (*DecryptRequest) FromJsonString

func (r *DecryptRequest) FromJsonString(s string) error

func (*DecryptRequest) ToJsonString

func (r *DecryptRequest) ToJsonString() string

type DecryptResponse

type DecryptResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的全局唯一标识
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 解密后的明文。该字段是base64编码的,为了得到原始明文,调用方需要进行base64解码
		Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDecryptResponse

func NewDecryptResponse() (response *DecryptResponse)

func (*DecryptResponse) FromJsonString

func (r *DecryptResponse) FromJsonString(s string) error

func (*DecryptResponse) ToJsonString

func (r *DecryptResponse) ToJsonString() string

type DeleteImportedKeyMaterialRequest

type DeleteImportedKeyMaterialRequest struct {
	*tchttp.BaseRequest

	// 指定需要删除密钥材料的EXTERNAL CMK。
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDeleteImportedKeyMaterialRequest

func NewDeleteImportedKeyMaterialRequest() (request *DeleteImportedKeyMaterialRequest)

func (*DeleteImportedKeyMaterialRequest) FromJsonString

func (r *DeleteImportedKeyMaterialRequest) FromJsonString(s string) error

func (*DeleteImportedKeyMaterialRequest) ToJsonString

func (r *DeleteImportedKeyMaterialRequest) ToJsonString() string

type DeleteImportedKeyMaterialResponse

type DeleteImportedKeyMaterialResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDeleteImportedKeyMaterialResponse

func NewDeleteImportedKeyMaterialResponse() (response *DeleteImportedKeyMaterialResponse)

func (*DeleteImportedKeyMaterialResponse) FromJsonString

func (r *DeleteImportedKeyMaterialResponse) FromJsonString(s string) error

func (*DeleteImportedKeyMaterialResponse) ToJsonString

func (r *DeleteImportedKeyMaterialResponse) ToJsonString() string

type DeleteWhiteBoxKeyRequest

type DeleteWhiteBoxKeyRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDeleteWhiteBoxKeyRequest

func NewDeleteWhiteBoxKeyRequest() (request *DeleteWhiteBoxKeyRequest)

func (*DeleteWhiteBoxKeyRequest) FromJsonString

func (r *DeleteWhiteBoxKeyRequest) FromJsonString(s string) error

func (*DeleteWhiteBoxKeyRequest) ToJsonString

func (r *DeleteWhiteBoxKeyRequest) ToJsonString() string

type DeleteWhiteBoxKeyResponse

type DeleteWhiteBoxKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDeleteWhiteBoxKeyResponse

func NewDeleteWhiteBoxKeyResponse() (response *DeleteWhiteBoxKeyResponse)

func (*DeleteWhiteBoxKeyResponse) FromJsonString

func (r *DeleteWhiteBoxKeyResponse) FromJsonString(s string) error

func (*DeleteWhiteBoxKeyResponse) ToJsonString

func (r *DeleteWhiteBoxKeyResponse) ToJsonString() string

type DescribeKeyRequest

type DescribeKeyRequest struct {
	*tchttp.BaseRequest

	// CMK全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDescribeKeyRequest

func NewDescribeKeyRequest() (request *DescribeKeyRequest)

func (*DescribeKeyRequest) FromJsonString

func (r *DescribeKeyRequest) FromJsonString(s string) error

func (*DescribeKeyRequest) ToJsonString

func (r *DescribeKeyRequest) ToJsonString() string

type DescribeKeyResponse

type DescribeKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 密钥属性信息
		// 注意:此字段可能返回 null,表示取不到有效值。
		KeyMetadata *KeyMetadata `json:"KeyMetadata,omitempty" name:"KeyMetadata"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeKeyResponse

func NewDescribeKeyResponse() (response *DescribeKeyResponse)

func (*DescribeKeyResponse) FromJsonString

func (r *DescribeKeyResponse) FromJsonString(s string) error

func (*DescribeKeyResponse) ToJsonString

func (r *DescribeKeyResponse) ToJsonString() string

type DescribeKeysRequest

type DescribeKeysRequest struct {
	*tchttp.BaseRequest

	// 查询CMK的ID列表,批量查询一次最多支持100个KeyId
	KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list`
}

func NewDescribeKeysRequest

func NewDescribeKeysRequest() (request *DescribeKeysRequest)

func (*DescribeKeysRequest) FromJsonString

func (r *DescribeKeysRequest) FromJsonString(s string) error

func (*DescribeKeysRequest) ToJsonString

func (r *DescribeKeysRequest) ToJsonString() string

type DescribeKeysResponse

type DescribeKeysResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 返回的属性信息列表
		// 注意:此字段可能返回 null,表示取不到有效值。
		KeyMetadatas []*KeyMetadata `json:"KeyMetadatas,omitempty" name:"KeyMetadatas" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeKeysResponse

func NewDescribeKeysResponse() (response *DescribeKeysResponse)

func (*DescribeKeysResponse) FromJsonString

func (r *DescribeKeysResponse) FromJsonString(s string) error

func (*DescribeKeysResponse) ToJsonString

func (r *DescribeKeysResponse) ToJsonString() string

type DescribeWhiteBoxDecryptKeyRequest

type DescribeWhiteBoxDecryptKeyRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDescribeWhiteBoxDecryptKeyRequest

func NewDescribeWhiteBoxDecryptKeyRequest() (request *DescribeWhiteBoxDecryptKeyRequest)

func (*DescribeWhiteBoxDecryptKeyRequest) FromJsonString

func (r *DescribeWhiteBoxDecryptKeyRequest) FromJsonString(s string) error

func (*DescribeWhiteBoxDecryptKeyRequest) ToJsonString

func (r *DescribeWhiteBoxDecryptKeyRequest) ToJsonString() string

type DescribeWhiteBoxDecryptKeyResponse

type DescribeWhiteBoxDecryptKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 白盒解密密钥,base64编码
		DecryptKey *string `json:"DecryptKey,omitempty" name:"DecryptKey"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeWhiteBoxDecryptKeyResponse

func NewDescribeWhiteBoxDecryptKeyResponse() (response *DescribeWhiteBoxDecryptKeyResponse)

func (*DescribeWhiteBoxDecryptKeyResponse) FromJsonString

func (r *DescribeWhiteBoxDecryptKeyResponse) FromJsonString(s string) error

func (*DescribeWhiteBoxDecryptKeyResponse) ToJsonString

func (r *DescribeWhiteBoxDecryptKeyResponse) ToJsonString() string

type DescribeWhiteBoxDeviceFingerprintsRequest

type DescribeWhiteBoxDeviceFingerprintsRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥ID
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDescribeWhiteBoxDeviceFingerprintsRequest

func NewDescribeWhiteBoxDeviceFingerprintsRequest() (request *DescribeWhiteBoxDeviceFingerprintsRequest)

func (*DescribeWhiteBoxDeviceFingerprintsRequest) FromJsonString

func (*DescribeWhiteBoxDeviceFingerprintsRequest) ToJsonString

type DescribeWhiteBoxDeviceFingerprintsResponse

type DescribeWhiteBoxDeviceFingerprintsResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 设备指纹列表
		DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitempty" name:"DeviceFingerprints" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeWhiteBoxDeviceFingerprintsResponse

func NewDescribeWhiteBoxDeviceFingerprintsResponse() (response *DescribeWhiteBoxDeviceFingerprintsResponse)

func (*DescribeWhiteBoxDeviceFingerprintsResponse) FromJsonString

func (*DescribeWhiteBoxDeviceFingerprintsResponse) ToJsonString

type DescribeWhiteBoxKeyDetailsRequest

type DescribeWhiteBoxKeyDetailsRequest struct {
	*tchttp.BaseRequest

	// 过滤条件:密钥的状态,0:disabled,1:enabled
	KeyStatus *int64 `json:"KeyStatus,omitempty" name:"KeyStatus"`
}

func NewDescribeWhiteBoxKeyDetailsRequest

func NewDescribeWhiteBoxKeyDetailsRequest() (request *DescribeWhiteBoxKeyDetailsRequest)

func (*DescribeWhiteBoxKeyDetailsRequest) FromJsonString

func (r *DescribeWhiteBoxKeyDetailsRequest) FromJsonString(s string) error

func (*DescribeWhiteBoxKeyDetailsRequest) ToJsonString

func (r *DescribeWhiteBoxKeyDetailsRequest) ToJsonString() string

type DescribeWhiteBoxKeyDetailsResponse

type DescribeWhiteBoxKeyDetailsResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 白盒密钥信息列表
		KeyInfos []*WhiteboxKeyInfo `json:"KeyInfos,omitempty" name:"KeyInfos" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeWhiteBoxKeyDetailsResponse

func NewDescribeWhiteBoxKeyDetailsResponse() (response *DescribeWhiteBoxKeyDetailsResponse)

func (*DescribeWhiteBoxKeyDetailsResponse) FromJsonString

func (r *DescribeWhiteBoxKeyDetailsResponse) FromJsonString(s string) error

func (*DescribeWhiteBoxKeyDetailsResponse) ToJsonString

func (r *DescribeWhiteBoxKeyDetailsResponse) ToJsonString() string

type DescribeWhiteBoxKeyRequest

type DescribeWhiteBoxKeyRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDescribeWhiteBoxKeyRequest

func NewDescribeWhiteBoxKeyRequest() (request *DescribeWhiteBoxKeyRequest)

func (*DescribeWhiteBoxKeyRequest) FromJsonString

func (r *DescribeWhiteBoxKeyRequest) FromJsonString(s string) error

func (*DescribeWhiteBoxKeyRequest) ToJsonString

func (r *DescribeWhiteBoxKeyRequest) ToJsonString() string

type DescribeWhiteBoxKeyResponse

type DescribeWhiteBoxKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 白盒密钥信息
		KeyInfo *WhiteboxKeyInfo `json:"KeyInfo,omitempty" name:"KeyInfo"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeWhiteBoxKeyResponse

func NewDescribeWhiteBoxKeyResponse() (response *DescribeWhiteBoxKeyResponse)

func (*DescribeWhiteBoxKeyResponse) FromJsonString

func (r *DescribeWhiteBoxKeyResponse) FromJsonString(s string) error

func (*DescribeWhiteBoxKeyResponse) ToJsonString

func (r *DescribeWhiteBoxKeyResponse) ToJsonString() string

type DescribeWhiteBoxServiceStatusRequest

type DescribeWhiteBoxServiceStatusRequest struct {
	*tchttp.BaseRequest
}

func NewDescribeWhiteBoxServiceStatusRequest

func NewDescribeWhiteBoxServiceStatusRequest() (request *DescribeWhiteBoxServiceStatusRequest)

func (*DescribeWhiteBoxServiceStatusRequest) FromJsonString

func (r *DescribeWhiteBoxServiceStatusRequest) FromJsonString(s string) error

func (*DescribeWhiteBoxServiceStatusRequest) ToJsonString

func (r *DescribeWhiteBoxServiceStatusRequest) ToJsonString() string

type DescribeWhiteBoxServiceStatusResponse

type DescribeWhiteBoxServiceStatusResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 用户的白盒密钥服务是否可用
		ServiceEnabled *bool `json:"ServiceEnabled,omitempty" name:"ServiceEnabled"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeWhiteBoxServiceStatusResponse

func NewDescribeWhiteBoxServiceStatusResponse() (response *DescribeWhiteBoxServiceStatusResponse)

func (*DescribeWhiteBoxServiceStatusResponse) FromJsonString

func (r *DescribeWhiteBoxServiceStatusResponse) FromJsonString(s string) error

func (*DescribeWhiteBoxServiceStatusResponse) ToJsonString

type DeviceFingerprint

type DeviceFingerprint struct {

	// 指纹信息,由设备指纹采集工具采集获得,格式满足正则表达式:^[0-9a-f]{8}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{16}$
	Identity *string `json:"Identity,omitempty" name:"Identity"`

	// 描述信息,如:IP,设备名称等,最大1024字节
	// 注意:此字段可能返回 null,表示取不到有效值。
	Description *string `json:"Description,omitempty" name:"Description"`
}

type DisableKeyRequest

type DisableKeyRequest struct {
	*tchttp.BaseRequest

	// CMK唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDisableKeyRequest

func NewDisableKeyRequest() (request *DisableKeyRequest)

func (*DisableKeyRequest) FromJsonString

func (r *DisableKeyRequest) FromJsonString(s string) error

func (*DisableKeyRequest) ToJsonString

func (r *DisableKeyRequest) ToJsonString() string

type DisableKeyResponse

type DisableKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDisableKeyResponse

func NewDisableKeyResponse() (response *DisableKeyResponse)

func (*DisableKeyResponse) FromJsonString

func (r *DisableKeyResponse) FromJsonString(s string) error

func (*DisableKeyResponse) ToJsonString

func (r *DisableKeyResponse) ToJsonString() string

type DisableKeyRotationRequest

type DisableKeyRotationRequest struct {
	*tchttp.BaseRequest

	// CMK唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDisableKeyRotationRequest

func NewDisableKeyRotationRequest() (request *DisableKeyRotationRequest)

func (*DisableKeyRotationRequest) FromJsonString

func (r *DisableKeyRotationRequest) FromJsonString(s string) error

func (*DisableKeyRotationRequest) ToJsonString

func (r *DisableKeyRotationRequest) ToJsonString() string

type DisableKeyRotationResponse

type DisableKeyRotationResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDisableKeyRotationResponse

func NewDisableKeyRotationResponse() (response *DisableKeyRotationResponse)

func (*DisableKeyRotationResponse) FromJsonString

func (r *DisableKeyRotationResponse) FromJsonString(s string) error

func (*DisableKeyRotationResponse) ToJsonString

func (r *DisableKeyRotationResponse) ToJsonString() string

type DisableKeysRequest

type DisableKeysRequest struct {
	*tchttp.BaseRequest

	// 需要批量禁用的CMK Id 列表,CMK数量最大支持100
	KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list`
}

func NewDisableKeysRequest

func NewDisableKeysRequest() (request *DisableKeysRequest)

func (*DisableKeysRequest) FromJsonString

func (r *DisableKeysRequest) FromJsonString(s string) error

func (*DisableKeysRequest) ToJsonString

func (r *DisableKeysRequest) ToJsonString() string

type DisableKeysResponse

type DisableKeysResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDisableKeysResponse

func NewDisableKeysResponse() (response *DisableKeysResponse)

func (*DisableKeysResponse) FromJsonString

func (r *DisableKeysResponse) FromJsonString(s string) error

func (*DisableKeysResponse) ToJsonString

func (r *DisableKeysResponse) ToJsonString() string

type DisableWhiteBoxKeyRequest

type DisableWhiteBoxKeyRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewDisableWhiteBoxKeyRequest

func NewDisableWhiteBoxKeyRequest() (request *DisableWhiteBoxKeyRequest)

func (*DisableWhiteBoxKeyRequest) FromJsonString

func (r *DisableWhiteBoxKeyRequest) FromJsonString(s string) error

func (*DisableWhiteBoxKeyRequest) ToJsonString

func (r *DisableWhiteBoxKeyRequest) ToJsonString() string

type DisableWhiteBoxKeyResponse

type DisableWhiteBoxKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDisableWhiteBoxKeyResponse

func NewDisableWhiteBoxKeyResponse() (response *DisableWhiteBoxKeyResponse)

func (*DisableWhiteBoxKeyResponse) FromJsonString

func (r *DisableWhiteBoxKeyResponse) FromJsonString(s string) error

func (*DisableWhiteBoxKeyResponse) ToJsonString

func (r *DisableWhiteBoxKeyResponse) ToJsonString() string

type DisableWhiteBoxKeysRequest

type DisableWhiteBoxKeysRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。
	KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list`
}

func NewDisableWhiteBoxKeysRequest

func NewDisableWhiteBoxKeysRequest() (request *DisableWhiteBoxKeysRequest)

func (*DisableWhiteBoxKeysRequest) FromJsonString

func (r *DisableWhiteBoxKeysRequest) FromJsonString(s string) error

func (*DisableWhiteBoxKeysRequest) ToJsonString

func (r *DisableWhiteBoxKeysRequest) ToJsonString() string

type DisableWhiteBoxKeysResponse

type DisableWhiteBoxKeysResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDisableWhiteBoxKeysResponse

func NewDisableWhiteBoxKeysResponse() (response *DisableWhiteBoxKeysResponse)

func (*DisableWhiteBoxKeysResponse) FromJsonString

func (r *DisableWhiteBoxKeysResponse) FromJsonString(s string) error

func (*DisableWhiteBoxKeysResponse) ToJsonString

func (r *DisableWhiteBoxKeysResponse) ToJsonString() string

type EnableKeyRequest

type EnableKeyRequest struct {
	*tchttp.BaseRequest

	// CMK唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewEnableKeyRequest

func NewEnableKeyRequest() (request *EnableKeyRequest)

func (*EnableKeyRequest) FromJsonString

func (r *EnableKeyRequest) FromJsonString(s string) error

func (*EnableKeyRequest) ToJsonString

func (r *EnableKeyRequest) ToJsonString() string

type EnableKeyResponse

type EnableKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEnableKeyResponse

func NewEnableKeyResponse() (response *EnableKeyResponse)

func (*EnableKeyResponse) FromJsonString

func (r *EnableKeyResponse) FromJsonString(s string) error

func (*EnableKeyResponse) ToJsonString

func (r *EnableKeyResponse) ToJsonString() string

type EnableKeyRotationRequest

type EnableKeyRotationRequest struct {
	*tchttp.BaseRequest

	// CMK唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewEnableKeyRotationRequest

func NewEnableKeyRotationRequest() (request *EnableKeyRotationRequest)

func (*EnableKeyRotationRequest) FromJsonString

func (r *EnableKeyRotationRequest) FromJsonString(s string) error

func (*EnableKeyRotationRequest) ToJsonString

func (r *EnableKeyRotationRequest) ToJsonString() string

type EnableKeyRotationResponse

type EnableKeyRotationResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEnableKeyRotationResponse

func NewEnableKeyRotationResponse() (response *EnableKeyRotationResponse)

func (*EnableKeyRotationResponse) FromJsonString

func (r *EnableKeyRotationResponse) FromJsonString(s string) error

func (*EnableKeyRotationResponse) ToJsonString

func (r *EnableKeyRotationResponse) ToJsonString() string

type EnableKeysRequest

type EnableKeysRequest struct {
	*tchttp.BaseRequest

	// 需要批量启用的CMK Id 列表, CMK数量最大支持100
	KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list`
}

func NewEnableKeysRequest

func NewEnableKeysRequest() (request *EnableKeysRequest)

func (*EnableKeysRequest) FromJsonString

func (r *EnableKeysRequest) FromJsonString(s string) error

func (*EnableKeysRequest) ToJsonString

func (r *EnableKeysRequest) ToJsonString() string

type EnableKeysResponse

type EnableKeysResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEnableKeysResponse

func NewEnableKeysResponse() (response *EnableKeysResponse)

func (*EnableKeysResponse) FromJsonString

func (r *EnableKeysResponse) FromJsonString(s string) error

func (*EnableKeysResponse) ToJsonString

func (r *EnableKeysResponse) ToJsonString() string

type EnableWhiteBoxKeyRequest

type EnableWhiteBoxKeyRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewEnableWhiteBoxKeyRequest

func NewEnableWhiteBoxKeyRequest() (request *EnableWhiteBoxKeyRequest)

func (*EnableWhiteBoxKeyRequest) FromJsonString

func (r *EnableWhiteBoxKeyRequest) FromJsonString(s string) error

func (*EnableWhiteBoxKeyRequest) ToJsonString

func (r *EnableWhiteBoxKeyRequest) ToJsonString() string

type EnableWhiteBoxKeyResponse

type EnableWhiteBoxKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEnableWhiteBoxKeyResponse

func NewEnableWhiteBoxKeyResponse() (response *EnableWhiteBoxKeyResponse)

func (*EnableWhiteBoxKeyResponse) FromJsonString

func (r *EnableWhiteBoxKeyResponse) FromJsonString(s string) error

func (*EnableWhiteBoxKeyResponse) ToJsonString

func (r *EnableWhiteBoxKeyResponse) ToJsonString() string

type EnableWhiteBoxKeysRequest

type EnableWhiteBoxKeysRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。
	KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds" list`
}

func NewEnableWhiteBoxKeysRequest

func NewEnableWhiteBoxKeysRequest() (request *EnableWhiteBoxKeysRequest)

func (*EnableWhiteBoxKeysRequest) FromJsonString

func (r *EnableWhiteBoxKeysRequest) FromJsonString(s string) error

func (*EnableWhiteBoxKeysRequest) ToJsonString

func (r *EnableWhiteBoxKeysRequest) ToJsonString() string

type EnableWhiteBoxKeysResponse

type EnableWhiteBoxKeysResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEnableWhiteBoxKeysResponse

func NewEnableWhiteBoxKeysResponse() (response *EnableWhiteBoxKeysResponse)

func (*EnableWhiteBoxKeysResponse) FromJsonString

func (r *EnableWhiteBoxKeysResponse) FromJsonString(s string) error

func (*EnableWhiteBoxKeysResponse) ToJsonString

func (r *EnableWhiteBoxKeysResponse) ToJsonString() string

type EncryptByWhiteBoxRequest

type EncryptByWhiteBoxRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 待加密的文本, base64编码,文本的原始长度最大不超过4KB
	PlainText *string `json:"PlainText,omitempty" name:"PlainText"`

	// 初始化向量,大小为 16 Bytes,加密算法会使用到, base64编码;如果不传,则由后端服务随机生成。用户需要自行保存该值,作为解密的参数。
	InitializationVector *string `json:"InitializationVector,omitempty" name:"InitializationVector"`
}

func NewEncryptByWhiteBoxRequest

func NewEncryptByWhiteBoxRequest() (request *EncryptByWhiteBoxRequest)

func (*EncryptByWhiteBoxRequest) FromJsonString

func (r *EncryptByWhiteBoxRequest) FromJsonString(s string) error

func (*EncryptByWhiteBoxRequest) ToJsonString

func (r *EncryptByWhiteBoxRequest) ToJsonString() string

type EncryptByWhiteBoxResponse

type EncryptByWhiteBoxResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 初始化向量,加密算法会使用到, base64编码。如果由调用方在入参中传入,则原样返回。如果调用方没有传入,则后端服务随机生成,并返回
		InitializationVector *string `json:"InitializationVector,omitempty" name:"InitializationVector"`

		// 加密后的密文,base64编码
		CipherText *string `json:"CipherText,omitempty" name:"CipherText"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEncryptByWhiteBoxResponse

func NewEncryptByWhiteBoxResponse() (response *EncryptByWhiteBoxResponse)

func (*EncryptByWhiteBoxResponse) FromJsonString

func (r *EncryptByWhiteBoxResponse) FromJsonString(s string) error

func (*EncryptByWhiteBoxResponse) ToJsonString

func (r *EncryptByWhiteBoxResponse) ToJsonString() string

type EncryptRequest

type EncryptRequest struct {
	*tchttp.BaseRequest

	// 调用CreateKey生成的CMK全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K
	Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"`

	// key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符
	EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"`
}

func NewEncryptRequest

func NewEncryptRequest() (request *EncryptRequest)

func (*EncryptRequest) FromJsonString

func (r *EncryptRequest) FromJsonString(s string) error

func (*EncryptRequest) ToJsonString

func (r *EncryptRequest) ToJsonString() string

type EncryptResponse

type EncryptResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 加密后经过base64编码的密文
		CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"`

		// 加密使用的CMK的全局唯一标识
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEncryptResponse

func NewEncryptResponse() (response *EncryptResponse)

func (*EncryptResponse) FromJsonString

func (r *EncryptResponse) FromJsonString(s string) error

func (*EncryptResponse) ToJsonString

func (r *EncryptResponse) ToJsonString() string

type GenerateDataKeyRequest

type GenerateDataKeyRequest struct {
	*tchttp.BaseRequest

	// CMK全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个
	KeySpec *string `json:"KeySpec,omitempty" name:"KeySpec"`

	// 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个
	NumberOfBytes *uint64 `json:"NumberOfBytes,omitempty" name:"NumberOfBytes"`

	// key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串
	EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"`
}

func NewGenerateDataKeyRequest

func NewGenerateDataKeyRequest() (request *GenerateDataKeyRequest)

func (*GenerateDataKeyRequest) FromJsonString

func (r *GenerateDataKeyRequest) FromJsonString(s string) error

func (*GenerateDataKeyRequest) ToJsonString

func (r *GenerateDataKeyRequest) ToJsonString() string

type GenerateDataKeyResponse

type GenerateDataKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的全局唯一标识
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 生成的数据密钥DataKey的明文,该明文使用base64进行了编码,需base64解码后作为数据密钥本地使用
		Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"`

		// 数据密钥DataKey加密后的密文,用户需要自行保存该密文,KMS不托管用户的数据密钥。可以通过Decrypt接口从CiphertextBlob中获取数据密钥DataKey明文
		CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewGenerateDataKeyResponse

func NewGenerateDataKeyResponse() (response *GenerateDataKeyResponse)

func (*GenerateDataKeyResponse) FromJsonString

func (r *GenerateDataKeyResponse) FromJsonString(s string) error

func (*GenerateDataKeyResponse) ToJsonString

func (r *GenerateDataKeyResponse) ToJsonString() string

type GenerateRandomRequest

type GenerateRandomRequest struct {
	*tchttp.BaseRequest

	// 生成的随机数的长度。最小值为1, 最大值为1024。
	NumberOfBytes *uint64 `json:"NumberOfBytes,omitempty" name:"NumberOfBytes"`
}

func NewGenerateRandomRequest

func NewGenerateRandomRequest() (request *GenerateRandomRequest)

func (*GenerateRandomRequest) FromJsonString

func (r *GenerateRandomRequest) FromJsonString(s string) error

func (*GenerateRandomRequest) ToJsonString

func (r *GenerateRandomRequest) ToJsonString() string

type GenerateRandomResponse

type GenerateRandomResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 生成的随机数的明文,该明文使用base64编码,用户需要使用base64解码得到明文。
		Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewGenerateRandomResponse

func NewGenerateRandomResponse() (response *GenerateRandomResponse)

func (*GenerateRandomResponse) FromJsonString

func (r *GenerateRandomResponse) FromJsonString(s string) error

func (*GenerateRandomResponse) ToJsonString

func (r *GenerateRandomResponse) ToJsonString() string

type GetKeyRotationStatusRequest

type GetKeyRotationStatusRequest struct {
	*tchttp.BaseRequest

	// CMK唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewGetKeyRotationStatusRequest

func NewGetKeyRotationStatusRequest() (request *GetKeyRotationStatusRequest)

func (*GetKeyRotationStatusRequest) FromJsonString

func (r *GetKeyRotationStatusRequest) FromJsonString(s string) error

func (*GetKeyRotationStatusRequest) ToJsonString

func (r *GetKeyRotationStatusRequest) ToJsonString() string

type GetKeyRotationStatusResponse

type GetKeyRotationStatusResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 密钥轮换是否开启
		KeyRotationEnabled *bool `json:"KeyRotationEnabled,omitempty" name:"KeyRotationEnabled"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewGetKeyRotationStatusResponse

func NewGetKeyRotationStatusResponse() (response *GetKeyRotationStatusResponse)

func (*GetKeyRotationStatusResponse) FromJsonString

func (r *GetKeyRotationStatusResponse) FromJsonString(s string) error

func (*GetKeyRotationStatusResponse) ToJsonString

func (r *GetKeyRotationStatusResponse) ToJsonString() string

type GetParametersForImportRequest

type GetParametersForImportRequest struct {
	*tchttp.BaseRequest

	// CMK的唯一标识,获取密钥参数的CMK必须是EXTERNAL类型,即在CreateKey时指定Type=2 类型的CMK。
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 指定加密密钥材料的算法,目前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256
	WrappingAlgorithm *string `json:"WrappingAlgorithm,omitempty" name:"WrappingAlgorithm"`

	// 指定加密密钥材料的类型,目前只支持RSA_2048
	WrappingKeySpec *string `json:"WrappingKeySpec,omitempty" name:"WrappingKeySpec"`
}

func NewGetParametersForImportRequest

func NewGetParametersForImportRequest() (request *GetParametersForImportRequest)

func (*GetParametersForImportRequest) FromJsonString

func (r *GetParametersForImportRequest) FromJsonString(s string) error

func (*GetParametersForImportRequest) ToJsonString

func (r *GetParametersForImportRequest) ToJsonString() string

type GetParametersForImportResponse

type GetParametersForImportResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的唯一标识,用于指定目标导入密钥材料的CMK。
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 导入密钥材料需要的token,用于作为 ImportKeyMaterial 的参数。
		ImportToken *string `json:"ImportToken,omitempty" name:"ImportToken"`

		// 用于加密密钥材料的RSA公钥,base64编码。使用PublicKey base64解码后的公钥将导入密钥进行加密后作为 ImportKeyMaterial 的参数。
		PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"`

		// 该导出token和公钥的有效期,超过该时间后无法导入,需要重新调用GetParametersForImport获取。
		ParametersValidTo *uint64 `json:"ParametersValidTo,omitempty" name:"ParametersValidTo"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewGetParametersForImportResponse

func NewGetParametersForImportResponse() (response *GetParametersForImportResponse)

func (*GetParametersForImportResponse) FromJsonString

func (r *GetParametersForImportResponse) FromJsonString(s string) error

func (*GetParametersForImportResponse) ToJsonString

func (r *GetParametersForImportResponse) ToJsonString() string

type GetPublicKeyRequest

type GetPublicKeyRequest struct {
	*tchttp.BaseRequest

	// CMK的唯一标识。
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewGetPublicKeyRequest

func NewGetPublicKeyRequest() (request *GetPublicKeyRequest)

func (*GetPublicKeyRequest) FromJsonString

func (r *GetPublicKeyRequest) FromJsonString(s string) error

func (*GetPublicKeyRequest) ToJsonString

func (r *GetPublicKeyRequest) ToJsonString() string

type GetPublicKeyResponse

type GetPublicKeyResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的唯一标识。
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 经过base64编码的公钥内容。
		PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"`

		// PEM格式的公钥内容。
		PublicKeyPem *string `json:"PublicKeyPem,omitempty" name:"PublicKeyPem"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewGetPublicKeyResponse

func NewGetPublicKeyResponse() (response *GetPublicKeyResponse)

func (*GetPublicKeyResponse) FromJsonString

func (r *GetPublicKeyResponse) FromJsonString(s string) error

func (*GetPublicKeyResponse) ToJsonString

func (r *GetPublicKeyResponse) ToJsonString() string

type GetServiceStatusRequest

type GetServiceStatusRequest struct {
	*tchttp.BaseRequest
}

func NewGetServiceStatusRequest

func NewGetServiceStatusRequest() (request *GetServiceStatusRequest)

func (*GetServiceStatusRequest) FromJsonString

func (r *GetServiceStatusRequest) FromJsonString(s string) error

func (*GetServiceStatusRequest) ToJsonString

func (r *GetServiceStatusRequest) ToJsonString() string

type GetServiceStatusResponse

type GetServiceStatusResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// KMS服务是否开通, true 表示已开通
		ServiceEnabled *bool `json:"ServiceEnabled,omitempty" name:"ServiceEnabled"`

		// 服务不可用类型: 0-未购买,1-正常, 2-欠费停服, 3-资源释放
		// 注意:此字段可能返回 null,表示取不到有效值。
		InvalidType *int64 `json:"InvalidType,omitempty" name:"InvalidType"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewGetServiceStatusResponse

func NewGetServiceStatusResponse() (response *GetServiceStatusResponse)

func (*GetServiceStatusResponse) FromJsonString

func (r *GetServiceStatusResponse) FromJsonString(s string) error

func (*GetServiceStatusResponse) ToJsonString

func (r *GetServiceStatusResponse) ToJsonString() string

type ImportKeyMaterialRequest

type ImportKeyMaterialRequest struct {
	*tchttp.BaseRequest

	// 使用GetParametersForImport 返回的PublicKey加密后的密钥材料base64编码。对于国密版本region的KMS,导入的密钥材料长度要求为 128 bit,FIPS版本region的KMS, 导入的密钥材料长度要求为 256 bit。
	EncryptedKeyMaterial *string `json:"EncryptedKeyMaterial,omitempty" name:"EncryptedKeyMaterial"`

	// 通过调用GetParametersForImport获得的导入令牌。
	ImportToken *string `json:"ImportToken,omitempty" name:"ImportToken"`

	// 指定导入密钥材料的CMK,需要和GetParametersForImport 指定的CMK相同。
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 密钥材料过期时间 unix 时间戳,不指定或者 0 表示密钥材料不会过期,若指定过期时间,需要大于当前时间点,最大支持 2147443200。
	ValidTo *uint64 `json:"ValidTo,omitempty" name:"ValidTo"`
}

func NewImportKeyMaterialRequest

func NewImportKeyMaterialRequest() (request *ImportKeyMaterialRequest)

func (*ImportKeyMaterialRequest) FromJsonString

func (r *ImportKeyMaterialRequest) FromJsonString(s string) error

func (*ImportKeyMaterialRequest) ToJsonString

func (r *ImportKeyMaterialRequest) ToJsonString() string

type ImportKeyMaterialResponse

type ImportKeyMaterialResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewImportKeyMaterialResponse

func NewImportKeyMaterialResponse() (response *ImportKeyMaterialResponse)

func (*ImportKeyMaterialResponse) FromJsonString

func (r *ImportKeyMaterialResponse) FromJsonString(s string) error

func (*ImportKeyMaterialResponse) ToJsonString

func (r *ImportKeyMaterialResponse) ToJsonString() string

type Key

type Key struct {

	// CMK的全局唯一标识。
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

type KeyMetadata

type KeyMetadata struct {

	// CMK的全局唯一标识
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 作为密钥更容易辨识,更容易被人看懂的别名
	Alias *string `json:"Alias,omitempty" name:"Alias"`

	// 密钥创建时间
	CreateTime *uint64 `json:"CreateTime,omitempty" name:"CreateTime"`

	// CMK的描述
	Description *string `json:"Description,omitempty" name:"Description"`

	// CMK的状态, 取值为:Enabled | Disabled | PendingDelete | PendingImport
	KeyState *string `json:"KeyState,omitempty" name:"KeyState"`

	// CMK用途,取值为: ENCRYPT_DECRYPT | ASYMMETRIC_DECRYPT_RSA_2048 | ASYMMETRIC_DECRYPT_SM2
	KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"`

	// CMK类型,2 表示符合FIPS标准,4表示符合国密标准
	Type *int64 `json:"Type,omitempty" name:"Type"`

	// 创建者
	CreatorUin *uint64 `json:"CreatorUin,omitempty" name:"CreatorUin"`

	// 是否开启了密钥轮换功能
	KeyRotationEnabled *bool `json:"KeyRotationEnabled,omitempty" name:"KeyRotationEnabled"`

	// CMK的创建者,用户创建的为 user,授权各云产品自动创建的为对应的产品名
	Owner *string `json:"Owner,omitempty" name:"Owner"`

	// 在密钥轮换开启状态下,下次轮换的时间
	NextRotateTime *uint64 `json:"NextRotateTime,omitempty" name:"NextRotateTime"`

	// 计划删除的时间
	// 注意:此字段可能返回 null,表示取不到有效值。
	DeletionDate *uint64 `json:"DeletionDate,omitempty" name:"DeletionDate"`

	// CMK 密钥材料类型,由KMS创建的为: TENCENT_KMS, 由用户导入的类型为:EXTERNAL
	// 注意:此字段可能返回 null,表示取不到有效值。
	Origin *string `json:"Origin,omitempty" name:"Origin"`

	// 在Origin为  EXTERNAL 时有效,表示密钥材料的有效日期, 0 表示不过期
	// 注意:此字段可能返回 null,表示取不到有效值。
	ValidTo *uint64 `json:"ValidTo,omitempty" name:"ValidTo"`

	// 资源ID,格式:creatorUin/$creatorUin/$keyId
	ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"`
}

type ListAlgorithmsRequest

type ListAlgorithmsRequest struct {
	*tchttp.BaseRequest
}

func NewListAlgorithmsRequest

func NewListAlgorithmsRequest() (request *ListAlgorithmsRequest)

func (*ListAlgorithmsRequest) FromJsonString

func (r *ListAlgorithmsRequest) FromJsonString(s string) error

func (*ListAlgorithmsRequest) ToJsonString

func (r *ListAlgorithmsRequest) ToJsonString() string

type ListAlgorithmsResponse

type ListAlgorithmsResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 本地区支持的对称加密算法
		SymmetricAlgorithms []*AlgorithmInfo `json:"SymmetricAlgorithms,omitempty" name:"SymmetricAlgorithms" list`

		// 本地区支持的非对称加密算法
		AsymmetricAlgorithms []*AlgorithmInfo `json:"AsymmetricAlgorithms,omitempty" name:"AsymmetricAlgorithms" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewListAlgorithmsResponse

func NewListAlgorithmsResponse() (response *ListAlgorithmsResponse)

func (*ListAlgorithmsResponse) FromJsonString

func (r *ListAlgorithmsResponse) FromJsonString(s string) error

func (*ListAlgorithmsResponse) ToJsonString

func (r *ListAlgorithmsResponse) ToJsonString() string

type ListKeyDetailRequest

type ListKeyDetailRequest struct {
	*tchttp.BaseRequest

	// 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
	Offset *uint64 `json:"Offset,omitempty" name:"Offset"`

	// 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为10,最大值为200
	Limit *uint64 `json:"Limit,omitempty" name:"Limit"`

	// 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk
	Role *uint64 `json:"Role,omitempty" name:"Role"`

	// 根据CMK创建时间排序, 0 表示按照降序排序,1表示按照升序排序
	OrderType *uint64 `json:"OrderType,omitempty" name:"OrderType"`

	// 根据CMK状态筛选, 0表示全部CMK, 1 表示仅查询Enabled CMK, 2 表示仅查询Disabled CMK,3 表示查询PendingDelete 状态的CMK(处于计划删除状态的Key),4 表示查询 PendingImport 状态的CMK
	KeyState *uint64 `json:"KeyState,omitempty" name:"KeyState"`

	// 根据KeyId或者Alias进行模糊匹配查询
	SearchKeyAlias *string `json:"SearchKeyAlias,omitempty" name:"SearchKeyAlias"`

	// 根据CMK类型筛选, "TENCENT_KMS" 表示筛选密钥材料由KMS创建的CMK, "EXTERNAL" 表示筛选密钥材料需要用户导入的 EXTERNAL类型CMK,"ALL" 或者不设置表示两种类型都查询,大小写敏感。
	Origin *string `json:"Origin,omitempty" name:"Origin"`

	// 根据CMK的KeyUsage筛选,ALL表示筛选全部,可使用的参数为:ALL 或 ENCRYPT_DECRYPT 或 ASYMMETRIC_DECRYPT_RSA_2048 或 ASYMMETRIC_DECRYPT_SM2,为空则默认筛选ENCRYPT_DECRYPT类型
	KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"`
}

func NewListKeyDetailRequest

func NewListKeyDetailRequest() (request *ListKeyDetailRequest)

func (*ListKeyDetailRequest) FromJsonString

func (r *ListKeyDetailRequest) FromJsonString(s string) error

func (*ListKeyDetailRequest) ToJsonString

func (r *ListKeyDetailRequest) ToJsonString() string

type ListKeyDetailResponse

type ListKeyDetailResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK的总数量
		TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`

		// 返回的属性信息列表。
		// 注意:此字段可能返回 null,表示取不到有效值。
		KeyMetadatas []*KeyMetadata `json:"KeyMetadatas,omitempty" name:"KeyMetadatas" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewListKeyDetailResponse

func NewListKeyDetailResponse() (response *ListKeyDetailResponse)

func (*ListKeyDetailResponse) FromJsonString

func (r *ListKeyDetailResponse) FromJsonString(s string) error

func (*ListKeyDetailResponse) ToJsonString

func (r *ListKeyDetailResponse) ToJsonString() string

type ListKeysRequest

type ListKeysRequest struct {
	*tchttp.BaseRequest

	// 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
	Offset *uint64 `json:"Offset,omitempty" name:"Offset"`

	// 含义跟 SQL 查询的 Limit 一致,表示本次获最多获取 Limit 个元素。缺省值为10,最大值为200
	Limit *uint64 `json:"Limit,omitempty" name:"Limit"`

	// 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk
	Role *uint64 `json:"Role,omitempty" name:"Role"`
}

func NewListKeysRequest

func NewListKeysRequest() (request *ListKeysRequest)

func (*ListKeysRequest) FromJsonString

func (r *ListKeysRequest) FromJsonString(s string) error

func (*ListKeysRequest) ToJsonString

func (r *ListKeysRequest) ToJsonString() string

type ListKeysResponse

type ListKeysResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// CMK列表数组
		// 注意:此字段可能返回 null,表示取不到有效值。
		Keys []*Key `json:"Keys,omitempty" name:"Keys" list`

		// CMK的总数量
		TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewListKeysResponse

func NewListKeysResponse() (response *ListKeysResponse)

func (*ListKeysResponse) FromJsonString

func (r *ListKeysResponse) FromJsonString(s string) error

func (*ListKeysResponse) ToJsonString

func (r *ListKeysResponse) ToJsonString() string

type OverwriteWhiteBoxDeviceFingerprintsRequest

type OverwriteWhiteBoxDeviceFingerprintsRequest struct {
	*tchttp.BaseRequest

	// 白盒密钥ID
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 设备指纹列表,如果列表为空,则表示删除该密钥对应的所有指纹信息。列表最大长度不超过200。
	DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitempty" name:"DeviceFingerprints" list`
}

func NewOverwriteWhiteBoxDeviceFingerprintsRequest

func NewOverwriteWhiteBoxDeviceFingerprintsRequest() (request *OverwriteWhiteBoxDeviceFingerprintsRequest)

func (*OverwriteWhiteBoxDeviceFingerprintsRequest) FromJsonString

func (*OverwriteWhiteBoxDeviceFingerprintsRequest) ToJsonString

type OverwriteWhiteBoxDeviceFingerprintsResponse

type OverwriteWhiteBoxDeviceFingerprintsResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewOverwriteWhiteBoxDeviceFingerprintsResponse

func NewOverwriteWhiteBoxDeviceFingerprintsResponse() (response *OverwriteWhiteBoxDeviceFingerprintsResponse)

func (*OverwriteWhiteBoxDeviceFingerprintsResponse) FromJsonString

func (*OverwriteWhiteBoxDeviceFingerprintsResponse) ToJsonString

type ReEncryptRequest

type ReEncryptRequest struct {
	*tchttp.BaseRequest

	// 需要重新加密的密文
	CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"`

	// 重新加密使用的CMK,如果为空,则使用密文原有的CMK重新加密(若密钥没有轮换则密文不会刷新)
	DestinationKeyId *string `json:"DestinationKeyId,omitempty" name:"DestinationKeyId"`

	// CiphertextBlob 密文加密时使用的key/value对的json字符串。如果加密时未使用,则为空
	SourceEncryptionContext *string `json:"SourceEncryptionContext,omitempty" name:"SourceEncryptionContext"`

	// 重新加密使用的key/value对的json字符串,如果使用该字段,则返回的新密文在解密时需要填入相同的字符串
	DestinationEncryptionContext *string `json:"DestinationEncryptionContext,omitempty" name:"DestinationEncryptionContext"`
}

func NewReEncryptRequest

func NewReEncryptRequest() (request *ReEncryptRequest)

func (*ReEncryptRequest) FromJsonString

func (r *ReEncryptRequest) FromJsonString(s string) error

func (*ReEncryptRequest) ToJsonString

func (r *ReEncryptRequest) ToJsonString() string

type ReEncryptResponse

type ReEncryptResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 重新加密后的密文
		CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"`

		// 重新加密使用的CMK
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 重新加密前密文使用的CMK
		SourceKeyId *string `json:"SourceKeyId,omitempty" name:"SourceKeyId"`

		// true表示密文已经重新加密。同一个CMK进行重加密,在密钥没有发生轮换的情况下不会进行实际重新加密操作,返回原密文
		ReEncrypted *bool `json:"ReEncrypted,omitempty" name:"ReEncrypted"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewReEncryptResponse

func NewReEncryptResponse() (response *ReEncryptResponse)

func (*ReEncryptResponse) FromJsonString

func (r *ReEncryptResponse) FromJsonString(s string) error

func (*ReEncryptResponse) ToJsonString

func (r *ReEncryptResponse) ToJsonString() string

type ScheduleKeyDeletionRequest

type ScheduleKeyDeletionRequest struct {
	*tchttp.BaseRequest

	// CMK的唯一标志
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 计划删除时间区间[7,30]
	PendingWindowInDays *uint64 `json:"PendingWindowInDays,omitempty" name:"PendingWindowInDays"`
}

func NewScheduleKeyDeletionRequest

func NewScheduleKeyDeletionRequest() (request *ScheduleKeyDeletionRequest)

func (*ScheduleKeyDeletionRequest) FromJsonString

func (r *ScheduleKeyDeletionRequest) FromJsonString(s string) error

func (*ScheduleKeyDeletionRequest) ToJsonString

func (r *ScheduleKeyDeletionRequest) ToJsonString() string

type ScheduleKeyDeletionResponse

type ScheduleKeyDeletionResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 计划删除执行时间
		DeletionDate *uint64 `json:"DeletionDate,omitempty" name:"DeletionDate"`

		// 唯一标志被计划删除的CMK
		KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewScheduleKeyDeletionResponse

func NewScheduleKeyDeletionResponse() (response *ScheduleKeyDeletionResponse)

func (*ScheduleKeyDeletionResponse) FromJsonString

func (r *ScheduleKeyDeletionResponse) FromJsonString(s string) error

func (*ScheduleKeyDeletionResponse) ToJsonString

func (r *ScheduleKeyDeletionResponse) ToJsonString() string

type Tag

type Tag struct {

	// 标签键
	TagKey *string `json:"TagKey,omitempty" name:"TagKey"`

	// 标签值
	TagValue *string `json:"TagValue,omitempty" name:"TagValue"`
}

type UnbindCloudResourceRequest

type UnbindCloudResourceRequest struct {
	*tchttp.BaseRequest

	// cmk的ID
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 云产品的唯一性标识符
	ProductId *string `json:"ProductId,omitempty" name:"ProductId"`

	// 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。
	ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"`
}

func NewUnbindCloudResourceRequest

func NewUnbindCloudResourceRequest() (request *UnbindCloudResourceRequest)

func (*UnbindCloudResourceRequest) FromJsonString

func (r *UnbindCloudResourceRequest) FromJsonString(s string) error

func (*UnbindCloudResourceRequest) ToJsonString

func (r *UnbindCloudResourceRequest) ToJsonString() string

type UnbindCloudResourceResponse

type UnbindCloudResourceResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewUnbindCloudResourceResponse

func NewUnbindCloudResourceResponse() (response *UnbindCloudResourceResponse)

func (*UnbindCloudResourceResponse) FromJsonString

func (r *UnbindCloudResourceResponse) FromJsonString(s string) error

func (*UnbindCloudResourceResponse) ToJsonString

func (r *UnbindCloudResourceResponse) ToJsonString() string

type UpdateAliasRequest

type UpdateAliasRequest struct {
	*tchttp.BaseRequest

	// 新的别名,1-60个字符或数字的组合
	Alias *string `json:"Alias,omitempty" name:"Alias"`

	// CMK的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewUpdateAliasRequest

func NewUpdateAliasRequest() (request *UpdateAliasRequest)

func (*UpdateAliasRequest) FromJsonString

func (r *UpdateAliasRequest) FromJsonString(s string) error

func (*UpdateAliasRequest) ToJsonString

func (r *UpdateAliasRequest) ToJsonString() string

type UpdateAliasResponse

type UpdateAliasResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewUpdateAliasResponse

func NewUpdateAliasResponse() (response *UpdateAliasResponse)

func (*UpdateAliasResponse) FromJsonString

func (r *UpdateAliasResponse) FromJsonString(s string) error

func (*UpdateAliasResponse) ToJsonString

func (r *UpdateAliasResponse) ToJsonString() string

type UpdateKeyDescriptionRequest

type UpdateKeyDescriptionRequest struct {
	*tchttp.BaseRequest

	// 新的描述信息,最大支持1024字节
	Description *string `json:"Description,omitempty" name:"Description"`

	// 需要修改描述信息的CMK ID
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`
}

func NewUpdateKeyDescriptionRequest

func NewUpdateKeyDescriptionRequest() (request *UpdateKeyDescriptionRequest)

func (*UpdateKeyDescriptionRequest) FromJsonString

func (r *UpdateKeyDescriptionRequest) FromJsonString(s string) error

func (*UpdateKeyDescriptionRequest) ToJsonString

func (r *UpdateKeyDescriptionRequest) ToJsonString() string

type UpdateKeyDescriptionResponse

type UpdateKeyDescriptionResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewUpdateKeyDescriptionResponse

func NewUpdateKeyDescriptionResponse() (response *UpdateKeyDescriptionResponse)

func (*UpdateKeyDescriptionResponse) FromJsonString

func (r *UpdateKeyDescriptionResponse) FromJsonString(s string) error

func (*UpdateKeyDescriptionResponse) ToJsonString

func (r *UpdateKeyDescriptionResponse) ToJsonString() string

type WhiteboxKeyInfo

type WhiteboxKeyInfo struct {

	// 白盒密钥的全局唯一标识符
	KeyId *string `json:"KeyId,omitempty" name:"KeyId"`

	// 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字. 不可重复
	Alias *string `json:"Alias,omitempty" name:"Alias"`

	// 创建者
	CreatorUin *uint64 `json:"CreatorUin,omitempty" name:"CreatorUin"`

	// 密钥的描述信息
	Description *string `json:"Description,omitempty" name:"Description"`

	// 密钥创建时间,Unix时间戳
	CreateTime *uint64 `json:"CreateTime,omitempty" name:"CreateTime"`

	// 白盒密钥的状态, 取值为:Enabled | Disabled
	Status *string `json:"Status,omitempty" name:"Status"`

	// 创建者
	OwnerUin *uint64 `json:"OwnerUin,omitempty" name:"OwnerUin"`

	// 密钥所用的算法类型
	Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"`

	// 白盒加密密钥,base64编码
	EncryptKey *string `json:"EncryptKey,omitempty" name:"EncryptKey"`

	// 白盒解密密钥,base64编码
	DecryptKey *string `json:"DecryptKey,omitempty" name:"DecryptKey"`

	// 资源ID,格式:creatorUin/$creatorUin/$keyId
	ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL