From aed860dc66fae592b9f29799375fb5f3fc17d2f2 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Fri, 7 Aug 2026 11:21:31 +0000 Subject: [PATCH] sdk: rolling update for 1.2.77-release --- VERSION | 2 +- examples/generic/pom.xml | 4 +- examples/uhost/pom.xml | 4 +- pom.xml | 3 +- ucloud-sdk-java-cloudwatch/pom.xml | 6 +- ucloud-sdk-java-common/pom.xml | 4 +- ucloud-sdk-java-cube/pom.xml | 6 +- ucloud-sdk-java-ipsecvpn/pom.xml | 6 +- ucloud-sdk-java-label/pom.xml | 6 +- ucloud-sdk-java-nlb/pom.xml | 6 +- ucloud-sdk-java-pathx/pom.xml | 6 +- ucloud-sdk-java-sts/pom.xml | 6 +- ucloud-sdk-java-tidb/pom.xml | 6 +- ucloud-sdk-java-uaccount/pom.xml | 6 +- ucloud-sdk-java-uai_modelverse/pom.xml | 6 +- ucloud-sdk-java-uas/pom.xml | 6 +- ucloud-sdk-java-ubill/pom.xml | 6 +- ucloud-sdk-java-ucdn/pom.xml | 6 +- ucloud-sdk-java-uclickhouse/pom.xml | 6 +- ucloud-sdk-java-ucompshare/pom.xml | 6 +- ucloud-sdk-java-udb/pom.xml | 6 +- ucloud-sdk-java-udbproxy/pom.xml | 6 +- ucloud-sdk-java-udi/pom.xml | 6 +- ucloud-sdk-java-udisk/pom.xml | 6 +- ucloud-sdk-java-udns/pom.xml | 6 +- ucloud-sdk-java-udpn/pom.xml | 6 +- ucloud-sdk-java-uec/pom.xml | 6 +- ucloud-sdk-java-ues/pom.xml | 6 +- ucloud-sdk-java-uewaf/pom.xml | 6 +- ucloud-sdk-java-ufile/pom.xml | 6 +- ucloud-sdk-java-ufs/pom.xml | 6 +- ucloud-sdk-java-uhadoop/pom.xml | 6 +- ucloud-sdk-java-uhids/pom.xml | 6 +- ucloud-sdk-java-uhost/pom.xml | 6 +- ucloud-sdk-java-uk8s/pom.xml | 6 +- ucloud-sdk-java-ukafka/pom.xml | 6 +- ucloud-sdk-java-ukms/pom.xml | 49 ++ .../cn/ucloud/ukms/client/UKMSClient.java | 438 ++++++++++++++++++ .../ukms/client/UKMSClientInterface.java | 335 ++++++++++++++ .../ukms/models/CancelKeyDeletionRequest.java | 72 +++ .../models/CancelKeyDeletionResponse.java | 20 + .../CancelScheduleKeyDeletionRequest.java | 62 +++ .../CancelScheduleKeyDeletionResponse.java | 20 + .../ukms/models/CreateAliasRequest.java | 85 ++++ .../ukms/models/CreateAliasResponse.java | 20 + .../ucloud/ukms/models/CreateKeyRequest.java | 135 ++++++ .../ucloud/ukms/models/CreateKeyResponse.java | 34 ++ .../cn/ucloud/ukms/models/DecryptRequest.java | 111 +++++ .../ucloud/ukms/models/DecryptResponse.java | 58 +++ .../ukms/models/DeleteAliasRequest.java | 72 +++ .../ukms/models/DeleteAliasResponse.java | 20 + .../ukms/models/DescribeKeyRequest.java | 72 +++ .../ukms/models/DescribeKeyResponse.java | 184 ++++++++ .../ucloud/ukms/models/DisableKeyRequest.java | 72 +++ .../ukms/models/DisableKeyResponse.java | 20 + .../models/DisableKeyRotationRequest.java | 72 +++ .../models/DisableKeyRotationResponse.java | 20 + .../ucloud/ukms/models/EnableKeyRequest.java | 72 +++ .../ucloud/ukms/models/EnableKeyResponse.java | 20 + .../ukms/models/EnableKeyRotationRequest.java | 85 ++++ .../models/EnableKeyRotationResponse.java | 20 + .../cn/ucloud/ukms/models/EncryptRequest.java | 112 +++++ .../ucloud/ukms/models/EncryptResponse.java | 58 +++ .../models/GenerateDataKeyPairRequest.java | 88 ++++ .../models/GenerateDataKeyPairResponse.java | 20 + ...ateDataKeyPairWithoutPlaintextRequest.java | 63 +++ ...teDataKeyPairWithoutPlaintextResponse.java | 20 + .../ukms/models/GenerateDataKeyRequest.java | 108 +++++ .../ukms/models/GenerateDataKeyResponse.java | 58 +++ ...enerateDataKeyWithoutPlaintextRequest.java | 108 +++++ ...nerateDataKeyWithoutPlaintextResponse.java | 46 ++ .../ukms/models/GenerateMacRequest.java | 76 +++ .../ukms/models/GenerateMacResponse.java | 20 + .../ukms/models/GenerateRandomRequest.java | 63 +++ .../ukms/models/GenerateRandomResponse.java | 20 + .../models/GetKeyRotationStatusRequest.java | 72 +++ .../models/GetKeyRotationStatusResponse.java | 82 ++++ .../ukms/models/GetPublicKeyRequest.java | 72 +++ .../ukms/models/GetPublicKeyResponse.java | 99 ++++ .../ukms/models/ListAliasesRequest.java | 95 ++++ .../ukms/models/ListAliasesResponse.java | 98 ++++ .../ucloud/ukms/models/ListKeysRequest.java | 95 ++++ .../ucloud/ukms/models/ListKeysResponse.java | 208 +++++++++ .../ListScheduleDeletionKeysRequest.java | 72 +++ .../ListScheduleDeletionKeysResponse.java | 170 +++++++ .../ukms/models/RotateKeyOnDemandRequest.java | 72 +++ .../models/RotateKeyOnDemandResponse.java | 34 ++ .../models/ScheduleKeyDeletionRequest.java | 72 +++ .../models/ScheduleKeyDeletionResponse.java | 20 + .../cn/ucloud/ukms/models/SignRequest.java | 113 +++++ .../cn/ucloud/ukms/models/SignResponse.java | 60 +++ .../ukms/models/UpdateAliasRequest.java | 85 ++++ .../ukms/models/UpdateAliasResponse.java | 20 + .../models/UpdateKeyDescriptionRequest.java | 85 ++++ .../models/UpdateKeyDescriptionResponse.java | 46 ++ .../ucloud/ukms/models/VerifyMacRequest.java | 102 ++++ .../ucloud/ukms/models/VerifyMacResponse.java | 20 + .../cn/ucloud/ukms/models/VerifyRequest.java | 127 +++++ .../cn/ucloud/ukms/models/VerifyResponse.java | 60 +++ ucloud-sdk-java-ulb/pom.xml | 6 +- ucloud-sdk-java-ulighthost/pom.xml | 6 +- ucloud-sdk-java-ulog/pom.xml | 6 +- ucloud-sdk-java-umem/pom.xml | 6 +- ucloud-sdk-java-umon/pom.xml | 6 +- ucloud-sdk-java-umongodb/pom.xml | 6 +- ucloud-sdk-java-unet/pom.xml | 6 +- ucloud-sdk-java-upfs/pom.xml | 6 +- ucloud-sdk-java-upgsql/pom.xml | 6 +- ucloud-sdk-java-uphone/pom.xml | 6 +- ucloud-sdk-java-uphost/pom.xml | 6 +- ucloud-sdk-java-uslk/pom.xml | 6 +- ucloud-sdk-java-usms/pom.xml | 6 +- ucloud-sdk-java-usnap/pom.xml | 6 +- ucloud-sdk-java-uvms/pom.xml | 6 +- ucloud-sdk-java-uwsc/pom.xml | 6 +- ucloud-sdk-java-vpc/pom.xml | 6 +- 116 files changed, 5160 insertions(+), 152 deletions(-) create mode 100644 ucloud-sdk-java-ukms/pom.xml create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClient.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClientInterface.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacResponse.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyRequest.java create mode 100644 ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyResponse.java diff --git a/VERSION b/VERSION index b1259eef..34b242db 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.76-release +1.2.77-release diff --git a/examples/generic/pom.xml b/examples/generic/pom.xml index 86165f6a..99006043 100644 --- a/examples/generic/pom.xml +++ b/examples/generic/pom.xml @@ -7,7 +7,7 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 @@ -19,7 +19,7 @@ cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/examples/uhost/pom.xml b/examples/uhost/pom.xml index 778fe728..d5f37be1 100644 --- a/examples/uhost/pom.xml +++ b/examples/uhost/pom.xml @@ -7,7 +7,7 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 @@ -19,7 +19,7 @@ cn.ucloud ucloud-sdk-java-uhost - 1.2.76-release + 1.2.77-release diff --git a/pom.xml b/pom.xml index b3d1ee7d..e60fd183 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ cn.ucloud ucloud-sdk-java pom - 1.2.76-release + 1.2.77-release ucloud-sdk-java-common ucloud-sdk-java-cloudwatch @@ -40,6 +40,7 @@ ucloud-sdk-java-uhadoop ucloud-sdk-java-uhost ucloud-sdk-java-uk8s + ucloud-sdk-java-ukms ucloud-sdk-java-ukafka ucloud-sdk-java-ulb ucloud-sdk-java-ulighthost diff --git a/ucloud-sdk-java-cloudwatch/pom.xml b/ucloud-sdk-java-cloudwatch/pom.xml index caaa1d8d..36024493 100644 --- a/ucloud-sdk-java-cloudwatch/pom.xml +++ b/ucloud-sdk-java-cloudwatch/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-cloudwatch ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-common/pom.xml b/ucloud-sdk-java-common/pom.xml index e4eec564..8bad0e80 100644 --- a/ucloud-sdk-java-common/pom.xml +++ b/ucloud-sdk-java-common/pom.xml @@ -7,13 +7,13 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-common ucloud-sdk-java - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-cube/pom.xml b/ucloud-sdk-java-cube/pom.xml index b9e69b20..dd474b58 100644 --- a/ucloud-sdk-java-cube/pom.xml +++ b/ucloud-sdk-java-cube/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-cube ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ipsecvpn/pom.xml b/ucloud-sdk-java-ipsecvpn/pom.xml index 0ad49496..2c353fb3 100644 --- a/ucloud-sdk-java-ipsecvpn/pom.xml +++ b/ucloud-sdk-java-ipsecvpn/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ipsecvpn ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-label/pom.xml b/ucloud-sdk-java-label/pom.xml index 8f15e356..a6e4f1c1 100644 --- a/ucloud-sdk-java-label/pom.xml +++ b/ucloud-sdk-java-label/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-label ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-nlb/pom.xml b/ucloud-sdk-java-nlb/pom.xml index f74fd573..80e2ab0d 100644 --- a/ucloud-sdk-java-nlb/pom.xml +++ b/ucloud-sdk-java-nlb/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-nlb ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-pathx/pom.xml b/ucloud-sdk-java-pathx/pom.xml index a995bed6..1bad7ad4 100644 --- a/ucloud-sdk-java-pathx/pom.xml +++ b/ucloud-sdk-java-pathx/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-pathx ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-sts/pom.xml b/ucloud-sdk-java-sts/pom.xml index c45d21bc..445b8602 100644 --- a/ucloud-sdk-java-sts/pom.xml +++ b/ucloud-sdk-java-sts/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-sts ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-tidb/pom.xml b/ucloud-sdk-java-tidb/pom.xml index c3c36f34..c5d55600 100644 --- a/ucloud-sdk-java-tidb/pom.xml +++ b/ucloud-sdk-java-tidb/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-tidb ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uaccount/pom.xml b/ucloud-sdk-java-uaccount/pom.xml index 99efa032..6396e7d1 100644 --- a/ucloud-sdk-java-uaccount/pom.xml +++ b/ucloud-sdk-java-uaccount/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uaccount ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uai_modelverse/pom.xml b/ucloud-sdk-java-uai_modelverse/pom.xml index 999cfbe4..c00818ef 100644 --- a/ucloud-sdk-java-uai_modelverse/pom.xml +++ b/ucloud-sdk-java-uai_modelverse/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uai_modelverse ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uas/pom.xml b/ucloud-sdk-java-uas/pom.xml index 4110136f..da4e29cc 100644 --- a/ucloud-sdk-java-uas/pom.xml +++ b/ucloud-sdk-java-uas/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uas ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ubill/pom.xml b/ucloud-sdk-java-ubill/pom.xml index a86ff5ec..075f2d77 100644 --- a/ucloud-sdk-java-ubill/pom.xml +++ b/ucloud-sdk-java-ubill/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ubill ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ucdn/pom.xml b/ucloud-sdk-java-ucdn/pom.xml index 8a563188..8a2101b6 100644 --- a/ucloud-sdk-java-ucdn/pom.xml +++ b/ucloud-sdk-java-ucdn/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ucdn ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uclickhouse/pom.xml b/ucloud-sdk-java-uclickhouse/pom.xml index 5a3ca41e..8bbf9a5e 100644 --- a/ucloud-sdk-java-uclickhouse/pom.xml +++ b/ucloud-sdk-java-uclickhouse/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uclickhouse ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ucompshare/pom.xml b/ucloud-sdk-java-ucompshare/pom.xml index 8276246d..8213d9bb 100644 --- a/ucloud-sdk-java-ucompshare/pom.xml +++ b/ucloud-sdk-java-ucompshare/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ucompshare ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-udb/pom.xml b/ucloud-sdk-java-udb/pom.xml index 52612893..ecca85a9 100644 --- a/ucloud-sdk-java-udb/pom.xml +++ b/ucloud-sdk-java-udb/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-udb ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-udbproxy/pom.xml b/ucloud-sdk-java-udbproxy/pom.xml index 25812b39..c11ff312 100644 --- a/ucloud-sdk-java-udbproxy/pom.xml +++ b/ucloud-sdk-java-udbproxy/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-udbproxy ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-udi/pom.xml b/ucloud-sdk-java-udi/pom.xml index 6b92d947..bbe9e6ba 100644 --- a/ucloud-sdk-java-udi/pom.xml +++ b/ucloud-sdk-java-udi/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-udi ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-udisk/pom.xml b/ucloud-sdk-java-udisk/pom.xml index d23b5251..a4afe2c8 100644 --- a/ucloud-sdk-java-udisk/pom.xml +++ b/ucloud-sdk-java-udisk/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-udisk ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-udns/pom.xml b/ucloud-sdk-java-udns/pom.xml index e95fd52e..367a1080 100644 --- a/ucloud-sdk-java-udns/pom.xml +++ b/ucloud-sdk-java-udns/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-udns ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-udpn/pom.xml b/ucloud-sdk-java-udpn/pom.xml index 3f647649..5da602fb 100644 --- a/ucloud-sdk-java-udpn/pom.xml +++ b/ucloud-sdk-java-udpn/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-udpn ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uec/pom.xml b/ucloud-sdk-java-uec/pom.xml index f8a6b583..cc84a356 100644 --- a/ucloud-sdk-java-uec/pom.xml +++ b/ucloud-sdk-java-uec/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uec ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ues/pom.xml b/ucloud-sdk-java-ues/pom.xml index 25b7de8c..105f4839 100644 --- a/ucloud-sdk-java-ues/pom.xml +++ b/ucloud-sdk-java-ues/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ues ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uewaf/pom.xml b/ucloud-sdk-java-uewaf/pom.xml index c6719900..b34eaccf 100644 --- a/ucloud-sdk-java-uewaf/pom.xml +++ b/ucloud-sdk-java-uewaf/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uewaf ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ufile/pom.xml b/ucloud-sdk-java-ufile/pom.xml index 37aba104..49c51fbe 100644 --- a/ucloud-sdk-java-ufile/pom.xml +++ b/ucloud-sdk-java-ufile/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ufile ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ufs/pom.xml b/ucloud-sdk-java-ufs/pom.xml index 46663984..274b0725 100644 --- a/ucloud-sdk-java-ufs/pom.xml +++ b/ucloud-sdk-java-ufs/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ufs ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uhadoop/pom.xml b/ucloud-sdk-java-uhadoop/pom.xml index 2f17276c..67b7b230 100644 --- a/ucloud-sdk-java-uhadoop/pom.xml +++ b/ucloud-sdk-java-uhadoop/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uhadoop ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uhids/pom.xml b/ucloud-sdk-java-uhids/pom.xml index 3d2cfc5b..2f71664f 100644 --- a/ucloud-sdk-java-uhids/pom.xml +++ b/ucloud-sdk-java-uhids/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uhids ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uhost/pom.xml b/ucloud-sdk-java-uhost/pom.xml index f9377401..babb9942 100644 --- a/ucloud-sdk-java-uhost/pom.xml +++ b/ucloud-sdk-java-uhost/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uhost ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uk8s/pom.xml b/ucloud-sdk-java-uk8s/pom.xml index 634d246a..ff76a0ad 100644 --- a/ucloud-sdk-java-uk8s/pom.xml +++ b/ucloud-sdk-java-uk8s/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uk8s ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ukafka/pom.xml b/ucloud-sdk-java-ukafka/pom.xml index cf9d9365..11224d3f 100644 --- a/ucloud-sdk-java-ukafka/pom.xml +++ b/ucloud-sdk-java-ukafka/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ukafka ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ukms/pom.xml b/ucloud-sdk-java-ukms/pom.xml new file mode 100644 index 00000000..3ff8f88b --- /dev/null +++ b/ucloud-sdk-java-ukms/pom.xml @@ -0,0 +1,49 @@ + + + + ucloud-sdk-java + cn.ucloud + 1.2.77-release + + + 4.0.0 + ucloud-sdk-java-ukms + ucloud-sdk-java + 1.2.77-release + + + + cn.ucloud + ucloud-sdk-java-common + 1.2.77-release + + + + com.google.code.gson + gson + + + + commons-codec + commons-codec + + + org.apache.commons + commons-lang3 + + + + junit + junit + test + + + + org.slf4j + slf4j-simple + provided + + + diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClient.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClient.java new file mode 100644 index 00000000..40427540 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClient.java @@ -0,0 +1,438 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.client; + +import cn.ucloud.common.client.DefaultClient; +import cn.ucloud.common.config.Config; +import cn.ucloud.common.credential.Credential; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.ukms.models.CancelKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelKeyDeletionResponse; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.CreateAliasRequest; +import cn.ucloud.ukms.models.CreateAliasResponse; +import cn.ucloud.ukms.models.CreateKeyRequest; +import cn.ucloud.ukms.models.CreateKeyResponse; +import cn.ucloud.ukms.models.DecryptRequest; +import cn.ucloud.ukms.models.DecryptResponse; +import cn.ucloud.ukms.models.DeleteAliasRequest; +import cn.ucloud.ukms.models.DeleteAliasResponse; +import cn.ucloud.ukms.models.DescribeKeyRequest; +import cn.ucloud.ukms.models.DescribeKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRequest; +import cn.ucloud.ukms.models.DisableKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRotationRequest; +import cn.ucloud.ukms.models.DisableKeyRotationResponse; +import cn.ucloud.ukms.models.EnableKeyRequest; +import cn.ucloud.ukms.models.EnableKeyResponse; +import cn.ucloud.ukms.models.EnableKeyRotationRequest; +import cn.ucloud.ukms.models.EnableKeyRotationResponse; +import cn.ucloud.ukms.models.EncryptRequest; +import cn.ucloud.ukms.models.EncryptResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateDataKeyRequest; +import cn.ucloud.ukms.models.GenerateDataKeyResponse; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateMacRequest; +import cn.ucloud.ukms.models.GenerateMacResponse; +import cn.ucloud.ukms.models.GenerateRandomRequest; +import cn.ucloud.ukms.models.GenerateRandomResponse; +import cn.ucloud.ukms.models.GetKeyRotationStatusRequest; +import cn.ucloud.ukms.models.GetKeyRotationStatusResponse; +import cn.ucloud.ukms.models.GetPublicKeyRequest; +import cn.ucloud.ukms.models.GetPublicKeyResponse; +import cn.ucloud.ukms.models.ListAliasesRequest; +import cn.ucloud.ukms.models.ListAliasesResponse; +import cn.ucloud.ukms.models.ListKeysRequest; +import cn.ucloud.ukms.models.ListKeysResponse; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysRequest; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysResponse; +import cn.ucloud.ukms.models.RotateKeyOnDemandRequest; +import cn.ucloud.ukms.models.RotateKeyOnDemandResponse; +import cn.ucloud.ukms.models.ScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.ScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.SignRequest; +import cn.ucloud.ukms.models.SignResponse; +import cn.ucloud.ukms.models.UpdateAliasRequest; +import cn.ucloud.ukms.models.UpdateAliasResponse; +import cn.ucloud.ukms.models.UpdateKeyDescriptionRequest; +import cn.ucloud.ukms.models.UpdateKeyDescriptionResponse; +import cn.ucloud.ukms.models.VerifyMacRequest; +import cn.ucloud.ukms.models.VerifyMacResponse; +import cn.ucloud.ukms.models.VerifyRequest; +import cn.ucloud.ukms.models.VerifyResponse; + +/** This client is used to call actions of **UKMS** service */ +public class UKMSClient extends DefaultClient implements UKMSClientInterface { + public UKMSClient(Config config, Credential credential) { + super(config, credential); + } + + /** + * CancelKeyDeletion - 取消密钥计划删除 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelKeyDeletionResponse cancelKeyDeletion(CancelKeyDeletionRequest request) + throws UCloudException { + request.setAction("CancelKeyDeletion"); + return (CancelKeyDeletionResponse) this.invoke(request, CancelKeyDeletionResponse.class); + } + + /** + * CancelScheduleKeyDeletion - 取消计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelScheduleKeyDeletionResponse cancelScheduleKeyDeletion( + CancelScheduleKeyDeletionRequest request) throws UCloudException { + request.setAction("CancelScheduleKeyDeletion"); + return (CancelScheduleKeyDeletionResponse) + this.invoke(request, CancelScheduleKeyDeletionResponse.class); + } + + /** + * CreateAlias - 创建别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateAliasResponse createAlias(CreateAliasRequest request) throws UCloudException { + request.setAction("CreateAlias"); + return (CreateAliasResponse) this.invoke(request, CreateAliasResponse.class); + } + + /** + * CreateKey - 创建密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateKeyResponse createKey(CreateKeyRequest request) throws UCloudException { + request.setAction("CreateKey"); + return (CreateKeyResponse) this.invoke(request, CreateKeyResponse.class); + } + + /** + * Decrypt - 解密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DecryptResponse decrypt(DecryptRequest request) throws UCloudException { + request.setAction("Decrypt"); + return (DecryptResponse) this.invoke(request, DecryptResponse.class); + } + + /** + * DeleteAlias - 删除别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws UCloudException { + request.setAction("DeleteAlias"); + return (DeleteAliasResponse) this.invoke(request, DeleteAliasResponse.class); + } + + /** + * DescribeKey - 查看主密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeKeyResponse describeKey(DescribeKeyRequest request) throws UCloudException { + request.setAction("DescribeKey"); + return (DescribeKeyResponse) this.invoke(request, DescribeKeyResponse.class); + } + + /** + * DisableKey - 禁用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyResponse disableKey(DisableKeyRequest request) throws UCloudException { + request.setAction("DisableKey"); + return (DisableKeyResponse) this.invoke(request, DisableKeyResponse.class); + } + + /** + * DisableKeyRotation - 关闭密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyRotationResponse disableKeyRotation(DisableKeyRotationRequest request) + throws UCloudException { + request.setAction("DisableKeyRotation"); + return (DisableKeyRotationResponse) this.invoke(request, DisableKeyRotationResponse.class); + } + + /** + * EnableKey - 启用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyResponse enableKey(EnableKeyRequest request) throws UCloudException { + request.setAction("EnableKey"); + return (EnableKeyResponse) this.invoke(request, EnableKeyResponse.class); + } + + /** + * EnableKeyRotation - 开启密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyRotationResponse enableKeyRotation(EnableKeyRotationRequest request) + throws UCloudException { + request.setAction("EnableKeyRotation"); + return (EnableKeyRotationResponse) this.invoke(request, EnableKeyRotationResponse.class); + } + + /** + * Encrypt - 加密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EncryptResponse encrypt(EncryptRequest request) throws UCloudException { + request.setAction("Encrypt"); + return (EncryptResponse) this.invoke(request, EncryptResponse.class); + } + + /** + * GenerateDataKey - 创建数据密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyResponse generateDataKey(GenerateDataKeyRequest request) + throws UCloudException { + request.setAction("GenerateDataKey"); + return (GenerateDataKeyResponse) this.invoke(request, GenerateDataKeyResponse.class); + } + + /** + * GenerateDataKeyPair - 创建数据密钥对 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairResponse generateDataKeyPair(GenerateDataKeyPairRequest request) + throws UCloudException { + request.setAction("GenerateDataKeyPair"); + return (GenerateDataKeyPairResponse) + this.invoke(request, GenerateDataKeyPairResponse.class); + } + + /** + * GenerateDataKeyPairWithoutPlaintext - 创建数据密钥对(无明文返回) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairWithoutPlaintextResponse generateDataKeyPairWithoutPlaintext( + GenerateDataKeyPairWithoutPlaintextRequest request) throws UCloudException { + request.setAction("GenerateDataKeyPairWithoutPlaintext"); + return (GenerateDataKeyPairWithoutPlaintextResponse) + this.invoke(request, GenerateDataKeyPairWithoutPlaintextResponse.class); + } + + /** + * GenerateDataKeyWithoutPlaintext - 创建数据密钥(无明文) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyWithoutPlaintextResponse generateDataKeyWithoutPlaintext( + GenerateDataKeyWithoutPlaintextRequest request) throws UCloudException { + request.setAction("GenerateDataKeyWithoutPlaintext"); + return (GenerateDataKeyWithoutPlaintextResponse) + this.invoke(request, GenerateDataKeyWithoutPlaintextResponse.class); + } + + /** + * GenerateMac - 生成MAC + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateMacResponse generateMac(GenerateMacRequest request) throws UCloudException { + request.setAction("GenerateMac"); + return (GenerateMacResponse) this.invoke(request, GenerateMacResponse.class); + } + + /** + * GenerateRandom - 生成随机数 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateRandomResponse generateRandom(GenerateRandomRequest request) + throws UCloudException { + request.setAction("GenerateRandom"); + return (GenerateRandomResponse) this.invoke(request, GenerateRandomResponse.class); + } + + /** + * GetKeyRotationStatus - 获取密钥轮转状态 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetKeyRotationStatusResponse getKeyRotationStatus(GetKeyRotationStatusRequest request) + throws UCloudException { + request.setAction("GetKeyRotationStatus"); + return (GetKeyRotationStatusResponse) + this.invoke(request, GetKeyRotationStatusResponse.class); + } + + /** + * GetPublicKey - 获取公钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetPublicKeyResponse getPublicKey(GetPublicKeyRequest request) throws UCloudException { + request.setAction("GetPublicKey"); + return (GetPublicKeyResponse) this.invoke(request, GetPublicKeyResponse.class); + } + + /** + * ListAliases - 获取别名列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListAliasesResponse listAliases(ListAliasesRequest request) throws UCloudException { + request.setAction("ListAliases"); + return (ListAliasesResponse) this.invoke(request, ListAliasesResponse.class); + } + + /** + * ListKeys - 获取主密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListKeysResponse listKeys(ListKeysRequest request) throws UCloudException { + request.setAction("ListKeys"); + return (ListKeysResponse) this.invoke(request, ListKeysResponse.class); + } + + /** + * ListScheduleDeletionKeys - 获取计划删除密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListScheduleDeletionKeysResponse listScheduleDeletionKeys( + ListScheduleDeletionKeysRequest request) throws UCloudException { + request.setAction("ListScheduleDeletionKeys"); + return (ListScheduleDeletionKeysResponse) + this.invoke(request, ListScheduleDeletionKeysResponse.class); + } + + /** + * RotateKeyOnDemand - 按需轮转密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public RotateKeyOnDemandResponse rotateKeyOnDemand(RotateKeyOnDemandRequest request) + throws UCloudException { + request.setAction("RotateKeyOnDemand"); + return (RotateKeyOnDemandResponse) this.invoke(request, RotateKeyOnDemandResponse.class); + } + + /** + * ScheduleKeyDeletion - 计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ScheduleKeyDeletionResponse scheduleKeyDeletion(ScheduleKeyDeletionRequest request) + throws UCloudException { + request.setAction("ScheduleKeyDeletion"); + return (ScheduleKeyDeletionResponse) + this.invoke(request, ScheduleKeyDeletionResponse.class); + } + + /** + * Sign - 签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public SignResponse sign(SignRequest request) throws UCloudException { + request.setAction("Sign"); + return (SignResponse) this.invoke(request, SignResponse.class); + } + + /** + * UpdateAlias - 更新别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateAliasResponse updateAlias(UpdateAliasRequest request) throws UCloudException { + request.setAction("UpdateAlias"); + return (UpdateAliasResponse) this.invoke(request, UpdateAliasResponse.class); + } + + /** + * UpdateKeyDescription - 更新主密钥描述信息 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateKeyDescriptionResponse updateKeyDescription(UpdateKeyDescriptionRequest request) + throws UCloudException { + request.setAction("UpdateKeyDescription"); + return (UpdateKeyDescriptionResponse) + this.invoke(request, UpdateKeyDescriptionResponse.class); + } + + /** + * Verify - 验签 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyResponse verify(VerifyRequest request) throws UCloudException { + request.setAction("Verify"); + return (VerifyResponse) this.invoke(request, VerifyResponse.class); + } + + /** + * VerifyMac - 验证Mac签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyMacResponse verifyMac(VerifyMacRequest request) throws UCloudException { + request.setAction("VerifyMac"); + return (VerifyMacResponse) this.invoke(request, VerifyMacResponse.class); + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClientInterface.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClientInterface.java new file mode 100644 index 00000000..84ac9983 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClientInterface.java @@ -0,0 +1,335 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.client; + +import cn.ucloud.common.client.Client; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.ukms.models.CancelKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelKeyDeletionResponse; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.CreateAliasRequest; +import cn.ucloud.ukms.models.CreateAliasResponse; +import cn.ucloud.ukms.models.CreateKeyRequest; +import cn.ucloud.ukms.models.CreateKeyResponse; +import cn.ucloud.ukms.models.DecryptRequest; +import cn.ucloud.ukms.models.DecryptResponse; +import cn.ucloud.ukms.models.DeleteAliasRequest; +import cn.ucloud.ukms.models.DeleteAliasResponse; +import cn.ucloud.ukms.models.DescribeKeyRequest; +import cn.ucloud.ukms.models.DescribeKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRequest; +import cn.ucloud.ukms.models.DisableKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRotationRequest; +import cn.ucloud.ukms.models.DisableKeyRotationResponse; +import cn.ucloud.ukms.models.EnableKeyRequest; +import cn.ucloud.ukms.models.EnableKeyResponse; +import cn.ucloud.ukms.models.EnableKeyRotationRequest; +import cn.ucloud.ukms.models.EnableKeyRotationResponse; +import cn.ucloud.ukms.models.EncryptRequest; +import cn.ucloud.ukms.models.EncryptResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateDataKeyRequest; +import cn.ucloud.ukms.models.GenerateDataKeyResponse; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateMacRequest; +import cn.ucloud.ukms.models.GenerateMacResponse; +import cn.ucloud.ukms.models.GenerateRandomRequest; +import cn.ucloud.ukms.models.GenerateRandomResponse; +import cn.ucloud.ukms.models.GetKeyRotationStatusRequest; +import cn.ucloud.ukms.models.GetKeyRotationStatusResponse; +import cn.ucloud.ukms.models.GetPublicKeyRequest; +import cn.ucloud.ukms.models.GetPublicKeyResponse; +import cn.ucloud.ukms.models.ListAliasesRequest; +import cn.ucloud.ukms.models.ListAliasesResponse; +import cn.ucloud.ukms.models.ListKeysRequest; +import cn.ucloud.ukms.models.ListKeysResponse; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysRequest; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysResponse; +import cn.ucloud.ukms.models.RotateKeyOnDemandRequest; +import cn.ucloud.ukms.models.RotateKeyOnDemandResponse; +import cn.ucloud.ukms.models.ScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.ScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.SignRequest; +import cn.ucloud.ukms.models.SignResponse; +import cn.ucloud.ukms.models.UpdateAliasRequest; +import cn.ucloud.ukms.models.UpdateAliasResponse; +import cn.ucloud.ukms.models.UpdateKeyDescriptionRequest; +import cn.ucloud.ukms.models.UpdateKeyDescriptionResponse; +import cn.ucloud.ukms.models.VerifyMacRequest; +import cn.ucloud.ukms.models.VerifyMacResponse; +import cn.ucloud.ukms.models.VerifyRequest; +import cn.ucloud.ukms.models.VerifyResponse; + +/** This client is used to call actions of **UKMS** service */ +public interface UKMSClientInterface extends Client { + + /** + * CancelKeyDeletion - 取消密钥计划删除 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelKeyDeletionResponse cancelKeyDeletion(CancelKeyDeletionRequest request) + throws UCloudException; + + /** + * CancelScheduleKeyDeletion - 取消计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelScheduleKeyDeletionResponse cancelScheduleKeyDeletion( + CancelScheduleKeyDeletionRequest request) throws UCloudException; + + /** + * CreateAlias - 创建别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateAliasResponse createAlias(CreateAliasRequest request) throws UCloudException; + + /** + * CreateKey - 创建密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateKeyResponse createKey(CreateKeyRequest request) throws UCloudException; + + /** + * Decrypt - 解密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DecryptResponse decrypt(DecryptRequest request) throws UCloudException; + + /** + * DeleteAlias - 删除别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws UCloudException; + + /** + * DescribeKey - 查看主密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeKeyResponse describeKey(DescribeKeyRequest request) throws UCloudException; + + /** + * DisableKey - 禁用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyResponse disableKey(DisableKeyRequest request) throws UCloudException; + + /** + * DisableKeyRotation - 关闭密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyRotationResponse disableKeyRotation(DisableKeyRotationRequest request) + throws UCloudException; + + /** + * EnableKey - 启用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyResponse enableKey(EnableKeyRequest request) throws UCloudException; + + /** + * EnableKeyRotation - 开启密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyRotationResponse enableKeyRotation(EnableKeyRotationRequest request) + throws UCloudException; + + /** + * Encrypt - 加密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EncryptResponse encrypt(EncryptRequest request) throws UCloudException; + + /** + * GenerateDataKey - 创建数据密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyResponse generateDataKey(GenerateDataKeyRequest request) + throws UCloudException; + + /** + * GenerateDataKeyPair - 创建数据密钥对 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairResponse generateDataKeyPair(GenerateDataKeyPairRequest request) + throws UCloudException; + + /** + * GenerateDataKeyPairWithoutPlaintext - 创建数据密钥对(无明文返回) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairWithoutPlaintextResponse generateDataKeyPairWithoutPlaintext( + GenerateDataKeyPairWithoutPlaintextRequest request) throws UCloudException; + + /** + * GenerateDataKeyWithoutPlaintext - 创建数据密钥(无明文) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyWithoutPlaintextResponse generateDataKeyWithoutPlaintext( + GenerateDataKeyWithoutPlaintextRequest request) throws UCloudException; + + /** + * GenerateMac - 生成MAC + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateMacResponse generateMac(GenerateMacRequest request) throws UCloudException; + + /** + * GenerateRandom - 生成随机数 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateRandomResponse generateRandom(GenerateRandomRequest request) + throws UCloudException; + + /** + * GetKeyRotationStatus - 获取密钥轮转状态 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetKeyRotationStatusResponse getKeyRotationStatus(GetKeyRotationStatusRequest request) + throws UCloudException; + + /** + * GetPublicKey - 获取公钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetPublicKeyResponse getPublicKey(GetPublicKeyRequest request) throws UCloudException; + + /** + * ListAliases - 获取别名列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListAliasesResponse listAliases(ListAliasesRequest request) throws UCloudException; + + /** + * ListKeys - 获取主密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListKeysResponse listKeys(ListKeysRequest request) throws UCloudException; + + /** + * ListScheduleDeletionKeys - 获取计划删除密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListScheduleDeletionKeysResponse listScheduleDeletionKeys( + ListScheduleDeletionKeysRequest request) throws UCloudException; + + /** + * RotateKeyOnDemand - 按需轮转密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public RotateKeyOnDemandResponse rotateKeyOnDemand(RotateKeyOnDemandRequest request) + throws UCloudException; + + /** + * ScheduleKeyDeletion - 计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ScheduleKeyDeletionResponse scheduleKeyDeletion(ScheduleKeyDeletionRequest request) + throws UCloudException; + + /** + * Sign - 签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public SignResponse sign(SignRequest request) throws UCloudException; + + /** + * UpdateAlias - 更新别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateAliasResponse updateAlias(UpdateAliasRequest request) throws UCloudException; + + /** + * UpdateKeyDescription - 更新主密钥描述信息 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateKeyDescriptionResponse updateKeyDescription(UpdateKeyDescriptionRequest request) + throws UCloudException; + + /** + * Verify - 验签 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyResponse verify(VerifyRequest request) throws UCloudException; + + /** + * VerifyMac - 验证Mac签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyMacResponse verifyMac(VerifyMacRequest request) throws UCloudException; +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionRequest.java new file mode 100644 index 00000000..193f1741 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CancelKeyDeletionRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 ID。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionResponse.java new file mode 100644 index 00000000..e3a5a2e7 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class CancelKeyDeletionResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionRequest.java new file mode 100644 index 00000000..fd3dba48 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionRequest.java @@ -0,0 +1,62 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CancelScheduleKeyDeletionRequest extends Request { + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 需要查看的主密钥对应的 KeyId */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 资源id */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionResponse.java new file mode 100644 index 00000000..30010e35 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class CancelScheduleKeyDeletionResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasRequest.java new file mode 100644 index 00000000..00a3a6df --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasRequest.java @@ -0,0 +1,85 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CreateAliasRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥别名,格式为 alias/name。 */ + @NotEmpty + @UCloudParam("AliasName") + private String aliasName; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getAliasName() { + return aliasName; + } + + public void setAliasName(String aliasName) { + this.aliasName = aliasName; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasResponse.java new file mode 100644 index 00000000..44fc692e --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class CreateAliasResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyRequest.java new file mode 100644 index 00000000..512df3f8 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyRequest.java @@ -0,0 +1,135 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CreateKeyRequest extends Request { + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** UKMS 实例资源 ID。 */ + @NotEmpty + @UCloudParam("ResourceId") + private String resourceId; + + /** 密钥描述,最多 8192 字符。 */ + @UCloudParam("Description") + private String description; + + /** 可选密钥别名,格式为 alias/name。 */ + @UCloudParam("Alias") + private String alias; + + /** + * 密钥规格,默认 + * 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。 + */ + @UCloudParam("KeySpec") + private String keySpec; + + /** 密钥用途 */ + @UCloudParam("KeyUsage") + private String keyUsage; + + /** 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 100660。 */ + @UCloudParam("Origin") + private String origin; + + /** 是否开启删除保护。可选值:true、false;默认 false。 */ + @UCloudParam("DeletionProtection") + private String deletionProtection; + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public String getKeySpec() { + return keySpec; + } + + public void setKeySpec(String keySpec) { + this.keySpec = keySpec; + } + + public String getKeyUsage() { + return keyUsage; + } + + public void setKeyUsage(String keyUsage) { + this.keyUsage = keyUsage; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getDeletionProtection() { + return deletionProtection; + } + + public void setDeletionProtection(String deletionProtection) { + this.deletionProtection = deletionProtection; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyResponse.java new file mode 100644 index 00000000..1a5e36e4 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class CreateKeyResponse extends Response { + + /** 密钥 ID。 */ + @SerializedName("KeyId") + private String keyId; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptRequest.java new file mode 100644 index 00000000..49ac1621 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptRequest.java @@ -0,0 +1,111 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DecryptRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 待解密密文。 */ + @NotEmpty + @UCloudParam("CiphertextBlob") + private String ciphertextBlob; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** 主密钥 KeyId;对称密钥可空,从 CiphertextBlob 自动识别;非对称必填。 */ + @UCloudParam("KeyId") + private String keyId; + + /** 加密上下文,JSON Object。 */ + @UCloudParam("EncryptionContext") + private String encryptionContext; + + /** + * 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填或使用默认 + * RSAES_OAEP_SHA_256。 + */ + @UCloudParam("EncryptionAlgorithm") + private String encryptionAlgorithm; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getCiphertextBlob() { + return ciphertextBlob; + } + + public void setCiphertextBlob(String ciphertextBlob) { + this.ciphertextBlob = ciphertextBlob; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getEncryptionContext() { + return encryptionContext; + } + + public void setEncryptionContext(String encryptionContext) { + this.encryptionContext = encryptionContext; + } + + public String getEncryptionAlgorithm() { + return encryptionAlgorithm; + } + + public void setEncryptionAlgorithm(String encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptResponse.java new file mode 100644 index 00000000..71cd42c4 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptResponse.java @@ -0,0 +1,58 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class DecryptResponse extends Response { + + /** 解密后的明文,Base64 编码。 */ + @SerializedName("Plaintext") + private String plaintext; + + /** 密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** 实际使用的解密算法。取值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256。 */ + @SerializedName("EncryptionAlgorithm") + private String encryptionAlgorithm; + + public String getPlaintext() { + return plaintext; + } + + public void setPlaintext(String plaintext) { + this.plaintext = plaintext; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getEncryptionAlgorithm() { + return encryptionAlgorithm; + } + + public void setEncryptionAlgorithm(String encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasRequest.java new file mode 100644 index 00000000..3448a790 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DeleteAliasRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥别名,格式为 alias/name。 */ + @NotEmpty + @UCloudParam("AliasName") + private String aliasName; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getAliasName() { + return aliasName; + } + + public void setAliasName(String aliasName) { + this.aliasName = aliasName; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasResponse.java new file mode 100644 index 00000000..719f8856 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class DeleteAliasResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyRequest.java new file mode 100644 index 00000000..0fe7862d --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DescribeKeyRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyResponse.java new file mode 100644 index 00000000..c814170c --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyResponse.java @@ -0,0 +1,184 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class DescribeKeyResponse extends Response { + + /** 密钥元数据。 */ + @SerializedName("KeyMetadata") + private KeyMetadata keyMetadata; + + public KeyMetadata getKeyMetadata() { + return keyMetadata; + } + + public void setKeyMetadata(KeyMetadata keyMetadata) { + this.keyMetadata = keyMetadata; + } + + public static class KeyMetadata extends Response { + + /** 密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** 创建时间,Unix 时间戳。 */ + @SerializedName("CreationDate") + private Integer creationDate; + + /** 是否启用。取值:true、false。 */ + @SerializedName("Enabled") + private String enabled; + + /** 密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。 */ + @SerializedName("KeyUsage") + private List keyUsage; + + /** 密钥对外状态。取值:Enabled、Disabled、PendingDeletion、PendingImport、Unavailable。 */ + @SerializedName("KeyState") + private String keyState; + + /** 密钥材料来源。取值:UCLOUD_KMS、EXTERNAL;当前 CreateKey 仅支持 UCLOUD_KMS。 */ + @SerializedName("Origin") + private String origin; + + /** + * 密钥规格。取值:SYMMETRIC_DEFAULT、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。 + */ + @SerializedName("KeySpec") + private String keySpec; + + /** 是否开启删除保护。取值:true、false。 */ + @SerializedName("DeletionProtection") + private String deletionProtection; + + /** 当前密钥版本。 */ + @SerializedName("KeyVersion") + private Integer keyVersion; + + /** 密钥所属的 UKMS 实例资源 ID。 */ + @SerializedName("ResourceId") + private String resourceId; + + /** 密钥描述。 */ + @SerializedName("Description") + private String description; + + /** 计划删除时间,Unix 时间戳。 */ + @SerializedName("DeletionDate") + private Integer deletionDate; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public Integer getCreationDate() { + return creationDate; + } + + public void setCreationDate(Integer creationDate) { + this.creationDate = creationDate; + } + + public String getEnabled() { + return enabled; + } + + public void setEnabled(String enabled) { + this.enabled = enabled; + } + + public List getKeyUsage() { + return keyUsage; + } + + public void setKeyUsage(List keyUsage) { + this.keyUsage = keyUsage; + } + + public String getKeyState() { + return keyState; + } + + public void setKeyState(String keyState) { + this.keyState = keyState; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getKeySpec() { + return keySpec; + } + + public void setKeySpec(String keySpec) { + this.keySpec = keySpec; + } + + public String getDeletionProtection() { + return deletionProtection; + } + + public void setDeletionProtection(String deletionProtection) { + this.deletionProtection = deletionProtection; + } + + public Integer getKeyVersion() { + return keyVersion; + } + + public void setKeyVersion(Integer keyVersion) { + this.keyVersion = keyVersion; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Integer getDeletionDate() { + return deletionDate; + } + + public void setDeletionDate(Integer deletionDate) { + this.deletionDate = deletionDate; + } + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRequest.java new file mode 100644 index 00000000..13c01997 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DisableKeyRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 DB 数字 ID。 */ + @NotEmpty + @UCloudParam("KeyId") + private Integer keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public Integer getKeyId() { + return keyId; + } + + public void setKeyId(Integer keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyResponse.java new file mode 100644 index 00000000..b7b0693d --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class DisableKeyResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationRequest.java new file mode 100644 index 00000000..614bd9f3 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DisableKeyRotationRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationResponse.java new file mode 100644 index 00000000..2f94e17b --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class DisableKeyRotationResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRequest.java new file mode 100644 index 00000000..dbc28025 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class EnableKeyRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 DB 数字 ID。 */ + @NotEmpty + @UCloudParam("KeyId") + private Integer keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public Integer getKeyId() { + return keyId; + } + + public void setKeyId(Integer keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyResponse.java new file mode 100644 index 00000000..290baf9d --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class EnableKeyResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationRequest.java new file mode 100644 index 00000000..a3482ece --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationRequest.java @@ -0,0 +1,85 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class EnableKeyRotationRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** UKMS 实例资源 ID。 */ + @NotEmpty + @UCloudParam("ResourceId") + private String resourceId; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 轮转周期,单位天。取值范围 1~2560,默认 365。仅 SYMMETRIC_DEFAULT 且 Origin=UCLOUD_KMS 的密钥支持轮转。 */ + @UCloudParam("RotationPeriodInDays") + private Integer rotationPeriodInDays; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public Integer getRotationPeriodInDays() { + return rotationPeriodInDays; + } + + public void setRotationPeriodInDays(Integer rotationPeriodInDays) { + this.rotationPeriodInDays = rotationPeriodInDays; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationResponse.java new file mode 100644 index 00000000..047cc92d --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class EnableKeyRotationResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptRequest.java new file mode 100644 index 00000000..f0a86f0a --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptRequest.java @@ -0,0 +1,112 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class EncryptRequest extends Request { + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 待加密明文,Base64 编码。 */ + @NotEmpty + @UCloudParam("Plaintext") + private String plaintext; + + /** 加密上下文,JSON Object。 */ + @UCloudParam("EncryptionContext") + private String encryptionContext; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** + * 加密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;对称密钥默认 SYMMETRIC_DEFAULT,RSA + * 默认 RSAES_OAEP_SHA_256。 + */ + @UCloudParam("EncryptionAlgorithm") + private String encryptionAlgorithm; + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getPlaintext() { + return plaintext; + } + + public void setPlaintext(String plaintext) { + this.plaintext = plaintext; + } + + public String getEncryptionContext() { + return encryptionContext; + } + + public void setEncryptionContext(String encryptionContext) { + this.encryptionContext = encryptionContext; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getEncryptionAlgorithm() { + return encryptionAlgorithm; + } + + public void setEncryptionAlgorithm(String encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptResponse.java new file mode 100644 index 00000000..9ee55d70 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptResponse.java @@ -0,0 +1,58 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class EncryptResponse extends Response { + + /** 加密后的密文。 */ + @SerializedName("CiphertextBlob") + private String ciphertextBlob; + + /** 密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** 实际使用的加密算法。取值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256。 */ + @SerializedName("EncryptionAlgorithm") + private String encryptionAlgorithm; + + public String getCiphertextBlob() { + return ciphertextBlob; + } + + public void setCiphertextBlob(String ciphertextBlob) { + this.ciphertextBlob = ciphertextBlob; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getEncryptionAlgorithm() { + return encryptionAlgorithm; + } + + public void setEncryptionAlgorithm(String encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairRequest.java new file mode 100644 index 00000000..2c689d2a --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairRequest.java @@ -0,0 +1,88 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GenerateDataKeyPairRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥ID */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 密钥类型 */ + @NotEmpty + @UCloudParam("KeyPairSpec") + private String keyPairSpec; + + /** 加密上下文 */ + @UCloudParam("EncryptionContext") + private String encryptionContext; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getKeyPairSpec() { + return keyPairSpec; + } + + public void setKeyPairSpec(String keyPairSpec) { + this.keyPairSpec = keyPairSpec; + } + + public String getEncryptionContext() { + return encryptionContext; + } + + public void setEncryptionContext(String encryptionContext) { + this.encryptionContext = encryptionContext; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairResponse.java new file mode 100644 index 00000000..ba825f73 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class GenerateDataKeyPairResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextRequest.java new file mode 100644 index 00000000..89ce8436 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextRequest.java @@ -0,0 +1,63 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GenerateDataKeyPairWithoutPlaintextRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥ID */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextResponse.java new file mode 100644 index 00000000..f5450acd --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class GenerateDataKeyPairWithoutPlaintextResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyRequest.java new file mode 100644 index 00000000..0f10e6d7 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyRequest.java @@ -0,0 +1,108 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GenerateDataKeyRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** 数据密钥规格。可选值:AES_256、AES_128;默认 AES_256。与 NumberOfBytes 二选一,同时填写时 NumberOfBytes 优先。 */ + @UCloudParam("KeySpec") + private String keySpec; + + /** 生成数据密钥的字节长度,取值范围 1~1024。与 KeySpec 二选一,同时填写时本字段优先。 */ + @UCloudParam("NumberOfBytes") + private Integer numberOfBytes; + + /** 加密上下文,JSON Object。 */ + @UCloudParam("EncryptionContext") + private String encryptionContext; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getKeySpec() { + return keySpec; + } + + public void setKeySpec(String keySpec) { + this.keySpec = keySpec; + } + + public Integer getNumberOfBytes() { + return numberOfBytes; + } + + public void setNumberOfBytes(Integer numberOfBytes) { + this.numberOfBytes = numberOfBytes; + } + + public String getEncryptionContext() { + return encryptionContext; + } + + public void setEncryptionContext(String encryptionContext) { + this.encryptionContext = encryptionContext; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyResponse.java new file mode 100644 index 00000000..213dfd96 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyResponse.java @@ -0,0 +1,58 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class GenerateDataKeyResponse extends Response { + + /** 数据密钥明文,Base64 编码。 */ + @SerializedName("Plaintext") + private String plaintext; + + /** 加密后的数据密钥。 */ + @SerializedName("CiphertextBlob") + private String ciphertextBlob; + + /** 加密该数据密钥的密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + public String getPlaintext() { + return plaintext; + } + + public void setPlaintext(String plaintext) { + this.plaintext = plaintext; + } + + public String getCiphertextBlob() { + return ciphertextBlob; + } + + public void setCiphertextBlob(String ciphertextBlob) { + this.ciphertextBlob = ciphertextBlob; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextRequest.java new file mode 100644 index 00000000..744d7a80 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextRequest.java @@ -0,0 +1,108 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GenerateDataKeyWithoutPlaintextRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** 数据密钥规格。可选值:AES_256、AES_128;默认 AES_256。与 NumberOfBytes 二选一,同时填写时 NumberOfBytes 优先。 */ + @UCloudParam("KeySpec") + private String keySpec; + + /** 生成数据密钥的字节长度,取值范围 1~1024。与 KeySpec 二选一,同时填写时本字段优先。 */ + @UCloudParam("NumberOfBytes") + private Integer numberOfBytes; + + /** 加密上下文,JSON Object。 */ + @UCloudParam("EncryptionContext") + private String encryptionContext; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getKeySpec() { + return keySpec; + } + + public void setKeySpec(String keySpec) { + this.keySpec = keySpec; + } + + public Integer getNumberOfBytes() { + return numberOfBytes; + } + + public void setNumberOfBytes(Integer numberOfBytes) { + this.numberOfBytes = numberOfBytes; + } + + public String getEncryptionContext() { + return encryptionContext; + } + + public void setEncryptionContext(String encryptionContext) { + this.encryptionContext = encryptionContext; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextResponse.java new file mode 100644 index 00000000..d2c3d979 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class GenerateDataKeyWithoutPlaintextResponse extends Response { + + /** 加密后的数据密钥。 */ + @SerializedName("CiphertextBlob") + private String ciphertextBlob; + + /** 加密该数据密钥的密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + public String getCiphertextBlob() { + return ciphertextBlob; + } + + public void setCiphertextBlob(String ciphertextBlob) { + this.ciphertextBlob = ciphertextBlob; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacRequest.java new file mode 100644 index 00000000..fe70d12e --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacRequest.java @@ -0,0 +1,76 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GenerateMacRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥ID */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 待哈希的消息。 */ + @NotEmpty + @UCloudParam("MacMessage") + private String macMessage; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getMacMessage() { + return macMessage; + } + + public void setMacMessage(String macMessage) { + this.macMessage = macMessage; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacResponse.java new file mode 100644 index 00000000..b979549b --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class GenerateMacResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomRequest.java new file mode 100644 index 00000000..5292f965 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomRequest.java @@ -0,0 +1,63 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GenerateRandomRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 随机数长度,最大1024 */ + @NotEmpty + @UCloudParam("NumberOfBytes") + private Integer numberOfBytes; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public Integer getNumberOfBytes() { + return numberOfBytes; + } + + public void setNumberOfBytes(Integer numberOfBytes) { + this.numberOfBytes = numberOfBytes; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomResponse.java new file mode 100644 index 00000000..fa79bc30 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class GenerateRandomResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusRequest.java new file mode 100644 index 00000000..3cc4a775 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GetKeyRotationStatusRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusResponse.java new file mode 100644 index 00000000..1dca4498 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusResponse.java @@ -0,0 +1,82 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class GetKeyRotationStatusResponse extends Response { + + /** 是否开启自动轮转。取值:true、false。 */ + @SerializedName("KeyRotationEnabled") + private Boolean keyRotationEnabled; + + /** 密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** 轮转周期,单位天;未开启时返回 0。 */ + @SerializedName("RotationPeriodInDays") + private Integer rotationPeriodInDays; + + /** 下次轮转时间,Unix 时间戳。 */ + @SerializedName("NextRotationDate") + private Integer nextRotationDate; + + /** 按需轮转开始时间,Unix 时间戳。 */ + @SerializedName("OnDemandRotationStartDate") + private Integer onDemandRotationStartDate; + + public Boolean getKeyRotationEnabled() { + return keyRotationEnabled; + } + + public void setKeyRotationEnabled(Boolean keyRotationEnabled) { + this.keyRotationEnabled = keyRotationEnabled; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public Integer getRotationPeriodInDays() { + return rotationPeriodInDays; + } + + public void setRotationPeriodInDays(Integer rotationPeriodInDays) { + this.rotationPeriodInDays = rotationPeriodInDays; + } + + public Integer getNextRotationDate() { + return nextRotationDate; + } + + public void setNextRotationDate(Integer nextRotationDate) { + this.nextRotationDate = nextRotationDate; + } + + public Integer getOnDemandRotationStartDate() { + return onDemandRotationStartDate; + } + + public void setOnDemandRotationStartDate(Integer onDemandRotationStartDate) { + this.onDemandRotationStartDate = onDemandRotationStartDate; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyRequest.java new file mode 100644 index 00000000..4c979612 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GetPublicKeyRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyResponse.java new file mode 100644 index 00000000..8efe06a9 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyResponse.java @@ -0,0 +1,99 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class GetPublicKeyResponse extends Response { + + /** 密钥 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** PEM 或 DER 编码的公钥。 */ + @SerializedName("KmsPublicKey") + private String kmsPublicKey; + + /** + * 密钥规格。取值:SYMMETRIC_DEFAULT、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。 + */ + @SerializedName("KeySpec") + private String keySpec; + + /** 密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。 */ + @SerializedName("KeyUsage") + private List keyUsage; + + /** + * 支持的签名算法列表。取值范围:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512。 + */ + @SerializedName("SigningAlgorithms") + private List signingAlgorithms; + + /** 支持的加密算法列表。取值范围:RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256。 */ + @SerializedName("EncryptionAlgorithms") + private List encryptionAlgorithms; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getKmsPublicKey() { + return kmsPublicKey; + } + + public void setKmsPublicKey(String kmsPublicKey) { + this.kmsPublicKey = kmsPublicKey; + } + + public String getKeySpec() { + return keySpec; + } + + public void setKeySpec(String keySpec) { + this.keySpec = keySpec; + } + + public List getKeyUsage() { + return keyUsage; + } + + public void setKeyUsage(List keyUsage) { + this.keyUsage = keyUsage; + } + + public List getSigningAlgorithms() { + return signingAlgorithms; + } + + public void setSigningAlgorithms(List signingAlgorithms) { + this.signingAlgorithms = signingAlgorithms; + } + + public List getEncryptionAlgorithms() { + return encryptionAlgorithms; + } + + public void setEncryptionAlgorithms(List encryptionAlgorithms) { + this.encryptionAlgorithms = encryptionAlgorithms; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesRequest.java new file mode 100644 index 00000000..dd55604d --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class ListAliasesRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** 可选:筛选指定密钥资源长 ID 的别名。 */ + @UCloudParam("KeyId") + private String keyId; + + /** 列表起始位置偏移量。 */ + @UCloudParam("Offset") + private Integer offset; + + /** 返回数据长度。 */ + @UCloudParam("Limit") + private Integer limit; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public Integer getOffset() { + return offset; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesResponse.java new file mode 100644 index 00000000..44c6832f --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesResponse.java @@ -0,0 +1,98 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class ListAliasesResponse extends Response { + + /** 别名总数。 */ + @SerializedName("TotalCount") + private Integer totalCount; + + /** 别名列表,每项为 AliasInfo。 */ + @SerializedName("Aliases") + private List aliases; + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public List getAliases() { + return aliases; + } + + public void setAliases(List aliases) { + this.aliases = aliases; + } + + public static class AliasInfo extends Response { + + /** 别名,含 alias/ 前缀。 */ + @SerializedName("AliasName") + private String aliasName; + + /** 别名指向的密钥资源长 ID。 */ + @SerializedName("TargetKeyId") + private String targetKeyId; + + /** 创建时间,Unix 时间戳。 */ + @SerializedName("CreationDate") + private Integer creationDate; + + /** 最后更新时间,Unix 时间戳。 */ + @SerializedName("LastUpdatedDate") + private Integer lastUpdatedDate; + + public String getAliasName() { + return aliasName; + } + + public void setAliasName(String aliasName) { + this.aliasName = aliasName; + } + + public String getTargetKeyId() { + return targetKeyId; + } + + public void setTargetKeyId(String targetKeyId) { + this.targetKeyId = targetKeyId; + } + + public Integer getCreationDate() { + return creationDate; + } + + public void setCreationDate(Integer creationDate) { + this.creationDate = creationDate; + } + + public Integer getLastUpdatedDate() { + return lastUpdatedDate; + } + + public void setLastUpdatedDate(Integer lastUpdatedDate) { + this.lastUpdatedDate = lastUpdatedDate; + } + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysRequest.java new file mode 100644 index 00000000..9e8e4666 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class ListKeysRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** 按密钥 ID 或别名模糊过滤。 */ + @UCloudParam("Alias") + private String alias; + + /** 列表起始位置偏移量。 */ + @UCloudParam("Offset") + private Integer offset; + + /** 返回数据长度。最大1000 */ + @UCloudParam("Limit") + private Integer limit; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public Integer getOffset() { + return offset; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysResponse.java new file mode 100644 index 00000000..6921e86f --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysResponse.java @@ -0,0 +1,208 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class ListKeysResponse extends Response { + + /** 密钥信息数组,每项为 DEK/ListKeys item。 */ + @SerializedName("Data") + private List data; + + /** 符合条件的总数,不同于 Limit。 */ + @SerializedName("TotalCount") + private Integer totalCount; + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public static class DEK extends Response { + + /** 对外主密钥 ID(ukms_key_info.key_id)。 */ + @SerializedName("KeyId") + private String keyId; + + /** + * 密钥规格。取值:SYMMETRIC_DEFAULT、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。 + */ + @SerializedName("KeySpec") + private String keySpec; + + /** 按 KeySpec 派生的密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。 */ + @SerializedName("KeyUsage") + private List keyUsage; + + /** 密钥来源,由 Origin 派生。取值:ucloud、import。当前 CreateKey 仅支持 ucloud。 */ + @SerializedName("Origin") + private String origin; + + /** 数据库密钥状态。常见取值:Active、Deactivated、PendingDeletion。 */ + @SerializedName("Status") + private String status; + + /** 创建时间,Unix 时间戳。 */ + @SerializedName("CreatedTime") + private Integer createdTime; + + /** 更新时间,Unix 时间戳。 */ + @SerializedName("UpdateTime") + private Integer updateTime; + + /** 是否已开启自动轮转;未配置或已关闭均为 false */ + @SerializedName("KeyRotationEnabled") + private Boolean keyRotationEnabled; + + /** 自动轮转周期(天);未开启时为 0 */ + @SerializedName("RotationPeriodInDays") + private Integer rotationPeriodInDays; + + /** 密钥所属的 UKMS 实例资源 ID。 */ + @SerializedName("ResourceId") + private String resourceId; + + /** 密钥描述。 */ + @SerializedName("Description") + private String description; + + /** 计划删除时间,Unix 时间戳。 */ + @SerializedName("PlanDeleteTime") + private Integer planDeleteTime; + + /** 下次自动轮转时间(Unix 时间戳,秒);仅在已开启自动轮转时返回。 */ + @SerializedName("NextRotationDate") + private Integer nextRotationDate; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getKeySpec() { + return keySpec; + } + + public void setKeySpec(String keySpec) { + this.keySpec = keySpec; + } + + public List getKeyUsage() { + return keyUsage; + } + + public void setKeyUsage(List keyUsage) { + this.keyUsage = keyUsage; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Integer getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Integer createdTime) { + this.createdTime = createdTime; + } + + public Integer getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Integer updateTime) { + this.updateTime = updateTime; + } + + public Boolean getKeyRotationEnabled() { + return keyRotationEnabled; + } + + public void setKeyRotationEnabled(Boolean keyRotationEnabled) { + this.keyRotationEnabled = keyRotationEnabled; + } + + public Integer getRotationPeriodInDays() { + return rotationPeriodInDays; + } + + public void setRotationPeriodInDays(Integer rotationPeriodInDays) { + this.rotationPeriodInDays = rotationPeriodInDays; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Integer getPlanDeleteTime() { + return planDeleteTime; + } + + public void setPlanDeleteTime(Integer planDeleteTime) { + this.planDeleteTime = planDeleteTime; + } + + public Integer getNextRotationDate() { + return nextRotationDate; + } + + public void setNextRotationDate(Integer nextRotationDate) { + this.nextRotationDate = nextRotationDate; + } + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysRequest.java new file mode 100644 index 00000000..7fdf3817 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class ListScheduleDeletionKeysRequest extends Request { + + /** 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) */ + @UCloudParam("ProjectId") + private String projectId; + + /** 输出列表起始位置,默认从0开始 */ + @UCloudParam("Offset") + private Integer offset; + + /** 输出列表数量,默认返回200个 */ + @UCloudParam("Limit") + private Integer limit; + + /** + * 列表排序方式, 可选项: "-created_time", + * "created_time","plan_delete_time","-plan_delete_time";默认按-plan_delete_time 计划删除时间升序返回 + */ + @UCloudParam("OrderBy") + private String orderBy; + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public Integer getOffset() { + return offset; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public String getOrderBy() { + return orderBy; + } + + public void setOrderBy(String orderBy) { + this.orderBy = orderBy; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysResponse.java new file mode 100644 index 00000000..f603b2c8 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysResponse.java @@ -0,0 +1,170 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class ListScheduleDeletionKeysResponse extends Response { + + /** 主密钥信息组成的列表 */ + @SerializedName("Objects") + private List objects; + + /** 操作结果 */ + @SerializedName("Status") + private String status; + + /** 请求唯一标识符 */ + @SerializedName("RequestUuid") + private String requestUuid; + + /** 符合条件的总数, 不同于Limit */ + @SerializedName("TotalCount") + private Integer totalCount; + + public List getObjects() { + return objects; + } + + public void setObjects(List objects) { + this.objects = objects; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRequestUuid() { + return requestUuid; + } + + public void setRequestUuid(String requestUuid) { + this.requestUuid = requestUuid; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public static class CMK extends Response { + + /** CMK 的唯一标识符 */ + @SerializedName("KeyId") + private String keyId; + + /** 密钥类型,仅支持UCloudManagedKeys、CustomerManagedKeys。默认值CustomerManagedKeys */ + @SerializedName("Type") + private String type; + + /** 对密钥的描述说明 */ + @SerializedName("Description") + private String description; + + /** 是否启用 */ + @SerializedName("Enabled") + private Boolean enabled; + + /** 创建时间 时间戳 */ + @SerializedName("CreatedTime") + private Integer createdTime; + + /** 最后修改时间 时间戳 */ + @SerializedName("LastModifiedTime") + private Integer lastModifiedTime; + + /** 别名,与CMK一一对应 */ + @SerializedName("Alias") + private String alias; + + /** 计划删除时间 时间戳 */ + @SerializedName("PlanDeleteTime") + private Integer planDeleteTime; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public Integer getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Integer createdTime) { + this.createdTime = createdTime; + } + + public Integer getLastModifiedTime() { + return lastModifiedTime; + } + + public void setLastModifiedTime(Integer lastModifiedTime) { + this.lastModifiedTime = lastModifiedTime; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public Integer getPlanDeleteTime() { + return planDeleteTime; + } + + public void setPlanDeleteTime(Integer planDeleteTime) { + this.planDeleteTime = planDeleteTime; + } + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandRequest.java new file mode 100644 index 00000000..b8677295 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class RotateKeyOnDemandRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandResponse.java new file mode 100644 index 00000000..65d388f6 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class RotateKeyOnDemandResponse extends Response { + + /** 密钥 ID。 */ + @SerializedName("KeyId") + private String keyId; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionRequest.java new file mode 100644 index 00000000..cc3c213b --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class ScheduleKeyDeletionRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 DB 数字 ID。 */ + @NotEmpty + @UCloudParam("KeyId") + private Integer keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public Integer getKeyId() { + return keyId; + } + + public void setKeyId(Integer keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionResponse.java new file mode 100644 index 00000000..612f475c --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class ScheduleKeyDeletionResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignRequest.java new file mode 100644 index 00000000..f0bdcc3f --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignRequest.java @@ -0,0 +1,113 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class SignRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 待签名消息,Base64 编码,最大 4096 字节。 */ + @NotEmpty + @UCloudParam("SigningMessage") + private String signingMessage; + + /** + * 签名算法。可选值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512;须与密钥 + * KeySpec 匹配。 + */ + @NotEmpty + @UCloudParam("SigningAlgorithm") + private String signingAlgorithm; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** 消息类型。可选值:RAW、DIGEST;默认 RAW。 */ + @UCloudParam("MessageType") + private String messageType; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getSigningMessage() { + return signingMessage; + } + + public void setSigningMessage(String signingMessage) { + this.signingMessage = signingMessage; + } + + public String getSigningAlgorithm() { + return signingAlgorithm; + } + + public void setSigningAlgorithm(String signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getMessageType() { + return messageType; + } + + public void setMessageType(String messageType) { + this.messageType = messageType; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignResponse.java new file mode 100644 index 00000000..1658fbd8 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignResponse.java @@ -0,0 +1,60 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class SignResponse extends Response { + + /** 签名结果,Base64 编码。 */ + @SerializedName("SignatureResult") + private String signatureResult; + + /** 密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** + * 实际使用的签名算法。取值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512。 + */ + @SerializedName("SigningAlgorithm") + private String signingAlgorithm; + + public String getSignatureResult() { + return signatureResult; + } + + public void setSignatureResult(String signatureResult) { + this.signatureResult = signatureResult; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getSigningAlgorithm() { + return signingAlgorithm; + } + + public void setSigningAlgorithm(String signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasRequest.java new file mode 100644 index 00000000..b86c1164 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasRequest.java @@ -0,0 +1,85 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class UpdateAliasRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥别名,格式为 alias/name。 */ + @NotEmpty + @UCloudParam("AliasName") + private String aliasName; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getAliasName() { + return aliasName; + } + + public void setAliasName(String aliasName) { + this.aliasName = aliasName; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasResponse.java new file mode 100644 index 00000000..711e6b6b --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class UpdateAliasResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionRequest.java new file mode 100644 index 00000000..5a974da9 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionRequest.java @@ -0,0 +1,85 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class UpdateKeyDescriptionRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 新的密钥描述,最多 8192 字符;空字符串表示清空描述。 */ + @NotEmpty + @UCloudParam("Description") + private String description; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionResponse.java new file mode 100644 index 00000000..43348b00 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class UpdateKeyDescriptionResponse extends Response { + + /** 返回状态。 */ + @SerializedName("Status") + private String status; + + /** 此次请求唯一标识符。 */ + @SerializedName("RequestUuid") + private String requestUuid; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRequestUuid() { + return requestUuid; + } + + public void setRequestUuid(String requestUuid) { + this.requestUuid = requestUuid; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacRequest.java new file mode 100644 index 00000000..87513259 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacRequest.java @@ -0,0 +1,102 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class VerifyMacRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥ID */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 用于验证的消息。请输入与生成 HMAC 时所用消息相同的消息。 */ + @NotEmpty + @UCloudParam("MacMessage") + private String macMessage; + + /** 要验证的 HMAC。请输入由 GenerateMac 操作生成的 HMAC,前提是您指定的消息、HMAC KMS 密钥和 MAC 算法与此请求中指定的值相同。 */ + @NotEmpty + @UCloudParam("Mac") + private String mac; + + /** 验证过程中将使用的 MAC 算法。请输入与计算 HMAC 时相同的 MAC 算法。 此算法必须受 KeyId 参数标识的 HMAC KMS 密钥支持。 */ + @NotEmpty + @UCloudParam("MacAlgorithm") + private String macAlgorithm; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getMacMessage() { + return macMessage; + } + + public void setMacMessage(String macMessage) { + this.macMessage = macMessage; + } + + public String getMac() { + return mac; + } + + public void setMac(String mac) { + this.mac = mac; + } + + public String getMacAlgorithm() { + return macAlgorithm; + } + + public void setMacAlgorithm(String macAlgorithm) { + this.macAlgorithm = macAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacResponse.java new file mode 100644 index 00000000..6694724c --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class VerifyMacResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyRequest.java new file mode 100644 index 00000000..61ed9fcc --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyRequest.java @@ -0,0 +1,127 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class VerifyRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** UKMS 实例资源 ID。 */ + @NotEmpty + @UCloudParam("ResourceId") + private String resourceId; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 待验签的消息或消息摘要,Base64 编码。 */ + @NotEmpty + @UCloudParam("SigningMessage") + private String signingMessage; + + /** 待验证的签名,Base64 编码。 */ + @NotEmpty + @UCloudParam("SignatureResult") + private String signatureResult; + + /** + * 签名时使用的算法。可选值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512;须与密钥 + * KeySpec 匹配。 + */ + @NotEmpty + @UCloudParam("SigningAlgorithm") + private String signingAlgorithm; + + /** 消息类型。可选值:RAW、DIGEST;默认 RAW。 */ + @UCloudParam("MessageType") + private String messageType; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getSigningMessage() { + return signingMessage; + } + + public void setSigningMessage(String signingMessage) { + this.signingMessage = signingMessage; + } + + public String getSignatureResult() { + return signatureResult; + } + + public void setSignatureResult(String signatureResult) { + this.signatureResult = signatureResult; + } + + public String getSigningAlgorithm() { + return signingAlgorithm; + } + + public void setSigningAlgorithm(String signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } + + public String getMessageType() { + return messageType; + } + + public void setMessageType(String messageType) { + this.messageType = messageType; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyResponse.java new file mode 100644 index 00000000..c7a1e562 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyResponse.java @@ -0,0 +1,60 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *

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. + */ +package cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class VerifyResponse extends Response { + + /** 密钥 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** 签名是否有效。 */ + @SerializedName("SignatureValid") + private Boolean signatureValid; + + /** + * 使用的签名算法。取值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512。 + */ + @SerializedName("SigningAlgorithm") + private String signingAlgorithm; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public Boolean getSignatureValid() { + return signatureValid; + } + + public void setSignatureValid(Boolean signatureValid) { + this.signatureValid = signatureValid; + } + + public String getSigningAlgorithm() { + return signingAlgorithm; + } + + public void setSigningAlgorithm(String signingAlgorithm) { + this.signingAlgorithm = signingAlgorithm; + } +} diff --git a/ucloud-sdk-java-ulb/pom.xml b/ucloud-sdk-java-ulb/pom.xml index 07514e13..2eac54a0 100644 --- a/ucloud-sdk-java-ulb/pom.xml +++ b/ucloud-sdk-java-ulb/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ulb ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ulighthost/pom.xml b/ucloud-sdk-java-ulighthost/pom.xml index 09209050..a34ccd80 100644 --- a/ucloud-sdk-java-ulighthost/pom.xml +++ b/ucloud-sdk-java-ulighthost/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ulighthost ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-ulog/pom.xml b/ucloud-sdk-java-ulog/pom.xml index ce2f2a2c..6f6629b6 100644 --- a/ucloud-sdk-java-ulog/pom.xml +++ b/ucloud-sdk-java-ulog/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-ulog ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-umem/pom.xml b/ucloud-sdk-java-umem/pom.xml index d672eb2d..3d307cf2 100644 --- a/ucloud-sdk-java-umem/pom.xml +++ b/ucloud-sdk-java-umem/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-umem ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-umon/pom.xml b/ucloud-sdk-java-umon/pom.xml index 489e5327..b1695645 100644 --- a/ucloud-sdk-java-umon/pom.xml +++ b/ucloud-sdk-java-umon/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-umon ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-umongodb/pom.xml b/ucloud-sdk-java-umongodb/pom.xml index 01b87620..8c44f4a3 100644 --- a/ucloud-sdk-java-umongodb/pom.xml +++ b/ucloud-sdk-java-umongodb/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-umongodb ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-unet/pom.xml b/ucloud-sdk-java-unet/pom.xml index f4d36d46..dc8e75fb 100644 --- a/ucloud-sdk-java-unet/pom.xml +++ b/ucloud-sdk-java-unet/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-unet ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-upfs/pom.xml b/ucloud-sdk-java-upfs/pom.xml index 42c40561..adb7e3f3 100644 --- a/ucloud-sdk-java-upfs/pom.xml +++ b/ucloud-sdk-java-upfs/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-upfs ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-upgsql/pom.xml b/ucloud-sdk-java-upgsql/pom.xml index ef367576..394008bf 100644 --- a/ucloud-sdk-java-upgsql/pom.xml +++ b/ucloud-sdk-java-upgsql/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-upgsql ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uphone/pom.xml b/ucloud-sdk-java-uphone/pom.xml index 35a5ddd5..8222b0eb 100644 --- a/ucloud-sdk-java-uphone/pom.xml +++ b/ucloud-sdk-java-uphone/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uphone ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uphost/pom.xml b/ucloud-sdk-java-uphost/pom.xml index 33c1390e..f36f95bf 100644 --- a/ucloud-sdk-java-uphost/pom.xml +++ b/ucloud-sdk-java-uphost/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uphost ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uslk/pom.xml b/ucloud-sdk-java-uslk/pom.xml index 7f510f5a..18bdd701 100644 --- a/ucloud-sdk-java-uslk/pom.xml +++ b/ucloud-sdk-java-uslk/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uslk ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-usms/pom.xml b/ucloud-sdk-java-usms/pom.xml index 0f897a56..ec7097e7 100644 --- a/ucloud-sdk-java-usms/pom.xml +++ b/ucloud-sdk-java-usms/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-usms ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-usnap/pom.xml b/ucloud-sdk-java-usnap/pom.xml index 8a045d48..fe7d1095 100644 --- a/ucloud-sdk-java-usnap/pom.xml +++ b/ucloud-sdk-java-usnap/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-usnap ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uvms/pom.xml b/ucloud-sdk-java-uvms/pom.xml index b04addb0..1f7397dc 100644 --- a/ucloud-sdk-java-uvms/pom.xml +++ b/ucloud-sdk-java-uvms/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uvms ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-uwsc/pom.xml b/ucloud-sdk-java-uwsc/pom.xml index 14371947..c7ad4a74 100644 --- a/ucloud-sdk-java-uwsc/pom.xml +++ b/ucloud-sdk-java-uwsc/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-uwsc ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release diff --git a/ucloud-sdk-java-vpc/pom.xml b/ucloud-sdk-java-vpc/pom.xml index 832871a4..c02935ee 100644 --- a/ucloud-sdk-java-vpc/pom.xml +++ b/ucloud-sdk-java-vpc/pom.xml @@ -5,19 +5,19 @@ ucloud-sdk-java cn.ucloud - 1.2.76-release + 1.2.77-release 4.0.0 ucloud-sdk-java-vpc ucloud-sdk-java - 1.2.76-release + 1.2.77-release cn.ucloud ucloud-sdk-java-common - 1.2.76-release + 1.2.77-release