Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.43
0.3.44
8 changes: 4 additions & 4 deletions src/UKMS/Apis/CreateKeyRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function setKeyUsage($keyUsage)
}

/**
* Origin: 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 100660
* Origin: 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 1230
*
* @return string|null
*/
Expand All @@ -180,7 +180,7 @@ public function getOrigin()
}

/**
* Origin: 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 100660
* Origin: 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 1230
*
* @param string $origin
*/
Expand All @@ -192,7 +192,7 @@ public function setOrigin($origin)
/**
* DeletionProtection: 是否开启删除保护。可选值:true、false;默认 false。
*
* @return string|null
* @return boolean|null
*/
public function getDeletionProtection()
{
Expand All @@ -202,7 +202,7 @@ public function getDeletionProtection()
/**
* DeletionProtection: 是否开启删除保护。可选值:true、false;默认 false。
*
* @param string $deletionProtection
* @param boolean $deletionProtection
*/
public function setDeletionProtection($deletionProtection)
{
Expand Down
4 changes: 2 additions & 2 deletions src/UKMS/Apis/DecryptRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function setEncryptionContext($encryptionContext)
}

/**
* EncryptionAlgorithm: 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填或使用默认 RSAES_OAEP_SHA_256
* EncryptionAlgorithm: 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填
*
* @return string|null
*/
Expand All @@ -160,7 +160,7 @@ public function getEncryptionAlgorithm()
}

/**
* EncryptionAlgorithm: 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填或使用默认 RSAES_OAEP_SHA_256
* EncryptionAlgorithm: 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填
*
* @param string $encryptionAlgorithm
*/
Expand Down
4 changes: 2 additions & 2 deletions src/UKMS/Apis/DisableKeyRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function setProjectId($projectId)
}

/**
* KeyId: 密钥 DB 数字 ID。
* KeyId: 密钥资源长 ID
*
* @return string|null
*/
Expand All @@ -80,7 +80,7 @@ public function getKeyId()
}

/**
* KeyId: 密钥 DB 数字 ID。
* KeyId: 密钥资源长 ID
*
* @param string $keyId
*/
Expand Down
1 change: 1 addition & 0 deletions src/UKMS/Apis/DisableKeyRotationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function __construct()
parent::__construct(["Action" => "DisableKeyRotation"]);
$this->markRequired("Region");
$this->markRequired("KeyId");
$this->markRequired("ResourceId");
}


Expand Down
4 changes: 2 additions & 2 deletions src/UKMS/Apis/EnableKeyRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function setProjectId($projectId)
}

/**
* KeyId: 密钥 DB 数字 ID。
* KeyId: 密钥资源长 ID
*
* @return string|null
*/
Expand All @@ -80,7 +80,7 @@ public function getKeyId()
}

/**
* KeyId: 密钥 DB 数字 ID。
* KeyId: 密钥资源长 ID
*
* @param string $keyId
*/
Expand Down
1 change: 1 addition & 0 deletions src/UKMS/Apis/RotateKeyOnDemandRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function __construct()
parent::__construct(["Action" => "RotateKeyOnDemand"]);
$this->markRequired("Region");
$this->markRequired("KeyId");
$this->markRequired("ResourceId");
}


Expand Down
4 changes: 2 additions & 2 deletions src/UKMS/Apis/ScheduleKeyDeletionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function setProjectId($projectId)
}

/**
* KeyId: 密钥 DB 数字 ID。
* KeyId: 密钥资源长 ID
*
* @return string|null
*/
Expand All @@ -80,7 +80,7 @@ public function getKeyId()
}

/**
* KeyId: 密钥 DB 数字 ID。
* KeyId: 密钥资源长 ID
*
* @param string $keyId
*/
Expand Down
4 changes: 2 additions & 2 deletions src/UKMS/Models/DEK.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function setKeyUsage(array $keyUsage)
}

/**
* Origin: 密钥来源,由 Origin 派生。取值:ucloud、import。当前 CreateKey 仅支持 ucloud
* Origin: 密钥来源,由 Origin 派生。取值:UCLOUD_KMS、EXTERNAL。当前 CreateKey 仅支持 UCLOUD_KMS
*
* @return string|null
*/
Expand All @@ -113,7 +113,7 @@ public function getOrigin()
}

/**
* Origin: 密钥来源,由 Origin 派生。取值:ucloud、import。当前 CreateKey 仅支持 ucloud
* Origin: 密钥来源,由 Origin 派生。取值:UCLOUD_KMS、EXTERNAL。当前 CreateKey 仅支持 UCLOUD_KMS
*
* @param string $origin
*/
Expand Down
44 changes: 42 additions & 2 deletions src/UKMS/Models/KeyMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class KeyMetadata extends Response


/**
* ProjectId: 密钥所属项目的对外别名,格式为 org-xxx。该值由项目数字 ID 解析得到,可能因项目别名查询失败而为空
* ProjectId: 密钥所属项目ID
*
* @return string|null
*/
Expand All @@ -33,7 +33,7 @@ public function getProjectId()
}

/**
* ProjectId: 密钥所属项目的对外别名,格式为 org-xxx。该值由项目数字 ID 解析得到,可能因项目别名查询失败而为空
* ProjectId: 密钥所属项目ID
*
* @param string $projectId
*/
Expand Down Expand Up @@ -281,4 +281,44 @@ public function setDeletionDate($deletionDate)
{
$this->set("DeletionDate", $deletionDate);
}

/**
* Arn: ucs:ukms:{Region}:{CompanyId}:key/{KeyId}
*
* @return string|null
*/
public function getArn()
{
return $this->get("Arn");
}

/**
* Arn: ucs:ukms:{Region}:{CompanyId}:key/{KeyId}
*
* @param string $arn
*/
public function setArn($arn)
{
$this->set("Arn", $arn);
}

/**
* OrganizationId: 所属组织数字 ID
*
* @return integer|null
*/
public function getOrganizationId()
{
return $this->get("OrganizationId");
}

/**
* OrganizationId: 所属组织数字 ID
*
* @param int $organizationId
*/
public function setOrganizationId($organizationId)
{
$this->set("OrganizationId", $organizationId);
}
}
18 changes: 10 additions & 8 deletions src/UKMS/UKMSClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public function createAlias(CreateAliasRequest $request = null)
* "Alias" => (string) 可选密钥别名,格式为 alias/name。
* "KeySpec" => (string) 密钥规格,默认 SYMMETRIC_DEFAULT(AES_256)。可选值:SYMMETRIC_DEFAULT(AES_256)、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。
* "KeyUsage" => (string) 密钥用途
* "Origin" => (string) 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 100660
* "DeletionProtection" => (string) 是否开启删除保护。可选值:true、false;默认 false。
* "Origin" => (string) 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 1230
* "DeletionProtection" => (boolean) 是否开启删除保护。可选值:true、false;默认 false。
* ]
*
* Outputs:
Expand Down Expand Up @@ -186,7 +186,7 @@ public function createKey(CreateKeyRequest $request = null)
* "ResourceId" => (string) UKMS 实例资源 ID。
* "KeyId" => (string) 主密钥 KeyId;对称密钥可空,从 CiphertextBlob 自动识别;非对称必填。
* "EncryptionContext" => (string) 加密上下文,JSON Object。该参数内容会记录在日志中,请勿传入密码、密钥、令牌等敏感信息。
* "EncryptionAlgorithm" => (string) 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填或使用默认 RSAES_OAEP_SHA_256
* "EncryptionAlgorithm" => (string) 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填
* ]
*
* Outputs:
Expand Down Expand Up @@ -252,7 +252,7 @@ public function deleteAlias(DeleteAliasRequest $request = null)
*
* $outputs = [
* "KeyMetadata" => (object) 密钥元数据。[
* "ProjectId" => (string) 密钥所属项目的对外别名,格式为 org-xxx。该值由项目数字 ID 解析得到,可能因项目别名查询失败而为空
* "ProjectId" => (string) 密钥所属项目ID
* "KeyId" => (string) 密钥资源长 ID。
* "CreationDate" => (integer) 创建时间,Unix 时间戳。
* "Enabled" => (string) 是否启用。取值:true、false。
Expand All @@ -265,6 +265,8 @@ public function deleteAlias(DeleteAliasRequest $request = null)
* "ResourceId" => (string) 密钥所属的 UKMS 实例资源 ID。
* "Description" => (string) 密钥描述。
* "DeletionDate" => (integer) 计划删除时间,Unix 时间戳。
* "Arn" => (string) ucs:ukms:{Region}:{CompanyId}:key/{KeyId}
* "OrganizationId" => (integer) 所属组织数字 ID
* ]
* ]
*
Expand All @@ -287,7 +289,7 @@ public function describeKey(DescribeKeyRequest $request = null)
* $args = [
* "Region" => (string) 地域。参见地域和可用区列表。
* "ProjectId" => (string) 项目ID。不填写为默认项目,子账号必须填写。
* "KeyId" => (string) 密钥 DB 数字 ID。
* "KeyId" => (string) 密钥资源长 ID
* "ResourceId" => (string) UKMS 实例资源 ID。
* ]
*
Expand Down Expand Up @@ -343,7 +345,7 @@ public function disableKeyRotation(DisableKeyRotationRequest $request = null)
* $args = [
* "Region" => (string) 地域。参见地域和可用区列表。
* "ProjectId" => (string) 项目ID。不填写为默认项目,子账号必须填写。
* "KeyId" => (string) 密钥 DB 数字 ID。
* "KeyId" => (string) 密钥资源长 ID
* "ResourceId" => (string) UKMS 实例资源 ID。
* ]
*
Expand Down Expand Up @@ -751,7 +753,7 @@ public function listAliases(ListAliasesRequest $request = null)
* "KeyId" => (string) 对外主密钥 ID(ukms_key_info.key_id)。
* "KeySpec" => (string) 密钥规格。取值:SYMMETRIC_DEFAULT、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。
* "KeyUsage" => (array<string>) 按 KeySpec 派生的密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。
* "Origin" => (string) 密钥来源,由 Origin 派生。取值:ucloud、import。当前 CreateKey 仅支持 ucloud
* "Origin" => (string) 密钥来源,由 Origin 派生。取值:UCLOUD_KMS、EXTERNAL。当前 CreateKey 仅支持 UCLOUD_KMS
* "Status" => (string) 数据库密钥状态。常见取值:Active、Deactivated、PendingDeletion。
* "CreatedTime" => (integer) 创建时间,Unix 时间戳。
* "UpdateTime" => (integer) 更新时间,Unix 时间戳。
Expand Down Expand Up @@ -815,7 +817,7 @@ public function rotateKeyOnDemand(RotateKeyOnDemandRequest $request = null)
* $args = [
* "Region" => (string) 地域。参见地域和可用区列表。
* "ProjectId" => (string) 项目ID。不填写为默认项目,子账号必须填写。
* "KeyId" => (string) 密钥 DB 数字 ID。
* "KeyId" => (string) 密钥资源长 ID
* "ResourceId" => (string) UKMS 实例资源 ID。
* "DeleteDay" => (integer) 删除等待天数,取值范围为 7~30 天;未填写时默认为 30 天。
* ]
Expand Down