diff --git a/.changelog/3327.txt b/.changelog/3327.txt new file mode 100644 index 0000000000..acda7ea59c --- /dev/null +++ b/.changelog/3327.txt @@ -0,0 +1,15 @@ +```release-note:new-data-source +tencentcloud_kms_service_status +``` + +```release-note:enhancement +resource/tencentcloud_kms_key: support `hsm_cluster_id` +``` + +```release-note:enhancement +resource/tencentcloud_kms_external_key: support `hsm_cluster_id` +``` + +```release-note:enhancement +datasource/tencentcloud_kms_keys: support `hsm_cluster_id` +``` \ No newline at end of file diff --git a/go.mod b/go.mod index e7153f65e5..e45dc08668 100644 --- a/go.mod +++ b/go.mod @@ -62,7 +62,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.1115 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.777 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.970 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.1145 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.729 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.777 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mariadb v1.0.672 diff --git a/go.sum b/go.sum index 1df3d020a6..0be33481ed 100644 --- a/go.sum +++ b/go.sum @@ -942,6 +942,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1133/go.mod github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1135 h1:NAu4sH5c+kGTZQ0rwhnuYjIXbentw3Np+TbwimH22uc= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1135/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1136/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1142/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1145 h1:DETyir/MtG+GLOD0OatzjrQTTXRguFSJo1ZtPXtbIQw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1145/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ= @@ -984,6 +985,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb v1.0.1127 h1:1ZhrN github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb v1.0.1127/go.mod h1:HSfd/mm8VyXn7VTe3tOvPgsumbsfeYcG5QgaCI1vsRk= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563 h1:FoX+MK4vHThvPO6FbP5q98zD8S3n+d5+DbtK7skl++c= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.1145 h1:/wV6YoCqDU1XXci7kxt/k+RTwx2xLzcxH4NYbC1UT6k= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.1145/go.mod h1:tUblC9MYww0ZRScBkLYINJ7F1fxAv/Ymmpbjn05RTPY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.729 h1:WQpzm3x27Jo/5uh6/Yqe/gbJ7r2ui9hc9ST7Ml2eP9Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.729/go.mod h1:lLoyD7Z6OQQDFxDGGTe8wmirhUFZ36l5OaxzP75853Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.777 h1:8nSy6GAXc4lHj7jpSimcM2eM1wE1r7PQJM9WVzY82+U= diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 7ad9590da1..265110a539 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -890,6 +890,7 @@ func Provider() *schema.Provider { "tencentcloud_kms_white_box_decrypt_key": kms.DataSourceTencentCloudKmsWhiteBoxDecryptKey(), "tencentcloud_kms_white_box_device_fingerprints": kms.DataSourceTencentCloudKmsWhiteBoxDeviceFingerprints(), "tencentcloud_kms_list_algorithms": kms.DataSourceTencentCloudKmsListAlgorithms(), + "tencentcloud_kms_service_status": kms.DataSourceTencentCloudKmsServiceStatus(), "tencentcloud_ssm_products": ssm.DataSourceTencentCloudSsmProducts(), "tencentcloud_ssm_secrets": ssm.DataSourceTencentCloudSsmSecrets(), "tencentcloud_ssm_secret_versions": ssm.DataSourceTencentCloudSsmSecretVersions(), diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md index 4133c735f5..12db9f983a 100644 --- a/tencentcloud/provider.md +++ b/tencentcloud/provider.md @@ -664,6 +664,7 @@ tencentcloud_kms_list_keys tencentcloud_kms_white_box_decrypt_key tencentcloud_kms_white_box_device_fingerprints tencentcloud_kms_list_algorithms +tencentcloud_kms_service_status Resource tencentcloud_kms_key diff --git a/tencentcloud/services/kms/data_source_tc_kms_keys.go b/tencentcloud/services/kms/data_source_tc_kms_keys.go index 60667a798d..501c6c9a4d 100644 --- a/tencentcloud/services/kms/data_source_tc_kms_keys.go +++ b/tencentcloud/services/kms/data_source_tc_kms_keys.go @@ -57,6 +57,11 @@ func DataSourceTencentCloudKmsKeys() *schema.Resource { Optional: true, Description: "Tags to filter CMK.", }, + "hsm_cluster_id": { + Type: schema.TypeString, + Optional: true, + Description: "The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances).", + }, "result_output_file": { Type: schema.TypeString, Optional: true, @@ -133,6 +138,11 @@ func DataSourceTencentCloudKmsKeys() *schema.Resource { Computed: true, Description: "Valid when origin is `EXTERNAL`, it means the effective date of the key material.", }, + "hsm_cluster_id": { + Type: schema.TypeString, + Computed: true, + Description: "The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances).", + }, }, }, }, @@ -169,6 +179,9 @@ func dataSourceTencentCloudKmsKeysRead(d *schema.ResourceData, meta interface{}) if tags := helper.GetTags(d, "tags"); len(tags) > 0 { param["tag_filter"] = tags } + if v, ok := d.GetOk("hsm_cluster_id"); ok { + param["hsm_cluster_id"] = v.(string) + } kmsService := KmsService{ client: meta.(tccommon.ProviderMeta).GetAPIV3Conn(), @@ -203,6 +216,7 @@ func dataSourceTencentCloudKmsKeysRead(d *schema.ResourceData, meta interface{}) "deletion_date": key.DeletionDate, "origin": key.Origin, "valid_to": key.ValidTo, + "hsm_cluster_id": key.HsmClusterId, } keyList = append(keyList, mapping) diff --git a/tencentcloud/services/kms/data_source_tc_kms_keys.md b/tencentcloud/services/kms/data_source_tc_kms_keys.md index d12c4acb9c..09663016d2 100644 --- a/tencentcloud/services/kms/data_source_tc_kms_keys.md +++ b/tencentcloud/services/kms/data_source_tc_kms_keys.md @@ -8,5 +8,6 @@ data "tencentcloud_kms_keys" "example" { key_state = 0 origin = "TENCENT_KMS" key_usage = "ALL" + hsm_cluster_id = "cls-hsm-mwpd9cjm" } ``` \ No newline at end of file diff --git a/tencentcloud/services/kms/data_source_tc_kms_service_status.go b/tencentcloud/services/kms/data_source_tc_kms_service_status.go new file mode 100644 index 0000000000..aaa4198d2f --- /dev/null +++ b/tencentcloud/services/kms/data_source_tc_kms_service_status.go @@ -0,0 +1,210 @@ +package kms + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + kms "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func DataSourceTencentCloudKmsServiceStatus() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudKmsServiceStatusRead, + Schema: map[string]*schema.Schema{ + "service_enabled": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether the KMS service has been activated. true: activated.", + }, + + "invalid_type": { + Type: schema.TypeInt, + Computed: true, + Description: "Service unavailability type. 0: not purchased; 1: normal; 2: suspended due to arrears; 3: resource released.", + }, + + "user_level": { + Type: schema.TypeInt, + Computed: true, + Description: "0: Basic Edition, 1: Ultimate Edition.", + }, + + "pro_expire_time": { + Type: schema.TypeInt, + Computed: true, + Description: "Expiration time of the KMS Ultimate edition. It's represented in a Unix Epoch timestamp.\nNote: This field may return null, indicating that no valid values can be obtained.", + }, + + "pro_renew_flag": { + Type: schema.TypeInt, + Computed: true, + Description: "Whether to automatically renew Ultimate Edition. 0: no, 1: yes\nNote: this field may return null, indicating that no valid values can be obtained.", + }, + + "pro_resource_id": { + Type: schema.TypeString, + Computed: true, + Description: "Unique ID of the Ultimate Edition purchase record. If the Ultimate Edition is not activated, the returned value will be null.\nNote: this field may return null, indicating that no valid values can be obtained.", + }, + + "exclusive_vsm_enabled": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether to activate Managed KMS\nNote: This field may return `null`, indicating that no valid value can be obtained.", + }, + + "exclusive_hsm_enabled": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether to activate Exclusive KMS\nNote: This field may return `null`, indicating that no valid value can be obtained.", + }, + + "subscription_info": { + Type: schema.TypeString, + Computed: true, + Description: "KMS subscription information.\nNote: This field may return null, indicating that no valid values can be obtained.", + }, + + "cmk_user_count": { + Type: schema.TypeInt, + Computed: true, + Description: "Return the number of KMS user key usage.", + }, + + "cmk_limit": { + Type: schema.TypeInt, + Computed: true, + Description: "Return KMS user key specification quantity.", + }, + + "exclusive_hsm_list": { + Type: schema.TypeList, + Computed: true, + Description: "Return to Exclusive Cluster Group.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "hsm_cluster_id": { + Type: schema.TypeString, + Required: true, + Description: "Exclusive cluster ID.", + }, + "hsm_cluster_name": { + Type: schema.TypeString, + Required: true, + Description: "Exclusive cluster name.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudKmsServiceStatusRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("data_source.tencentcloud_kms_service_status.read")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(nil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + service = KmsService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + ) + + paramMap := make(map[string]interface{}) + var respData *kms.GetServiceStatusResponseParams + reqErr := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeKmsServiceStatusByFilter(ctx, paramMap) + if e != nil { + return tccommon.RetryError(e) + } + + respData = result + return nil + }) + + if reqErr != nil { + return reqErr + } + + if respData.ServiceEnabled != nil { + _ = d.Set("service_enabled", respData.ServiceEnabled) + } + + if respData.InvalidType != nil { + _ = d.Set("invalid_type", respData.InvalidType) + } + + if respData.UserLevel != nil { + _ = d.Set("user_level", respData.UserLevel) + } + + if respData.ProExpireTime != nil { + _ = d.Set("pro_expire_time", respData.ProExpireTime) + } + + if respData.ProRenewFlag != nil { + _ = d.Set("pro_renew_flag", respData.ProRenewFlag) + } + + if respData.ProResourceId != nil { + _ = d.Set("pro_resource_id", respData.ProResourceId) + } + + if respData.ExclusiveVSMEnabled != nil { + _ = d.Set("exclusive_vsm_enabled", respData.ExclusiveVSMEnabled) + } + + if respData.ExclusiveHSMEnabled != nil { + _ = d.Set("exclusive_hsm_enabled", respData.ExclusiveHSMEnabled) + } + + if respData.SubscriptionInfo != nil { + _ = d.Set("subscription_info", respData.SubscriptionInfo) + } + + if respData.CmkUserCount != nil { + _ = d.Set("cmk_user_count", respData.CmkUserCount) + } + + if respData.CmkLimit != nil { + _ = d.Set("cmk_limit", respData.CmkLimit) + } + + if respData.ExclusiveHSMList != nil { + tmpList := make([]map[string]interface{}, 0, len(respData.ExclusiveHSMList)) + for _, item := range respData.ExclusiveHSMList { + dMap := make(map[string]interface{}) + if item.HsmClusterId != nil { + dMap["hsm_cluster_id"] = item.HsmClusterId + } + + if item.HsmClusterName != nil { + dMap["hsm_cluster_name"] = item.HsmClusterName + } + + tmpList = append(tmpList, dMap) + } + + _ = d.Set("exclusive_hsm_list", tmpList) + } + + d.SetId(helper.BuildToken()) + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := tccommon.WriteToFile(output.(string), d); e != nil { + return e + } + } + + return nil +} diff --git a/tencentcloud/services/kms/data_source_tc_kms_service_status.md b/tencentcloud/services/kms/data_source_tc_kms_service_status.md new file mode 100644 index 0000000000..49d003bef1 --- /dev/null +++ b/tencentcloud/services/kms/data_source_tc_kms_service_status.md @@ -0,0 +1,7 @@ +Use this data source to query detailed information of KMS service_status + +Example Usage + +```hcl +data "tencentcloud_kms_service_status" "example" {} +``` diff --git a/tencentcloud/services/kms/data_source_tc_kms_service_status_test.go b/tencentcloud/services/kms/data_source_tc_kms_service_status_test.go new file mode 100644 index 0000000000..02261c96de --- /dev/null +++ b/tencentcloud/services/kms/data_source_tc_kms_service_status_test.go @@ -0,0 +1,29 @@ +package kms_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" +) + +func TestAccTencentCloudKmsServiceStatusDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{{ + Config: testAccKmsServiceStatusDataSource, + Check: resource.ComposeTestCheckFunc( + tcacctest.AccCheckTencentCloudDataSourceID("data.tencentcloud_kms_service_status.example"), + ), + }}, + }) +} + +const testAccKmsServiceStatusDataSource = ` +data "tencentcloud_kms_service_status" "example" {} +` diff --git a/tencentcloud/services/kms/resource_tc_kms_external_key.go b/tencentcloud/services/kms/resource_tc_kms_external_key.go index d70d3db321..69d91afb60 100644 --- a/tencentcloud/services/kms/resource_tc_kms_external_key.go +++ b/tencentcloud/services/kms/resource_tc_kms_external_key.go @@ -34,6 +34,11 @@ func ResourceTencentCloudKmsExternalKey() *schema.Resource { Optional: true, Description: "This value means the effective timestamp of the key material, 0 means it does not expire. Need to be greater than the current timestamp, the maximum support is 2147443200.", }, + "hsm_cluster_id": { + Type: schema.TypeString, + Optional: true, + Description: "The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances).", + }, } basic := TencentKmsBasicInfo() @@ -66,15 +71,20 @@ func resourceTencentCloudKmsExternalKeyCreate(d *schema.ResourceData, meta inter keyType := KMS_ORIGIN_TYPE[KMS_ORIGIN_EXTERNAL] alias := d.Get("alias").(string) description := "" + hsmClusterId := "" keyUsage := KMS_KEY_USAGE_ENCRYPT_DECRYPT if v, ok := d.GetOk("description"); ok { description = v.(string) } + if v, ok := d.GetOk("hsm_cluster_id"); ok { + hsmClusterId = v.(string) + } + var keyId string var outErr, inErr error outErr = resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { - keyId, inErr = kmsService.CreateKey(ctx, keyType, alias, description, keyUsage) + keyId, inErr = kmsService.CreateKey(ctx, keyType, alias, description, keyUsage, hsmClusterId) if inErr != nil { return tccommon.RetryError(inErr) } @@ -185,6 +195,10 @@ func resourceTencentCloudKmsExternalKeyRead(d *schema.ResourceData, meta interfa _ = d.Set("description", key.Description) _ = d.Set("valid_to", key.ValidTo) _ = d.Set("key_state", key.KeyState) + if key.HsmClusterId != nil { + _ = d.Set("hsm_cluster_id", key.HsmClusterId) + } + transformKeyState(d) tcClient := meta.(tccommon.ProviderMeta).GetAPIV3Conn() @@ -206,6 +220,14 @@ func resourceTencentCloudKmsExternalKeyUpdate(d *schema.ResourceData, meta inter kmsService := KmsService{ client: meta.(tccommon.ProviderMeta).GetAPIV3Conn(), } + + immutableArgs := []string{"hsm_cluster_id"} + for _, v := range immutableArgs { + if d.HasChange(v) { + return fmt.Errorf("argument `%s` cannot be changed", v) + } + } + d.Partial(true) if d.HasChange("description") { diff --git a/tencentcloud/services/kms/resource_tc_kms_external_key.md b/tencentcloud/services/kms/resource_tc_kms_external_key.md index 8a4e43a636..f7b1538ed8 100644 --- a/tencentcloud/services/kms/resource_tc_kms_external_key.md +++ b/tencentcloud/services/kms/resource_tc_kms_external_key.md @@ -6,11 +6,25 @@ Create a basic instance. ```hcl resource "tencentcloud_kms_external_key" "example" { - alias = "tf-example-kms-externalkey" - description = "example of kms external key" + alias = "tf-example-kms-externalkey" + description = "example of kms external key" tags = { - "createdBy" = "terraform" + createdBy = "terraform" + } +} +``` + +Create kms instance with HSM + +```hcl +resource "tencentcloud_kms_external_key" "example" { + alias = "tf-example-kms-externalkey" + description = "example of kms external key" + hsm_cluster_id = "cls-hsm-mwpd9cjm" + + tags = { + createdBy = "terraform" } } ``` @@ -26,7 +40,7 @@ resource "tencentcloud_kms_external_key" "example" { is_enabled = true tags = { - "createdBy" = "terraform" + createdBy = "terraform" } } ``` @@ -42,7 +56,7 @@ resource "tencentcloud_kms_external_key" "example" { is_enabled = false tags = { - "test-tag" = "unit-test" + createdBy = "terraform" } } ``` @@ -52,5 +66,5 @@ Import KMS external keys can be imported using the id, e.g. ``` -$ terraform import tencentcloud_kms_external_key.example 287e8f40-7cbb-11eb-9a3a-xxxxx -``` \ No newline at end of file +$ terraform import tencentcloud_kms_external_key.example 25068921-2101-11f0-bf1f-5254000328e1 +``` diff --git a/tencentcloud/services/kms/resource_tc_kms_key.go b/tencentcloud/services/kms/resource_tc_kms_key.go index b0c61430dc..1205c157a8 100644 --- a/tencentcloud/services/kms/resource_tc_kms_key.go +++ b/tencentcloud/services/kms/resource_tc_kms_key.go @@ -76,6 +76,11 @@ func ResourceTencentCloudKmsKey() *schema.Resource { Default: false, Description: "Specify whether to enable key rotation, valid when key_usage is `ENCRYPT_DECRYPT`. Default value is `false`.", }, + "hsm_cluster_id": { + Type: schema.TypeString, + Optional: true, + Description: "The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances).", + }, } basic := TencentKmsBasicInfo() @@ -109,6 +114,7 @@ func resourceTencentCloudKmsKeyCreate(d *schema.ResourceData, meta interface{}) alias := d.Get("alias").(string) description := "" keyUsage := "" + hsmClusterId := "" if v, ok := d.GetOk("description"); ok { description = v.(string) @@ -118,10 +124,14 @@ func resourceTencentCloudKmsKeyCreate(d *schema.ResourceData, meta interface{}) keyUsage = v.(string) } + if v, ok := d.GetOk("hsm_cluster_id"); ok { + hsmClusterId = v.(string) + } + var keyId string var outErr, inErr error outErr = resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { - keyId, inErr = kmsService.CreateKey(ctx, keyType, alias, description, keyUsage) + keyId, inErr = kmsService.CreateKey(ctx, keyType, alias, description, keyUsage, hsmClusterId) if inErr != nil { return tccommon.RetryError(inErr) } @@ -240,6 +250,9 @@ func resourceTencentCloudKmsKeyRead(d *schema.ResourceData, meta interface{}) er _ = d.Set("key_state", key.KeyState) _ = d.Set("key_usage", key.KeyUsage) _ = d.Set("key_rotation_enabled", key.KeyRotationEnabled) + if key.HsmClusterId != nil { + _ = d.Set("hsm_cluster_id", key.HsmClusterId) + } transformKeyState(d) tcClient := meta.(tccommon.ProviderMeta).GetAPIV3Conn() @@ -263,6 +276,13 @@ func resourceTencentCloudKmsKeyUpdate(d *schema.ResourceData, meta interface{}) keyId = d.Id() ) + immutableArgs := []string{"hsm_cluster_id"} + for _, v := range immutableArgs { + if d.HasChange(v) { + return fmt.Errorf("argument `%s` cannot be changed", v) + } + } + d.Partial(true) if d.HasChange("description") { description := d.Get("description").(string) diff --git a/tencentcloud/services/kms/resource_tc_kms_key.md b/tencentcloud/services/kms/resource_tc_kms_key.md index 6ce2f77d29..72419127f2 100644 --- a/tencentcloud/services/kms/resource_tc_kms_key.md +++ b/tencentcloud/services/kms/resource_tc_kms_key.md @@ -18,6 +18,23 @@ resource "tencentcloud_kms_key" "example" { } ``` +Create kms instance with HSM + +```hcl +resource "tencentcloud_kms_key" "example" { + alias = "tf-example-kms-key" + description = "example of kms key" + key_rotation_enabled = false + is_enabled = true + pending_delete_window_in_days = 7 + hsm_cluster_id = "cls-hsm-mwpd9cjm" + + tags = { + createdBy = "Terraform" + } +} +``` + Specify the Key Usage as an asymmetry method. ```hcl diff --git a/tencentcloud/services/kms/service_tencentcloud_kms.go b/tencentcloud/services/kms/service_tencentcloud_kms.go index d50205bb16..632b12f2e4 100644 --- a/tencentcloud/services/kms/service_tencentcloud_kms.go +++ b/tencentcloud/services/kms/service_tencentcloud_kms.go @@ -62,6 +62,9 @@ func (me *KmsService) DescribeKeysByFilter(ctx context.Context, param map[string request.TagFilters = append(request.TagFilters, &tag) } } + if k == "hsm_cluster_id" { + request.HsmClusterId = helper.String(v.(string)) + } } var offset uint64 = 0 var pageSize = uint64(KMS_PAGE_LIMIT) @@ -109,7 +112,7 @@ func (me *KmsService) DescribeKeyById(ctx context.Context, keyId string) (key *k return } -func (me *KmsService) CreateKey(ctx context.Context, keyType uint64, alias, description, keyUsage string) (keyId string, errRet error) { +func (me *KmsService) CreateKey(ctx context.Context, keyType uint64, alias, description, keyUsage, hsmClusterId string) (keyId string, errRet error) { logId := tccommon.GetLogId(ctx) request := kms.NewCreateKeyRequest() request.Type = helper.Uint64(keyType) @@ -120,6 +123,9 @@ func (me *KmsService) CreateKey(ctx context.Context, keyType uint64, alias, desc if keyUsage != "" { request.KeyUsage = helper.String(keyUsage) } + if hsmClusterId != "" { + request.HsmClusterId = helper.String(hsmClusterId) + } ratelimit.Check(request.GetAction()) response, err := me.client.UseKmsClient().CreateKey(request) @@ -127,9 +133,20 @@ func (me *KmsService) CreateKey(ctx context.Context, keyType uint64, alias, desc errRet = errors.WithStack(err) return } + + if response == nil || response.Response == nil { + errRet = fmt.Errorf("Create key failed, Response is nil.") + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + if response.Response.KeyId == nil { + errRet = fmt.Errorf("KeyId is nil.") + return + } + keyId = *response.Response.KeyId return } @@ -844,3 +861,31 @@ func (me *KmsService) DescribeKmsListAlgorithmsByFilter(ctx context.Context) (li listAlgorithms = response.Response return } + +func (me *KmsService) DescribeKmsServiceStatusByFilter(ctx context.Context, param map[string]interface{}) (ret *kms.GetServiceStatusResponseParams, errRet error) { + var ( + logId = tccommon.GetLogId(ctx) + request = kms.NewGetServiceStatusRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + response, err := me.client.UseKmsClient().GetServiceStatus(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || response.Response == nil { + return + } + + ret = response.Response + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/client.go index 43392bb7e5..23df0a7506 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/client.go @@ -59,8 +59,9 @@ func NewArchiveKeyRequest() (request *ArchiveKeyRequest) { func NewArchiveKeyResponse() (response *ArchiveKeyResponse) { response = &ArchiveKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // ArchiveKey @@ -123,8 +124,9 @@ func NewAsymmetricRsaDecryptRequest() (request *AsymmetricRsaDecryptRequest) { func NewAsymmetricRsaDecryptResponse() (response *AsymmetricRsaDecryptResponse) { response = &AsymmetricRsaDecryptResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // AsymmetricRsaDecrypt @@ -185,8 +187,9 @@ func NewAsymmetricSm2DecryptRequest() (request *AsymmetricSm2DecryptRequest) { func NewAsymmetricSm2DecryptResponse() (response *AsymmetricSm2DecryptResponse) { response = &AsymmetricSm2DecryptResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // AsymmetricSm2Decrypt @@ -249,8 +252,9 @@ func NewBindCloudResourceRequest() (request *BindCloudResourceRequest) { func NewBindCloudResourceResponse() (response *BindCloudResourceResponse) { response = &BindCloudResourceResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // BindCloudResource @@ -309,8 +313,9 @@ func NewCancelKeyArchiveRequest() (request *CancelKeyArchiveRequest) { func NewCancelKeyArchiveResponse() (response *CancelKeyArchiveResponse) { response = &CancelKeyArchiveResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // CancelKeyArchive @@ -371,8 +376,9 @@ func NewCancelKeyDeletionRequest() (request *CancelKeyDeletionRequest) { func NewCancelKeyDeletionResponse() (response *CancelKeyDeletionResponse) { response = &CancelKeyDeletionResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // CancelKeyDeletion @@ -429,8 +435,9 @@ func NewCreateKeyRequest() (request *CreateKeyRequest) { func NewCreateKeyResponse() (response *CreateKeyResponse) { response = &CreateKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // CreateKey @@ -503,8 +510,9 @@ func NewCreateWhiteBoxKeyRequest() (request *CreateWhiteBoxKeyRequest) { func NewCreateWhiteBoxKeyResponse() (response *CreateWhiteBoxKeyResponse) { response = &CreateWhiteBoxKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // CreateWhiteBoxKey @@ -567,8 +575,9 @@ func NewDecryptRequest() (request *DecryptRequest) { func NewDecryptResponse() (response *DecryptResponse) { response = &DecryptResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // Decrypt @@ -627,8 +636,9 @@ func NewDeleteImportedKeyMaterialRequest() (request *DeleteImportedKeyMaterialRe func NewDeleteImportedKeyMaterialResponse() (response *DeleteImportedKeyMaterialResponse) { response = &DeleteImportedKeyMaterialResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DeleteImportedKeyMaterial @@ -689,8 +699,9 @@ func NewDeleteWhiteBoxKeyRequest() (request *DeleteWhiteBoxKeyRequest) { func NewDeleteWhiteBoxKeyResponse() (response *DeleteWhiteBoxKeyResponse) { response = &DeleteWhiteBoxKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DeleteWhiteBoxKey @@ -747,8 +758,9 @@ func NewDescribeKeyRequest() (request *DescribeKeyRequest) { func NewDescribeKeyResponse() (response *DescribeKeyResponse) { response = &DescribeKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DescribeKey @@ -803,8 +815,9 @@ func NewDescribeKeysRequest() (request *DescribeKeysRequest) { func NewDescribeKeysResponse() (response *DescribeKeysResponse) { response = &DescribeKeysResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DescribeKeys @@ -861,8 +874,9 @@ func NewDescribeWhiteBoxDecryptKeyRequest() (request *DescribeWhiteBoxDecryptKey func NewDescribeWhiteBoxDecryptKeyResponse() (response *DescribeWhiteBoxDecryptKeyResponse) { response = &DescribeWhiteBoxDecryptKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DescribeWhiteBoxDecryptKey @@ -917,8 +931,9 @@ func NewDescribeWhiteBoxDeviceFingerprintsRequest() (request *DescribeWhiteBoxDe func NewDescribeWhiteBoxDeviceFingerprintsResponse() (response *DescribeWhiteBoxDeviceFingerprintsResponse) { response = &DescribeWhiteBoxDeviceFingerprintsResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DescribeWhiteBoxDeviceFingerprints @@ -973,8 +988,9 @@ func NewDescribeWhiteBoxKeyRequest() (request *DescribeWhiteBoxKeyRequest) { func NewDescribeWhiteBoxKeyResponse() (response *DescribeWhiteBoxKeyResponse) { response = &DescribeWhiteBoxKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DescribeWhiteBoxKey @@ -1029,8 +1045,9 @@ func NewDescribeWhiteBoxKeyDetailsRequest() (request *DescribeWhiteBoxKeyDetails func NewDescribeWhiteBoxKeyDetailsResponse() (response *DescribeWhiteBoxKeyDetailsResponse) { response = &DescribeWhiteBoxKeyDetailsResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DescribeWhiteBoxKeyDetails @@ -1083,8 +1100,9 @@ func NewDescribeWhiteBoxServiceStatusRequest() (request *DescribeWhiteBoxService func NewDescribeWhiteBoxServiceStatusResponse() (response *DescribeWhiteBoxServiceStatusResponse) { response = &DescribeWhiteBoxServiceStatusResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DescribeWhiteBoxServiceStatus @@ -1135,8 +1153,9 @@ func NewDisableKeyRequest() (request *DisableKeyRequest) { func NewDisableKeyResponse() (response *DisableKeyResponse) { response = &DisableKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DisableKey @@ -1197,8 +1216,9 @@ func NewDisableKeyRotationRequest() (request *DisableKeyRotationRequest) { func NewDisableKeyRotationResponse() (response *DisableKeyRotationResponse) { response = &DisableKeyRotationResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DisableKeyRotation @@ -1253,8 +1273,9 @@ func NewDisableKeysRequest() (request *DisableKeysRequest) { func NewDisableKeysResponse() (response *DisableKeysResponse) { response = &DisableKeysResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DisableKeys @@ -1317,8 +1338,9 @@ func NewDisableWhiteBoxKeyRequest() (request *DisableWhiteBoxKeyRequest) { func NewDisableWhiteBoxKeyResponse() (response *DisableWhiteBoxKeyResponse) { response = &DisableWhiteBoxKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DisableWhiteBoxKey @@ -1373,8 +1395,9 @@ func NewDisableWhiteBoxKeysRequest() (request *DisableWhiteBoxKeysRequest) { func NewDisableWhiteBoxKeysResponse() (response *DisableWhiteBoxKeysResponse) { response = &DisableWhiteBoxKeysResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // DisableWhiteBoxKeys @@ -1433,8 +1456,9 @@ func NewEnableKeyRequest() (request *EnableKeyRequest) { func NewEnableKeyResponse() (response *EnableKeyResponse) { response = &EnableKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // EnableKey @@ -1493,8 +1517,9 @@ func NewEnableKeyRotationRequest() (request *EnableKeyRotationRequest) { func NewEnableKeyRotationResponse() (response *EnableKeyRotationResponse) { response = &EnableKeyRotationResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // EnableKeyRotation @@ -1557,8 +1582,9 @@ func NewEnableKeysRequest() (request *EnableKeysRequest) { func NewEnableKeysResponse() (response *EnableKeysResponse) { response = &EnableKeysResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // EnableKeys @@ -1619,8 +1645,9 @@ func NewEnableWhiteBoxKeyRequest() (request *EnableWhiteBoxKeyRequest) { func NewEnableWhiteBoxKeyResponse() (response *EnableWhiteBoxKeyResponse) { response = &EnableWhiteBoxKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // EnableWhiteBoxKey @@ -1675,8 +1702,9 @@ func NewEnableWhiteBoxKeysRequest() (request *EnableWhiteBoxKeysRequest) { func NewEnableWhiteBoxKeysResponse() (response *EnableWhiteBoxKeysResponse) { response = &EnableWhiteBoxKeysResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // EnableWhiteBoxKeys @@ -1735,8 +1763,9 @@ func NewEncryptRequest() (request *EncryptRequest) { func NewEncryptResponse() (response *EncryptResponse) { response = &EncryptResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // Encrypt @@ -1797,8 +1826,9 @@ func NewEncryptByWhiteBoxRequest() (request *EncryptByWhiteBoxRequest) { func NewEncryptByWhiteBoxResponse() (response *EncryptByWhiteBoxResponse) { response = &EncryptByWhiteBoxResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // EncryptByWhiteBox @@ -1857,8 +1887,9 @@ func NewGenerateDataKeyRequest() (request *GenerateDataKeyRequest) { func NewGenerateDataKeyResponse() (response *GenerateDataKeyResponse) { response = &GenerateDataKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // GenerateDataKey @@ -1919,8 +1950,9 @@ func NewGenerateRandomRequest() (request *GenerateRandomRequest) { func NewGenerateRandomResponse() (response *GenerateRandomResponse) { response = &GenerateRandomResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // GenerateRandom @@ -1971,8 +2003,9 @@ func NewGetKeyRotationStatusRequest() (request *GetKeyRotationStatusRequest) { func NewGetKeyRotationStatusResponse() (response *GetKeyRotationStatusResponse) { response = &GetKeyRotationStatusResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // GetKeyRotationStatus @@ -2027,8 +2060,9 @@ func NewGetParametersForImportRequest() (request *GetParametersForImportRequest) func NewGetParametersForImportResponse() (response *GetParametersForImportResponse) { response = &GetParametersForImportResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // GetParametersForImport @@ -2085,8 +2119,9 @@ func NewGetPublicKeyRequest() (request *GetPublicKeyRequest) { func NewGetPublicKeyResponse() (response *GetPublicKeyResponse) { response = &GetPublicKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // GetPublicKey @@ -2143,8 +2178,9 @@ func NewGetRegionsRequest() (request *GetRegionsRequest) { func NewGetRegionsResponse() (response *GetRegionsResponse) { response = &GetRegionsResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // GetRegions @@ -2191,8 +2227,9 @@ func NewGetServiceStatusRequest() (request *GetServiceStatusRequest) { func NewGetServiceStatusResponse() (response *GetServiceStatusResponse) { response = &GetServiceStatusResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // GetServiceStatus @@ -2201,6 +2238,7 @@ func NewGetServiceStatusResponse() (response *GetServiceStatusResponse) { // 可能返回的错误码: // INTERNALERROR = "InternalError" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" func (c *Client) GetServiceStatus(request *GetServiceStatusRequest) (response *GetServiceStatusResponse, err error) { return c.GetServiceStatusWithContext(context.Background(), request) } @@ -2211,6 +2249,7 @@ func (c *Client) GetServiceStatus(request *GetServiceStatusRequest) (response *G // 可能返回的错误码: // INTERNALERROR = "InternalError" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" func (c *Client) GetServiceStatusWithContext(ctx context.Context, request *GetServiceStatusRequest) (response *GetServiceStatusResponse, err error) { if request == nil { request = NewGetServiceStatusRequest() @@ -2241,8 +2280,9 @@ func NewImportKeyMaterialRequest() (request *ImportKeyMaterialRequest) { func NewImportKeyMaterialResponse() (response *ImportKeyMaterialResponse) { response = &ImportKeyMaterialResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // ImportKeyMaterial @@ -2311,8 +2351,9 @@ func NewListAlgorithmsRequest() (request *ListAlgorithmsRequest) { func NewListAlgorithmsResponse() (response *ListAlgorithmsResponse) { response = &ListAlgorithmsResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // ListAlgorithms @@ -2361,8 +2402,9 @@ func NewListKeyDetailRequest() (request *ListKeyDetailRequest) { func NewListKeyDetailResponse() (response *ListKeyDetailResponse) { response = &ListKeyDetailResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // ListKeyDetail @@ -2415,8 +2457,9 @@ func NewListKeysRequest() (request *ListKeysRequest) { func NewListKeysResponse() (response *ListKeysResponse) { response = &ListKeysResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // ListKeys @@ -2469,8 +2512,9 @@ func NewOverwriteWhiteBoxDeviceFingerprintsRequest() (request *OverwriteWhiteBox func NewOverwriteWhiteBoxDeviceFingerprintsResponse() (response *OverwriteWhiteBoxDeviceFingerprintsResponse) { response = &OverwriteWhiteBoxDeviceFingerprintsResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // OverwriteWhiteBoxDeviceFingerprints @@ -2515,6 +2559,250 @@ func (c *Client) OverwriteWhiteBoxDeviceFingerprintsWithContext(ctx context.Cont return } +func NewPostQuantumCryptoDecryptRequest() (request *PostQuantumCryptoDecryptRequest) { + request = &PostQuantumCryptoDecryptRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("kms", APIVersion, "PostQuantumCryptoDecrypt") + + + return +} + +func NewPostQuantumCryptoDecryptResponse() (response *PostQuantumCryptoDecryptResponse) { + response = &PostQuantumCryptoDecryptResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// PostQuantumCryptoDecrypt +// 本接口使用后量子密码算法密钥,解密密文,并得到明文数据。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ENCRYPTIONERROR = "FailedOperation.EncryptionError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDCIPHERTEXT = "InvalidParameterValue.InvalidCiphertext" +// RESOURCEUNAVAILABLE_CMKDISABLED = "ResourceUnavailable.CmkDisabled" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) PostQuantumCryptoDecrypt(request *PostQuantumCryptoDecryptRequest) (response *PostQuantumCryptoDecryptResponse, err error) { + return c.PostQuantumCryptoDecryptWithContext(context.Background(), request) +} + +// PostQuantumCryptoDecrypt +// 本接口使用后量子密码算法密钥,解密密文,并得到明文数据。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ENCRYPTIONERROR = "FailedOperation.EncryptionError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDCIPHERTEXT = "InvalidParameterValue.InvalidCiphertext" +// RESOURCEUNAVAILABLE_CMKDISABLED = "ResourceUnavailable.CmkDisabled" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) PostQuantumCryptoDecryptWithContext(ctx context.Context, request *PostQuantumCryptoDecryptRequest) (response *PostQuantumCryptoDecryptResponse, err error) { + if request == nil { + request = NewPostQuantumCryptoDecryptRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("PostQuantumCryptoDecrypt require credential") + } + + request.SetContext(ctx) + + response = NewPostQuantumCryptoDecryptResponse() + err = c.Send(request, response) + return +} + +func NewPostQuantumCryptoEncryptRequest() (request *PostQuantumCryptoEncryptRequest) { + request = &PostQuantumCryptoEncryptRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("kms", APIVersion, "PostQuantumCryptoEncrypt") + + + return +} + +func NewPostQuantumCryptoEncryptResponse() (response *PostQuantumCryptoEncryptResponse) { + response = &PostQuantumCryptoEncryptResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// PostQuantumCryptoEncrypt +// 本接口使用后量子密码算法密钥,可加密最多为4KB任意数据,可用于加密数据库密码,RSA Key,或其它较小的敏感信息。对于应用的数据加密,使用GenerateDataKey生成的DataKey进行本地数据的加解密操作。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDKEYID = "InvalidParameterValue.InvalidKeyId" +// INVALIDPARAMETERVALUE_INVALIDPLAINTEXT = "InvalidParameterValue.InvalidPlaintext" +// RESOURCEUNAVAILABLE_CMKARCHIVED = "ResourceUnavailable.CmkArchived" +// RESOURCEUNAVAILABLE_CMKDISABLED = "ResourceUnavailable.CmkDisabled" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) PostQuantumCryptoEncrypt(request *PostQuantumCryptoEncryptRequest) (response *PostQuantumCryptoEncryptResponse, err error) { + return c.PostQuantumCryptoEncryptWithContext(context.Background(), request) +} + +// PostQuantumCryptoEncrypt +// 本接口使用后量子密码算法密钥,可加密最多为4KB任意数据,可用于加密数据库密码,RSA Key,或其它较小的敏感信息。对于应用的数据加密,使用GenerateDataKey生成的DataKey进行本地数据的加解密操作。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDKEYID = "InvalidParameterValue.InvalidKeyId" +// INVALIDPARAMETERVALUE_INVALIDPLAINTEXT = "InvalidParameterValue.InvalidPlaintext" +// RESOURCEUNAVAILABLE_CMKARCHIVED = "ResourceUnavailable.CmkArchived" +// RESOURCEUNAVAILABLE_CMKDISABLED = "ResourceUnavailable.CmkDisabled" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) PostQuantumCryptoEncryptWithContext(ctx context.Context, request *PostQuantumCryptoEncryptRequest) (response *PostQuantumCryptoEncryptResponse, err error) { + if request == nil { + request = NewPostQuantumCryptoEncryptRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("PostQuantumCryptoEncrypt require credential") + } + + request.SetContext(ctx) + + response = NewPostQuantumCryptoEncryptResponse() + err = c.Send(request, response) + return +} + +func NewPostQuantumCryptoSignRequest() (request *PostQuantumCryptoSignRequest) { + request = &PostQuantumCryptoSignRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("kms", APIVersion, "PostQuantumCryptoSign") + + + return +} + +func NewPostQuantumCryptoSignResponse() (response *PostQuantumCryptoSignResponse) { + response = &PostQuantumCryptoSignResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// PostQuantumCryptoSign +// 使用后量子密码算法签名验签密钥进行签名。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDKEYID = "InvalidParameterValue.InvalidKeyId" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// RESOURCEUNAVAILABLE_CMKSTATENOTSUPPORT = "ResourceUnavailable.CmkStateNotSupport" +func (c *Client) PostQuantumCryptoSign(request *PostQuantumCryptoSignRequest) (response *PostQuantumCryptoSignResponse, err error) { + return c.PostQuantumCryptoSignWithContext(context.Background(), request) +} + +// PostQuantumCryptoSign +// 使用后量子密码算法签名验签密钥进行签名。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDKEYID = "InvalidParameterValue.InvalidKeyId" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// RESOURCEUNAVAILABLE_CMKSTATENOTSUPPORT = "ResourceUnavailable.CmkStateNotSupport" +func (c *Client) PostQuantumCryptoSignWithContext(ctx context.Context, request *PostQuantumCryptoSignRequest) (response *PostQuantumCryptoSignResponse, err error) { + if request == nil { + request = NewPostQuantumCryptoSignRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("PostQuantumCryptoSign require credential") + } + + request.SetContext(ctx) + + response = NewPostQuantumCryptoSignResponse() + err = c.Send(request, response) + return +} + +func NewPostQuantumCryptoVerifyRequest() (request *PostQuantumCryptoVerifyRequest) { + request = &PostQuantumCryptoVerifyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("kms", APIVersion, "PostQuantumCryptoVerify") + + + return +} + +func NewPostQuantumCryptoVerifyResponse() (response *PostQuantumCryptoVerifyResponse) { + response = &PostQuantumCryptoVerifyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// PostQuantumCryptoVerify +// 使用后量子密码算法密钥对签名进行验证。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDKEYID = "InvalidParameterValue.InvalidKeyId" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// RESOURCEUNAVAILABLE_CMKSTATENOTSUPPORT = "ResourceUnavailable.CmkStateNotSupport" +func (c *Client) PostQuantumCryptoVerify(request *PostQuantumCryptoVerifyRequest) (response *PostQuantumCryptoVerifyResponse, err error) { + return c.PostQuantumCryptoVerifyWithContext(context.Background(), request) +} + +// PostQuantumCryptoVerify +// 使用后量子密码算法密钥对签名进行验证。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDKEYID = "InvalidParameterValue.InvalidKeyId" +// RESOURCEUNAVAILABLE_CMKNOTFOUND = "ResourceUnavailable.CmkNotFound" +// RESOURCEUNAVAILABLE_CMKSTATENOTSUPPORT = "ResourceUnavailable.CmkStateNotSupport" +func (c *Client) PostQuantumCryptoVerifyWithContext(ctx context.Context, request *PostQuantumCryptoVerifyRequest) (response *PostQuantumCryptoVerifyResponse, err error) { + if request == nil { + request = NewPostQuantumCryptoVerifyRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("PostQuantumCryptoVerify require credential") + } + + request.SetContext(ctx) + + response = NewPostQuantumCryptoVerifyResponse() + err = c.Send(request, response) + return +} + func NewReEncryptRequest() (request *ReEncryptRequest) { request = &ReEncryptRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2529,8 +2817,9 @@ func NewReEncryptRequest() (request *ReEncryptRequest) { func NewReEncryptResponse() (response *ReEncryptResponse) { response = &ReEncryptResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // ReEncrypt @@ -2589,8 +2878,9 @@ func NewScheduleKeyDeletionRequest() (request *ScheduleKeyDeletionRequest) { func NewScheduleKeyDeletionResponse() (response *ScheduleKeyDeletionResponse) { response = &ScheduleKeyDeletionResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // ScheduleKeyDeletion @@ -2653,8 +2943,9 @@ func NewSignByAsymmetricKeyRequest() (request *SignByAsymmetricKeyRequest) { func NewSignByAsymmetricKeyResponse() (response *SignByAsymmetricKeyResponse) { response = &SignByAsymmetricKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // SignByAsymmetricKey @@ -2717,8 +3008,9 @@ func NewUnbindCloudResourceRequest() (request *UnbindCloudResourceRequest) { func NewUnbindCloudResourceResponse() (response *UnbindCloudResourceResponse) { response = &UnbindCloudResourceResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // UnbindCloudResource @@ -2777,8 +3069,9 @@ func NewUpdateAliasRequest() (request *UpdateAliasRequest) { func NewUpdateAliasResponse() (response *UpdateAliasResponse) { response = &UpdateAliasResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // UpdateAlias @@ -2839,8 +3132,9 @@ func NewUpdateKeyDescriptionRequest() (request *UpdateKeyDescriptionRequest) { func NewUpdateKeyDescriptionResponse() (response *UpdateKeyDescriptionResponse) { response = &UpdateKeyDescriptionResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // UpdateKeyDescription @@ -2897,8 +3191,9 @@ func NewVerifyByAsymmetricKeyRequest() (request *VerifyByAsymmetricKeyRequest) { func NewVerifyByAsymmetricKeyResponse() (response *VerifyByAsymmetricKeyResponse) { response = &VerifyByAsymmetricKeyResponse{ BaseResponse: &tchttp.BaseResponse{}, - } + } return + } // VerifyByAsymmetricKey diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/errors.go index 28cf3edb67..6303954331 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/errors.go @@ -137,6 +137,9 @@ const ( // 未授权操作。 UNAUTHORIZEDOPERATION = "UnauthorizedOperation" + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + // 用户导入类型的CMK禁止轮换。 UNSUPPORTEDOPERATION_EXTERNALCMKCANNOTROTATE = "UnsupportedOperation.ExternalCmkCanNotRotate" diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/models.go index e04e7d8669..52473c8bce 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118/models.go @@ -15,30 +15,30 @@ package v20190118 import ( - "encoding/json" tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/json" ) type AlgorithmInfo struct { // 算法的标识 - KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"` + KeyUsage *string `json:"KeyUsage,omitnil,omitempty" name:"KeyUsage"` // 算法的名称 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` } // Predefined struct for user type ArchiveKeyRequestParams struct { // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type ArchiveKeyRequest struct { *tchttp.BaseRequest // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *ArchiveKeyRequest) ToJsonString() string { @@ -62,8 +62,8 @@ func (r *ArchiveKeyRequest) FromJsonString(s string) error { // Predefined struct for user type ArchiveKeyResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type ArchiveKeyResponse struct { @@ -85,26 +85,26 @@ func (r *ArchiveKeyResponse) FromJsonString(s string) error { // Predefined struct for user type AsymmetricRsaDecryptRequestParams struct { // CMK的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 使用PublicKey加密的密文,Base64编码 - Ciphertext *string `json:"Ciphertext,omitempty" name:"Ciphertext"` + Ciphertext *string `json:"Ciphertext,omitnil,omitempty" name:"Ciphertext"` // 在使用公钥加密时对应的算法:当前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` } type AsymmetricRsaDecryptRequest struct { *tchttp.BaseRequest // CMK的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 使用PublicKey加密的密文,Base64编码 - Ciphertext *string `json:"Ciphertext,omitempty" name:"Ciphertext"` + Ciphertext *string `json:"Ciphertext,omitnil,omitempty" name:"Ciphertext"` // 在使用公钥加密时对应的算法:当前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` } func (r *AsymmetricRsaDecryptRequest) ToJsonString() string { @@ -131,13 +131,13 @@ func (r *AsymmetricRsaDecryptRequest) FromJsonString(s string) error { // Predefined struct for user type AsymmetricRsaDecryptResponseParams struct { // CMK的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 解密后的明文,base64编码 - Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"` + Plaintext *string `json:"Plaintext,omitnil,omitempty" name:"Plaintext"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type AsymmetricRsaDecryptResponse struct { @@ -159,20 +159,20 @@ func (r *AsymmetricRsaDecryptResponse) FromJsonString(s string) error { // Predefined struct for user type AsymmetricSm2DecryptRequestParams struct { // CMK的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` - // 使用PublicKey加密的密文,Base64编码。密文长度不能超过256字节。 - Ciphertext *string `json:"Ciphertext,omitempty" name:"Ciphertext"` + // 使用PublicKey加密的密文,Base64编码,原始密文格式需要为C1C3C2_ASN1。原始密文长度不能超过256字节。 + Ciphertext *string `json:"Ciphertext,omitnil,omitempty" name:"Ciphertext"` } type AsymmetricSm2DecryptRequest struct { *tchttp.BaseRequest // CMK的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` - // 使用PublicKey加密的密文,Base64编码。密文长度不能超过256字节。 - Ciphertext *string `json:"Ciphertext,omitempty" name:"Ciphertext"` + // 使用PublicKey加密的密文,Base64编码,原始密文格式需要为C1C3C2_ASN1。原始密文长度不能超过256字节。 + Ciphertext *string `json:"Ciphertext,omitnil,omitempty" name:"Ciphertext"` } func (r *AsymmetricSm2DecryptRequest) ToJsonString() string { @@ -198,13 +198,13 @@ func (r *AsymmetricSm2DecryptRequest) FromJsonString(s string) error { // Predefined struct for user type AsymmetricSm2DecryptResponseParams struct { // CMK的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 解密后的明文,base64编码 - Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"` + Plaintext *string `json:"Plaintext,omitnil,omitempty" name:"Plaintext"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type AsymmetricSm2DecryptResponse struct { @@ -226,26 +226,26 @@ func (r *AsymmetricSm2DecryptResponse) FromJsonString(s string) error { // Predefined struct for user type BindCloudResourceRequestParams struct { // cmk的ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 云产品的唯一性标识符 - ProductId *string `json:"ProductId,omitempty" name:"ProductId"` + ProductId *string `json:"ProductId,omitnil,omitempty" name:"ProductId"` // 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。 - ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` } type BindCloudResourceRequest struct { *tchttp.BaseRequest // cmk的ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 云产品的唯一性标识符 - ProductId *string `json:"ProductId,omitempty" name:"ProductId"` + ProductId *string `json:"ProductId,omitnil,omitempty" name:"ProductId"` // 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。 - ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` } func (r *BindCloudResourceRequest) ToJsonString() string { @@ -271,8 +271,8 @@ func (r *BindCloudResourceRequest) FromJsonString(s string) error { // Predefined struct for user type BindCloudResourceResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type BindCloudResourceResponse struct { @@ -294,14 +294,14 @@ func (r *BindCloudResourceResponse) FromJsonString(s string) error { // Predefined struct for user type CancelKeyArchiveRequestParams struct { // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type CancelKeyArchiveRequest struct { *tchttp.BaseRequest // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *CancelKeyArchiveRequest) ToJsonString() string { @@ -325,8 +325,8 @@ func (r *CancelKeyArchiveRequest) FromJsonString(s string) error { // Predefined struct for user type CancelKeyArchiveResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type CancelKeyArchiveResponse struct { @@ -348,14 +348,14 @@ func (r *CancelKeyArchiveResponse) FromJsonString(s string) error { // Predefined struct for user type CancelKeyDeletionRequestParams struct { // 需要被取消删除的CMK的唯一标志 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type CancelKeyDeletionRequest struct { *tchttp.BaseRequest // 需要被取消删除的CMK的唯一标志 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *CancelKeyDeletionRequest) ToJsonString() string { @@ -380,10 +380,10 @@ func (r *CancelKeyDeletionRequest) FromJsonString(s string) error { // Predefined struct for user type CancelKeyDeletionResponseParams struct { // 唯一标志被取消删除的CMK。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type CancelKeyDeletionResponse struct { @@ -405,44 +405,44 @@ func (r *CancelKeyDeletionResponse) FromJsonString(s string) error { // Predefined struct for user type CreateKeyRequestParams struct { // 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // CMK 的描述,最大1024字节 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。 - KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"` + KeyUsage *string `json:"KeyUsage,omitnil,omitempty" name:"KeyUsage"` // 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口 - Type *uint64 `json:"Type,omitempty" name:"Type"` + Type *uint64 `json:"Type,omitnil,omitempty" name:"Type"` // 标签列表 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` // KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` } type CreateKeyRequest struct { *tchttp.BaseRequest // 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // CMK 的描述,最大1024字节 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。 - KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"` + KeyUsage *string `json:"KeyUsage,omitnil,omitempty" name:"KeyUsage"` // 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口 - Type *uint64 `json:"Type,omitempty" name:"Type"` + Type *uint64 `json:"Type,omitnil,omitempty" name:"Type"` // 标签列表 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` // KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` } func (r *CreateKeyRequest) ToJsonString() string { @@ -472,38 +472,34 @@ func (r *CreateKeyRequest) FromJsonString(s string) error { // Predefined struct for user type CreateKeyResponseParams struct { // CMK的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 作为密钥更容易辨识,更容易被人看懂的别名 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // 密钥创建时间,unix时间戳 - CreateTime *uint64 `json:"CreateTime,omitempty" name:"CreateTime"` + CreateTime *uint64 `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` // CMK的描述 - // 注意:此字段可能返回 null,表示取不到有效值。 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // CMK的状态 - KeyState *string `json:"KeyState,omitempty" name:"KeyState"` + KeyState *string `json:"KeyState,omitnil,omitempty" name:"KeyState"` // CMK的用途 - KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"` + KeyUsage *string `json:"KeyUsage,omitnil,omitempty" name:"KeyUsage"` // 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误 - // 注意:此字段可能返回 null,表示取不到有效值。 - TagCode *uint64 `json:"TagCode,omitempty" name:"TagCode"` + TagCode *uint64 `json:"TagCode,omitnil,omitempty" name:"TagCode"` // 标签操作的返回信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - TagMsg *string `json:"TagMsg,omitempty" name:"TagMsg"` + TagMsg *string `json:"TagMsg,omitnil,omitempty" name:"TagMsg"` // HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效) - // 注意:此字段可能返回 null,表示取不到有效值。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type CreateKeyResponse struct { @@ -525,32 +521,32 @@ func (r *CreateKeyResponse) FromJsonString(s string) error { // Predefined struct for user type CreateWhiteBoxKeyRequestParams struct { // 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。Alias不可重复。 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // 创建密钥所有的算法类型,支持的取值:AES_256,SM4 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` // 密钥的描述,最大1024字节 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // 标签列表 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` } type CreateWhiteBoxKeyRequest struct { *tchttp.BaseRequest // 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。Alias不可重复。 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // 创建密钥所有的算法类型,支持的取值:AES_256,SM4 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` // 密钥的描述,最大1024字节 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // 标签列表 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` } func (r *CreateWhiteBoxKeyRequest) ToJsonString() string { @@ -578,24 +574,22 @@ func (r *CreateWhiteBoxKeyRequest) FromJsonString(s string) error { // Predefined struct for user type CreateWhiteBoxKeyResponseParams struct { // 用于加密的密钥,base64编码 - EncryptKey *string `json:"EncryptKey,omitempty" name:"EncryptKey"` + EncryptKey *string `json:"EncryptKey,omitnil,omitempty" name:"EncryptKey"` // 用于解密的密钥,base64编码 - DecryptKey *string `json:"DecryptKey,omitempty" name:"DecryptKey"` + DecryptKey *string `json:"DecryptKey,omitnil,omitempty" name:"DecryptKey"` // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误 - // 注意:此字段可能返回 null,表示取不到有效值。 - TagCode *uint64 `json:"TagCode,omitempty" name:"TagCode"` + TagCode *uint64 `json:"TagCode,omitnil,omitempty" name:"TagCode"` // 标签操作的返回信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - TagMsg *string `json:"TagMsg,omitempty" name:"TagMsg"` + TagMsg *string `json:"TagMsg,omitnil,omitempty" name:"TagMsg"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type CreateWhiteBoxKeyResponse struct { @@ -617,32 +611,32 @@ func (r *CreateWhiteBoxKeyResponse) FromJsonString(s string) error { // Predefined struct for user type DecryptRequestParams struct { // 待解密的密文数据 - CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"` + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` // key/value对的json字符串,如果Encrypt指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024字符 - EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"` + EncryptionContext *string `json:"EncryptionContext,omitnil,omitempty" name:"EncryptionContext"` // PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。 - EncryptionPublicKey *string `json:"EncryptionPublicKey,omitempty" name:"EncryptionPublicKey"` + EncryptionPublicKey *string `json:"EncryptionPublicKey,omitnil,omitempty" name:"EncryptionPublicKey"` // 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。 - EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitempty" name:"EncryptionAlgorithm"` + EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitnil,omitempty" name:"EncryptionAlgorithm"` } type DecryptRequest struct { *tchttp.BaseRequest // 待解密的密文数据 - CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"` + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` // key/value对的json字符串,如果Encrypt指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024字符 - EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"` + EncryptionContext *string `json:"EncryptionContext,omitnil,omitempty" name:"EncryptionContext"` // PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。 - EncryptionPublicKey *string `json:"EncryptionPublicKey,omitempty" name:"EncryptionPublicKey"` + EncryptionPublicKey *string `json:"EncryptionPublicKey,omitnil,omitempty" name:"EncryptionPublicKey"` // 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。 - EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitempty" name:"EncryptionAlgorithm"` + EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitnil,omitempty" name:"EncryptionAlgorithm"` } func (r *DecryptRequest) ToJsonString() string { @@ -670,14 +664,14 @@ func (r *DecryptRequest) FromJsonString(s string) error { // Predefined struct for user type DecryptResponseParams struct { // CMK的全局唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 若调用时未提供 EncryptionPublicKey,该字段值为 Base64 编码的明文,需进行 Base64 解码以获取明文。 // 若调用时提供了 EncryptionPublicKey,则该字段值为使用 EncryptionPublicKey 公钥进行非对称加密后的 Base64 编码的密文。需在 Base64 解码后,使用用户上传的公钥对应的私钥进行进一步解密,以获取明文。 - Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"` + Plaintext *string `json:"Plaintext,omitnil,omitempty" name:"Plaintext"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DecryptResponse struct { @@ -699,14 +693,14 @@ func (r *DecryptResponse) FromJsonString(s string) error { // Predefined struct for user type DeleteImportedKeyMaterialRequestParams struct { // 指定需要删除密钥材料的EXTERNAL CMK。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DeleteImportedKeyMaterialRequest struct { *tchttp.BaseRequest // 指定需要删除密钥材料的EXTERNAL CMK。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DeleteImportedKeyMaterialRequest) ToJsonString() string { @@ -730,8 +724,8 @@ func (r *DeleteImportedKeyMaterialRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteImportedKeyMaterialResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DeleteImportedKeyMaterialResponse struct { @@ -753,14 +747,14 @@ func (r *DeleteImportedKeyMaterialResponse) FromJsonString(s string) error { // Predefined struct for user type DeleteWhiteBoxKeyRequestParams struct { // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DeleteWhiteBoxKeyRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DeleteWhiteBoxKeyRequest) ToJsonString() string { @@ -784,8 +778,8 @@ func (r *DeleteWhiteBoxKeyRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteWhiteBoxKeyResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DeleteWhiteBoxKeyResponse struct { @@ -807,14 +801,14 @@ func (r *DeleteWhiteBoxKeyResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeKeyRequestParams struct { // CMK全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DescribeKeyRequest struct { *tchttp.BaseRequest // CMK全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DescribeKeyRequest) ToJsonString() string { @@ -839,11 +833,10 @@ func (r *DescribeKeyRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeKeyResponseParams struct { // 密钥属性信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - KeyMetadata *KeyMetadata `json:"KeyMetadata,omitempty" name:"KeyMetadata"` + KeyMetadata *KeyMetadata `json:"KeyMetadata,omitnil,omitempty" name:"KeyMetadata"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DescribeKeyResponse struct { @@ -865,14 +858,14 @@ func (r *DescribeKeyResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeKeysRequestParams struct { // 查询CMK的ID列表,批量查询一次最多支持100个KeyId - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } type DescribeKeysRequest struct { *tchttp.BaseRequest // 查询CMK的ID列表,批量查询一次最多支持100个KeyId - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } func (r *DescribeKeysRequest) ToJsonString() string { @@ -897,11 +890,10 @@ func (r *DescribeKeysRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeKeysResponseParams struct { // 返回的属性信息列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - KeyMetadatas []*KeyMetadata `json:"KeyMetadatas,omitempty" name:"KeyMetadatas"` + KeyMetadatas []*KeyMetadata `json:"KeyMetadatas,omitnil,omitempty" name:"KeyMetadatas"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DescribeKeysResponse struct { @@ -923,14 +915,14 @@ func (r *DescribeKeysResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeWhiteBoxDecryptKeyRequestParams struct { // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DescribeWhiteBoxDecryptKeyRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DescribeWhiteBoxDecryptKeyRequest) ToJsonString() string { @@ -955,10 +947,10 @@ func (r *DescribeWhiteBoxDecryptKeyRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeWhiteBoxDecryptKeyResponseParams struct { // 白盒解密密钥,base64编码 - DecryptKey *string `json:"DecryptKey,omitempty" name:"DecryptKey"` + DecryptKey *string `json:"DecryptKey,omitnil,omitempty" name:"DecryptKey"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DescribeWhiteBoxDecryptKeyResponse struct { @@ -980,14 +972,14 @@ func (r *DescribeWhiteBoxDecryptKeyResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeWhiteBoxDeviceFingerprintsRequestParams struct { // 白盒密钥ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DescribeWhiteBoxDeviceFingerprintsRequest struct { *tchttp.BaseRequest // 白盒密钥ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DescribeWhiteBoxDeviceFingerprintsRequest) ToJsonString() string { @@ -1012,10 +1004,10 @@ func (r *DescribeWhiteBoxDeviceFingerprintsRequest) FromJsonString(s string) err // Predefined struct for user type DescribeWhiteBoxDeviceFingerprintsResponseParams struct { // 设备指纹列表 - DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitempty" name:"DeviceFingerprints"` + DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitnil,omitempty" name:"DeviceFingerprints"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DescribeWhiteBoxDeviceFingerprintsResponse struct { @@ -1037,32 +1029,32 @@ func (r *DescribeWhiteBoxDeviceFingerprintsResponse) FromJsonString(s string) er // Predefined struct for user type DescribeWhiteBoxKeyDetailsRequestParams struct { // 过滤条件:密钥的状态,0:disabled,1:enabled - KeyStatus *int64 `json:"KeyStatus,omitempty" name:"KeyStatus"` + KeyStatus *int64 `json:"KeyStatus,omitnil,omitempty" name:"KeyStatus"` // 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` // 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为0, 表示不分页 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 标签过滤条件 - TagFilters []*TagFilter `json:"TagFilters,omitempty" name:"TagFilters"` + TagFilters []*TagFilter `json:"TagFilters,omitnil,omitempty" name:"TagFilters"` } type DescribeWhiteBoxKeyDetailsRequest struct { *tchttp.BaseRequest // 过滤条件:密钥的状态,0:disabled,1:enabled - KeyStatus *int64 `json:"KeyStatus,omitempty" name:"KeyStatus"` + KeyStatus *int64 `json:"KeyStatus,omitnil,omitempty" name:"KeyStatus"` // 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` // 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为0, 表示不分页 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 标签过滤条件 - TagFilters []*TagFilter `json:"TagFilters,omitempty" name:"TagFilters"` + TagFilters []*TagFilter `json:"TagFilters,omitnil,omitempty" name:"TagFilters"` } func (r *DescribeWhiteBoxKeyDetailsRequest) ToJsonString() string { @@ -1090,14 +1082,13 @@ func (r *DescribeWhiteBoxKeyDetailsRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeWhiteBoxKeyDetailsResponseParams struct { // 白盒密钥信息列表。 - KeyInfos []*WhiteboxKeyInfo `json:"KeyInfos,omitempty" name:"KeyInfos"` + KeyInfos []*WhiteboxKeyInfo `json:"KeyInfos,omitnil,omitempty" name:"KeyInfos"` // 白盒密钥总数。 - // 注意:此字段可能返回 null,表示取不到有效值。 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DescribeWhiteBoxKeyDetailsResponse struct { @@ -1119,14 +1110,14 @@ func (r *DescribeWhiteBoxKeyDetailsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeWhiteBoxKeyRequestParams struct { // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DescribeWhiteBoxKeyRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DescribeWhiteBoxKeyRequest) ToJsonString() string { @@ -1151,10 +1142,10 @@ func (r *DescribeWhiteBoxKeyRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeWhiteBoxKeyResponseParams struct { // 白盒密钥信息 - KeyInfo *WhiteboxKeyInfo `json:"KeyInfo,omitempty" name:"KeyInfo"` + KeyInfo *WhiteboxKeyInfo `json:"KeyInfo,omitnil,omitempty" name:"KeyInfo"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DescribeWhiteBoxKeyResponse struct { @@ -1205,10 +1196,10 @@ func (r *DescribeWhiteBoxServiceStatusRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeWhiteBoxServiceStatusResponseParams struct { // 用户的白盒密钥服务是否可用 - ServiceEnabled *bool `json:"ServiceEnabled,omitempty" name:"ServiceEnabled"` + ServiceEnabled *bool `json:"ServiceEnabled,omitnil,omitempty" name:"ServiceEnabled"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DescribeWhiteBoxServiceStatusResponse struct { @@ -1229,24 +1220,23 @@ func (r *DescribeWhiteBoxServiceStatusResponse) FromJsonString(s string) error { type DeviceFingerprint struct { // 指纹信息,由设备指纹采集工具采集获得,格式满足正则表达式:^[0-9a-f]{8}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{16}$ - Identity *string `json:"Identity,omitempty" name:"Identity"` + Identity *string `json:"Identity,omitnil,omitempty" name:"Identity"` // 描述信息,如:IP,设备名称等,最大1024字节 - // 注意:此字段可能返回 null,表示取不到有效值。 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` } // Predefined struct for user type DisableKeyRequestParams struct { // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DisableKeyRequest struct { *tchttp.BaseRequest // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DisableKeyRequest) ToJsonString() string { @@ -1270,8 +1260,8 @@ func (r *DisableKeyRequest) FromJsonString(s string) error { // Predefined struct for user type DisableKeyResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DisableKeyResponse struct { @@ -1293,14 +1283,14 @@ func (r *DisableKeyResponse) FromJsonString(s string) error { // Predefined struct for user type DisableKeyRotationRequestParams struct { // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DisableKeyRotationRequest struct { *tchttp.BaseRequest // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DisableKeyRotationRequest) ToJsonString() string { @@ -1324,8 +1314,8 @@ func (r *DisableKeyRotationRequest) FromJsonString(s string) error { // Predefined struct for user type DisableKeyRotationResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DisableKeyRotationResponse struct { @@ -1347,14 +1337,14 @@ func (r *DisableKeyRotationResponse) FromJsonString(s string) error { // Predefined struct for user type DisableKeysRequestParams struct { // 需要批量禁用的CMK Id 列表,CMK数量最大支持100 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } type DisableKeysRequest struct { *tchttp.BaseRequest // 需要批量禁用的CMK Id 列表,CMK数量最大支持100 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } func (r *DisableKeysRequest) ToJsonString() string { @@ -1378,8 +1368,8 @@ func (r *DisableKeysRequest) FromJsonString(s string) error { // Predefined struct for user type DisableKeysResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DisableKeysResponse struct { @@ -1401,14 +1391,14 @@ func (r *DisableKeysResponse) FromJsonString(s string) error { // Predefined struct for user type DisableWhiteBoxKeyRequestParams struct { // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type DisableWhiteBoxKeyRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *DisableWhiteBoxKeyRequest) ToJsonString() string { @@ -1432,8 +1422,8 @@ func (r *DisableWhiteBoxKeyRequest) FromJsonString(s string) error { // Predefined struct for user type DisableWhiteBoxKeyResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DisableWhiteBoxKeyResponse struct { @@ -1455,14 +1445,14 @@ func (r *DisableWhiteBoxKeyResponse) FromJsonString(s string) error { // Predefined struct for user type DisableWhiteBoxKeysRequestParams struct { // 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } type DisableWhiteBoxKeysRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } func (r *DisableWhiteBoxKeysRequest) ToJsonString() string { @@ -1486,8 +1476,8 @@ func (r *DisableWhiteBoxKeysRequest) FromJsonString(s string) error { // Predefined struct for user type DisableWhiteBoxKeysResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type DisableWhiteBoxKeysResponse struct { @@ -1509,14 +1499,14 @@ func (r *DisableWhiteBoxKeysResponse) FromJsonString(s string) error { // Predefined struct for user type EnableKeyRequestParams struct { // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type EnableKeyRequest struct { *tchttp.BaseRequest // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *EnableKeyRequest) ToJsonString() string { @@ -1540,8 +1530,8 @@ func (r *EnableKeyRequest) FromJsonString(s string) error { // Predefined struct for user type EnableKeyResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type EnableKeyResponse struct { @@ -1563,20 +1553,20 @@ func (r *EnableKeyResponse) FromJsonString(s string) error { // Predefined struct for user type EnableKeyRotationRequestParams struct { // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 密钥轮转周期,单位天,允许范围 7 ~ 365,默认值 365。 - RotateDays *uint64 `json:"RotateDays,omitempty" name:"RotateDays"` + RotateDays *uint64 `json:"RotateDays,omitnil,omitempty" name:"RotateDays"` } type EnableKeyRotationRequest struct { *tchttp.BaseRequest // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 密钥轮转周期,单位天,允许范围 7 ~ 365,默认值 365。 - RotateDays *uint64 `json:"RotateDays,omitempty" name:"RotateDays"` + RotateDays *uint64 `json:"RotateDays,omitnil,omitempty" name:"RotateDays"` } func (r *EnableKeyRotationRequest) ToJsonString() string { @@ -1601,8 +1591,8 @@ func (r *EnableKeyRotationRequest) FromJsonString(s string) error { // Predefined struct for user type EnableKeyRotationResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type EnableKeyRotationResponse struct { @@ -1624,14 +1614,14 @@ func (r *EnableKeyRotationResponse) FromJsonString(s string) error { // Predefined struct for user type EnableKeysRequestParams struct { // 需要批量启用的CMK Id 列表, CMK数量最大支持100 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } type EnableKeysRequest struct { *tchttp.BaseRequest // 需要批量启用的CMK Id 列表, CMK数量最大支持100 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } func (r *EnableKeysRequest) ToJsonString() string { @@ -1655,8 +1645,8 @@ func (r *EnableKeysRequest) FromJsonString(s string) error { // Predefined struct for user type EnableKeysResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type EnableKeysResponse struct { @@ -1678,14 +1668,14 @@ func (r *EnableKeysResponse) FromJsonString(s string) error { // Predefined struct for user type EnableWhiteBoxKeyRequestParams struct { // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type EnableWhiteBoxKeyRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *EnableWhiteBoxKeyRequest) ToJsonString() string { @@ -1709,8 +1699,8 @@ func (r *EnableWhiteBoxKeyRequest) FromJsonString(s string) error { // Predefined struct for user type EnableWhiteBoxKeyResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type EnableWhiteBoxKeyResponse struct { @@ -1732,14 +1722,14 @@ func (r *EnableWhiteBoxKeyResponse) FromJsonString(s string) error { // Predefined struct for user type EnableWhiteBoxKeysRequestParams struct { // 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } type EnableWhiteBoxKeysRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` } func (r *EnableWhiteBoxKeysRequest) ToJsonString() string { @@ -1763,8 +1753,8 @@ func (r *EnableWhiteBoxKeysRequest) FromJsonString(s string) error { // Predefined struct for user type EnableWhiteBoxKeysResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type EnableWhiteBoxKeysResponse struct { @@ -1786,26 +1776,26 @@ func (r *EnableWhiteBoxKeysResponse) FromJsonString(s string) error { // Predefined struct for user type EncryptByWhiteBoxRequestParams struct { // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 待加密的文本, base64编码,文本的原始长度最大不超过4KB - PlainText *string `json:"PlainText,omitempty" name:"PlainText"` + PlainText *string `json:"PlainText,omitnil,omitempty" name:"PlainText"` // 初始化向量,大小为 16 Bytes,加密算法会使用到, base64编码;如果不传,则由后端服务随机生成。用户需要自行保存该值,作为解密的参数。 - InitializationVector *string `json:"InitializationVector,omitempty" name:"InitializationVector"` + InitializationVector *string `json:"InitializationVector,omitnil,omitempty" name:"InitializationVector"` } type EncryptByWhiteBoxRequest struct { *tchttp.BaseRequest // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 待加密的文本, base64编码,文本的原始长度最大不超过4KB - PlainText *string `json:"PlainText,omitempty" name:"PlainText"` + PlainText *string `json:"PlainText,omitnil,omitempty" name:"PlainText"` // 初始化向量,大小为 16 Bytes,加密算法会使用到, base64编码;如果不传,则由后端服务随机生成。用户需要自行保存该值,作为解密的参数。 - InitializationVector *string `json:"InitializationVector,omitempty" name:"InitializationVector"` + InitializationVector *string `json:"InitializationVector,omitnil,omitempty" name:"InitializationVector"` } func (r *EncryptByWhiteBoxRequest) ToJsonString() string { @@ -1832,13 +1822,13 @@ func (r *EncryptByWhiteBoxRequest) FromJsonString(s string) error { // Predefined struct for user type EncryptByWhiteBoxResponseParams struct { // 初始化向量,加密算法会使用到, base64编码。如果由调用方在入参中传入,则原样返回。如果调用方没有传入,则后端服务随机生成,并返回 - InitializationVector *string `json:"InitializationVector,omitempty" name:"InitializationVector"` + InitializationVector *string `json:"InitializationVector,omitnil,omitempty" name:"InitializationVector"` // 加密后的密文,base64编码 - CipherText *string `json:"CipherText,omitempty" name:"CipherText"` + CipherText *string `json:"CipherText,omitnil,omitempty" name:"CipherText"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type EncryptByWhiteBoxResponse struct { @@ -1860,26 +1850,26 @@ func (r *EncryptByWhiteBoxResponse) FromJsonString(s string) error { // Predefined struct for user type EncryptRequestParams struct { // 调用CreateKey生成的CMK全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K - Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"` + Plaintext *string `json:"Plaintext,omitnil,omitempty" name:"Plaintext"` // key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符 - EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"` + EncryptionContext *string `json:"EncryptionContext,omitnil,omitempty" name:"EncryptionContext"` } type EncryptRequest struct { *tchttp.BaseRequest // 调用CreateKey生成的CMK全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K - Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"` + Plaintext *string `json:"Plaintext,omitnil,omitempty" name:"Plaintext"` // key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符 - EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"` + EncryptionContext *string `json:"EncryptionContext,omitnil,omitempty" name:"EncryptionContext"` } func (r *EncryptRequest) ToJsonString() string { @@ -1906,13 +1896,13 @@ func (r *EncryptRequest) FromJsonString(s string) error { // Predefined struct for user type EncryptResponseParams struct { // 加密后的密文,base64编码。注意:本字段中打包了密文和密钥的相关信息,不是对明文的直接加密结果,只有将该字段作为Decrypt接口的输入参数,才可以解密出原文。 - CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"` + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` // 加密使用的CMK的全局唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type EncryptResponse struct { @@ -1931,47 +1921,55 @@ func (r *EncryptResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type ExclusiveHSM struct { + // 独享集群Id + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` + + // 独享集群名称 + HsmClusterName *string `json:"HsmClusterName,omitnil,omitempty" name:"HsmClusterName"` +} + // Predefined struct for user type GenerateDataKeyRequestParams struct { // CMK全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个 - KeySpec *string `json:"KeySpec,omitempty" name:"KeySpec"` + KeySpec *string `json:"KeySpec,omitnil,omitempty" name:"KeySpec"` // 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个 - NumberOfBytes *uint64 `json:"NumberOfBytes,omitempty" name:"NumberOfBytes"` + NumberOfBytes *uint64 `json:"NumberOfBytes,omitnil,omitempty" name:"NumberOfBytes"` // key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串 - EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"` + EncryptionContext *string `json:"EncryptionContext,omitnil,omitempty" name:"EncryptionContext"` // PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。 - EncryptionPublicKey *string `json:"EncryptionPublicKey,omitempty" name:"EncryptionPublicKey"` + EncryptionPublicKey *string `json:"EncryptionPublicKey,omitnil,omitempty" name:"EncryptionPublicKey"` // 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。 - EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitempty" name:"EncryptionAlgorithm"` + EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitnil,omitempty" name:"EncryptionAlgorithm"` } type GenerateDataKeyRequest struct { *tchttp.BaseRequest // CMK全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个 - KeySpec *string `json:"KeySpec,omitempty" name:"KeySpec"` + KeySpec *string `json:"KeySpec,omitnil,omitempty" name:"KeySpec"` // 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个 - NumberOfBytes *uint64 `json:"NumberOfBytes,omitempty" name:"NumberOfBytes"` + NumberOfBytes *uint64 `json:"NumberOfBytes,omitnil,omitempty" name:"NumberOfBytes"` // key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串 - EncryptionContext *string `json:"EncryptionContext,omitempty" name:"EncryptionContext"` + EncryptionContext *string `json:"EncryptionContext,omitnil,omitempty" name:"EncryptionContext"` // PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。 - EncryptionPublicKey *string `json:"EncryptionPublicKey,omitempty" name:"EncryptionPublicKey"` + EncryptionPublicKey *string `json:"EncryptionPublicKey,omitnil,omitempty" name:"EncryptionPublicKey"` // 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。 - EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitempty" name:"EncryptionAlgorithm"` + EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitnil,omitempty" name:"EncryptionAlgorithm"` } func (r *GenerateDataKeyRequest) ToJsonString() string { @@ -2001,17 +1999,17 @@ func (r *GenerateDataKeyRequest) FromJsonString(s string) error { // Predefined struct for user type GenerateDataKeyResponseParams struct { // CMK的全局唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 若调用时未提供 EncryptionPublicKey,该字段值为生成的数据密钥 DataKey 的 Base64 编码的明文,需进行 Base64 解码以获取 DataKey 明文。 // 若调用时提供了 EncryptionPublicKey,则该字段值为使用 EncryptionPublicKey 公钥进行非对称加密后的 Base64 编码的密文。需在 Base64 解码后,使用用户上传的公钥对应的私钥进行进一步解密,以获取 DataKey 明文。 - Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"` + Plaintext *string `json:"Plaintext,omitnil,omitempty" name:"Plaintext"` // 数据密钥DataKey加密后的密文,用户需要自行保存该密文,KMS不托管用户的数据密钥。可以通过Decrypt接口从CiphertextBlob中获取数据密钥DataKey明文 - CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"` + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type GenerateDataKeyResponse struct { @@ -2033,14 +2031,14 @@ func (r *GenerateDataKeyResponse) FromJsonString(s string) error { // Predefined struct for user type GenerateRandomRequestParams struct { // 生成的随机数的长度。最小值为1, 最大值为1024。 - NumberOfBytes *uint64 `json:"NumberOfBytes,omitempty" name:"NumberOfBytes"` + NumberOfBytes *uint64 `json:"NumberOfBytes,omitnil,omitempty" name:"NumberOfBytes"` } type GenerateRandomRequest struct { *tchttp.BaseRequest // 生成的随机数的长度。最小值为1, 最大值为1024。 - NumberOfBytes *uint64 `json:"NumberOfBytes,omitempty" name:"NumberOfBytes"` + NumberOfBytes *uint64 `json:"NumberOfBytes,omitnil,omitempty" name:"NumberOfBytes"` } func (r *GenerateRandomRequest) ToJsonString() string { @@ -2065,10 +2063,10 @@ func (r *GenerateRandomRequest) FromJsonString(s string) error { // Predefined struct for user type GenerateRandomResponseParams struct { // 生成的随机数的明文,该明文使用base64编码,用户需要使用base64解码得到明文。 - Plaintext *string `json:"Plaintext,omitempty" name:"Plaintext"` + Plaintext *string `json:"Plaintext,omitnil,omitempty" name:"Plaintext"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type GenerateRandomResponse struct { @@ -2090,14 +2088,14 @@ func (r *GenerateRandomResponse) FromJsonString(s string) error { // Predefined struct for user type GetKeyRotationStatusRequestParams struct { // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type GetKeyRotationStatusRequest struct { *tchttp.BaseRequest // CMK唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *GetKeyRotationStatusRequest) ToJsonString() string { @@ -2122,10 +2120,10 @@ func (r *GetKeyRotationStatusRequest) FromJsonString(s string) error { // Predefined struct for user type GetKeyRotationStatusResponseParams struct { // 密钥轮换是否开启 - KeyRotationEnabled *bool `json:"KeyRotationEnabled,omitempty" name:"KeyRotationEnabled"` + KeyRotationEnabled *bool `json:"KeyRotationEnabled,omitnil,omitempty" name:"KeyRotationEnabled"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type GetKeyRotationStatusResponse struct { @@ -2147,26 +2145,26 @@ func (r *GetKeyRotationStatusResponse) FromJsonString(s string) error { // Predefined struct for user type GetParametersForImportRequestParams struct { // CMK的唯一标识,获取密钥参数的CMK必须是EXTERNAL类型,即在CreateKey时指定Type=2 类型的CMK。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 指定加密密钥材料的算法,目前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256 - WrappingAlgorithm *string `json:"WrappingAlgorithm,omitempty" name:"WrappingAlgorithm"` + WrappingAlgorithm *string `json:"WrappingAlgorithm,omitnil,omitempty" name:"WrappingAlgorithm"` // 指定加密密钥材料的类型,目前只支持RSA_2048 - WrappingKeySpec *string `json:"WrappingKeySpec,omitempty" name:"WrappingKeySpec"` + WrappingKeySpec *string `json:"WrappingKeySpec,omitnil,omitempty" name:"WrappingKeySpec"` } type GetParametersForImportRequest struct { *tchttp.BaseRequest // CMK的唯一标识,获取密钥参数的CMK必须是EXTERNAL类型,即在CreateKey时指定Type=2 类型的CMK。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 指定加密密钥材料的算法,目前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256 - WrappingAlgorithm *string `json:"WrappingAlgorithm,omitempty" name:"WrappingAlgorithm"` + WrappingAlgorithm *string `json:"WrappingAlgorithm,omitnil,omitempty" name:"WrappingAlgorithm"` // 指定加密密钥材料的类型,目前只支持RSA_2048 - WrappingKeySpec *string `json:"WrappingKeySpec,omitempty" name:"WrappingKeySpec"` + WrappingKeySpec *string `json:"WrappingKeySpec,omitnil,omitempty" name:"WrappingKeySpec"` } func (r *GetParametersForImportRequest) ToJsonString() string { @@ -2193,19 +2191,19 @@ func (r *GetParametersForImportRequest) FromJsonString(s string) error { // Predefined struct for user type GetParametersForImportResponseParams struct { // CMK的唯一标识,用于指定目标导入密钥材料的CMK。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 导入密钥材料需要的token,用于作为 ImportKeyMaterial 的参数。 - ImportToken *string `json:"ImportToken,omitempty" name:"ImportToken"` + ImportToken *string `json:"ImportToken,omitnil,omitempty" name:"ImportToken"` // 用于加密密钥材料的RSA公钥,base64编码。使用PublicKey base64解码后的公钥将导入密钥进行加密后作为 ImportKeyMaterial 的参数。 - PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` + PublicKey *string `json:"PublicKey,omitnil,omitempty" name:"PublicKey"` // 该导出token和公钥的有效期,超过该时间后无法导入,需要重新调用GetParametersForImport获取。 - ParametersValidTo *uint64 `json:"ParametersValidTo,omitempty" name:"ParametersValidTo"` + ParametersValidTo *uint64 `json:"ParametersValidTo,omitnil,omitempty" name:"ParametersValidTo"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type GetParametersForImportResponse struct { @@ -2227,14 +2225,14 @@ func (r *GetParametersForImportResponse) FromJsonString(s string) error { // Predefined struct for user type GetPublicKeyRequestParams struct { // CMK的唯一标识。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type GetPublicKeyRequest struct { *tchttp.BaseRequest // CMK的唯一标识。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *GetPublicKeyRequest) ToJsonString() string { @@ -2259,16 +2257,16 @@ func (r *GetPublicKeyRequest) FromJsonString(s string) error { // Predefined struct for user type GetPublicKeyResponseParams struct { // CMK的唯一标识。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 经过base64编码的公钥内容。 - PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` + PublicKey *string `json:"PublicKey,omitnil,omitempty" name:"PublicKey"` // PEM格式的公钥内容。 - PublicKeyPem *string `json:"PublicKeyPem,omitempty" name:"PublicKeyPem"` + PublicKeyPem *string `json:"PublicKeyPem,omitnil,omitempty" name:"PublicKeyPem"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type GetPublicKeyResponse struct { @@ -2319,11 +2317,10 @@ func (r *GetRegionsRequest) FromJsonString(s string) error { // Predefined struct for user type GetRegionsResponseParams struct { // 可用region列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Regions []*string `json:"Regions,omitempty" name:"Regions"` + Regions []*string `json:"Regions,omitnil,omitempty" name:"Regions"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type GetRegionsResponse struct { @@ -2374,37 +2371,43 @@ func (r *GetServiceStatusRequest) FromJsonString(s string) error { // Predefined struct for user type GetServiceStatusResponseParams struct { // KMS服务是否开通, true 表示已开通 - ServiceEnabled *bool `json:"ServiceEnabled,omitempty" name:"ServiceEnabled"` + ServiceEnabled *bool `json:"ServiceEnabled,omitnil,omitempty" name:"ServiceEnabled"` // 服务不可用类型: 0-未购买,1-正常, 2-欠费停服, 3-资源释放 - // 注意:此字段可能返回 null,表示取不到有效值。 - InvalidType *int64 `json:"InvalidType,omitempty" name:"InvalidType"` + InvalidType *int64 `json:"InvalidType,omitnil,omitempty" name:"InvalidType"` // 0-普通版,1-旗舰版 - UserLevel *uint64 `json:"UserLevel,omitempty" name:"UserLevel"` + UserLevel *uint64 `json:"UserLevel,omitnil,omitempty" name:"UserLevel"` // 旗舰版到期时间(Epoch Unix Timestamp)。 - // 注意:此字段可能返回 null,表示取不到有效值。 - ProExpireTime *uint64 `json:"ProExpireTime,omitempty" name:"ProExpireTime"` + ProExpireTime *uint64 `json:"ProExpireTime,omitnil,omitempty" name:"ProExpireTime"` // 旗舰版是否自动续费:0-不自动续费,1-自动续费 - // 注意:此字段可能返回 null,表示取不到有效值。 - ProRenewFlag *uint64 `json:"ProRenewFlag,omitempty" name:"ProRenewFlag"` + ProRenewFlag *uint64 `json:"ProRenewFlag,omitnil,omitempty" name:"ProRenewFlag"` // 旗舰版购买记录的唯一性标识。如果为开通旗舰版,则返回值为空 - // 注意:此字段可能返回 null,表示取不到有效值。 - ProResourceId *string `json:"ProResourceId,omitempty" name:"ProResourceId"` + ProResourceId *string `json:"ProResourceId,omitnil,omitempty" name:"ProResourceId"` // 是否开通 KMS 托管版 - // 注意:此字段可能返回 null,表示取不到有效值。 - ExclusiveVSMEnabled *bool `json:"ExclusiveVSMEnabled,omitempty" name:"ExclusiveVSMEnabled"` + ExclusiveVSMEnabled *bool `json:"ExclusiveVSMEnabled,omitnil,omitempty" name:"ExclusiveVSMEnabled"` // 是否开通 KMS 独享版 - // 注意:此字段可能返回 null,表示取不到有效值。 - ExclusiveHSMEnabled *bool `json:"ExclusiveHSMEnabled,omitempty" name:"ExclusiveHSMEnabled"` + ExclusiveHSMEnabled *bool `json:"ExclusiveHSMEnabled,omitnil,omitempty" name:"ExclusiveHSMEnabled"` + + // KMS 订阅信息。 + SubscriptionInfo *string `json:"SubscriptionInfo,omitnil,omitempty" name:"SubscriptionInfo"` + + // 返回KMS用户密钥使用数量 + CmkUserCount *uint64 `json:"CmkUserCount,omitnil,omitempty" name:"CmkUserCount"` + + // 返回KMS用户密钥规格数量 + CmkLimit *uint64 `json:"CmkLimit,omitnil,omitempty" name:"CmkLimit"` + + // 返回独享集群组 + ExclusiveHSMList []*ExclusiveHSM `json:"ExclusiveHSMList,omitnil,omitempty" name:"ExclusiveHSMList"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type GetServiceStatusResponse struct { @@ -2426,32 +2429,32 @@ func (r *GetServiceStatusResponse) FromJsonString(s string) error { // Predefined struct for user type ImportKeyMaterialRequestParams struct { // 使用GetParametersForImport 返回的PublicKey加密后的密钥材料base64编码。对于国密版本region的KMS,导入的密钥材料长度要求为 128 bit,FIPS版本region的KMS, 导入的密钥材料长度要求为 256 bit。 - EncryptedKeyMaterial *string `json:"EncryptedKeyMaterial,omitempty" name:"EncryptedKeyMaterial"` + EncryptedKeyMaterial *string `json:"EncryptedKeyMaterial,omitnil,omitempty" name:"EncryptedKeyMaterial"` // 通过调用GetParametersForImport获得的导入令牌。 - ImportToken *string `json:"ImportToken,omitempty" name:"ImportToken"` + ImportToken *string `json:"ImportToken,omitnil,omitempty" name:"ImportToken"` // 指定导入密钥材料的CMK,需要和GetParametersForImport 指定的CMK相同。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 密钥材料过期时间 unix 时间戳,不指定或者 0 表示密钥材料不会过期,若指定过期时间,需要大于当前时间点,最大支持 2147443200。 - ValidTo *uint64 `json:"ValidTo,omitempty" name:"ValidTo"` + ValidTo *uint64 `json:"ValidTo,omitnil,omitempty" name:"ValidTo"` } type ImportKeyMaterialRequest struct { *tchttp.BaseRequest // 使用GetParametersForImport 返回的PublicKey加密后的密钥材料base64编码。对于国密版本region的KMS,导入的密钥材料长度要求为 128 bit,FIPS版本region的KMS, 导入的密钥材料长度要求为 256 bit。 - EncryptedKeyMaterial *string `json:"EncryptedKeyMaterial,omitempty" name:"EncryptedKeyMaterial"` + EncryptedKeyMaterial *string `json:"EncryptedKeyMaterial,omitnil,omitempty" name:"EncryptedKeyMaterial"` // 通过调用GetParametersForImport获得的导入令牌。 - ImportToken *string `json:"ImportToken,omitempty" name:"ImportToken"` + ImportToken *string `json:"ImportToken,omitnil,omitempty" name:"ImportToken"` // 指定导入密钥材料的CMK,需要和GetParametersForImport 指定的CMK相同。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 密钥材料过期时间 unix 时间戳,不指定或者 0 表示密钥材料不会过期,若指定过期时间,需要大于当前时间点,最大支持 2147443200。 - ValidTo *uint64 `json:"ValidTo,omitempty" name:"ValidTo"` + ValidTo *uint64 `json:"ValidTo,omitnil,omitempty" name:"ValidTo"` } func (r *ImportKeyMaterialRequest) ToJsonString() string { @@ -2478,8 +2481,8 @@ func (r *ImportKeyMaterialRequest) FromJsonString(s string) error { // Predefined struct for user type ImportKeyMaterialResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type ImportKeyMaterialResponse struct { @@ -2500,61 +2503,63 @@ func (r *ImportKeyMaterialResponse) FromJsonString(s string) error { type Key struct { // CMK的全局唯一标识。 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type KeyMetadata struct { // CMK的全局唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 作为密钥更容易辨识,更容易被人看懂的别名 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // 密钥创建时间 - CreateTime *uint64 `json:"CreateTime,omitempty" name:"CreateTime"` + CreateTime *uint64 `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` // CMK的描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // CMK的状态, 取值为:Enabled | Disabled | PendingDelete | PendingImport | Archived - KeyState *string `json:"KeyState,omitempty" name:"KeyState"` + KeyState *string `json:"KeyState,omitnil,omitempty" name:"KeyState"` // CMK用途,取值为: ENCRYPT_DECRYPT | ASYMMETRIC_DECRYPT_RSA_2048 | ASYMMETRIC_DECRYPT_SM2 | ASYMMETRIC_SIGN_VERIFY_SM2 | ASYMMETRIC_SIGN_VERIFY_RSA_2048 | ASYMMETRIC_SIGN_VERIFY_ECC - KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"` + KeyUsage *string `json:"KeyUsage,omitnil,omitempty" name:"KeyUsage"` // CMK类型,2 表示符合FIPS标准,4表示符合国密标准 - Type *int64 `json:"Type,omitempty" name:"Type"` + Type *int64 `json:"Type,omitnil,omitempty" name:"Type"` // 创建者 - CreatorUin *uint64 `json:"CreatorUin,omitempty" name:"CreatorUin"` + CreatorUin *uint64 `json:"CreatorUin,omitnil,omitempty" name:"CreatorUin"` // 是否开启了密钥轮换功能 - KeyRotationEnabled *bool `json:"KeyRotationEnabled,omitempty" name:"KeyRotationEnabled"` + KeyRotationEnabled *bool `json:"KeyRotationEnabled,omitnil,omitempty" name:"KeyRotationEnabled"` // CMK的创建者,用户创建的为 user,授权各云产品自动创建的为对应的产品名 - Owner *string `json:"Owner,omitempty" name:"Owner"` + Owner *string `json:"Owner,omitnil,omitempty" name:"Owner"` // 在密钥轮换开启状态下,下次轮换的时间 - NextRotateTime *uint64 `json:"NextRotateTime,omitempty" name:"NextRotateTime"` + NextRotateTime *uint64 `json:"NextRotateTime,omitnil,omitempty" name:"NextRotateTime"` // 计划删除的时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - DeletionDate *uint64 `json:"DeletionDate,omitempty" name:"DeletionDate"` + DeletionDate *uint64 `json:"DeletionDate,omitnil,omitempty" name:"DeletionDate"` // CMK 密钥材料类型,由KMS创建的为: TENCENT_KMS, 由用户导入的类型为:EXTERNAL - // 注意:此字段可能返回 null,表示取不到有效值。 - Origin *string `json:"Origin,omitempty" name:"Origin"` + Origin *string `json:"Origin,omitnil,omitempty" name:"Origin"` // 在Origin为 EXTERNAL 时有效,表示密钥材料的有效日期, 0 表示不过期 - // 注意:此字段可能返回 null,表示取不到有效值。 - ValidTo *uint64 `json:"ValidTo,omitempty" name:"ValidTo"` + ValidTo *uint64 `json:"ValidTo,omitnil,omitempty" name:"ValidTo"` // 资源ID,格式:creatorUin/$creatorUin/$keyId - ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` // HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效) - // 注意:此字段可能返回 null,表示取不到有效值。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` + + // 密钥轮转周期(天) + RotateDays *uint64 `json:"RotateDays,omitnil,omitempty" name:"RotateDays"` + + // 上次乱转时间(Unix timestamp) + LastRotateTime *uint64 `json:"LastRotateTime,omitnil,omitempty" name:"LastRotateTime"` } // Predefined struct for user @@ -2589,16 +2594,16 @@ func (r *ListAlgorithmsRequest) FromJsonString(s string) error { // Predefined struct for user type ListAlgorithmsResponseParams struct { // 本地区支持的对称加密算法 - SymmetricAlgorithms []*AlgorithmInfo `json:"SymmetricAlgorithms,omitempty" name:"SymmetricAlgorithms"` + SymmetricAlgorithms []*AlgorithmInfo `json:"SymmetricAlgorithms,omitnil,omitempty" name:"SymmetricAlgorithms"` // 本地区支持的非对称加密算法 - AsymmetricAlgorithms []*AlgorithmInfo `json:"AsymmetricAlgorithms,omitempty" name:"AsymmetricAlgorithms"` + AsymmetricAlgorithms []*AlgorithmInfo `json:"AsymmetricAlgorithms,omitnil,omitempty" name:"AsymmetricAlgorithms"` // 本地区支持的非对称签名验签算法 - AsymmetricSignVerifyAlgorithms []*AlgorithmInfo `json:"AsymmetricSignVerifyAlgorithms,omitempty" name:"AsymmetricSignVerifyAlgorithms"` + AsymmetricSignVerifyAlgorithms []*AlgorithmInfo `json:"AsymmetricSignVerifyAlgorithms,omitnil,omitempty" name:"AsymmetricSignVerifyAlgorithms"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type ListAlgorithmsResponse struct { @@ -2620,68 +2625,68 @@ func (r *ListAlgorithmsResponse) FromJsonString(s string) error { // Predefined struct for user type ListKeyDetailRequestParams struct { // 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` // 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为10,最大值为200 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk - Role *uint64 `json:"Role,omitempty" name:"Role"` + Role *uint64 `json:"Role,omitnil,omitempty" name:"Role"` // 根据CMK创建时间排序, 0 表示按照降序排序,1表示按照升序排序 - OrderType *uint64 `json:"OrderType,omitempty" name:"OrderType"` + OrderType *uint64 `json:"OrderType,omitnil,omitempty" name:"OrderType"` // 根据CMK状态筛选, 0表示全部CMK, 1 表示仅查询Enabled CMK, 2 表示仅查询Disabled CMK,3 表示查询PendingDelete 状态的CMK(处于计划删除状态的Key),4 表示查询 PendingImport 状态的CMK,5 表示查询 Archived 状态的 CMK - KeyState *uint64 `json:"KeyState,omitempty" name:"KeyState"` + KeyState *uint64 `json:"KeyState,omitnil,omitempty" name:"KeyState"` // 根据KeyId或者Alias进行模糊匹配查询 - SearchKeyAlias *string `json:"SearchKeyAlias,omitempty" name:"SearchKeyAlias"` + SearchKeyAlias *string `json:"SearchKeyAlias,omitnil,omitempty" name:"SearchKeyAlias"` // 根据CMK类型筛选, "TENCENT_KMS" 表示筛选密钥材料由KMS创建的CMK, "EXTERNAL" 表示筛选密钥材料需要用户导入的 EXTERNAL类型CMK,"ALL" 或者不设置表示两种类型都查询,大小写敏感。 - Origin *string `json:"Origin,omitempty" name:"Origin"` + Origin *string `json:"Origin,omitnil,omitempty" name:"Origin"` // 根据CMK的KeyUsage筛选,ALL表示筛选全部,可使用的参数为:ALL 或 ENCRYPT_DECRYPT 或 ASYMMETRIC_DECRYPT_RSA_2048 或 ASYMMETRIC_DECRYPT_SM2 或 ASYMMETRIC_SIGN_VERIFY_SM2 或 ASYMMETRIC_SIGN_VERIFY_RSA_2048 或 ASYMMETRIC_SIGN_VERIFY_ECC,为空则默认筛选ENCRYPT_DECRYPT类型 - KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"` + KeyUsage *string `json:"KeyUsage,omitnil,omitempty" name:"KeyUsage"` // 标签过滤条件 - TagFilters []*TagFilter `json:"TagFilters,omitempty" name:"TagFilters"` + TagFilters []*TagFilter `json:"TagFilters,omitnil,omitempty" name:"TagFilters"` // KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` } type ListKeyDetailRequest struct { *tchttp.BaseRequest // 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` // 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为10,最大值为200 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk - Role *uint64 `json:"Role,omitempty" name:"Role"` + Role *uint64 `json:"Role,omitnil,omitempty" name:"Role"` // 根据CMK创建时间排序, 0 表示按照降序排序,1表示按照升序排序 - OrderType *uint64 `json:"OrderType,omitempty" name:"OrderType"` + OrderType *uint64 `json:"OrderType,omitnil,omitempty" name:"OrderType"` // 根据CMK状态筛选, 0表示全部CMK, 1 表示仅查询Enabled CMK, 2 表示仅查询Disabled CMK,3 表示查询PendingDelete 状态的CMK(处于计划删除状态的Key),4 表示查询 PendingImport 状态的CMK,5 表示查询 Archived 状态的 CMK - KeyState *uint64 `json:"KeyState,omitempty" name:"KeyState"` + KeyState *uint64 `json:"KeyState,omitnil,omitempty" name:"KeyState"` // 根据KeyId或者Alias进行模糊匹配查询 - SearchKeyAlias *string `json:"SearchKeyAlias,omitempty" name:"SearchKeyAlias"` + SearchKeyAlias *string `json:"SearchKeyAlias,omitnil,omitempty" name:"SearchKeyAlias"` // 根据CMK类型筛选, "TENCENT_KMS" 表示筛选密钥材料由KMS创建的CMK, "EXTERNAL" 表示筛选密钥材料需要用户导入的 EXTERNAL类型CMK,"ALL" 或者不设置表示两种类型都查询,大小写敏感。 - Origin *string `json:"Origin,omitempty" name:"Origin"` + Origin *string `json:"Origin,omitnil,omitempty" name:"Origin"` // 根据CMK的KeyUsage筛选,ALL表示筛选全部,可使用的参数为:ALL 或 ENCRYPT_DECRYPT 或 ASYMMETRIC_DECRYPT_RSA_2048 或 ASYMMETRIC_DECRYPT_SM2 或 ASYMMETRIC_SIGN_VERIFY_SM2 或 ASYMMETRIC_SIGN_VERIFY_RSA_2048 或 ASYMMETRIC_SIGN_VERIFY_ECC,为空则默认筛选ENCRYPT_DECRYPT类型 - KeyUsage *string `json:"KeyUsage,omitempty" name:"KeyUsage"` + KeyUsage *string `json:"KeyUsage,omitnil,omitempty" name:"KeyUsage"` // 标签过滤条件 - TagFilters []*TagFilter `json:"TagFilters,omitempty" name:"TagFilters"` + TagFilters []*TagFilter `json:"TagFilters,omitnil,omitempty" name:"TagFilters"` // KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` } func (r *ListKeyDetailRequest) ToJsonString() string { @@ -2715,14 +2720,13 @@ func (r *ListKeyDetailRequest) FromJsonString(s string) error { // Predefined struct for user type ListKeyDetailResponseParams struct { // CMK的总数量 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` // 返回的属性信息列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 - KeyMetadatas []*KeyMetadata `json:"KeyMetadatas,omitempty" name:"KeyMetadatas"` + KeyMetadatas []*KeyMetadata `json:"KeyMetadatas,omitnil,omitempty" name:"KeyMetadatas"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type ListKeyDetailResponse struct { @@ -2744,32 +2748,32 @@ func (r *ListKeyDetailResponse) FromJsonString(s string) error { // Predefined struct for user type ListKeysRequestParams struct { // 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` // 含义跟 SQL 查询的 Limit 一致,表示本次获最多获取 Limit 个元素。缺省值为10,最大值为200 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk - Role *uint64 `json:"Role,omitempty" name:"Role"` + Role *uint64 `json:"Role,omitnil,omitempty" name:"Role"` // KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` } type ListKeysRequest struct { *tchttp.BaseRequest // 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` // 含义跟 SQL 查询的 Limit 一致,表示本次获最多获取 Limit 个元素。缺省值为10,最大值为200 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk - Role *uint64 `json:"Role,omitempty" name:"Role"` + Role *uint64 `json:"Role,omitnil,omitempty" name:"Role"` // KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。 - HsmClusterId *string `json:"HsmClusterId,omitempty" name:"HsmClusterId"` + HsmClusterId *string `json:"HsmClusterId,omitnil,omitempty" name:"HsmClusterId"` } func (r *ListKeysRequest) ToJsonString() string { @@ -2797,14 +2801,13 @@ func (r *ListKeysRequest) FromJsonString(s string) error { // Predefined struct for user type ListKeysResponseParams struct { // CMK列表数组 - // 注意:此字段可能返回 null,表示取不到有效值。 - Keys []*Key `json:"Keys,omitempty" name:"Keys"` + Keys []*Key `json:"Keys,omitnil,omitempty" name:"Keys"` // CMK的总数量 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type ListKeysResponse struct { @@ -2826,20 +2829,20 @@ func (r *ListKeysResponse) FromJsonString(s string) error { // Predefined struct for user type OverwriteWhiteBoxDeviceFingerprintsRequestParams struct { // 白盒密钥ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 设备指纹列表,如果列表为空,则表示删除该密钥对应的所有指纹信息。列表最大长度不超过200。 - DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitempty" name:"DeviceFingerprints"` + DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitnil,omitempty" name:"DeviceFingerprints"` } type OverwriteWhiteBoxDeviceFingerprintsRequest struct { *tchttp.BaseRequest // 白盒密钥ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 设备指纹列表,如果列表为空,则表示删除该密钥对应的所有指纹信息。列表最大长度不超过200。 - DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitempty" name:"DeviceFingerprints"` + DeviceFingerprints []*DeviceFingerprint `json:"DeviceFingerprints,omitnil,omitempty" name:"DeviceFingerprints"` } func (r *OverwriteWhiteBoxDeviceFingerprintsRequest) ToJsonString() string { @@ -2864,8 +2867,8 @@ func (r *OverwriteWhiteBoxDeviceFingerprintsRequest) FromJsonString(s string) er // Predefined struct for user type OverwriteWhiteBoxDeviceFingerprintsResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type OverwriteWhiteBoxDeviceFingerprintsResponse struct { @@ -2884,35 +2887,312 @@ func (r *OverwriteWhiteBoxDeviceFingerprintsResponse) FromJsonString(s string) e return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type PostQuantumCryptoDecryptRequestParams struct { + // 待解密的密文数据 + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` + + // PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。 + EncryptionPublicKey *string `json:"EncryptionPublicKey,omitnil,omitempty" name:"EncryptionPublicKey"` + + // 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。 + EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitnil,omitempty" name:"EncryptionAlgorithm"` +} + +type PostQuantumCryptoDecryptRequest struct { + *tchttp.BaseRequest + + // 待解密的密文数据 + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` + + // PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。 + EncryptionPublicKey *string `json:"EncryptionPublicKey,omitnil,omitempty" name:"EncryptionPublicKey"` + + // 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。 + EncryptionAlgorithm *string `json:"EncryptionAlgorithm,omitnil,omitempty" name:"EncryptionAlgorithm"` +} + +func (r *PostQuantumCryptoDecryptRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoDecryptRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CiphertextBlob") + delete(f, "EncryptionPublicKey") + delete(f, "EncryptionAlgorithm") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PostQuantumCryptoDecryptRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PostQuantumCryptoDecryptResponseParams struct { + // CMK的全局唯一标识 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // 若调用时未提供 EncryptionPublicKey,该字段值为 Base64 编码的明文,需进行 Base64 解码以获取明文。 + // 若调用时提供了 EncryptionPublicKey,则该字段值为使用 EncryptionPublicKey 公钥进行非对称加密后的 Base64 编码的密文。需在 Base64 解码后,使用用户上传的公钥对应的私钥进行进一步解密,以获取明文。 + PlainText *string `json:"PlainText,omitnil,omitempty" name:"PlainText"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type PostQuantumCryptoDecryptResponse struct { + *tchttp.BaseResponse + Response *PostQuantumCryptoDecryptResponseParams `json:"Response"` +} + +func (r *PostQuantumCryptoDecryptResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoDecryptResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PostQuantumCryptoEncryptRequestParams struct { + // 调用CreateKey生成的CMK全局唯一标识符 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K + PlainText *string `json:"PlainText,omitnil,omitempty" name:"PlainText"` +} + +type PostQuantumCryptoEncryptRequest struct { + *tchttp.BaseRequest + + // 调用CreateKey生成的CMK全局唯一标识符 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K + PlainText *string `json:"PlainText,omitnil,omitempty" name:"PlainText"` +} + +func (r *PostQuantumCryptoEncryptRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoEncryptRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyId") + delete(f, "PlainText") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PostQuantumCryptoEncryptRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PostQuantumCryptoEncryptResponseParams struct { + // 加密后的密文,base64编码。注意:本字段中打包了密文和密钥的相关信息,不是对明文的直接加密结果,只有将该字段作为PostQuantumCryptoDecrypt接口的输入参数,才可以解密出原文。 + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` + + // 加密使用的CMK的全局唯一标识 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type PostQuantumCryptoEncryptResponse struct { + *tchttp.BaseResponse + Response *PostQuantumCryptoEncryptResponseParams `json:"Response"` +} + +func (r *PostQuantumCryptoEncryptResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoEncryptResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PostQuantumCryptoSignRequestParams struct { + // Base64 编码的消息原文。消息原文的长度(Base64编码前的长度)不超过4096字节。 + Message *string `json:"Message,omitnil,omitempty" name:"Message"` + + // 密钥的唯一标识 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` +} + +type PostQuantumCryptoSignRequest struct { + *tchttp.BaseRequest + + // Base64 编码的消息原文。消息原文的长度(Base64编码前的长度)不超过4096字节。 + Message *string `json:"Message,omitnil,omitempty" name:"Message"` + + // 密钥的唯一标识 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` +} + +func (r *PostQuantumCryptoSignRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoSignRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Message") + delete(f, "KeyId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PostQuantumCryptoSignRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PostQuantumCryptoSignResponseParams struct { + // 签名值,Base64编码。可使用 PostQuantumCryptoVerify接口对签名值进行验证。 + Signature *string `json:"Signature,omitnil,omitempty" name:"Signature"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type PostQuantumCryptoSignResponse struct { + *tchttp.BaseResponse + Response *PostQuantumCryptoSignResponseParams `json:"Response"` +} + +func (r *PostQuantumCryptoSignResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoSignResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PostQuantumCryptoVerifyRequestParams struct { + // 密钥的唯一标识 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // 签名值,通过调用KMS PostQuantumCryptoSign签名接口生成 + SignatureValue *string `json:"SignatureValue,omitnil,omitempty" name:"SignatureValue"` + + // Base64 编码的消息原文,消息原文的长度(Base64编码前的长度)不超过4096字节。 + Message *string `json:"Message,omitnil,omitempty" name:"Message"` +} + +type PostQuantumCryptoVerifyRequest struct { + *tchttp.BaseRequest + + // 密钥的唯一标识 + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // 签名值,通过调用KMS PostQuantumCryptoSign签名接口生成 + SignatureValue *string `json:"SignatureValue,omitnil,omitempty" name:"SignatureValue"` + + // Base64 编码的消息原文,消息原文的长度(Base64编码前的长度)不超过4096字节。 + Message *string `json:"Message,omitnil,omitempty" name:"Message"` +} + +func (r *PostQuantumCryptoVerifyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoVerifyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyId") + delete(f, "SignatureValue") + delete(f, "Message") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PostQuantumCryptoVerifyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PostQuantumCryptoVerifyResponseParams struct { + // 签名是否有效。true:签名有效,false:签名无效。 + SignatureValid *bool `json:"SignatureValid,omitnil,omitempty" name:"SignatureValid"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type PostQuantumCryptoVerifyResponse struct { + *tchttp.BaseResponse + Response *PostQuantumCryptoVerifyResponseParams `json:"Response"` +} + +func (r *PostQuantumCryptoVerifyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PostQuantumCryptoVerifyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type ReEncryptRequestParams struct { // 需要重新加密的密文 - CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"` + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` // 重新加密使用的CMK,如果为空,则使用密文原有的CMK重新加密(若密钥没有轮换则密文不会刷新) - DestinationKeyId *string `json:"DestinationKeyId,omitempty" name:"DestinationKeyId"` + DestinationKeyId *string `json:"DestinationKeyId,omitnil,omitempty" name:"DestinationKeyId"` // CiphertextBlob 密文加密时使用的key/value对的json字符串。如果加密时未使用,则为空 - SourceEncryptionContext *string `json:"SourceEncryptionContext,omitempty" name:"SourceEncryptionContext"` + SourceEncryptionContext *string `json:"SourceEncryptionContext,omitnil,omitempty" name:"SourceEncryptionContext"` // 重新加密使用的key/value对的json字符串,如果使用该字段,则返回的新密文在解密时需要填入相同的字符串 - DestinationEncryptionContext *string `json:"DestinationEncryptionContext,omitempty" name:"DestinationEncryptionContext"` + DestinationEncryptionContext *string `json:"DestinationEncryptionContext,omitnil,omitempty" name:"DestinationEncryptionContext"` } type ReEncryptRequest struct { *tchttp.BaseRequest // 需要重新加密的密文 - CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"` + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` // 重新加密使用的CMK,如果为空,则使用密文原有的CMK重新加密(若密钥没有轮换则密文不会刷新) - DestinationKeyId *string `json:"DestinationKeyId,omitempty" name:"DestinationKeyId"` + DestinationKeyId *string `json:"DestinationKeyId,omitnil,omitempty" name:"DestinationKeyId"` // CiphertextBlob 密文加密时使用的key/value对的json字符串。如果加密时未使用,则为空 - SourceEncryptionContext *string `json:"SourceEncryptionContext,omitempty" name:"SourceEncryptionContext"` + SourceEncryptionContext *string `json:"SourceEncryptionContext,omitnil,omitempty" name:"SourceEncryptionContext"` // 重新加密使用的key/value对的json字符串,如果使用该字段,则返回的新密文在解密时需要填入相同的字符串 - DestinationEncryptionContext *string `json:"DestinationEncryptionContext,omitempty" name:"DestinationEncryptionContext"` + DestinationEncryptionContext *string `json:"DestinationEncryptionContext,omitnil,omitempty" name:"DestinationEncryptionContext"` } func (r *ReEncryptRequest) ToJsonString() string { @@ -2940,19 +3220,19 @@ func (r *ReEncryptRequest) FromJsonString(s string) error { // Predefined struct for user type ReEncryptResponseParams struct { // 重新加密后的密文 - CiphertextBlob *string `json:"CiphertextBlob,omitempty" name:"CiphertextBlob"` + CiphertextBlob *string `json:"CiphertextBlob,omitnil,omitempty" name:"CiphertextBlob"` // 重新加密使用的CMK - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 重新加密前密文使用的CMK - SourceKeyId *string `json:"SourceKeyId,omitempty" name:"SourceKeyId"` + SourceKeyId *string `json:"SourceKeyId,omitnil,omitempty" name:"SourceKeyId"` // true表示密文已经重新加密。同一个CMK进行重加密,在密钥没有发生轮换的情况下不会进行实际重新加密操作,返回原密文 - ReEncrypted *bool `json:"ReEncrypted,omitempty" name:"ReEncrypted"` + ReEncrypted *bool `json:"ReEncrypted,omitnil,omitempty" name:"ReEncrypted"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type ReEncryptResponse struct { @@ -2974,20 +3254,20 @@ func (r *ReEncryptResponse) FromJsonString(s string) error { // Predefined struct for user type ScheduleKeyDeletionRequestParams struct { // CMK的唯一标志 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 计划删除时间区间[7,30] - PendingWindowInDays *uint64 `json:"PendingWindowInDays,omitempty" name:"PendingWindowInDays"` + PendingWindowInDays *uint64 `json:"PendingWindowInDays,omitnil,omitempty" name:"PendingWindowInDays"` } type ScheduleKeyDeletionRequest struct { *tchttp.BaseRequest // CMK的唯一标志 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 计划删除时间区间[7,30] - PendingWindowInDays *uint64 `json:"PendingWindowInDays,omitempty" name:"PendingWindowInDays"` + PendingWindowInDays *uint64 `json:"PendingWindowInDays,omitnil,omitempty" name:"PendingWindowInDays"` } func (r *ScheduleKeyDeletionRequest) ToJsonString() string { @@ -3013,13 +3293,13 @@ func (r *ScheduleKeyDeletionRequest) FromJsonString(s string) error { // Predefined struct for user type ScheduleKeyDeletionResponseParams struct { // 计划删除执行时间 - DeletionDate *uint64 `json:"DeletionDate,omitempty" name:"DeletionDate"` + DeletionDate *uint64 `json:"DeletionDate,omitnil,omitempty" name:"DeletionDate"` // 唯一标志被计划删除的CMK - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type ScheduleKeyDeletionResponse struct { @@ -3041,32 +3321,32 @@ func (r *ScheduleKeyDeletionResponse) FromJsonString(s string) error { // Predefined struct for user type SignByAsymmetricKeyRequestParams struct { // 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256 等。更多支持的算法可通过 ListAlgorithms 接口进行查询。 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` // 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,消息摘要长度(Base64编码前的长度)必须等于32字节 - Message *string `json:"Message,omitempty" name:"Message"` + Message *string `json:"Message,omitnil,omitempty" name:"Message"` // 密钥的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。 - MessageType *string `json:"MessageType,omitempty" name:"MessageType"` + MessageType *string `json:"MessageType,omitnil,omitempty" name:"MessageType"` } type SignByAsymmetricKeyRequest struct { *tchttp.BaseRequest // 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256 等。更多支持的算法可通过 ListAlgorithms 接口进行查询。 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` // 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,消息摘要长度(Base64编码前的长度)必须等于32字节 - Message *string `json:"Message,omitempty" name:"Message"` + Message *string `json:"Message,omitnil,omitempty" name:"Message"` // 密钥的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。 - MessageType *string `json:"MessageType,omitempty" name:"MessageType"` + MessageType *string `json:"MessageType,omitnil,omitempty" name:"MessageType"` } func (r *SignByAsymmetricKeyRequest) ToJsonString() string { @@ -3094,10 +3374,10 @@ func (r *SignByAsymmetricKeyRequest) FromJsonString(s string) error { // Predefined struct for user type SignByAsymmetricKeyResponseParams struct { // 签名,Base64编码 - Signature *string `json:"Signature,omitempty" name:"Signature"` + Signature *string `json:"Signature,omitnil,omitempty" name:"Signature"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type SignByAsymmetricKeyResponse struct { @@ -3118,43 +3398,43 @@ func (r *SignByAsymmetricKeyResponse) FromJsonString(s string) error { type Tag struct { // 标签键 - TagKey *string `json:"TagKey,omitempty" name:"TagKey"` + TagKey *string `json:"TagKey,omitnil,omitempty" name:"TagKey"` // 标签值 - TagValue *string `json:"TagValue,omitempty" name:"TagValue"` + TagValue *string `json:"TagValue,omitnil,omitempty" name:"TagValue"` } type TagFilter struct { // 标签键 - TagKey *string `json:"TagKey,omitempty" name:"TagKey"` + TagKey *string `json:"TagKey,omitnil,omitempty" name:"TagKey"` // 标签值 - TagValue []*string `json:"TagValue,omitempty" name:"TagValue"` + TagValue []*string `json:"TagValue,omitnil,omitempty" name:"TagValue"` } // Predefined struct for user type UnbindCloudResourceRequestParams struct { // cmk的ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 云产品的唯一性标识符 - ProductId *string `json:"ProductId,omitempty" name:"ProductId"` + ProductId *string `json:"ProductId,omitnil,omitempty" name:"ProductId"` // 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。 - ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` } type UnbindCloudResourceRequest struct { *tchttp.BaseRequest // cmk的ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 云产品的唯一性标识符 - ProductId *string `json:"ProductId,omitempty" name:"ProductId"` + ProductId *string `json:"ProductId,omitnil,omitempty" name:"ProductId"` // 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。 - ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` } func (r *UnbindCloudResourceRequest) ToJsonString() string { @@ -3180,8 +3460,8 @@ func (r *UnbindCloudResourceRequest) FromJsonString(s string) error { // Predefined struct for user type UnbindCloudResourceResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type UnbindCloudResourceResponse struct { @@ -3203,20 +3483,20 @@ func (r *UnbindCloudResourceResponse) FromJsonString(s string) error { // Predefined struct for user type UpdateAliasRequestParams struct { // 新的别名,1-60个字符或数字的组合 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // CMK的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type UpdateAliasRequest struct { *tchttp.BaseRequest // 新的别名,1-60个字符或数字的组合 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // CMK的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *UpdateAliasRequest) ToJsonString() string { @@ -3241,8 +3521,8 @@ func (r *UpdateAliasRequest) FromJsonString(s string) error { // Predefined struct for user type UpdateAliasResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type UpdateAliasResponse struct { @@ -3264,20 +3544,20 @@ func (r *UpdateAliasResponse) FromJsonString(s string) error { // Predefined struct for user type UpdateKeyDescriptionRequestParams struct { // 新的描述信息,最大支持1024字节 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // 需要修改描述信息的CMK ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } type UpdateKeyDescriptionRequest struct { *tchttp.BaseRequest // 新的描述信息,最大支持1024字节 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // 需要修改描述信息的CMK ID - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` } func (r *UpdateKeyDescriptionRequest) ToJsonString() string { @@ -3302,8 +3582,8 @@ func (r *UpdateKeyDescriptionRequest) FromJsonString(s string) error { // Predefined struct for user type UpdateKeyDescriptionResponseParams struct { - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type UpdateKeyDescriptionResponse struct { @@ -3325,38 +3605,38 @@ func (r *UpdateKeyDescriptionResponse) FromJsonString(s string) error { // Predefined struct for user type VerifyByAsymmetricKeyRequestParams struct { // 密钥的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 签名值,通过调用KMS签名接口生成 - SignatureValue *string `json:"SignatureValue,omitempty" name:"SignatureValue"` + SignatureValue *string `json:"SignatureValue,omitnil,omitempty" name:"SignatureValue"` // 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,则消息摘要长度(Base64编码前的长度)必须等于32字节 - Message *string `json:"Message,omitempty" name:"Message"` + Message *string `json:"Message,omitnil,omitempty" name:"Message"` // 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256 等。更多支持的算法可通过 ListAlgorithms 接口进行查询。 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` // 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。 - MessageType *string `json:"MessageType,omitempty" name:"MessageType"` + MessageType *string `json:"MessageType,omitnil,omitempty" name:"MessageType"` } type VerifyByAsymmetricKeyRequest struct { *tchttp.BaseRequest // 密钥的唯一标识 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 签名值,通过调用KMS签名接口生成 - SignatureValue *string `json:"SignatureValue,omitempty" name:"SignatureValue"` + SignatureValue *string `json:"SignatureValue,omitnil,omitempty" name:"SignatureValue"` // 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,则消息摘要长度(Base64编码前的长度)必须等于32字节 - Message *string `json:"Message,omitempty" name:"Message"` + Message *string `json:"Message,omitnil,omitempty" name:"Message"` // 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256 等。更多支持的算法可通过 ListAlgorithms 接口进行查询。 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` // 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。 - MessageType *string `json:"MessageType,omitempty" name:"MessageType"` + MessageType *string `json:"MessageType,omitnil,omitempty" name:"MessageType"` } func (r *VerifyByAsymmetricKeyRequest) ToJsonString() string { @@ -3385,10 +3665,10 @@ func (r *VerifyByAsymmetricKeyRequest) FromJsonString(s string) error { // Predefined struct for user type VerifyByAsymmetricKeyResponseParams struct { // 签名是否有效。true:签名有效,false:签名无效。 - SignatureValid *bool `json:"SignatureValid,omitempty" name:"SignatureValid"` + SignatureValid *bool `json:"SignatureValid,omitnil,omitempty" name:"SignatureValid"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } type VerifyByAsymmetricKeyResponse struct { @@ -3409,39 +3689,38 @@ func (r *VerifyByAsymmetricKeyResponse) FromJsonString(s string) error { type WhiteboxKeyInfo struct { // 白盒密钥的全局唯一标识符 - KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` // 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字. 不可重复 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil,omitempty" name:"Alias"` // 创建者 - CreatorUin *uint64 `json:"CreatorUin,omitempty" name:"CreatorUin"` + CreatorUin *uint64 `json:"CreatorUin,omitnil,omitempty" name:"CreatorUin"` // 密钥的描述信息 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil,omitempty" name:"Description"` // 密钥创建时间,Unix时间戳 - CreateTime *uint64 `json:"CreateTime,omitempty" name:"CreateTime"` + CreateTime *uint64 `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` // 白盒密钥的状态, 取值为:Enabled | Disabled - Status *string `json:"Status,omitempty" name:"Status"` + Status *string `json:"Status,omitnil,omitempty" name:"Status"` // 创建者 - OwnerUin *uint64 `json:"OwnerUin,omitempty" name:"OwnerUin"` + OwnerUin *uint64 `json:"OwnerUin,omitnil,omitempty" name:"OwnerUin"` // 密钥所用的算法类型 - Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"` + Algorithm *string `json:"Algorithm,omitnil,omitempty" name:"Algorithm"` // 白盒加密密钥,base64编码 - EncryptKey *string `json:"EncryptKey,omitempty" name:"EncryptKey"` + EncryptKey *string `json:"EncryptKey,omitnil,omitempty" name:"EncryptKey"` // 白盒解密密钥,base64编码 - DecryptKey *string `json:"DecryptKey,omitempty" name:"DecryptKey"` + DecryptKey *string `json:"DecryptKey,omitnil,omitempty" name:"DecryptKey"` // 资源ID,格式:creatorUin/$creatorUin/$keyId - ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` // 是否有设备指纹与当前密钥绑定 - // 注意:此字段可能返回 null,表示取不到有效值。 - DeviceFingerprintBind *bool `json:"DeviceFingerprintBind,omitempty" name:"DeviceFingerprintBind"` + DeviceFingerprintBind *bool `json:"DeviceFingerprintBind,omitnil,omitempty" name:"DeviceFingerprintBind"` } \ No newline at end of file diff --git a/vendor/modules.txt b/vendor/modules.txt index d58a928ea6..f804a81606 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1231,7 +1231,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap/v20180529 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb v1.0.1127 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb/v20240906 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.1145 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.729 diff --git a/website/docs/d/kms_keys.html.markdown b/website/docs/d/kms_keys.html.markdown index 69655fdd3b..ec07e77889 100644 --- a/website/docs/d/kms_keys.html.markdown +++ b/website/docs/d/kms_keys.html.markdown @@ -19,6 +19,7 @@ data "tencentcloud_kms_keys" "example" { key_state = 0 origin = "TENCENT_KMS" key_usage = "ALL" + hsm_cluster_id = "cls-hsm-mwpd9cjm" } ``` @@ -26,6 +27,7 @@ data "tencentcloud_kms_keys" "example" { The following arguments are supported: +* `hsm_cluster_id` - (Optional, String) The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances). * `key_state` - (Optional, Int) Filter by state of CMK. `0` - all CMKs are queried, `1` - only Enabled CMKs are queried, `2` - only Disabled CMKs are queried, `3` - only PendingDelete CMKs are queried, `4` - only PendingImport CMKs are queried, `5` - only Archived CMKs are queried. * `key_usage` - (Optional, String) Filter by usage of CMK. Available values include `ALL`, `ENCRYPT_DECRYPT`, `ASYMMETRIC_DECRYPT_RSA_2048`, `ASYMMETRIC_DECRYPT_SM2`, `ASYMMETRIC_SIGN_VERIFY_SM2`, `ASYMMETRIC_SIGN_VERIFY_RSA_2048`, `ASYMMETRIC_SIGN_VERIFY_ECC`. Default value is `ENCRYPT_DECRYPT`. * `order_type` - (Optional, Int) Order to sort the CMK create time. `0` - desc, `1` - asc. Default value is `0`. @@ -45,6 +47,7 @@ In addition to all arguments above, the following attributes are exported: * `creator_uin` - Uin of CMK Creator. * `deletion_date` - Delete time of CMK. * `description` - Description of CMK. + * `hsm_cluster_id` - The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances). * `key_id` - ID of CMK. * `key_rotation_enabled` - Specify whether to enable key rotation. * `key_state` - State of CMK. diff --git a/website/docs/d/kms_service_status.html.markdown b/website/docs/d/kms_service_status.html.markdown new file mode 100644 index 0000000000..90f19de505 --- /dev/null +++ b/website/docs/d/kms_service_status.html.markdown @@ -0,0 +1,49 @@ +--- +subcategory: "Key Management Service(KMS)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_kms_service_status" +sidebar_current: "docs-tencentcloud-datasource-kms_service_status" +description: |- + Use this data source to query detailed information of KMS service_status +--- + +# tencentcloud_kms_service_status + +Use this data source to query detailed information of KMS service_status + +## Example Usage + +```hcl +data "tencentcloud_kms_service_status" "example" {} +``` + +## Argument Reference + +The following arguments are supported: + +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `cmk_limit` - Return KMS user key specification quantity. +* `cmk_user_count` - Return the number of KMS user key usage. +* `exclusive_hsm_enabled` - Whether to activate Exclusive KMS +Note: This field may return `null`, indicating that no valid value can be obtained. +* `exclusive_hsm_list` - Return to Exclusive Cluster Group. +* `exclusive_vsm_enabled` - Whether to activate Managed KMS +Note: This field may return `null`, indicating that no valid value can be obtained. +* `invalid_type` - Service unavailability type. 0: not purchased; 1: normal; 2: suspended due to arrears; 3: resource released. +* `pro_expire_time` - Expiration time of the KMS Ultimate edition. It's represented in a Unix Epoch timestamp. +Note: This field may return null, indicating that no valid values can be obtained. +* `pro_renew_flag` - Whether to automatically renew Ultimate Edition. 0: no, 1: yes +Note: this field may return null, indicating that no valid values can be obtained. +* `pro_resource_id` - Unique ID of the Ultimate Edition purchase record. If the Ultimate Edition is not activated, the returned value will be null. +Note: this field may return null, indicating that no valid values can be obtained. +* `service_enabled` - Whether the KMS service has been activated. true: activated. +* `subscription_info` - KMS subscription information. +Note: This field may return null, indicating that no valid values can be obtained. +* `user_level` - 0: Basic Edition, 1: Ultimate Edition. + + diff --git a/website/docs/r/kms_external_key.html.markdown b/website/docs/r/kms_external_key.html.markdown index 1818c49d46..c8758491b9 100644 --- a/website/docs/r/kms_external_key.html.markdown +++ b/website/docs/r/kms_external_key.html.markdown @@ -21,7 +21,21 @@ resource "tencentcloud_kms_external_key" "example" { description = "example of kms external key" tags = { - "createdBy" = "terraform" + createdBy = "terraform" + } +} +``` + +### Create kms instance with HSM + +```hcl +resource "tencentcloud_kms_external_key" "example" { + alias = "tf-example-kms-externalkey" + description = "example of kms external key" + hsm_cluster_id = "cls-hsm-mwpd9cjm" + + tags = { + createdBy = "terraform" } } ``` @@ -37,7 +51,7 @@ resource "tencentcloud_kms_external_key" "example" { is_enabled = true tags = { - "createdBy" = "terraform" + createdBy = "terraform" } } ``` @@ -53,7 +67,7 @@ resource "tencentcloud_kms_external_key" "example" { is_enabled = false tags = { - "test-tag" = "unit-test" + createdBy = "terraform" } } ``` @@ -64,6 +78,7 @@ The following arguments are supported: * `alias` - (Required, String) Name of CMK. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number. * `description` - (Optional, String) Description of CMK. The maximum is 1024 bytes. +* `hsm_cluster_id` - (Optional, String) The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances). * `is_archived` - (Optional, Bool) Specify whether to archive key. Default value is `false`. This field is conflict with `is_enabled`, valid when key_state is `Enabled`, `Disabled`, `Archived`. * `is_enabled` - (Optional, Bool) Specify whether to enable key. Default value is `false`. This field is conflict with `is_archived`, valid when key_state is `Enabled`, `Disabled`, `Archived`. * `key_material_base64` - (Optional, String) The base64-encoded key material encrypted with the public_key. For regions using the national secret version, the length of the imported key material is required to be 128 bits, and for regions using the FIPS version, the length of the imported key material is required to be 256 bits. @@ -85,6 +100,6 @@ In addition to all arguments above, the following attributes are exported: KMS external keys can be imported using the id, e.g. ``` -$ terraform import tencentcloud_kms_external_key.example 287e8f40-7cbb-11eb-9a3a-xxxxx +$ terraform import tencentcloud_kms_external_key.example 25068921-2101-11f0-bf1f-5254000328e1 ``` diff --git a/website/docs/r/kms_key.html.markdown b/website/docs/r/kms_key.html.markdown index 2c4c0850ab..a0e1cf5ad0 100644 --- a/website/docs/r/kms_key.html.markdown +++ b/website/docs/r/kms_key.html.markdown @@ -29,6 +29,23 @@ resource "tencentcloud_kms_key" "example" { } ``` +### Create kms instance with HSM + +```hcl +resource "tencentcloud_kms_key" "example" { + alias = "tf-example-kms-key" + description = "example of kms key" + key_rotation_enabled = false + is_enabled = true + pending_delete_window_in_days = 7 + hsm_cluster_id = "cls-hsm-mwpd9cjm" + + tags = { + createdBy = "Terraform" + } +} +``` + ### Specify the Key Usage as an asymmetry method. ```hcl @@ -61,6 +78,7 @@ The following arguments are supported: * `alias` - (Required, String) Name of CMK. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number. * `description` - (Optional, String) Description of CMK. The maximum is 1024 bytes. +* `hsm_cluster_id` - (Optional, String) The HSM cluster ID corresponding to KMS Advanced Edition (only valid for KMS Exclusive/Managed Edition service instances). * `is_archived` - (Optional, Bool) Specify whether to archive key. Default value is `false`. This field is conflict with `is_enabled`, valid when key_state is `Enabled`, `Disabled`, `Archived`. * `is_enabled` - (Optional, Bool) Specify whether to enable key. Default value is `false`. This field is conflict with `is_archived`, valid when key_state is `Enabled`, `Disabled`, `Archived`. * `key_rotation_enabled` - (Optional, Bool) Specify whether to enable key rotation, valid when key_usage is `ENCRYPT_DECRYPT`. Default value is `false`. diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index 900b1703f0..26f065a684 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -2845,6 +2845,9 @@