tencentcloud-sdk-nodejs-intl-en
Version:
1,907 lines (1,588 loc) • 190 kB
JavaScript
/*
* Copyright (c) 2018 Tencent. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* UpdateAlias request structure.
* @class
*/
class UpdateAliasRequest extends AbstractModel {
constructor(){
super();
/**
* New alias containing 1-60 characters or digits
* @type {string || null}
*/
this.Alias = null;
/**
* Globally unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Alias = 'Alias' in params ? params.Alias : null;
this.KeyId = 'KeyId' in params ? params.KeyId : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* EnableWhiteBoxKey request structure.
* @class
*/
class EnableWhiteBoxKeyRequest extends AbstractModel {
constructor(){
super();
/**
* Globally unique white-box key ID
* @type {string || null}
*/
this.KeyId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
}
}
/**
* AsymmetricRsaDecrypt request structure.
* @class
*/
class AsymmetricRsaDecryptRequest extends AbstractModel {
constructor(){
super();
/**
* Unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Base64-encoded ciphertext encrypted with `PublicKey`
* @type {string || null}
*/
this.Ciphertext = null;
/**
* Corresponding algorithm when a public key is used for encryption. Valid values: RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
* @type {string || null}
*/
this.Algorithm = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.Ciphertext = 'Ciphertext' in params ? params.Ciphertext : null;
this.Algorithm = 'Algorithm' in params ? params.Algorithm : null;
}
}
/**
* EnableKeyRotation request structure.
* @class
*/
class EnableKeyRotationRequest extends AbstractModel {
constructor(){
super();
/**
* Unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* The interval between each key rotation in days. Value range: 7 - 365 (default).
* @type {number || null}
*/
this.RotateDays = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.RotateDays = 'RotateDays' in params ? params.RotateDays : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* DescribeWhiteBoxKeyDetails response structure.
* @class
*/
class DescribeWhiteBoxKeyDetailsResponse extends AbstractModel {
constructor(){
super();
/**
* White-box key information list
* @type {Array.<WhiteboxKeyInfo> || null}
*/
this.KeyInfos = null;
/**
* Total number of white-box keys.
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.KeyInfos) {
this.KeyInfos = new Array();
for (let z in params.KeyInfos) {
let obj = new WhiteboxKeyInfo();
obj.deserialize(params.KeyInfos[z]);
this.KeyInfos.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CreateKey request structure.
* @class
*/
class CreateKeyRequest extends AbstractModel {
constructor(){
super();
/**
* Unique alias that makes a key more recognizable and understandable. This parameter cannot be empty, can contain 1-60 letters, digits, `-`, and `_`, and must begin with a letter or digit. The `kms-` prefix is used for Tencent Cloud products.
* @type {string || null}
*/
this.Alias = null;
/**
* CMK description of up to 1,024 bytes in length
* @type {string || null}
*/
this.Description = null;
/**
* Specifies the key purpose, defaults to "ENCRYPT_DECRYPT" indicating the creation of a symmetric encryption/decryption key. other supported purposes include "ASYMMETRIC_DECRYPT_RSA_2048" for RSA2048 ASYMMETRIC keys used to ENCRYPT and DECRYPT, "ASYMMETRIC_DECRYPT_SM2" for SM2 ASYMMETRIC keys used to ENCRYPT and DECRYPT, "ASYMMETRIC_SIGN_VERIFY_SM2" for SM2 ASYMMETRIC keys used for signature verification, "ASYMMETRIC_SIGN_VERIFY_ECC" for ECC ASYMMETRIC keys used for signature verification, "ASYMMETRIC_SIGN_VERIFY_RSA_2048" for RSA_2048 ASYMMETRIC keys used for signature verification, and "ASYMMETRIC_SIGN_VERIFY_ECDSA384" for ECDSA384 ASYMMETRIC keys used for signature verification. the complete list of key purposes and algorithm support can be obtained through the ListAlgorithms api.
* @type {string || null}
*/
this.KeyUsage = null;
/**
* Specifies the key type. Default value: 1. Valid value: 1 - default type, indicating that the CMK is created by KMS; 2 - EXTERNAL type, indicating that you need to import key material. For more information, please see the `GetParametersForImport` and `ImportKeyMaterial` API documents.
* @type {number || null}
*/
this.Type = null;
/**
* Tag list
* @type {Array.<Tag> || null}
*/
this.Tags = null;
/**
* ID of the HSM cluster. This field is only valid for Exclusive and Managed KMS instances.
* @type {string || null}
*/
this.HsmClusterId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Alias = 'Alias' in params ? params.Alias : null;
this.Description = 'Description' in params ? params.Description : null;
this.KeyUsage = 'KeyUsage' in params ? params.KeyUsage : null;
this.Type = 'Type' in params ? params.Type : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new Tag();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
this.HsmClusterId = 'HsmClusterId' in params ? params.HsmClusterId : null;
}
}
/**
* DisableWhiteBoxKey response structure.
* @class
*/
class DisableWhiteBoxKeyResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DisableKey response structure.
* @class
*/
class DisableKeyResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeWhiteBoxServiceStatus request structure.
* @class
*/
class DescribeWhiteBoxServiceStatusRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* UpdateDataKeyDescription request structure.
* @class
*/
class UpdateDataKeyDescriptionRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the unique identifier of the data key.
* @type {string || null}
*/
this.DataKeyId = null;
/**
* Data key description of up to 100 bytes.
* @type {string || null}
*/
this.Description = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DataKeyId = 'DataKeyId' in params ? params.DataKeyId : null;
this.Description = 'Description' in params ? params.Description : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* DescribeDataKey response structure.
* @class
*/
class DescribeDataKeyResponse extends AbstractModel {
constructor(){
super();
/**
* Specifies the data key attribute information.
* @type {DataKeyMetadata || null}
*/
this.DataKeyMetadata = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.DataKeyMetadata) {
let obj = new DataKeyMetadata();
obj.deserialize(params.DataKeyMetadata)
this.DataKeyMetadata = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DisableDataKey response structure.
* @class
*/
class DisableDataKeyResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeKey request structure.
* @class
*/
class DescribeKeyRequest extends AbstractModel {
constructor(){
super();
/**
* Globally unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Trusted service member account information.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* White-box key information
* @class
*/
class WhiteboxKeyInfo extends AbstractModel {
constructor(){
super();
/**
* Globally unique white-box key ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Unique alias that makes a key more recognizable and understandable. This parameter cannot be empty, can contain 1 to 60 letters, digits, hyphens (-), and underscores (_), and must begin with a letter or digit.
* @type {string || null}
*/
this.Alias = null;
/**
* Creator
* @type {number || null}
*/
this.CreatorUin = null;
/**
* Key description information
* @type {string || null}
*/
this.Description = null;
/**
* Key creation time in Unix timestamp
* @type {number || null}
*/
this.CreateTime = null;
/**
* White-box key status. Valid values: Enabled, Disabled
* @type {string || null}
*/
this.Status = null;
/**
* Creator
* @type {number || null}
*/
this.OwnerUin = null;
/**
* Key algorithm type
* @type {string || null}
*/
this.Algorithm = null;
/**
* Base64-encoded white-box encryption key
* @type {string || null}
*/
this.EncryptKey = null;
/**
* Base64-encoded white-box decryption key
* @type {string || null}
*/
this.DecryptKey = null;
/**
* Resource ID in the format of `creatorUin/$creatorUin/$keyId`
* @type {string || null}
*/
this.ResourceId = null;
/**
* Specifies whether there is a device fingerprint bound to the current key.
* @type {boolean || null}
*/
this.DeviceFingerprintBind = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.Alias = 'Alias' in params ? params.Alias : null;
this.CreatorUin = 'CreatorUin' in params ? params.CreatorUin : null;
this.Description = 'Description' in params ? params.Description : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.Status = 'Status' in params ? params.Status : null;
this.OwnerUin = 'OwnerUin' in params ? params.OwnerUin : null;
this.Algorithm = 'Algorithm' in params ? params.Algorithm : null;
this.EncryptKey = 'EncryptKey' in params ? params.EncryptKey : null;
this.DecryptKey = 'DecryptKey' in params ? params.DecryptKey : null;
this.ResourceId = 'ResourceId' in params ? params.ResourceId : null;
this.DeviceFingerprintBind = 'DeviceFingerprintBind' in params ? params.DeviceFingerprintBind : null;
}
}
/**
* DescribeDataKeys request structure.
* @class
*/
class DescribeDataKeysRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the ID list of datakeys to query. supports up to 100 DataKey ids in a batch query.
* @type {Array.<string> || null}
*/
this.DataKeyIds = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DataKeyIds = 'DataKeyIds' in params ? params.DataKeyIds : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* ListAlgorithms response structure.
* @class
*/
class ListAlgorithmsResponse extends AbstractModel {
constructor(){
super();
/**
* Symmetric encryption algorithms supported in this region
* @type {Array.<AlgorithmInfo> || null}
*/
this.SymmetricAlgorithms = null;
/**
* Asymmetric encryption algorithms supported in this region
* @type {Array.<AlgorithmInfo> || null}
*/
this.AsymmetricAlgorithms = null;
/**
* Asymmetric signature verification algorithms supported in the current region
* @type {Array.<AlgorithmInfo> || null}
*/
this.AsymmetricSignVerifyAlgorithms = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.SymmetricAlgorithms) {
this.SymmetricAlgorithms = new Array();
for (let z in params.SymmetricAlgorithms) {
let obj = new AlgorithmInfo();
obj.deserialize(params.SymmetricAlgorithms[z]);
this.SymmetricAlgorithms.push(obj);
}
}
if (params.AsymmetricAlgorithms) {
this.AsymmetricAlgorithms = new Array();
for (let z in params.AsymmetricAlgorithms) {
let obj = new AlgorithmInfo();
obj.deserialize(params.AsymmetricAlgorithms[z]);
this.AsymmetricAlgorithms.push(obj);
}
}
if (params.AsymmetricSignVerifyAlgorithms) {
this.AsymmetricSignVerifyAlgorithms = new Array();
for (let z in params.AsymmetricSignVerifyAlgorithms) {
let obj = new AlgorithmInfo();
obj.deserialize(params.AsymmetricSignVerifyAlgorithms[z]);
this.AsymmetricSignVerifyAlgorithms.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DisableKeys response structure.
* @class
*/
class DisableKeysResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Region extra QPS package
* @class
*/
class RegionQps extends AbstractModel {
constructor(){
super();
/**
* <p>Region.</p>
* @type {string || null}
*/
this.Region = null;
/**
* <p>qps size</p>
* @type {number || null}
*/
this.Qps = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Region = 'Region' in params ? params.Region : null;
this.Qps = 'Qps' in params ? params.Qps : null;
}
}
/**
* EnableDataKey response structure.
* @class
*/
class EnableDataKeyResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeWhiteBoxKey response structure.
* @class
*/
class DescribeWhiteBoxKeyResponse extends AbstractModel {
constructor(){
super();
/**
* White-box key information
* @type {WhiteboxKeyInfo || null}
*/
this.KeyInfo = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.KeyInfo) {
let obj = new WhiteboxKeyInfo();
obj.deserialize(params.KeyInfo)
this.KeyInfo = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* UpdateKeyDescription response structure.
* @class
*/
class UpdateKeyDescriptionResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeWhiteBoxServiceStatus response structure.
* @class
*/
class DescribeWhiteBoxServiceStatusResponse extends AbstractModel {
constructor(){
super();
/**
* Whether the user's white-box key service is available
* @type {boolean || null}
*/
this.ServiceEnabled = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ServiceEnabled = 'ServiceEnabled' in params ? params.ServiceEnabled : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* AsymmetricRsaDecrypt response structure.
* @class
*/
class AsymmetricRsaDecryptResponse extends AbstractModel {
constructor(){
super();
/**
* Unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Base64-encoded plaintext after decryption
* @type {string || null}
*/
this.Plaintext = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.Plaintext = 'Plaintext' in params ? params.Plaintext : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ScheduleDataKeyDeletion response structure.
* @class
*/
class ScheduleDataKeyDeletionResponse extends AbstractModel {
constructor(){
super();
/**
* Schedule deletion execution time.
* @type {number || null}
*/
this.DeletionDate = null;
/**
* Unique identifier of the data key scheduled for deletion.
* @type {string || null}
*/
this.DataKeyId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DeletionDate = 'DeletionDate' in params ? params.DeletionDate : null;
this.DataKeyId = 'DataKeyId' in params ? params.DataKeyId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* EnableKey request structure.
* @class
*/
class EnableKeyRequest extends AbstractModel {
constructor(){
super();
/**
* Unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* GetKeyRotationStatus request structure.
* @class
*/
class GetKeyRotationStatusRequest extends AbstractModel {
constructor(){
super();
/**
* Unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* ListAlgorithms request structure.
* @class
*/
class ListAlgorithmsRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* Shared member account information.
* @class
*/
class MemberAccount extends AbstractModel {
constructor(){
super();
/**
* Member account appid.
* @type {number || null}
*/
this.MemberAppId = null;
/**
* Member account UIN
* @type {number || null}
*/
this.MemberUin = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.MemberAppId = 'MemberAppId' in params ? params.MemberAppId : null;
this.MemberUin = 'MemberUin' in params ? params.MemberUin : null;
}
}
/**
* ListKeyDetail response structure.
* @class
*/
class ListKeyDetailResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of CMKs
* @type {number || null}
*/
this.TotalCount = null;
/**
* Specifies the returned attribute information list.
* @type {Array.<KeyMetadata> || null}
*/
this.KeyMetadatas = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.KeyMetadatas) {
this.KeyMetadatas = new Array();
for (let z in params.KeyMetadatas) {
let obj = new KeyMetadata();
obj.deserialize(params.KeyMetadatas[z]);
this.KeyMetadatas.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* GenerateDataKey request structure.
* @class
*/
class GenerateDataKeyRequest extends AbstractModel {
constructor(){
super();
/**
* Globally unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* Specifies the encryption algorithm and size of the `DataKey`. Valid values: AES_128, AES_256. Either `KeySpec` or `NumberOfBytes` must be specified.
* @type {string || null}
*/
this.KeySpec = null;
/**
* Length of the `DataKey`. If both `NumberOfBytes` and `KeySpec` are specified, `NumberOfBytes` will prevail. Minimum value: 1; maximum value: 1024. Either `KeySpec` or `NumberOfBytes` must be specified.
* @type {number || null}
*/
this.NumberOfBytes = null;
/**
* JSON string of key-value pair. If this field is used, the same string should be entered when the returned `DataKey` is decrypted.
* @type {string || null}
*/
this.EncryptionContext = null;
/**
* PEM-encoded public key (2048-bit RSA/SM2 key), which can be used to encrypt the `Plaintext` returned. If this field is left empty, the `Plaintext` will not be encrypted.
* @type {string || null}
*/
this.EncryptionPublicKey = null;
/**
* Asymmetric encryption algorithm. Valid values: `SM2` (C1C3C2 ciphertext is returned)`, `SM2_C1C3C2_ASN1` (C1C3C2 ASN1 ciphertext is returned), `RSAES_PKCS1_V1_5`, `RSAES_OAEP_SHA_1`, and `RSAES_OAEP_SHA_256`. This field is used in combination with `EncryptionPublicKey` for encryption. If it is left empty, an SM2 public key will be used by default.
* @type {string || null}
*/
this.EncryptionAlgorithm = null;
/**
* Indicates whether the data generated key is managed by KMS. 1 means the key is managed and saved by KMS. 0 means the key is not managed by KMS.
* @type {number || null}
*/
this.IsHostedByKms = null;
/**
* Name of the data key. required when IsHostedByKms is 1. optional when IsHostedByKms is 0 as KMS does not manage it.
* @type {string || null}
*/
this.DataKeyName = null;
/**
* Describes the data key. maximum 100 bytes.
* @type {string || null}
*/
this.Description = null;
/**
* HSM cluster ID corresponding to the KMS exclusive edition. if HsmClusterId is specified, it indicates the root key is in this cluster and verifies whether KeyId corresponds to HsmClusterId.
* @type {string || null}
*/
this.HsmClusterId = null;
/**
* Tag list. valid at that time when parameter IsHostedByKms=1 and the data key is hosted by kms.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.KeySpec = 'KeySpec' in params ? params.KeySpec : null;
this.NumberOfBytes = 'NumberOfBytes' in params ? params.NumberOfBytes : null;
this.EncryptionContext = 'EncryptionContext' in params ? params.EncryptionContext : null;
this.EncryptionPublicKey = 'EncryptionPublicKey' in params ? params.EncryptionPublicKey : null;
this.EncryptionAlgorithm = 'EncryptionAlgorithm' in params ? params.EncryptionAlgorithm : null;
this.IsHostedByKms = 'IsHostedByKms' in params ? params.IsHostedByKms : null;
this.DataKeyName = 'DataKeyName' in params ? params.DataKeyName : null;
this.Description = 'Description' in params ? params.Description : null;
this.HsmClusterId = 'HsmClusterId' in params ? params.HsmClusterId : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new Tag();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
}
}
/**
* UpdateAlias response structure.
* @class
*/
class UpdateAliasResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ScheduleKeyDeletion response structure.
* @class
*/
class ScheduleKeyDeletionResponse extends AbstractModel {
constructor(){
super();
/**
* Schedule deletion execution time
* @type {number || null}
*/
this.DeletionDate = null;
/**
* Unique ID of the CMK scheduled for deletion
* @type {string || null}
*/
this.KeyId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DeletionDate = 'DeletionDate' in params ? params.DeletionDate : null;
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* PostQuantumCryptoVerify request structure.
* @class
*/
class PostQuantumCryptoVerifyRequest extends AbstractModel {
constructor(){
super();
/**
* Unique ID of a key
* @type {string || null}
*/
this.KeyId = null;
/**
* Signature value, which is generated by calling the `PostQuantumCryptoSign` API.
* @type {string || null}
*/
this.SignatureValue = null;
/**
* Original message text before Base64 encoding. It cannot exceed 4096 bytes.
* @type {string || null}
*/
this.Message = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.SignatureValue = 'SignatureValue' in params ? params.SignatureValue : null;
this.Message = 'Message' in params ? params.Message : null;
}
}
/**
* GenerateRandom response structure.
* @class
*/
class GenerateRandomResponse extends AbstractModel {
constructor(){
super();
/**
* Base64-encoded plaintext of the randomly generated number. You need to Base64-decode it to get the plaintext.
* @type {string || null}
*/
this.Plaintext = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Plaintext = 'Plaintext' in params ? params.Plaintext : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* UpdateDataKeyName request structure.
* @class
*/
class UpdateDataKeyNameRequest extends AbstractModel {
constructor(){
super();
/**
* Unique identifier of a data key.
* @type {string || null}
*/
this.DataKeyId = null;
/**
* Name of the data key.
* @type {string || null}
*/
this.DataKeyName = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DataKeyId = 'DataKeyId' in params ? params.DataKeyId : null;
this.DataKeyName = 'DataKeyName' in params ? params.DataKeyName : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* ScheduleDataKeyDeletion request structure.
* @class
*/
class ScheduleDataKeyDeletionRequest extends AbstractModel {
constructor(){
super();
/**
* Unique id of a data key.
* @type {string || null}
*/
this.DataKeyId = null;
/**
* Schedule deletion time range: [7,30].
* @type {number || null}
*/
this.PendingWindowInDays = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DataKeyId = 'DataKeyId' in params ? params.DataKeyId : null;
this.PendingWindowInDays = 'PendingWindowInDays' in params ? params.PendingWindowInDays : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* DescribeKeys request structure.
* @class
*/
class DescribeKeysRequest extends AbstractModel {
constructor(){
super();
/**
* List of IDs of the CMKs to be queried in batches. Up to 100 `KeyId` values are supported in one query.
* @type {Array.<string> || null}
*/
this.KeyIds = null;
/**
* Trusted service member account information. valid at that time when the current account is admin or delegated admin.
* @type {MemberAccount || null}
*/
this.MemberAccount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyIds = 'KeyIds' in params ? params.KeyIds : null;
if (params.MemberAccount) {
let obj = new MemberAccount();
obj.deserialize(params.MemberAccount)
this.MemberAccount = obj;
}
}
}
/**
* GetPublicKey request structure.
* @class
*/
class GetPublicKeyRequest extends AbstractModel {
constructor(){
super();
/**
* Unique CMK ID.
* @type {string || null}
*/
this.KeyId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
}
}
/**
* GetServiceStatus request structure.
* @class
*/
class GetServiceStatusRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* EnableWhiteBoxKeys response structure.
* @class
*/
class EnableWhiteBoxKeysResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ArchiveKey response structure.
* @class
*/
class ArchiveKeyResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* VerifyByAsymmetricKey response structure.
* @class
*/
class VerifyByAsymmetricKeyResponse extends AbstractModel {
constructor(){
super();
/**
* Whether the signature is valid. `true`: the signature is valid; `false`: the signature is invalid.
* @type {boolean || null}
*/
this.SignatureValid = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SignatureValid = 'SignatureValid' in params ? params.SignatureValid : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeDataKeys response structure.
* @class
*/
class DescribeDataKeysResponse extends AbstractModel {
constructor(){
super();
/**
* Response data key attribute information list.
* @type {Array.<DataKeyMetadata> || null}
*/
this.DataKeyMetadatas = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.DataKeyMetadatas) {
this.DataKeyMetadatas = new Array();
for (let z in params.DataKeyMetadatas) {
let obj = new DataKeyMetadata();
obj.deserialize(params.DataKeyMetadatas[z]);
this.DataKeyMetadatas.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeWhiteBoxKey request structure.
* @class
*/
class DescribeWhiteBoxKeyRequest extends AbstractModel {
constructor(){
super();
/**
* Globally unique white-box key ID
* @type {string || null}
*/
this.KeyId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
}
}
/**
* GetParametersForImport response structure.
* @class
*/
class GetParametersForImportResponse extends AbstractModel {
constructor(){
super();
/**
* Unique ID of a CMK, which is used to specify the CMK into which to import key material.
* @type {string || null}
*/
this.KeyId = null;
/**
* The token required for importing key material, which is used as a parameter for `ImportKeyMaterial`.
* @type {string || null}
*/
this.ImportToken = null;
/**
* The Base64-encoded RSA public key used to encrypt key material before importing it with `ImportKeyMaterial`.
* @type {string || null}
*/
this.PublicKey = null;
/**
* Validity period of the token and public key. A token and public key can only be imported when they are valid. If they are expired, you will need to call the `GetParametersForImport` API again to get a new token and public key.
* @type {number || null}
*/
this.ParametersValidTo = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyId = 'KeyId' in params ? params.KeyId : null;
this.ImportToken = 'ImportToken' in params ? params.ImportToken : null;
this.PublicKey = 'PublicKey' in params ? params.PublicKey : null;
this.ParametersValidTo = 'ParametersValidTo' in params ? params.ParametersValidTo : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Decrypt response structure.
* @class
*/
class DecryptResponse extends AbstractModel {
constructor(){
super();
/**
* Globally unique CMK ID
* @type {string || null}
*/
this.KeyId = null;
/**
* If `EncryptionPublicKey` is left empty, a Base64-encoded ciphertext will be returned. To get the plaintext, you need to decode the ciphertext first.
If `EncryptionPublicKey` is specified, this field will return the Base64-encoded ciphertext encrypted with the specified public key. To get the plaintext, you need to decode the ciphertext and upload the corresponding private key.
* @type {string || null}
*/
this.Plaintext = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return