v20190118

package
v3.0.93+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 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 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) 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) Decrypt

func (c *Client) Decrypt(request *DecryptRequest) (response *DecryptResponse, 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) 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) 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) Encrypt

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

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

func (*Client) GenerateDataKey

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

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

func (*Client) GetKeyRotationStatus

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

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

func (*Client) GetServiceStatus

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

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

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)

列出账号下面的密钥列表(KeyId信息)。

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) UpdateAlias

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

用于修改CMK的别名。

func (*Client) UpdateKeyDescription

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

该接口用于对指定的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",默认为  "ENCRYPT_DECRYPT",即key用于加密和解密
	KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"`

	// 指定key类型,1为当前地域默认类型,默认为1,且当前只支持该类型
	Type *uint64 `json:"Type,omitempty" name:"Type"`
}

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"`

		// 唯一请求 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 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 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 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 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 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 {

		// 加密后的密文
		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 *string `json:"KeySpec,omitempty" name:"KeySpec"`

	// 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024
	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加密后的密文,用户需要自行保存密文
		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 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 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 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状态
	KeyState *string `json:"KeyState,omitempty" name:"KeyState"`

	// CMK用途,当前是 ENCRYPT_DECRYPT
	KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"`

	// CMK类型,当前为 1 普通类型
	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"`
}

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)
	KeyState *uint64 `json:"KeyState,omitempty" name:"KeyState"`

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

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,表示取不到有效值。
		// 注意:此字段可能返回 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 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 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

Jump to

Keyboard shortcuts

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