diff --git a/go.mod b/go.mod index f413232332..f2f4ccfc44 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1034 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.1033 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1046 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1052 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1055 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1014 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.692 @@ -59,7 +59,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/domain v1.0.414 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dts v1.0.628 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/eb v1.0.760 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.1004 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.1055 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 diff --git a/go.sum b/go.sum index 93d816f5d2..02ccb4d532 100644 --- a/go.sum +++ b/go.sum @@ -934,6 +934,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1051 h1:3mg github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1051/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1052 h1:RCs8aH5Gy1sn4qc22KweqQE7usx1S2reyZcedo0ZXBI= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1052/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1055 h1:qDpGP5ee98ZW5m0192E/cvw18PGAjaqIqYuqaFME2iE= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1055/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993/go.mod h1:Z9U8zNtyuyKhjS0698wqsrG/kLx1TQ5CEixXBwVe7xY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 h1:F3esKBIT3HW9+7Gt8cVgf8X06VdGIczpgLBUECzSEzU= @@ -966,6 +968,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/eb v1.0.760 h1:IKP2LFgJ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/eb v1.0.760/go.mod h1:pSQXTeuC6BahiUIfssVqvL1/BoXccLkyD7nJ+tKgygw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.1004 h1:PbKCgIXZSwX0eraNZGG+AqVjgLZwW/C+up/6mL9FP3o= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.1004/go.mod h1:6H1XZ2TIVV6VHdjkdQQl611NsIJkeTqugZ1jaUfPop4= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.1055 h1:CAxiWYRFmvpcDMkpoF7E0HZXgpM2BPYE+uyrS92LPQE= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.1055/go.mod h1:tmcOt09PyU+2nQgdbz0Lwe8aS8/Sb1spemL9kxusCPU= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.777 h1:G1eX/DkiznhSjNVF97BAQyycFXOiPHxeTxgOadp5J/o= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.777/go.mod h1:ehbc9eaNknF/VU/kPTFLZbIUmkL06vQ/JYydu6yeXp4= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.970 h1:Z82LbcEnE2m4CGvcOY024N7REhAN++xdEyE88HG2YBA= diff --git a/tencentcloud/services/emr/resource_tc_lite_hbase_instance.go b/tencentcloud/services/emr/resource_tc_lite_hbase_instance.go index fd89b33f73..ff839773d7 100644 --- a/tencentcloud/services/emr/resource_tc_lite_hbase_instance.go +++ b/tencentcloud/services/emr/resource_tc_lite_hbase_instance.go @@ -34,19 +34,19 @@ func ResourceTencentCloudLiteHbaseInstance() *schema.Resource { "pay_mode": { Type: schema.TypeInt, Required: true, - Description: "Instance pay mode. Value range: 0: indicates post pay mode, that is, pay-as-you-go.", + Description: "Instance pay mode. Value range: 0: indicates post-pay mode, that is, pay-as-you-go. 1: indicates pre-pay mode, that is, monthly subscription.", }, "disk_type": { Type: schema.TypeString, Required: true, - Description: "Instance disk type, fill in CLOUD_HSSD to indicate performance cloud storage.", + Description: "Instance disk type, Value range: CLOUD_HSSD: indicate performance cloud storage(ESSD). CLOUD_BSSD: indicate standard cloud storage(SSD).", }, "disk_size": { Type: schema.TypeInt, Required: true, - Description: "Instance single-node disk capacity, in GB. The single-node disk capacity must be greater than or equal to 100 and less than or equal to 10000, with an adjustment step size of 20.", + Description: "Instance single-node disk capacity, in GB. The single-node disk capacity must be greater than or equal to 100 and less than or equal to 250 times the number of CPU cores. The capacity adjustment step is 100.", }, "node_type": { @@ -114,6 +114,23 @@ func ResourceTencentCloudLiteHbaseInstance() *schema.Resource { }, }, }, + + "time_span": { + Type: schema.TypeInt, + Optional: true, + Description: "Time span.", + }, + "time_unit": { + Type: schema.TypeString, + Optional: true, + Description: "Time unit, fill in m which means month.", + }, + "auto_renew_flag": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + Description: "AutoRenewFlag, Value range: 0: indicates NOTIFY_AND_MANUAL_RENEW; 1: indicates NOTIFY_AND_AUTO_RENEW; 2: indicates DISABLE_NOTIFY_AND_MANUAL_RENEW.", + }, }, } } @@ -189,6 +206,31 @@ func resourceTencentCloudLiteHbaseInstanceCreate(d *schema.ResourceData, meta in } } + var prePaySetting *emr.PrePaySetting + if v, ok := d.GetOk("time_span"); ok { + prePaySetting = &emr.PrePaySetting{} + prePaySetting.Period = &emr.Period{} + prePaySetting.Period.TimeSpan = helper.IntInt64(v.(int)) + } + if v, ok := d.GetOk("time_unit"); ok { + if prePaySetting == nil { + prePaySetting = &emr.PrePaySetting{} + } + if prePaySetting.Period == nil { + prePaySetting.Period = &emr.Period{} + } + prePaySetting.Period.TimeUnit = helper.String(v.(string)) + } + if v, ok := d.GetOk("auto_renew_flag"); ok { + if prePaySetting == nil { + prePaySetting = &emr.PrePaySetting{} + } + prePaySetting.AutoRenewFlag = helper.IntInt64(v.(int)) + } + if prePaySetting != nil { + request.PrePaySetting = prePaySetting + } + err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseEmrClient().CreateSLInstanceWithContext(ctx, request) if e != nil { @@ -267,10 +309,6 @@ func resourceTencentCloudLiteHbaseInstanceRead(d *schema.ResourceData, meta inte _ = d.Set("disk_size", respData.DiskSize) } - if respData.NodeType != nil { - _ = d.Set("node_type", respData.NodeType) - } - zoneSettingsList := make([]map[string]interface{}, 0, len(respData.ZoneSettings)) if respData.ZoneSettings != nil { for _, zoneSettings := range respData.ZoneSettings { @@ -322,6 +360,9 @@ func resourceTencentCloudLiteHbaseInstanceRead(d *schema.ResourceData, meta inte _ = d.Set("tags", tagsList) } + if respData.AutoRenewFlag != nil { + _ = d.Set("auto_renew_flag", respData.AutoRenewFlag) + } _ = instanceId return nil @@ -335,7 +376,7 @@ func resourceTencentCloudLiteHbaseInstanceUpdate(d *schema.ResourceData, meta in ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) - immutableArgs := []string{"instance_name", "pay_mode", "disk_type", "disk_size", "node_type", "tags"} + immutableArgs := []string{"instance_name", "pay_mode", "disk_type", "disk_size", "node_type", "tags", "time_span", "time_unit", "auto_renew_flag"} for _, v := range immutableArgs { if d.HasChange(v) { return fmt.Errorf("argument `%s` cannot be changed", v) @@ -434,9 +475,33 @@ func resourceTencentCloudLiteHbaseInstanceDelete(d *schema.ResourceData, meta in log.Printf("[CRITAL]%s delete lite hbase instance failed, reason:%+v", logId, err) return err } + emrService := EMRService{ client: meta.(tccommon.ProviderMeta).GetAPIV3Conn(), } + + if d.Get("pay_mode").(int) == 1 { + conf := tccommon.BuildStateChangeConf([]string{}, []string{"201"}, 10*tccommon.ReadRetryTimeout, time.Second, emrService.SLInstanceStateRefreshFunc(instanceId, []string{})) + if _, e := conf.WaitForState(); e != nil { + return e + } + + err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseEmrClient().TerminateSLInstanceWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + response = result + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s delete lite hbase instance failed, reason:%+v", logId, err) + return err + } + } + conf := tccommon.BuildStateChangeConf([]string{}, []string{"-2"}, 10*tccommon.ReadRetryTimeout, time.Second, emrService.SLInstanceStateRefreshFunc(instanceId, []string{})) if _, e := conf.WaitForState(); e != nil { return e diff --git a/tencentcloud/services/emr/resource_tc_lite_hbase_instance_test.go b/tencentcloud/services/emr/resource_tc_lite_hbase_instance_test.go index bb8b7243ba..ddfb66ca0f 100644 --- a/tencentcloud/services/emr/resource_tc_lite_hbase_instance_test.go +++ b/tencentcloud/services/emr/resource_tc_lite_hbase_instance_test.go @@ -51,9 +51,39 @@ func TestAccTencentCloudLiteHbaseInstanceResource_basic(t *testing.T) { ), }, { - ResourceName: "tencentcloud_lite_hbase_instance.lite_hbase_instance", - ImportState: true, - ImportStateVerify: true, + ResourceName: "tencentcloud_lite_hbase_instance.lite_hbase_instance", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"node_type", "time_span", "time_unit"}, + }, + }, + }) +} + +func TestAccTencentCloudLiteHbaseInstanceResource_prepay(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{ + { + Config: testAccLiteHbaseInstancePrePay, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("tencentcloud_lite_hbase_instance.lite_hbase_instance_prepay", "id"), + resource.TestCheckResourceAttr("tencentcloud_lite_hbase_instance.lite_hbase_instance_prepay", "instance_name", "tf-test-prepay"), + resource.TestCheckResourceAttr("tencentcloud_lite_hbase_instance.lite_hbase_instance_prepay", "pay_mode", "1"), + resource.TestCheckResourceAttr("tencentcloud_lite_hbase_instance.lite_hbase_instance_prepay", "time_span", "1"), + resource.TestCheckResourceAttr("tencentcloud_lite_hbase_instance.lite_hbase_instance_prepay", "time_unit", "m"), + resource.TestCheckResourceAttr("tencentcloud_lite_hbase_instance.lite_hbase_instance_prepay", "auto_renew_flag", "1"), + ), + }, + { + ResourceName: "tencentcloud_lite_hbase_instance.lite_hbase_instance_prepay", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"node_type", "time_span", "time_unit"}, }, }, }) @@ -140,6 +170,31 @@ resource "tencentcloud_lite_hbase_instance" "lite_hbase_instance" { } ` +const testAccLiteHbaseInstancePrePay = ` +resource "tencentcloud_lite_hbase_instance" "lite_hbase_instance_prepay" { + instance_name = "tf-test-prepay" + pay_mode = 1 + disk_type = "CLOUD_HSSD" + disk_size = 100 + node_type = "4C16G" + zone_settings { + zone = "ap-guangzhou-6" + vpc_settings { + vpc_id = "vpc-a5pph3hr" + subnet_id = "subnet-bpr2mo2g" + } + node_num = 3 + } + tags { + tag_key = "test" + tag_value = "test" + } + time_span = 1 + time_unit = "m" + auto_renew_flag = 1 +} +` + const testAccLiteHbaseInstanceMultiZone = ` resource "tencentcloud_lite_hbase_instance" "lite_hbase_instance_multi_zone" { instance_name = "tf-test-multi-zone" diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index 6ce3cee960..fa98916465 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -265,7 +265,7 @@ func CompleteCommonParams(request Request, region string, requestClient string) params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.1052" + params["RequestClient"] = "SDK_GO_1.0.1055" if requestClient != "" { params["RequestClient"] += ": " + requestClient } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/client.go index c0163f714c..37148c3d34 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/client.go @@ -511,11 +511,11 @@ func NewCreateSLInstanceResponse() (response *CreateSLInstanceResponse) { } // CreateSLInstance -// 本接口(CreateSLInstance)用于创建 Lite HBase 实例 +// 本接口(CreateSLInstance)用于创建Serverless HBase实例 // -// - 接口调用成功,会创建Lite HBase实例,创建实例请求成功会返回创建实例的 InstaceId 和请求的 RequestID。 +// - 接口调用成功,会创建Serverless HBase实例,创建实例请求成功会返回创建实例的InstaceId和请求的 RequestID。 // -// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用 DescribeInstancesList 查看当前实例的 StatusDesc 状态。 +// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用DescribeInstancesList查看当前实例的StatusDesc状态。 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -542,11 +542,11 @@ func (c *Client) CreateSLInstance(request *CreateSLInstanceRequest) (response *C } // CreateSLInstance -// 本接口(CreateSLInstance)用于创建 Lite HBase 实例 +// 本接口(CreateSLInstance)用于创建Serverless HBase实例 // -// - 接口调用成功,会创建Lite HBase实例,创建实例请求成功会返回创建实例的 InstaceId 和请求的 RequestID。 +// - 接口调用成功,会创建Serverless HBase实例,创建实例请求成功会返回创建实例的InstaceId和请求的 RequestID。 // -// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用 DescribeInstancesList 查看当前实例的 StatusDesc 状态。 +// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用DescribeInstancesList查看当前实例的StatusDesc状态。 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -1245,6 +1245,65 @@ func (c *Client) DescribeEmrOverviewMetricsWithContext(ctx context.Context, requ return } +func NewDescribeGlobalConfigRequest() (request *DescribeGlobalConfigRequest) { + request = &DescribeGlobalConfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("emr", APIVersion, "DescribeGlobalConfig") + + + return +} + +func NewDescribeGlobalConfigResponse() (response *DescribeGlobalConfigResponse) { + response = &DescribeGlobalConfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeGlobalConfig +// 查询YARN资源调度的全局配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMCGWERROR = "InternalError.CamCgwError" +// INTERNALERROR_WOODSERVERERROR = "InternalError.WoodServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDINSTANCENAME = "InvalidParameter.InvalidInstanceName" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +func (c *Client) DescribeGlobalConfig(request *DescribeGlobalConfigRequest) (response *DescribeGlobalConfigResponse, err error) { + return c.DescribeGlobalConfigWithContext(context.Background(), request) +} + +// DescribeGlobalConfig +// 查询YARN资源调度的全局配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMCGWERROR = "InternalError.CamCgwError" +// INTERNALERROR_WOODSERVERERROR = "InternalError.WoodServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDINSTANCENAME = "InvalidParameter.InvalidInstanceName" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +func (c *Client) DescribeGlobalConfigWithContext(ctx context.Context, request *DescribeGlobalConfigRequest) (response *DescribeGlobalConfigResponse, err error) { + if request == nil { + request = NewDescribeGlobalConfigRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeGlobalConfig require credential") + } + + request.SetContext(ctx) + + response = NewDescribeGlobalConfigResponse() + err = c.Send(request, response) + return +} + func NewDescribeHBaseTableOverviewRequest() (request *DescribeHBaseTableOverviewRequest) { request = &DescribeHBaseTableOverviewRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1300,6 +1359,61 @@ func (c *Client) DescribeHBaseTableOverviewWithContext(ctx context.Context, requ return } +func NewDescribeHDFSStorageInfoRequest() (request *DescribeHDFSStorageInfoRequest) { + request = &DescribeHDFSStorageInfoRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("emr", APIVersion, "DescribeHDFSStorageInfo") + + + return +} + +func NewDescribeHDFSStorageInfoResponse() (response *DescribeHDFSStorageInfoResponse) { + response = &DescribeHDFSStorageInfoResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeHDFSStorageInfo +// 查询HDFS存储文件信息 +// +// 可能返回的错误码: +// INTERNALERROR_DOOPENTSDBREQUESTEXCEPTION = "InternalError.DoOpenTSDBRequestException" +// INTERNALERROR_OPENTSDBHTTPRETURNCODENOTOK = "InternalError.OpenTSDBHttpReturnCodeNotOK" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeHDFSStorageInfo(request *DescribeHDFSStorageInfoRequest) (response *DescribeHDFSStorageInfoResponse, err error) { + return c.DescribeHDFSStorageInfoWithContext(context.Background(), request) +} + +// DescribeHDFSStorageInfo +// 查询HDFS存储文件信息 +// +// 可能返回的错误码: +// INTERNALERROR_DOOPENTSDBREQUESTEXCEPTION = "InternalError.DoOpenTSDBRequestException" +// INTERNALERROR_OPENTSDBHTTPRETURNCODENOTOK = "InternalError.OpenTSDBHttpReturnCodeNotOK" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeHDFSStorageInfoWithContext(ctx context.Context, request *DescribeHDFSStorageInfoRequest) (response *DescribeHDFSStorageInfoResponse, err error) { + if request == nil { + request = NewDescribeHDFSStorageInfoRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeHDFSStorageInfo require credential") + } + + request.SetContext(ctx) + + response = NewDescribeHDFSStorageInfoResponse() + err = c.Send(request, response) + return +} + func NewDescribeHiveQueriesRequest() (request *DescribeHiveQueriesRequest) { request = &DescribeHiveQueriesRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1819,6 +1933,57 @@ func (c *Client) DescribeJobFlowWithContext(ctx context.Context, request *Descri return } +func NewDescribeKyuubiQueryInfoRequest() (request *DescribeKyuubiQueryInfoRequest) { + request = &DescribeKyuubiQueryInfoRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("emr", APIVersion, "DescribeKyuubiQueryInfo") + + + return +} + +func NewDescribeKyuubiQueryInfoResponse() (response *DescribeKyuubiQueryInfoResponse) { + response = &DescribeKyuubiQueryInfoResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeKyuubiQueryInfo +// 查询Kyuubi查询信息 +// +// 可能返回的错误码: +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNAUTHORIZEDOPERATION_APPIDMISMATCHED = "UnauthorizedOperation.AppIdMismatched" +func (c *Client) DescribeKyuubiQueryInfo(request *DescribeKyuubiQueryInfoRequest) (response *DescribeKyuubiQueryInfoResponse, err error) { + return c.DescribeKyuubiQueryInfoWithContext(context.Background(), request) +} + +// DescribeKyuubiQueryInfo +// 查询Kyuubi查询信息 +// +// 可能返回的错误码: +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNAUTHORIZEDOPERATION_APPIDMISMATCHED = "UnauthorizedOperation.AppIdMismatched" +func (c *Client) DescribeKyuubiQueryInfoWithContext(ctx context.Context, request *DescribeKyuubiQueryInfoRequest) (response *DescribeKyuubiQueryInfoResponse, err error) { + if request == nil { + request = NewDescribeKyuubiQueryInfoRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeKyuubiQueryInfo require credential") + } + + request.SetContext(ctx) + + response = NewDescribeKyuubiQueryInfoResponse() + err = c.Send(request, response) + return +} + func NewDescribeResourceScheduleRequest() (request *DescribeResourceScheduleRequest) { request = &DescribeResourceScheduleRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1957,7 +2122,7 @@ func NewDescribeSLInstanceResponse() (response *DescribeSLInstanceResponse) { } // DescribeSLInstance -// 本接口(DescribeSLInstance)用于查询 Lite HBase 实例基本信息 +// 本接口(DescribeSLInstance)用于查询 Serverless HBase实例基本信息 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -1979,7 +2144,7 @@ func (c *Client) DescribeSLInstance(request *DescribeSLInstanceRequest) (respons } // DescribeSLInstance -// 本接口(DescribeSLInstance)用于查询 Lite HBase 实例基本信息 +// 本接口(DescribeSLInstance)用于查询 Serverless HBase实例基本信息 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -2032,7 +2197,7 @@ func NewDescribeSLInstanceListResponse() (response *DescribeSLInstanceListRespon } // DescribeSLInstanceList -// 本接口(DescribeSLInstanceList)用于查询 Lite HBase 实例列表详细信息 +// 本接口(DescribeSLInstanceList)用于查询Serverless HBase实例列表详细信息 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -2109,7 +2274,7 @@ func (c *Client) DescribeSLInstanceList(request *DescribeSLInstanceListRequest) } // DescribeSLInstanceList -// 本接口(DescribeSLInstanceList)用于查询 Lite HBase 实例列表详细信息 +// 本接口(DescribeSLInstanceList)用于查询Serverless HBase实例列表详细信息 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -2294,6 +2459,108 @@ func (c *Client) DescribeServiceNodeInfosWithContext(ctx context.Context, reques return } +func NewDescribeSparkQueriesRequest() (request *DescribeSparkQueriesRequest) { + request = &DescribeSparkQueriesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("emr", APIVersion, "DescribeSparkQueries") + + + return +} + +func NewDescribeSparkQueriesResponse() (response *DescribeSparkQueriesResponse) { + response = &DescribeSparkQueriesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeSparkQueries +// 查询Spark查询信息列表 +// +// 可能返回的错误码: +// INVALIDPARAMETER_INVALIDCLUSTERID = "InvalidParameter.InvalidClusterId" +// UNAUTHORIZEDOPERATION_APPIDMISMATCHED = "UnauthorizedOperation.AppIdMismatched" +func (c *Client) DescribeSparkQueries(request *DescribeSparkQueriesRequest) (response *DescribeSparkQueriesResponse, err error) { + return c.DescribeSparkQueriesWithContext(context.Background(), request) +} + +// DescribeSparkQueries +// 查询Spark查询信息列表 +// +// 可能返回的错误码: +// INVALIDPARAMETER_INVALIDCLUSTERID = "InvalidParameter.InvalidClusterId" +// UNAUTHORIZEDOPERATION_APPIDMISMATCHED = "UnauthorizedOperation.AppIdMismatched" +func (c *Client) DescribeSparkQueriesWithContext(ctx context.Context, request *DescribeSparkQueriesRequest) (response *DescribeSparkQueriesResponse, err error) { + if request == nil { + request = NewDescribeSparkQueriesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeSparkQueries require credential") + } + + request.SetContext(ctx) + + response = NewDescribeSparkQueriesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeStarRocksQueryInfoRequest() (request *DescribeStarRocksQueryInfoRequest) { + request = &DescribeStarRocksQueryInfoRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("emr", APIVersion, "DescribeStarRocksQueryInfo") + + + return +} + +func NewDescribeStarRocksQueryInfoResponse() (response *DescribeStarRocksQueryInfoResponse) { + response = &DescribeStarRocksQueryInfoResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeStarRocksQueryInfo +// 查询StarRocks查询信息 +// +// 可能返回的错误码: +// INVALIDPARAMETER_INVALIDCLUSTERID = "InvalidParameter.InvalidClusterId" +// UNAUTHORIZEDOPERATION_APPIDMISMATCHED = "UnauthorizedOperation.AppIdMismatched" +func (c *Client) DescribeStarRocksQueryInfo(request *DescribeStarRocksQueryInfoRequest) (response *DescribeStarRocksQueryInfoResponse, err error) { + return c.DescribeStarRocksQueryInfoWithContext(context.Background(), request) +} + +// DescribeStarRocksQueryInfo +// 查询StarRocks查询信息 +// +// 可能返回的错误码: +// INVALIDPARAMETER_INVALIDCLUSTERID = "InvalidParameter.InvalidClusterId" +// UNAUTHORIZEDOPERATION_APPIDMISMATCHED = "UnauthorizedOperation.AppIdMismatched" +func (c *Client) DescribeStarRocksQueryInfoWithContext(ctx context.Context, request *DescribeStarRocksQueryInfoRequest) (response *DescribeStarRocksQueryInfoResponse, err error) { + if request == nil { + request = NewDescribeStarRocksQueryInfoRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeStarRocksQueryInfo require credential") + } + + request.SetContext(ctx) + + response = NewDescribeStarRocksQueryInfoResponse() + err = c.Send(request, response) + return +} + func NewDescribeTrinoQueryInfoRequest() (request *DescribeTrinoQueryInfoRequest) { request = &DescribeTrinoQueryInfoRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2314,7 +2581,7 @@ func NewDescribeTrinoQueryInfoResponse() (response *DescribeTrinoQueryInfoRespon } // DescribeTrinoQueryInfo -// 获取trino查询结果 +// 查询Trino(PrestoSQL)查询信息 // // 可能返回的错误码: // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" @@ -2324,7 +2591,7 @@ func (c *Client) DescribeTrinoQueryInfo(request *DescribeTrinoQueryInfoRequest) } // DescribeTrinoQueryInfo -// 获取trino查询结果 +// 查询Trino(PrestoSQL)查询信息 // // 可能返回的错误码: // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" @@ -3252,6 +3519,65 @@ func (c *Client) ModifyAutoScaleStrategyWithContext(ctx context.Context, request return } +func NewModifyGlobalConfigRequest() (request *ModifyGlobalConfigRequest) { + request = &ModifyGlobalConfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("emr", APIVersion, "ModifyGlobalConfig") + + + return +} + +func NewModifyGlobalConfigResponse() (response *ModifyGlobalConfigResponse) { + response = &ModifyGlobalConfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyGlobalConfig +// 修改YARN资源调度的全局配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMCGWERROR = "InternalError.CamCgwError" +// INTERNALERROR_WOODSERVERERROR = "InternalError.WoodServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDINSTANCENAME = "InvalidParameter.InvalidInstanceName" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +func (c *Client) ModifyGlobalConfig(request *ModifyGlobalConfigRequest) (response *ModifyGlobalConfigResponse, err error) { + return c.ModifyGlobalConfigWithContext(context.Background(), request) +} + +// ModifyGlobalConfig +// 修改YARN资源调度的全局配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMCGWERROR = "InternalError.CamCgwError" +// INTERNALERROR_WOODSERVERERROR = "InternalError.WoodServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDINSTANCENAME = "InvalidParameter.InvalidInstanceName" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +func (c *Client) ModifyGlobalConfigWithContext(ctx context.Context, request *ModifyGlobalConfigRequest) (response *ModifyGlobalConfigResponse, err error) { + if request == nil { + request = NewModifyGlobalConfigRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyGlobalConfig require credential") + } + + request.SetContext(ctx) + + response = NewModifyGlobalConfigResponse() + err = c.Send(request, response) + return +} + func NewModifyResourcePoolsRequest() (request *ModifyResourcePoolsRequest) { request = &ModifyResourcePoolsRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -3504,11 +3830,11 @@ func NewModifySLInstanceResponse() (response *ModifySLInstanceResponse) { } // ModifySLInstance -// 本接口(ModifySLInstance)用于修改Lite HBase 实例节点数。 +// 本接口(ModifySLInstance)用于Serverless HBase变配实例。 // -// - 接口调用成功,会创建Lite HBase实例,创建实例请求成功会返回请求的 RequestID。 +// - 接口调用成功,会创建Serverless HBase实例,创建实例请求成功会返回请求的 RequestID。 // -// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用 DescribeInstancesList 查看当前实例的 StatusDesc 状态。 +// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用DescribeInstancesList查看当前实例的StatusDesc状态。 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -3532,11 +3858,11 @@ func (c *Client) ModifySLInstance(request *ModifySLInstanceRequest) (response *M } // ModifySLInstance -// 本接口(ModifySLInstance)用于修改Lite HBase 实例节点数。 +// 本接口(ModifySLInstance)用于Serverless HBase变配实例。 // -// - 接口调用成功,会创建Lite HBase实例,创建实例请求成功会返回请求的 RequestID。 +// - 接口调用成功,会创建Serverless HBase实例,创建实例请求成功会返回请求的 RequestID。 // -// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用 DescribeInstancesList 查看当前实例的 StatusDesc 状态。 +// - 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用DescribeInstancesList查看当前实例的StatusDesc状态。 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -4560,7 +4886,7 @@ func NewTerminateSLInstanceResponse() (response *TerminateSLInstanceResponse) { } // TerminateSLInstance -// 本接口(TerminateSLInstance)用于销毁 Lite HBase 实例 +// 本接口(TerminateSLInstance)用于销毁Serverless HBase实例 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" @@ -4583,7 +4909,7 @@ func (c *Client) TerminateSLInstance(request *TerminateSLInstanceRequest) (respo } // TerminateSLInstance -// 本接口(TerminateSLInstance)用于销毁 Lite HBase 实例 +// 本接口(TerminateSLInstance)用于销毁Serverless HBase实例 // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/errors.go index fed11bc182..210502758b 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/errors.go @@ -377,7 +377,7 @@ const ( // 无效的Tke集群ID,或Tke集群不符合条件。 INVALIDPARAMETER_INVALIDTKEINSTANCE = "InvalidParameter.InvalidTkeInstance" - // 父帐号uin参数输入异常。 + // 父账号uin参数输入异常。 INVALIDPARAMETER_INVALIDUINNUM = "InvalidParameter.InvalidUinNum" // 无效的统一元数据库。 diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/models.go index 19bde1e7be..454b90839a 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr/v20190103/models.go @@ -374,6 +374,23 @@ type COSSettings struct { LogOnCosPath *string `json:"LogOnCosPath,omitnil,omitempty" name:"LogOnCosPath"` } +type CapacityGlobalConfig struct { + // 是否开启了标签调度 + EnableLabel *bool `json:"EnableLabel,omitnil,omitempty" name:"EnableLabel"` + + // 如果开启了标签调度,标签信息存放的路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + LabelDir *string `json:"LabelDir,omitnil,omitempty" name:"LabelDir"` + + // 是否覆盖用户指定队列,为true表示覆盖。 + // 注意:此字段可能返回 null,表示取不到有效值。 + QueueMappingOverride *bool `json:"QueueMappingOverride,omitnil,omitempty" name:"QueueMappingOverride"` + + // 高级设置 + // 注意:此字段可能返回 null,表示取不到有效值。 + DefaultSettings []*DefaultSetting `json:"DefaultSettings,omitnil,omitempty" name:"DefaultSettings"` +} + type CdbInfo struct { // 数据库实例 // 注意:此字段可能返回 null,表示取不到有效值。 @@ -671,6 +688,10 @@ type ClusterInstancesInfo struct { // 集群产品配置信息 // 注意:此字段可能返回 null,表示取不到有效值。 ConfigDetail *EmrProductConfigDetail `json:"ConfigDetail,omitnil,omitempty" name:"ConfigDetail"` + + // 集群绑定的文件系统数 + // 注意:此字段可能返回 null,表示取不到有效值。 + BindFileSystemNum *int64 `json:"BindFileSystemNum,omitnil,omitempty" name:"BindFileSystemNum"` } type ClusterSetting struct { @@ -1455,7 +1476,7 @@ type CreateSLInstanceRequestParams struct { // 实例存储类型,填写CLOUD_HSSD,表示性能云存储。 DiskType *string `json:"DiskType,omitnil,omitempty" name:"DiskType"` - // 实例单节点磁盘容量,单位GB,单节点磁盘容量需大于等于100,小于等于10000,容量调整步长为20。 + // 实例单节点磁盘容量,单位GB,单节点磁盘容量需大于等于100,小于等于250*CPU核心数,容量调整步长为100。 DiskSize *int64 `json:"DiskSize,omitnil,omitempty" name:"DiskSize"` // 实例节点规格,可填写4C16G、8C32G、16C64G、32C128G,不区分大小写。 @@ -1466,6 +1487,9 @@ type CreateSLInstanceRequestParams struct { // 实例要绑定的标签列表。 Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` + + // 预付费参数 + PrePaySetting *PrePaySetting `json:"PrePaySetting,omitnil,omitempty" name:"PrePaySetting"` } type CreateSLInstanceRequest struct { @@ -1480,7 +1504,7 @@ type CreateSLInstanceRequest struct { // 实例存储类型,填写CLOUD_HSSD,表示性能云存储。 DiskType *string `json:"DiskType,omitnil,omitempty" name:"DiskType"` - // 实例单节点磁盘容量,单位GB,单节点磁盘容量需大于等于100,小于等于10000,容量调整步长为20。 + // 实例单节点磁盘容量,单位GB,单节点磁盘容量需大于等于100,小于等于250*CPU核心数,容量调整步长为100。 DiskSize *int64 `json:"DiskSize,omitnil,omitempty" name:"DiskSize"` // 实例节点规格,可填写4C16G、8C32G、16C64G、32C128G,不区分大小写。 @@ -1491,6 +1515,9 @@ type CreateSLInstanceRequest struct { // 实例要绑定的标签列表。 Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` + + // 预付费参数 + PrePaySetting *PrePaySetting `json:"PrePaySetting,omitnil,omitempty" name:"PrePaySetting"` } func (r *CreateSLInstanceRequest) ToJsonString() string { @@ -1512,6 +1539,7 @@ func (r *CreateSLInstanceRequest) FromJsonString(s string) error { delete(f, "NodeType") delete(f, "ZoneSettings") delete(f, "Tags") + delete(f, "PrePaySetting") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSLInstanceRequest has unknown keys!", "") } @@ -1592,6 +1620,24 @@ type DayRepeatStrategy struct { Step *uint64 `json:"Step,omitnil,omitempty" name:"Step"` } +type DefaultSetting struct { + // 名称,作为入参的key + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 描述 + Desc *string `json:"Desc,omitnil,omitempty" name:"Desc"` + + // 提示 + Prompt *string `json:"Prompt,omitnil,omitempty" name:"Prompt"` + + // key,用于展示,该配置对应与配置文件中的配置项 + Key *string `json:"Key,omitnil,omitempty" name:"Key"` + + // Name对应的值 + // 注意:此字段可能返回 null,表示取不到有效值。 + Value *string `json:"Value,omitnil,omitempty" name:"Value"` +} + // Predefined struct for user type DeleteAutoScaleStrategyRequestParams struct { // 实例ID。 @@ -1683,6 +1729,9 @@ type DeleteUserManagerUserListRequestParams struct { // 用户组 UserGroupList []*UserAndGroup `json:"UserGroupList,omitnil,omitempty" name:"UserGroupList"` + + // 是否删除家目录,只针对cvm集群 + DeleteHomeDir *bool `json:"DeleteHomeDir,omitnil,omitempty" name:"DeleteHomeDir"` } type DeleteUserManagerUserListRequest struct { @@ -1702,6 +1751,9 @@ type DeleteUserManagerUserListRequest struct { // 用户组 UserGroupList []*UserAndGroup `json:"UserGroupList,omitnil,omitempty" name:"UserGroupList"` + + // 是否删除家目录,只针对cvm集群 + DeleteHomeDir *bool `json:"DeleteHomeDir,omitnil,omitempty" name:"DeleteHomeDir"` } func (r *DeleteUserManagerUserListRequest) ToJsonString() string { @@ -1721,6 +1773,7 @@ func (r *DeleteUserManagerUserListRequest) FromJsonString(s string) error { delete(f, "TkeClusterId") delete(f, "DisplayStrategy") delete(f, "UserGroupList") + delete(f, "DeleteHomeDir") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteUserManagerUserListRequest has unknown keys!", "") } @@ -2169,10 +2222,10 @@ type DescribeClusterNodesRequestParams struct { // 支持搜索的字段 SearchFields []*SearchItem `json:"SearchFields,omitnil,omitempty" name:"SearchFields"` - // 无 + // 排序字段 OrderField *string `json:"OrderField,omitnil,omitempty" name:"OrderField"` - // 无 + // 是否升序,1:升序,0:降序 Asc *int64 `json:"Asc,omitnil,omitempty" name:"Asc"` } @@ -2211,10 +2264,10 @@ type DescribeClusterNodesRequest struct { // 支持搜索的字段 SearchFields []*SearchItem `json:"SearchFields,omitnil,omitempty" name:"SearchFields"` - // 无 + // 排序字段 OrderField *string `json:"OrderField,omitnil,omitempty" name:"OrderField"` - // 无 + // 是否升序,1:升序,0:降序 Asc *int64 `json:"Asc,omitnil,omitempty" name:"Asc"` } @@ -2499,7 +2552,7 @@ type DescribeEmrOverviewMetricsRequestParams struct { // 结束时间 End *int64 `json:"End,omitnil,omitempty" name:"End"` - // 指标名 + // 指标名,NODE.CPU:节点平均CPU利用率和总核数;NODE.CPU.SLHBASE:Serverless实例平均CPU利用率和总核数;HDFS.NN.CAPACITY:存储使用率和总量 Metric *string `json:"Metric,omitnil,omitempty" name:"Metric"` // 集群id @@ -2524,7 +2577,7 @@ type DescribeEmrOverviewMetricsRequest struct { // 结束时间 End *int64 `json:"End,omitnil,omitempty" name:"End"` - // 指标名 + // 指标名,NODE.CPU:节点平均CPU利用率和总核数;NODE.CPU.SLHBASE:Serverless实例平均CPU利用率和总核数;HDFS.NN.CAPACITY:存储使用率和总量 Metric *string `json:"Metric,omitnil,omitempty" name:"Metric"` // 集群id @@ -2593,6 +2646,77 @@ func (r *DescribeEmrOverviewMetricsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribeGlobalConfigRequestParams struct { + // emr集群的英文id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +type DescribeGlobalConfigRequest struct { + *tchttp.BaseRequest + + // emr集群的英文id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +func (r *DescribeGlobalConfigRequest) 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 *DescribeGlobalConfigRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeGlobalConfigRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeGlobalConfigResponseParams struct { + // 是否开启了资源调度功能 + EnableResourceSchedule *bool `json:"EnableResourceSchedule,omitnil,omitempty" name:"EnableResourceSchedule"` + + // 当前生效的资源调度器 + ActiveScheduler *string `json:"ActiveScheduler,omitnil,omitempty" name:"ActiveScheduler"` + + // 公平调度器的信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + CapacityGlobalConfig *CapacityGlobalConfig `json:"CapacityGlobalConfig,omitnil,omitempty" name:"CapacityGlobalConfig"` + + // 容量调度器的信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + FairGlobalConfig *FairGlobalConfig `json:"FairGlobalConfig,omitnil,omitempty" name:"FairGlobalConfig"` + + // 最新的资源调度器 + Scheduler *string `json:"Scheduler,omitnil,omitempty" name:"Scheduler"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeGlobalConfigResponse struct { + *tchttp.BaseResponse + Response *DescribeGlobalConfigResponseParams `json:"Response"` +} + +func (r *DescribeGlobalConfigResponse) 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 *DescribeGlobalConfigResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeHBaseTableOverviewRequestParams struct { // 实例ID @@ -2691,6 +2815,82 @@ func (r *DescribeHBaseTableOverviewResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribeHDFSStorageInfoRequestParams struct { + // 集群id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 获取查询信息开始时间 (s) + StartTime *int64 `json:"StartTime,omitnil,omitempty" name:"StartTime"` + + // 获取查询信息结束时间 (s) + EndTime *int64 `json:"EndTime,omitnil,omitempty" name:"EndTime"` +} + +type DescribeHDFSStorageInfoRequest struct { + *tchttp.BaseRequest + + // 集群id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 获取查询信息开始时间 (s) + StartTime *int64 `json:"StartTime,omitnil,omitempty" name:"StartTime"` + + // 获取查询信息结束时间 (s) + EndTime *int64 `json:"EndTime,omitnil,omitempty" name:"EndTime"` +} + +func (r *DescribeHDFSStorageInfoRequest) 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 *DescribeHDFSStorageInfoRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "StartTime") + delete(f, "EndTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHDFSStorageInfoRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeHDFSStorageInfoResponseParams struct { + // 采样时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + SampleTime *int64 `json:"SampleTime,omitnil,omitempty" name:"SampleTime"` + + // hdfs存储详情 + // 注意:此字段可能返回 null,表示取不到有效值。 + StorageSummaryDistribution []*StorageSummaryDistribution `json:"StorageSummaryDistribution,omitnil,omitempty" name:"StorageSummaryDistribution"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeHDFSStorageInfoResponse struct { + *tchttp.BaseResponse + Response *DescribeHDFSStorageInfoResponseParams `json:"Response"` +} + +func (r *DescribeHDFSStorageInfoResponse) 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 *DescribeHDFSStorageInfoResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeHiveQueriesRequestParams struct { // 集群ID @@ -2925,6 +3125,9 @@ type DescribeInsightListRequestParams struct { // 分页查询时的页号,从1开始 Page *int64 `json:"Page,omitnil,omitempty" name:"Page"` + + // 查询类型,支持HIVE,SPARK,DLC_SPARK,SPARK_SQL,SCHEDULE,MAPREDUCE,TRINO等类型,默认查询全部 + Type *string `json:"Type,omitnil,omitempty" name:"Type"` } type DescribeInsightListRequest struct { @@ -2944,6 +3147,9 @@ type DescribeInsightListRequest struct { // 分页查询时的页号,从1开始 Page *int64 `json:"Page,omitnil,omitempty" name:"Page"` + + // 查询类型,支持HIVE,SPARK,DLC_SPARK,SPARK_SQL,SCHEDULE,MAPREDUCE,TRINO等类型,默认查询全部 + Type *string `json:"Type,omitnil,omitempty" name:"Type"` } func (r *DescribeInsightListRequest) ToJsonString() string { @@ -2963,6 +3169,7 @@ func (r *DescribeInsightListRequest) FromJsonString(s string) error { delete(f, "EndTime") delete(f, "PageSize") delete(f, "Page") + delete(f, "Type") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInsightListRequest has unknown keys!", "") } @@ -3081,7 +3288,7 @@ type DescribeInstancesListRequestParams struct { // 按照OrderField升序或者降序进行排序。取值范围:
程序上限
+ // 注意:此字段可能返回 null,表示取不到有效值。 + UserMaxAppsDefault *int64 `json:"UserMaxAppsDefault,omitnil,omitempty" name:"UserMaxAppsDefault"` } type Filters struct { @@ -5231,11 +5660,7 @@ type InquiryPriceCreateInstanceRequestParams struct { // 产品ID,不同产品ID表示不同的EMR产品版本。取值范围: