diff --git a/.changelog/2193.txt b/.changelog/2193.txt new file mode 100644 index 0000000000..14e94ed4bd --- /dev/null +++ b/.changelog/2193.txt @@ -0,0 +1,15 @@ +```release-note:new-data-source +tencentcloud_pts_scenario_with_jobs +``` + +```release-note:new-resource +tencentcloud_pts_cron_job_restart +``` + +```release-note:new-resource +tencentcloud_pts_job_abort +``` + +```release-note:new-resource +tencentcloud_pts_cron_job_abort +``` \ No newline at end of file diff --git a/go.mod b/go.mod index 004f72ad71..7f55d8b28c 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.763 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.676 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.751 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.533 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.657 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/rum v1.0.744 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf v1.0.729 diff --git a/go.sum b/go.sum index 0ea67abe6d..7064a1a0d4 100644 --- a/go.sum +++ b/go.sum @@ -965,6 +965,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.751 h1: github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.751/go.mod h1:PsIFaoUYRjgVGiG9fUFgs1x/ewUsvBtPeIXDHjh8ABw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.533 h1:BJDJlHkuoPsSUJ/ZHnmtX3gmA2PVfmKyhB7uV2d9QlE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.533/go.mod h1:SHeExU5ggWrG8hsc4BMmxdhhw6WpoiWSu1Jw8CXs/Dg= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 h1:rZDKucVVtTnmnbZFDyh6t47dHswkb2oSuOxOHTTkygA= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762/go.mod h1:QB/XcdVZ8mhRgk90XuXd+2Smfo8emTo0wHIUsygEaKs= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.657 h1:9p/4/qXtnBIYkz5b5mYAhp1XhnIn5jUkxxfllF8hMMM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.657/go.mod h1:CPc7SSKl8I21UmhTf2AVYZqZfy8MbDr/RrMsSqMkOAM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/rum v1.0.542 h1:/U0rTVKXD7Y8Opw6OtnqSDPnWiP3zMMAlxOKayII/5Q= diff --git a/tencentcloud/data_source_tc_pts_scenario_with_jobs.go b/tencentcloud/data_source_tc_pts_scenario_with_jobs.go new file mode 100644 index 0000000000..4fb594cb64 --- /dev/null +++ b/tencentcloud/data_source_tc_pts_scenario_with_jobs.go @@ -0,0 +1,2719 @@ +/* +Use this data source to query detailed information of pts scenario_with_jobs + +Example Usage + +```hcl +data "tencentcloud_pts_scenario_with_jobs" "scenario_with_jobs" { + project_ids = ["project-45vw7v82"] + scenario_ids = ["scenario-koakp3h6"] + scenario_name = "pts-jmeter" + ascend = true + ignore_script = true + ignore_dataset = true + scenario_type = "pts-jmeter" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + pts "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudPtsScenarioWithJobs() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudPtsScenarioWithJobsRead, + Schema: map[string]*schema.Schema{ + "project_ids": { + Required: true, + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "Project ID list.", + }, + + "scenario_ids": { + Optional: true, + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "Scenario ID list.", + }, + + "scenario_name": { + Optional: true, + Type: schema.TypeString, + Description: "Scenario name.", + }, + + "order_by": { + Optional: true, + Type: schema.TypeString, + Description: "The field column used for ordering.", + }, + + "ascend": { + Optional: true, + Type: schema.TypeBool, + Description: "Whether to use ascending order.", + }, + + "ignore_script": { + Optional: true, + Type: schema.TypeBool, + Description: "Whether to ignore the script content.", + }, + + "ignore_dataset": { + Optional: true, + Type: schema.TypeBool, + Description: "Whether to ignore the dataset.", + }, + + "scenario_type": { + Optional: true, + Type: schema.TypeString, + Description: "Scenario type, e.g.: pts-http, pts-js, pts-trpc, pts-jmeter.", + }, + + "owner": { + Optional: true, + Type: schema.TypeString, + Description: "The job owner.", + }, + + "scenario_with_jobs_set": { + Computed: true, + Type: schema.TypeList, + Description: "The scenario configuration and its jobs.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scenario": { + Type: schema.TypeList, + Computed: true, + Description: "The returned scenario.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scenario_id": { + Type: schema.TypeString, + Computed: true, + Description: "Scenario ID.", + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: "Scenario name.", + }, + "description": { + Type: schema.TypeString, + Computed: true, + Description: "Scenario description.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "Scenario type, e.g.: pts-http, pts-js, pts-trpc, pts-jmeter.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "Scenario status.", + }, + "load": { + Type: schema.TypeList, + Computed: true, + Description: "Scenario is load test configuration.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "load_spec": { + Type: schema.TypeList, + Computed: true, + Description: "Scenario is load specification.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "concurrency": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration for the concurrency mode.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "stages": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration for the multi-stage load test.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "duration_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The execution time for the load test.", + }, + "target_virtual_users": { + Type: schema.TypeInt, + Computed: true, + Description: "The number of the target virtual users.", + }, + }, + }, + }, + "iteration_count": { + Type: schema.TypeInt, + Computed: true, + Description: "The iteration count of the load test.", + }, + "max_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The maximum RPS.", + }, + "graceful_stop_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The waiting period for a graceful shutdown.", + }, + "resources": { + Type: schema.TypeInt, + Computed: true, + Description: "The resource count of the load test.", + }, + }, + }, + }, + "requests_per_second": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration of the RPS mode load test.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "max_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The maximum RPS.", + }, + "duration_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The execution time of the load test.", + }, + "target_virtual_users": { + Type: schema.TypeInt, + Computed: true, + Description: "Deprecated.", + }, + "resources": { + Type: schema.TypeInt, + Computed: true, + Description: "The recource count of the load test.", + }, + "start_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The starting minimum RPS.", + }, + "target_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The target RPS.", + }, + "graceful_stop_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The waiting period for a graceful shutdown.", + }, + }, + }, + }, + "script_origin": { + Type: schema.TypeList, + Computed: true, + Description: "The script origin.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "machine_number": { + Type: schema.TypeInt, + Computed: true, + Description: "The load test machine number.", + }, + "machine_specification": { + Type: schema.TypeString, + Computed: true, + Description: "The load test machine specification.", + }, + "duration_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The load test execution time.", + }, + }, + }, + }, + }, + }, + }, + "vpc_load_distribution": { + Type: schema.TypeList, + Computed: true, + Description: "The distribution of the load source.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Region ID.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Region.", + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + Description: "The VPC ID.", + }, + "subnet_ids": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The subnet ID list.", + }, + }, + }, + }, + "geo_regions_load_distribution": { + Type: schema.TypeList, + Computed: true, + Description: "The geographical distribution of the load source.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Region ID.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Region.", + }, + "percentage": { + Type: schema.TypeInt, + Computed: true, + Description: "Percentage.", + }, + }, + }, + }, + }, + }, + }, + "encoded_scripts": { + Type: schema.TypeString, + Computed: true, + Description: "Deprecated.", + }, + "configs": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Deprecated.", + }, + "extensions": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Deprecated.", + }, + "datasets": { + Type: schema.TypeList, + Computed: true, + Description: "The test data sets for the load test.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "The file name of the test data sets.", + }, + "split": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether to split the test data.", + }, + "header_in_file": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether the first line contains the parameter names.", + }, + "header_columns": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The parameter name list.", + }, + "line_count": { + Type: schema.TypeInt, + Computed: true, + Description: "The line count of the file.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The update time of the file.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "The byte count of the file.", + }, + "head_lines": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The header lines of the file.", + }, + "tail_lines": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The tail lines of the file.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "The file type.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "The file ID.", + }, + }, + }, + }, + "sla_id": { + Type: schema.TypeString, + Computed: true, + Description: "The ID of the SLA policy.", + }, + "cron_id": { + Type: schema.TypeString, + Computed: true, + Description: "The cron job ID.", + }, + "created_at": { + Type: schema.TypeString, + Computed: true, + Description: "The creation time of the scenario.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The updating time of the scenario.", + }, + "project_id": { + Type: schema.TypeString, + Computed: true, + Description: "Project ID.", + }, + "app_id": { + Type: schema.TypeInt, + Computed: true, + Description: "AppId.", + }, + "uin": { + Type: schema.TypeString, + Computed: true, + Description: "Uin.", + }, + "sub_account_uin": { + Type: schema.TypeString, + Computed: true, + Description: "SubAccountUin.", + }, + "test_scripts": { + Type: schema.TypeList, + Computed: true, + Description: "The script of the load test.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "encoded_content": { + Type: schema.TypeString, + Computed: true, + Description: "The base64 encoded content.", + }, + "encoded_http_archive": { + Type: schema.TypeString, + Computed: true, + Description: "The base64 encoded HAR.", + }, + "load_weight": { + Type: schema.TypeInt, + Computed: true, + Description: "The weight of the script, ranging from 1 to 100.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "protocols": { + Type: schema.TypeList, + Computed: true, + Description: "The protocol file.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "request_files": { + Type: schema.TypeList, + Computed: true, + Description: "The files in the request.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "sla_policy": { + Type: schema.TypeList, + Computed: true, + Description: "The SLA policy.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "sla_rules": { + Type: schema.TypeList, + Computed: true, + Description: "The SLA rules.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "metric": { + Type: schema.TypeString, + Computed: true, + Description: "The load test metrics.", + }, + "aggregation": { + Type: schema.TypeString, + Computed: true, + Description: "The aggregation method of the metrics.", + }, + "condition": { + Type: schema.TypeString, + Computed: true, + Description: "The operator for checking the condition.", + }, + "value": { + Type: schema.TypeFloat, + Computed: true, + Description: "The threshold in the condition.", + }, + "label_filter": { + Type: schema.TypeList, + Computed: true, + Description: "The label filter.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "label_name": { + Type: schema.TypeString, + Computed: true, + Description: "Label name.", + }, + "label_value": { + Type: schema.TypeString, + Computed: true, + Description: "Label value.", + }, + }, + }, + }, + "abort_flag": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether to abort the load test job.", + }, + "for": { + Type: schema.TypeString, + Computed: true, + Description: "The duration for checking the condition.", + }, + }, + }, + }, + "alert_channel": { + Type: schema.TypeList, + Computed: true, + Description: "The alert channel.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "notice_id": { + Type: schema.TypeString, + Computed: true, + Description: "The notice ID bound with this alert channel.", + }, + "amp_consumer_id": { + Type: schema.TypeString, + Computed: true, + Description: "AMP consumer ID.", + }, + }, + }, + }, + }, + }, + }, + "plugins": { + Type: schema.TypeList, + Computed: true, + Description: "Plugins.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "domain_name_config": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration for parsing domain names.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host_aliases": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration for host aliases.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host_names": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Host names.", + }, + "ip": { + Type: schema.TypeString, + Computed: true, + Description: "IP.", + }, + }, + }, + }, + "dns_config": { + Type: schema.TypeList, + Computed: true, + Description: "The DNS configuration.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "nameservers": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "DNS IP list.", + }, + }, + }, + }, + }, + }, + }, + "notification_hooks": { + Type: schema.TypeList, + Computed: true, + Description: "The notification hooks.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "events": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The notification hook.", + }, + "url": { + Type: schema.TypeString, + Computed: true, + Description: "The callback URL.", + }, + }, + }, + }, + "owner": { + Type: schema.TypeString, + Computed: true, + Description: "The owner.", + }, + "project_name": { + Type: schema.TypeString, + Computed: true, + Description: "Project name.", + }, + }, + }, + }, + "jobs": { + Type: schema.TypeList, + Computed: true, + Description: "Jobs related to the scenario.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "job_id": { + Type: schema.TypeString, + Computed: true, + Description: "Job ID.", + }, + "scenario_id": { + Type: schema.TypeString, + Computed: true, + Description: "Scenario ID.", + }, + "load": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration of the load.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "load_spec": { + Type: schema.TypeList, + Computed: true, + Description: "The specification of the load configuration.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "concurrency": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration of the concurrency load test mode.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "stages": { + Type: schema.TypeList, + Computed: true, + Description: "The multi-stage configuration.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "duration_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The execution time.", + }, + "target_virtual_users": { + Type: schema.TypeInt, + Computed: true, + Description: "The target count of the virtual users.", + }, + }, + }, + }, + "iteration_count": { + Type: schema.TypeInt, + Computed: true, + Description: "The iteration count.", + }, + "max_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The maximum RPS.", + }, + "graceful_stop_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The waiting period for a graceful shutdown.", + }, + "resources": { + Type: schema.TypeInt, + Computed: true, + Description: "The count of the load test resource.", + }, + }, + }, + }, + "requests_per_second": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration of the RPS mode load test.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "max_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The maximum RPS.", + }, + "duration_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The execution time.", + }, + "target_virtual_users": { + Type: schema.TypeInt, + Computed: true, + Description: "Deprecated.", + }, + "resources": { + Type: schema.TypeInt, + Computed: true, + Description: "The count of the load test resource.", + }, + "start_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The starting minimum RPS.", + }, + "target_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The target RPS.", + }, + "graceful_stop_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The waiting period for a gracefulshutdown.", + }, + }, + }, + }, + "script_origin": { + Type: schema.TypeList, + Computed: true, + Description: "The script origin.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "machine_number": { + Type: schema.TypeInt, + Computed: true, + Description: "Machine number.", + }, + "machine_specification": { + Type: schema.TypeString, + Computed: true, + Description: "Machine specification.", + }, + "duration_seconds": { + Type: schema.TypeInt, + Computed: true, + Description: "The execution time.", + }, + }, + }, + }, + }, + }, + }, + "vpc_load_distribution": { + Type: schema.TypeList, + Computed: true, + Description: "The distribution of the load source.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Region ID.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Region.", + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + Description: "VPC ID.", + }, + "subnet_ids": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The subnet ID list.", + }, + }, + }, + }, + "geo_regions_load_distribution": { + Type: schema.TypeList, + Computed: true, + Description: "The geographical distribution of the load source.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Region ID.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Region.", + }, + "percentage": { + Type: schema.TypeInt, + Computed: true, + Description: "Percentage.", + }, + }, + }, + }, + }, + }, + }, + "configs": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Deprecated.", + }, + "datasets": { + Type: schema.TypeList, + Computed: true, + Description: "The test data sets.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "Test data set name.", + }, + "split": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether to split the test data.", + }, + "header_in_file": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether the first line contains the parameter names.", + }, + "header_columns": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The parameter name list.", + }, + "line_count": { + Type: schema.TypeInt, + Computed: true, + Description: "The line count of the file.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "head_lines": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The header lines of the file.", + }, + "tail_lines": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "The tail lines of the file.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "extensions": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Deprecated.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "Job running status. JobUnknown: 0,JobCreated:1,JobPending:2, JobPreparing:3,JobSelectClustering:4,JobCreateTasking:5,JobSyncTasking:6 JobRunning:11,JobFinished:12,JobPrepareException:13,JobFinishException:14,JobAborting:15,JobAborted:16,JobAbortException:17,JobDeleted:18, JobSelectClusterException:19,JobCreateTaskException:20,JobSyncTaskException:21.", + }, + "start_time": { + Type: schema.TypeString, + Computed: true, + Description: "The job starting time.", + }, + "end_time": { + Type: schema.TypeString, + Computed: true, + Description: "The job ending time.", + }, + "max_virtual_user_count": { + Type: schema.TypeInt, + Computed: true, + Description: "The maximum VU of the job.", + }, + "note": { + Type: schema.TypeString, + Computed: true, + Description: "The note of the job.", + }, + "error_rate": { + Type: schema.TypeFloat, + Computed: true, + Description: "Error rate.", + }, + "job_owner": { + Type: schema.TypeString, + Computed: true, + Description: "Job owner.", + }, + "load_sources": { + Type: schema.TypeList, + Computed: true, + Description: "Deprecated.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ip": { + Type: schema.TypeString, + Computed: true, + Description: "The IP of the load source.", + }, + "pod_name": { + Type: schema.TypeString, + Computed: true, + Description: "The pod name of the load source.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Region.", + }, + }, + }, + }, + "duration": { + Type: schema.TypeInt, + Computed: true, + Description: "Job running duration.", + }, + "max_requests_per_second": { + Type: schema.TypeInt, + Computed: true, + Description: "The maximum RPS.", + }, + "request_total": { + Type: schema.TypeFloat, + Computed: true, + Description: "The total reqeust count.", + }, + "requests_per_second": { + Type: schema.TypeFloat, + Computed: true, + Description: "RPS.", + }, + "response_time_average": { + Type: schema.TypeFloat, + Computed: true, + Description: "The average response time.", + }, + "response_time_p99": { + Type: schema.TypeFloat, + Computed: true, + Description: "The 99 percentile of the response time.", + }, + "response_time_p95": { + Type: schema.TypeFloat, + Computed: true, + Description: "The 95 percentile of the response time.", + }, + "response_time_p90": { + Type: schema.TypeFloat, + Computed: true, + Description: "The 90 percentile of the response time.", + }, + "scripts": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Deprecated.", + }, + "response_time_max": { + Type: schema.TypeFloat, + Computed: true, + Description: "The maximum response time.", + }, + "response_time_min": { + Type: schema.TypeFloat, + Computed: true, + Description: "The minimum response time.", + }, + "load_source_infos": { + Type: schema.TypeList, + Computed: true, + Description: "The load source information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ip": { + Type: schema.TypeString, + Computed: true, + Description: "The IP of the load source.", + }, + "pod_name": { + Type: schema.TypeString, + Computed: true, + Description: "The pod name of the load source.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Region.", + }, + }, + }, + }, + "test_scripts": { + Type: schema.TypeList, + Computed: true, + Description: "Test scripts.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "encoded_content": { + Type: schema.TypeString, + Computed: true, + Description: "The base64 encoded content.", + }, + "encoded_http_archive": { + Type: schema.TypeString, + Computed: true, + Description: "The base64 encoded HAR.", + }, + "load_weight": { + Type: schema.TypeInt, + Computed: true, + Description: "The weight of the script, ranging from 1 to 100.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "protocols": { + Type: schema.TypeList, + Computed: true, + Description: "The protocol file.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "request_files": { + Type: schema.TypeList, + Computed: true, + Description: "The files in the request.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "plugins": { + Type: schema.TypeList, + Computed: true, + Description: "Plugins.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "File name.", + }, + "size": { + Type: schema.TypeInt, + Computed: true, + Description: "File size.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "File type.", + }, + "updated_at": { + Type: schema.TypeString, + Computed: true, + Description: "The time of the most recent update.", + }, + "file_id": { + Type: schema.TypeString, + Computed: true, + Description: "File ID.", + }, + }, + }, + }, + "cron_id": { + Type: schema.TypeString, + Computed: true, + Description: "Cron job ID.", + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: "Scenario type.", + }, + "domain_name_config": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration for parsing domain names.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host_aliases": { + Type: schema.TypeList, + Computed: true, + Description: "The configuration for host aliases.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host_names": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Host names.", + }, + "ip": { + Type: schema.TypeString, + Computed: true, + Description: "IP.", + }, + }, + }, + }, + "dns_config": { + Type: schema.TypeList, + Computed: true, + Description: "The DNS configuration.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "nameservers": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "DNS IP list.", + }, + }, + }, + }, + }, + }, + }, + "debug": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether to run the job in the debug mode. The default value is false.", + }, + "abort_reason": { + Type: schema.TypeInt, + Computed: true, + Description: "The reason for aborting the job.", + }, + "created_at": { + Type: schema.TypeString, + Computed: true, + Description: "The job creation time.", + }, + "project_id": { + Type: schema.TypeString, + Computed: true, + Description: "Project ID.", + }, + "notification_hooks": { + Type: schema.TypeList, + Computed: true, + Description: "Notification hooks.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "events": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Notification hook.", + }, + "url": { + Type: schema.TypeString, + Computed: true, + Description: "The callback URL.", + }, + }, + }, + }, + "network_receive_rate": { + Type: schema.TypeFloat, + Computed: true, + Description: "The rate of receiving bytes.", + }, + "network_send_rate": { + Type: schema.TypeFloat, + Computed: true, + Description: "The rate of sending bytes.", + }, + "message": { + Type: schema.TypeString, + Computed: true, + Description: "The message describing the job running status.", + }, + "project_name": { + Type: schema.TypeString, + Computed: true, + Description: "Project name.", + }, + "scenario_name": { + Type: schema.TypeString, + Computed: true, + Description: "Scenario name.", + }, + }, + }, + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudPtsScenarioWithJobsRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_pts_scenario_with_jobs.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("project_ids"); ok { + projectIdsSet := v.(*schema.Set).List() + paramMap["ProjectIds"] = helper.InterfacesStringsPoint(projectIdsSet) + } + + if v, ok := d.GetOk("scenario_ids"); ok { + scenarioIdsSet := v.(*schema.Set).List() + paramMap["ScenarioIds"] = helper.InterfacesStringsPoint(scenarioIdsSet) + } + + if v, ok := d.GetOk("scenario_name"); ok { + paramMap["ScenarioName"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("scenario_status"); v != nil { + paramMap["ScenarioStatus"] = helper.IntInt64(v.(int)) + } + + if v, ok := d.GetOk("order_by"); ok { + paramMap["OrderBy"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("ascend"); v != nil { + paramMap["Ascend"] = helper.Bool(v.(bool)) + } + + if v, _ := d.GetOk("ignore_script"); v != nil { + paramMap["IgnoreScript"] = helper.Bool(v.(bool)) + } + + if v, _ := d.GetOk("ignore_dataset"); v != nil { + paramMap["IgnoreDataset"] = helper.Bool(v.(bool)) + } + + if v, ok := d.GetOk("scenario_type"); ok { + paramMap["ScenarioType"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("owner"); ok { + paramMap["Owner"] = helper.String(v.(string)) + } + + service := PtsService{client: meta.(*TencentCloudClient).apiV3Conn} + + var scenarioWithJobsSet []*pts.ScenarioWithJobs + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribePtsScenarioWithJobsByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + scenarioWithJobsSet = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(scenarioWithJobsSet)) + tmpList := make([]map[string]interface{}, 0, len(scenarioWithJobsSet)) + + if scenarioWithJobsSet != nil { + for _, scenarioWithJobs := range scenarioWithJobsSet { + scenarioWithJobsMap := map[string]interface{}{} + + if scenarioWithJobs.Scenario != nil { + scenario := scenarioWithJobs.Scenario + scenarioMap := map[string]interface{}{} + + if scenario.ScenarioId != nil { + scenarioMap["scenario_id"] = scenario.ScenarioId + ids = append(ids, *scenario.ScenarioId) + } + + if scenario.Name != nil { + scenarioMap["name"] = scenario.Name + } + + if scenario.Description != nil { + scenarioMap["description"] = scenario.Description + } + + if scenario.Type != nil { + scenarioMap["type"] = scenario.Type + } + + if scenario.Status != nil { + scenarioMap["status"] = scenario.Status + } + + if scenario.Load != nil { + loadMap := map[string]interface{}{} + + if scenario.Load.LoadSpec != nil { + loadSpecMap := map[string]interface{}{} + + if scenario.Load.LoadSpec.Concurrency != nil { + concurrencyMap := map[string]interface{}{} + + if scenario.Load.LoadSpec.Concurrency.Stages != nil { + stagesList := []interface{}{} + for _, stages := range scenario.Load.LoadSpec.Concurrency.Stages { + stagesMap := map[string]interface{}{} + + if stages.DurationSeconds != nil { + stagesMap["duration_seconds"] = stages.DurationSeconds + } + + if stages.TargetVirtualUsers != nil { + stagesMap["target_virtual_users"] = stages.TargetVirtualUsers + } + + stagesList = append(stagesList, stagesMap) + } + + concurrencyMap["stages"] = stagesList + } + + if scenario.Load.LoadSpec.Concurrency.IterationCount != nil { + concurrencyMap["iteration_count"] = scenario.Load.LoadSpec.Concurrency.IterationCount + } + + if scenario.Load.LoadSpec.Concurrency.MaxRequestsPerSecond != nil { + concurrencyMap["max_requests_per_second"] = scenario.Load.LoadSpec.Concurrency.MaxRequestsPerSecond + } + + if scenario.Load.LoadSpec.Concurrency.GracefulStopSeconds != nil { + concurrencyMap["graceful_stop_seconds"] = scenario.Load.LoadSpec.Concurrency.GracefulStopSeconds + } + + if scenario.Load.LoadSpec.Concurrency.Resources != nil { + concurrencyMap["resources"] = scenario.Load.LoadSpec.Concurrency.Resources + } + + loadSpecMap["concurrency"] = []interface{}{concurrencyMap} + } + + if scenario.Load.LoadSpec.RequestsPerSecond != nil { + requestsPerSecondMap := map[string]interface{}{} + + if scenario.Load.LoadSpec.RequestsPerSecond.MaxRequestsPerSecond != nil { + requestsPerSecondMap["max_requests_per_second"] = scenario.Load.LoadSpec.RequestsPerSecond.MaxRequestsPerSecond + } + + if scenario.Load.LoadSpec.RequestsPerSecond.DurationSeconds != nil { + requestsPerSecondMap["duration_seconds"] = scenario.Load.LoadSpec.RequestsPerSecond.DurationSeconds + } + + if scenario.Load.LoadSpec.RequestsPerSecond.TargetVirtualUsers != nil { + requestsPerSecondMap["target_virtual_users"] = scenario.Load.LoadSpec.RequestsPerSecond.TargetVirtualUsers + } + + if scenario.Load.LoadSpec.RequestsPerSecond.Resources != nil { + requestsPerSecondMap["resources"] = scenario.Load.LoadSpec.RequestsPerSecond.Resources + } + + if scenario.Load.LoadSpec.RequestsPerSecond.StartRequestsPerSecond != nil { + requestsPerSecondMap["start_requests_per_second"] = scenario.Load.LoadSpec.RequestsPerSecond.StartRequestsPerSecond + } + + if scenario.Load.LoadSpec.RequestsPerSecond.TargetRequestsPerSecond != nil { + requestsPerSecondMap["target_requests_per_second"] = scenario.Load.LoadSpec.RequestsPerSecond.TargetRequestsPerSecond + } + + if scenario.Load.LoadSpec.RequestsPerSecond.GracefulStopSeconds != nil { + requestsPerSecondMap["graceful_stop_seconds"] = scenario.Load.LoadSpec.RequestsPerSecond.GracefulStopSeconds + } + + loadSpecMap["requests_per_second"] = []interface{}{requestsPerSecondMap} + } + + if scenario.Load.LoadSpec.ScriptOrigin != nil { + scriptOriginMap := map[string]interface{}{} + + if scenario.Load.LoadSpec.ScriptOrigin.MachineNumber != nil { + scriptOriginMap["machine_number"] = scenario.Load.LoadSpec.ScriptOrigin.MachineNumber + } + + if scenario.Load.LoadSpec.ScriptOrigin.MachineSpecification != nil { + scriptOriginMap["machine_specification"] = scenario.Load.LoadSpec.ScriptOrigin.MachineSpecification + } + + if scenario.Load.LoadSpec.ScriptOrigin.DurationSeconds != nil { + scriptOriginMap["duration_seconds"] = scenario.Load.LoadSpec.ScriptOrigin.DurationSeconds + } + + loadSpecMap["script_origin"] = []interface{}{scriptOriginMap} + } + + loadMap["load_spec"] = []interface{}{loadSpecMap} + } + + if scenario.Load.VpcLoadDistribution != nil { + vpcLoadDistributionMap := map[string]interface{}{} + + if scenario.Load.VpcLoadDistribution.RegionId != nil { + vpcLoadDistributionMap["region_id"] = scenario.Load.VpcLoadDistribution.RegionId + } + + if scenario.Load.VpcLoadDistribution.Region != nil { + vpcLoadDistributionMap["region"] = scenario.Load.VpcLoadDistribution.Region + } + + if scenario.Load.VpcLoadDistribution.VpcId != nil { + vpcLoadDistributionMap["vpc_id"] = scenario.Load.VpcLoadDistribution.VpcId + } + + if scenario.Load.VpcLoadDistribution.SubnetIds != nil { + vpcLoadDistributionMap["subnet_ids"] = scenario.Load.VpcLoadDistribution.SubnetIds + } + + loadMap["vpc_load_distribution"] = []interface{}{vpcLoadDistributionMap} + } + + if scenario.Load.GeoRegionsLoadDistribution != nil { + geoRegionsLoadDistributionList := []interface{}{} + for _, geoRegionsLoadDistribution := range scenario.Load.GeoRegionsLoadDistribution { + geoRegionsLoadDistributionMap := map[string]interface{}{} + + if geoRegionsLoadDistribution.RegionId != nil { + geoRegionsLoadDistributionMap["region_id"] = geoRegionsLoadDistribution.RegionId + } + + if geoRegionsLoadDistribution.Region != nil { + geoRegionsLoadDistributionMap["region"] = geoRegionsLoadDistribution.Region + } + + if geoRegionsLoadDistribution.Percentage != nil { + geoRegionsLoadDistributionMap["percentage"] = geoRegionsLoadDistribution.Percentage + } + + geoRegionsLoadDistributionList = append(geoRegionsLoadDistributionList, geoRegionsLoadDistributionMap) + } + + loadMap["geo_regions_load_distribution"] = geoRegionsLoadDistributionList + } + + scenarioMap["load"] = []interface{}{loadMap} + } + + if scenario.EncodedScripts != nil { + scenarioMap["encoded_scripts"] = scenario.EncodedScripts + } + + if scenario.Configs != nil { + scenarioMap["configs"] = scenario.Configs + } + + if scenario.Extensions != nil { + scenarioMap["extensions"] = scenario.Extensions + } + + if scenario.Datasets != nil { + datasetsList := []interface{}{} + for _, datasets := range scenario.Datasets { + datasetsMap := map[string]interface{}{} + + if datasets.Name != nil { + datasetsMap["name"] = datasets.Name + } + + if datasets.Split != nil { + datasetsMap["split"] = datasets.Split + } + + if datasets.HeaderInFile != nil { + datasetsMap["header_in_file"] = datasets.HeaderInFile + } + + if datasets.HeaderColumns != nil { + datasetsMap["header_columns"] = datasets.HeaderColumns + } + + if datasets.LineCount != nil { + datasetsMap["line_count"] = datasets.LineCount + } + + if datasets.UpdatedAt != nil { + datasetsMap["updated_at"] = datasets.UpdatedAt + } + + if datasets.Size != nil { + datasetsMap["size"] = datasets.Size + } + + if datasets.HeadLines != nil { + datasetsMap["head_lines"] = datasets.HeadLines + } + + if datasets.TailLines != nil { + datasetsMap["tail_lines"] = datasets.TailLines + } + + if datasets.Type != nil { + datasetsMap["type"] = datasets.Type + } + + if datasets.FileId != nil { + datasetsMap["file_id"] = datasets.FileId + } + + datasetsList = append(datasetsList, datasetsMap) + } + + scenarioMap["datasets"] = datasetsList + } + + if scenario.SLAId != nil { + scenarioMap["sla_id"] = scenario.SLAId + } + + if scenario.CronId != nil { + scenarioMap["cron_id"] = scenario.CronId + } + + if scenario.CreatedAt != nil { + scenarioMap["created_at"] = scenario.CreatedAt + } + + if scenario.UpdatedAt != nil { + scenarioMap["updated_at"] = scenario.UpdatedAt + } + + if scenario.ProjectId != nil { + scenarioMap["project_id"] = scenario.ProjectId + } + + if scenario.AppId != nil { + scenarioMap["app_id"] = scenario.AppId + } + + if scenario.Uin != nil { + scenarioMap["uin"] = scenario.Uin + } + + if scenario.SubAccountUin != nil { + scenarioMap["sub_account_uin"] = scenario.SubAccountUin + } + + if scenario.TestScripts != nil { + testScriptsList := []interface{}{} + for _, testScripts := range scenario.TestScripts { + testScriptsMap := map[string]interface{}{} + + if testScripts.Name != nil { + testScriptsMap["name"] = testScripts.Name + } + + if testScripts.Size != nil { + testScriptsMap["size"] = testScripts.Size + } + + if testScripts.Type != nil { + testScriptsMap["type"] = testScripts.Type + } + + if testScripts.UpdatedAt != nil { + testScriptsMap["updated_at"] = testScripts.UpdatedAt + } + + if testScripts.EncodedContent != nil { + testScriptsMap["encoded_content"] = testScripts.EncodedContent + } + + if testScripts.EncodedHttpArchive != nil { + testScriptsMap["encoded_http_archive"] = testScripts.EncodedHttpArchive + } + + if testScripts.LoadWeight != nil { + testScriptsMap["load_weight"] = testScripts.LoadWeight + } + + if testScripts.FileId != nil { + testScriptsMap["file_id"] = testScripts.FileId + } + + testScriptsList = append(testScriptsList, testScriptsMap) + } + + scenarioMap["test_scripts"] = testScriptsList + } + + if scenario.Protocols != nil { + protocolsList := []interface{}{} + for _, protocols := range scenario.Protocols { + protocolsMap := map[string]interface{}{} + + if protocols.Name != nil { + protocolsMap["name"] = protocols.Name + } + + if protocols.Size != nil { + protocolsMap["size"] = protocols.Size + } + + if protocols.Type != nil { + protocolsMap["type"] = protocols.Type + } + + if protocols.UpdatedAt != nil { + protocolsMap["updated_at"] = protocols.UpdatedAt + } + + if protocols.FileId != nil { + protocolsMap["file_id"] = protocols.FileId + } + + protocolsList = append(protocolsList, protocolsMap) + } + + scenarioMap["protocols"] = protocolsList + } + + if scenario.RequestFiles != nil { + requestFilesList := []interface{}{} + for _, requestFiles := range scenario.RequestFiles { + requestFilesMap := map[string]interface{}{} + + if requestFiles.Name != nil { + requestFilesMap["name"] = requestFiles.Name + } + + if requestFiles.Size != nil { + requestFilesMap["size"] = requestFiles.Size + } + + if requestFiles.Type != nil { + requestFilesMap["type"] = requestFiles.Type + } + + if requestFiles.UpdatedAt != nil { + requestFilesMap["updated_at"] = requestFiles.UpdatedAt + } + + if requestFiles.FileId != nil { + requestFilesMap["file_id"] = requestFiles.FileId + } + + requestFilesList = append(requestFilesList, requestFilesMap) + } + + scenarioMap["request_files"] = requestFilesList + } + + if scenario.SLAPolicy != nil { + sLAPolicyMap := map[string]interface{}{} + + if scenario.SLAPolicy.SLARules != nil { + sLARulesList := []interface{}{} + for _, sLARules := range scenario.SLAPolicy.SLARules { + sLARulesMap := map[string]interface{}{} + + if sLARules.Metric != nil { + sLARulesMap["metric"] = sLARules.Metric + } + + if sLARules.Aggregation != nil { + sLARulesMap["aggregation"] = sLARules.Aggregation + } + + if sLARules.Condition != nil { + sLARulesMap["condition"] = sLARules.Condition + } + + if sLARules.Value != nil { + sLARulesMap["value"] = sLARules.Value + } + + if sLARules.LabelFilter != nil { + labelFilterList := []interface{}{} + for _, labelFilter := range sLARules.LabelFilter { + labelFilterMap := map[string]interface{}{} + + if labelFilter.LabelName != nil { + labelFilterMap["label_name"] = labelFilter.LabelName + } + + if labelFilter.LabelValue != nil { + labelFilterMap["label_value"] = labelFilter.LabelValue + } + + labelFilterList = append(labelFilterList, labelFilterMap) + } + + sLARulesMap["label_filter"] = labelFilterList + } + + if sLARules.AbortFlag != nil { + sLARulesMap["abort_flag"] = sLARules.AbortFlag + } + + if sLARules.For != nil { + sLARulesMap["for"] = sLARules.For + } + + sLARulesList = append(sLARulesList, sLARulesMap) + } + + sLAPolicyMap["sla_rules"] = sLARulesList + } + + if scenario.SLAPolicy.AlertChannel != nil { + alertChannelMap := map[string]interface{}{} + + if scenario.SLAPolicy.AlertChannel.NoticeId != nil { + alertChannelMap["notice_id"] = scenario.SLAPolicy.AlertChannel.NoticeId + } + + if scenario.SLAPolicy.AlertChannel.AMPConsumerId != nil { + alertChannelMap["amp_consumer_id"] = scenario.SLAPolicy.AlertChannel.AMPConsumerId + } + + sLAPolicyMap["alert_channel"] = []interface{}{alertChannelMap} + } + + scenarioMap["sla_policy"] = []interface{}{sLAPolicyMap} + } + + if scenario.Plugins != nil { + pluginsList := []interface{}{} + for _, plugins := range scenario.Plugins { + pluginsMap := map[string]interface{}{} + + if plugins.Name != nil { + pluginsMap["name"] = plugins.Name + } + + if plugins.Size != nil { + pluginsMap["size"] = plugins.Size + } + + if plugins.Type != nil { + pluginsMap["type"] = plugins.Type + } + + if plugins.UpdatedAt != nil { + pluginsMap["updated_at"] = plugins.UpdatedAt + } + + if plugins.FileId != nil { + pluginsMap["file_id"] = plugins.FileId + } + + pluginsList = append(pluginsList, pluginsMap) + } + + scenarioMap["plugins"] = pluginsList + } + + if scenario.DomainNameConfig != nil { + domainNameConfigMap := map[string]interface{}{} + + if scenario.DomainNameConfig.HostAliases != nil { + hostAliasesList := []interface{}{} + for _, hostAliases := range scenario.DomainNameConfig.HostAliases { + hostAliasesMap := map[string]interface{}{} + + if hostAliases.HostNames != nil { + hostAliasesMap["host_names"] = hostAliases.HostNames + } + + if hostAliases.IP != nil { + hostAliasesMap["ip"] = hostAliases.IP + } + + hostAliasesList = append(hostAliasesList, hostAliasesMap) + } + + domainNameConfigMap["host_aliases"] = hostAliasesList + } + + if scenario.DomainNameConfig.DNSConfig != nil { + dNSConfigMap := map[string]interface{}{} + + if scenario.DomainNameConfig.DNSConfig.Nameservers != nil { + dNSConfigMap["nameservers"] = scenario.DomainNameConfig.DNSConfig.Nameservers + } + + domainNameConfigMap["dns_config"] = []interface{}{dNSConfigMap} + } + + scenarioMap["domain_name_config"] = []interface{}{domainNameConfigMap} + } + + if scenario.NotificationHooks != nil { + notificationHooksList := []interface{}{} + for _, notificationHooks := range scenario.NotificationHooks { + notificationHooksMap := map[string]interface{}{} + + if notificationHooks.Events != nil { + notificationHooksMap["events"] = notificationHooks.Events + } + + if notificationHooks.URL != nil { + notificationHooksMap["url"] = notificationHooks.URL + } + + notificationHooksList = append(notificationHooksList, notificationHooksMap) + } + + scenarioMap["notification_hooks"] = notificationHooksList + } + + if scenario.Owner != nil { + scenarioMap["owner"] = scenario.Owner + } + + if scenario.ProjectName != nil { + scenarioMap["project_name"] = scenario.ProjectName + } + + scenarioWithJobsMap["scenario"] = []interface{}{scenarioMap} + } + + if scenarioWithJobs.Jobs != nil { + jobsList := []interface{}{} + for _, jobs := range scenarioWithJobs.Jobs { + jobsMap := map[string]interface{}{} + + if jobs.JobId != nil { + jobsMap["job_id"] = jobs.JobId + ids = append(ids, *jobs.JobId) + } + + if jobs.ScenarioId != nil { + jobsMap["scenario_id"] = jobs.ScenarioId + } + + if jobs.Load != nil { + loadMap := map[string]interface{}{} + + if jobs.Load.LoadSpec != nil { + loadSpecMap := map[string]interface{}{} + + if jobs.Load.LoadSpec.Concurrency != nil { + concurrencyMap := map[string]interface{}{} + + if jobs.Load.LoadSpec.Concurrency.Stages != nil { + stagesList := []interface{}{} + for _, stages := range jobs.Load.LoadSpec.Concurrency.Stages { + stagesMap := map[string]interface{}{} + + if stages.DurationSeconds != nil { + stagesMap["duration_seconds"] = stages.DurationSeconds + } + + if stages.TargetVirtualUsers != nil { + stagesMap["target_virtual_users"] = stages.TargetVirtualUsers + } + + stagesList = append(stagesList, stagesMap) + } + + concurrencyMap["stages"] = stagesList + } + + if jobs.Load.LoadSpec.Concurrency.IterationCount != nil { + concurrencyMap["iteration_count"] = jobs.Load.LoadSpec.Concurrency.IterationCount + } + + if jobs.Load.LoadSpec.Concurrency.MaxRequestsPerSecond != nil { + concurrencyMap["max_requests_per_second"] = jobs.Load.LoadSpec.Concurrency.MaxRequestsPerSecond + } + + if jobs.Load.LoadSpec.Concurrency.GracefulStopSeconds != nil { + concurrencyMap["graceful_stop_seconds"] = jobs.Load.LoadSpec.Concurrency.GracefulStopSeconds + } + + if jobs.Load.LoadSpec.Concurrency.Resources != nil { + concurrencyMap["resources"] = jobs.Load.LoadSpec.Concurrency.Resources + } + + loadSpecMap["concurrency"] = []interface{}{concurrencyMap} + } + + if jobs.Load.LoadSpec.RequestsPerSecond != nil { + requestsPerSecondMap := map[string]interface{}{} + + if jobs.Load.LoadSpec.RequestsPerSecond.MaxRequestsPerSecond != nil { + requestsPerSecondMap["max_requests_per_second"] = jobs.Load.LoadSpec.RequestsPerSecond.MaxRequestsPerSecond + } + + if jobs.Load.LoadSpec.RequestsPerSecond.DurationSeconds != nil { + requestsPerSecondMap["duration_seconds"] = jobs.Load.LoadSpec.RequestsPerSecond.DurationSeconds + } + + if jobs.Load.LoadSpec.RequestsPerSecond.TargetVirtualUsers != nil { + requestsPerSecondMap["target_virtual_users"] = jobs.Load.LoadSpec.RequestsPerSecond.TargetVirtualUsers + } + + if jobs.Load.LoadSpec.RequestsPerSecond.Resources != nil { + requestsPerSecondMap["resources"] = jobs.Load.LoadSpec.RequestsPerSecond.Resources + } + + if jobs.Load.LoadSpec.RequestsPerSecond.StartRequestsPerSecond != nil { + requestsPerSecondMap["start_requests_per_second"] = jobs.Load.LoadSpec.RequestsPerSecond.StartRequestsPerSecond + } + + if jobs.Load.LoadSpec.RequestsPerSecond.TargetRequestsPerSecond != nil { + requestsPerSecondMap["target_requests_per_second"] = jobs.Load.LoadSpec.RequestsPerSecond.TargetRequestsPerSecond + } + + if jobs.Load.LoadSpec.RequestsPerSecond.GracefulStopSeconds != nil { + requestsPerSecondMap["graceful_stop_seconds"] = jobs.Load.LoadSpec.RequestsPerSecond.GracefulStopSeconds + } + + loadSpecMap["requests_per_second"] = []interface{}{requestsPerSecondMap} + } + + if jobs.Load.LoadSpec.ScriptOrigin != nil { + scriptOriginMap := map[string]interface{}{} + + if jobs.Load.LoadSpec.ScriptOrigin.MachineNumber != nil { + scriptOriginMap["machine_number"] = jobs.Load.LoadSpec.ScriptOrigin.MachineNumber + } + + if jobs.Load.LoadSpec.ScriptOrigin.MachineSpecification != nil { + scriptOriginMap["machine_specification"] = jobs.Load.LoadSpec.ScriptOrigin.MachineSpecification + } + + if jobs.Load.LoadSpec.ScriptOrigin.DurationSeconds != nil { + scriptOriginMap["duration_seconds"] = jobs.Load.LoadSpec.ScriptOrigin.DurationSeconds + } + + loadSpecMap["script_origin"] = []interface{}{scriptOriginMap} + } + + loadMap["load_spec"] = []interface{}{loadSpecMap} + } + + if jobs.Load.VpcLoadDistribution != nil { + vpcLoadDistributionMap := map[string]interface{}{} + + if jobs.Load.VpcLoadDistribution.RegionId != nil { + vpcLoadDistributionMap["region_id"] = jobs.Load.VpcLoadDistribution.RegionId + } + + if jobs.Load.VpcLoadDistribution.Region != nil { + vpcLoadDistributionMap["region"] = jobs.Load.VpcLoadDistribution.Region + } + + if jobs.Load.VpcLoadDistribution.VpcId != nil { + vpcLoadDistributionMap["vpc_id"] = jobs.Load.VpcLoadDistribution.VpcId + } + + if jobs.Load.VpcLoadDistribution.SubnetIds != nil { + vpcLoadDistributionMap["subnet_ids"] = jobs.Load.VpcLoadDistribution.SubnetIds + } + + loadMap["vpc_load_distribution"] = []interface{}{vpcLoadDistributionMap} + } + + if jobs.Load.GeoRegionsLoadDistribution != nil { + geoRegionsLoadDistributionList := []interface{}{} + for _, geoRegionsLoadDistribution := range jobs.Load.GeoRegionsLoadDistribution { + geoRegionsLoadDistributionMap := map[string]interface{}{} + + if geoRegionsLoadDistribution.RegionId != nil { + geoRegionsLoadDistributionMap["region_id"] = geoRegionsLoadDistribution.RegionId + } + + if geoRegionsLoadDistribution.Region != nil { + geoRegionsLoadDistributionMap["region"] = geoRegionsLoadDistribution.Region + } + + if geoRegionsLoadDistribution.Percentage != nil { + geoRegionsLoadDistributionMap["percentage"] = geoRegionsLoadDistribution.Percentage + } + + geoRegionsLoadDistributionList = append(geoRegionsLoadDistributionList, geoRegionsLoadDistributionMap) + } + + loadMap["geo_regions_load_distribution"] = geoRegionsLoadDistributionList + } + + jobsMap["load"] = []interface{}{loadMap} + } + + if jobs.Configs != nil { + jobsMap["configs"] = jobs.Configs + } + + if jobs.Datasets != nil { + datasetsList := []interface{}{} + for _, datasets := range jobs.Datasets { + datasetsMap := map[string]interface{}{} + + if datasets.Name != nil { + datasetsMap["name"] = datasets.Name + } + + if datasets.Split != nil { + datasetsMap["split"] = datasets.Split + } + + if datasets.HeaderInFile != nil { + datasetsMap["header_in_file"] = datasets.HeaderInFile + } + + if datasets.HeaderColumns != nil { + datasetsMap["header_columns"] = datasets.HeaderColumns + } + + if datasets.LineCount != nil { + datasetsMap["line_count"] = datasets.LineCount + } + + if datasets.UpdatedAt != nil { + datasetsMap["updated_at"] = datasets.UpdatedAt + } + + if datasets.Size != nil { + datasetsMap["size"] = datasets.Size + } + + if datasets.HeadLines != nil { + datasetsMap["head_lines"] = datasets.HeadLines + } + + if datasets.TailLines != nil { + datasetsMap["tail_lines"] = datasets.TailLines + } + + if datasets.Type != nil { + datasetsMap["type"] = datasets.Type + } + + if datasets.FileId != nil { + datasetsMap["file_id"] = datasets.FileId + } + + datasetsList = append(datasetsList, datasetsMap) + } + + jobsMap["datasets"] = datasetsList + } + + if jobs.Extensions != nil { + jobsMap["extensions"] = jobs.Extensions + } + + if jobs.Status != nil { + jobsMap["status"] = jobs.Status + } + + if jobs.StartTime != nil { + jobsMap["start_time"] = jobs.StartTime + } + + if jobs.EndTime != nil { + jobsMap["end_time"] = jobs.EndTime + } + + if jobs.MaxVirtualUserCount != nil { + jobsMap["max_virtual_user_count"] = jobs.MaxVirtualUserCount + } + + if jobs.Note != nil { + jobsMap["note"] = jobs.Note + } + + if jobs.ErrorRate != nil { + jobsMap["error_rate"] = jobs.ErrorRate + } + + if jobs.JobOwner != nil { + jobsMap["job_owner"] = jobs.JobOwner + } + + if jobs.LoadSources != nil { + loadSourcesMap := map[string]interface{}{} + + if jobs.LoadSources.IP != nil { + loadSourcesMap["ip"] = jobs.LoadSources.IP + } + + if jobs.LoadSources.PodName != nil { + loadSourcesMap["pod_name"] = jobs.LoadSources.PodName + } + + if jobs.LoadSources.Region != nil { + loadSourcesMap["region"] = jobs.LoadSources.Region + } + + jobsMap["load_sources"] = []interface{}{loadSourcesMap} + } + + if jobs.Duration != nil { + jobsMap["duration"] = jobs.Duration + } + + if jobs.MaxRequestsPerSecond != nil { + jobsMap["max_requests_per_second"] = jobs.MaxRequestsPerSecond + } + + if jobs.RequestTotal != nil { + jobsMap["request_total"] = jobs.RequestTotal + } + + if jobs.RequestsPerSecond != nil { + jobsMap["requests_per_second"] = jobs.RequestsPerSecond + } + + if jobs.ResponseTimeAverage != nil { + jobsMap["response_time_average"] = jobs.ResponseTimeAverage + } + + if jobs.ResponseTimeP99 != nil { + jobsMap["response_time_p99"] = jobs.ResponseTimeP99 + } + + if jobs.ResponseTimeP95 != nil { + jobsMap["response_time_p95"] = jobs.ResponseTimeP95 + } + + if jobs.ResponseTimeP90 != nil { + jobsMap["response_time_p90"] = jobs.ResponseTimeP90 + } + + if jobs.Scripts != nil { + jobsMap["scripts"] = jobs.Scripts + } + + if jobs.ResponseTimeMax != nil { + jobsMap["response_time_max"] = jobs.ResponseTimeMax + } + + if jobs.ResponseTimeMin != nil { + jobsMap["response_time_min"] = jobs.ResponseTimeMin + } + + if jobs.LoadSourceInfos != nil { + loadSourceInfosList := []interface{}{} + for _, loadSourceInfos := range jobs.LoadSourceInfos { + loadSourceInfosMap := map[string]interface{}{} + + if loadSourceInfos.IP != nil { + loadSourceInfosMap["ip"] = loadSourceInfos.IP + } + + if loadSourceInfos.PodName != nil { + loadSourceInfosMap["pod_name"] = loadSourceInfos.PodName + } + + if loadSourceInfos.Region != nil { + loadSourceInfosMap["region"] = loadSourceInfos.Region + } + + loadSourceInfosList = append(loadSourceInfosList, loadSourceInfosMap) + } + + jobsMap["load_source_infos"] = loadSourceInfosList + } + + if jobs.TestScripts != nil { + testScriptsList := []interface{}{} + for _, testScripts := range jobs.TestScripts { + testScriptsMap := map[string]interface{}{} + + if testScripts.Name != nil { + testScriptsMap["name"] = testScripts.Name + } + + if testScripts.Size != nil { + testScriptsMap["size"] = testScripts.Size + } + + if testScripts.Type != nil { + testScriptsMap["type"] = testScripts.Type + } + + if testScripts.UpdatedAt != nil { + testScriptsMap["updated_at"] = testScripts.UpdatedAt + } + + if testScripts.EncodedContent != nil { + testScriptsMap["encoded_content"] = testScripts.EncodedContent + } + + if testScripts.EncodedHttpArchive != nil { + testScriptsMap["encoded_http_archive"] = testScripts.EncodedHttpArchive + } + + if testScripts.LoadWeight != nil { + testScriptsMap["load_weight"] = testScripts.LoadWeight + } + + if testScripts.FileId != nil { + testScriptsMap["file_id"] = testScripts.FileId + } + + testScriptsList = append(testScriptsList, testScriptsMap) + } + + jobsMap["test_scripts"] = testScriptsList + } + + if jobs.Protocols != nil { + protocolsList := []interface{}{} + for _, protocols := range jobs.Protocols { + protocolsMap := map[string]interface{}{} + + if protocols.Name != nil { + protocolsMap["name"] = protocols.Name + } + + if protocols.Size != nil { + protocolsMap["size"] = protocols.Size + } + + if protocols.Type != nil { + protocolsMap["type"] = protocols.Type + } + + if protocols.UpdatedAt != nil { + protocolsMap["updated_at"] = protocols.UpdatedAt + } + + if protocols.FileId != nil { + protocolsMap["file_id"] = protocols.FileId + } + + protocolsList = append(protocolsList, protocolsMap) + } + + jobsMap["protocols"] = protocolsList + } + + if jobs.RequestFiles != nil { + requestFilesList := []interface{}{} + for _, requestFiles := range jobs.RequestFiles { + requestFilesMap := map[string]interface{}{} + + if requestFiles.Name != nil { + requestFilesMap["name"] = requestFiles.Name + } + + if requestFiles.Size != nil { + requestFilesMap["size"] = requestFiles.Size + } + + if requestFiles.Type != nil { + requestFilesMap["type"] = requestFiles.Type + } + + if requestFiles.UpdatedAt != nil { + requestFilesMap["updated_at"] = requestFiles.UpdatedAt + } + + if requestFiles.FileId != nil { + requestFilesMap["file_id"] = requestFiles.FileId + } + + requestFilesList = append(requestFilesList, requestFilesMap) + } + + jobsMap["request_files"] = requestFilesList + } + + if jobs.Plugins != nil { + pluginsList := []interface{}{} + for _, plugins := range jobs.Plugins { + pluginsMap := map[string]interface{}{} + + if plugins.Name != nil { + pluginsMap["name"] = plugins.Name + } + + if plugins.Size != nil { + pluginsMap["size"] = plugins.Size + } + + if plugins.Type != nil { + pluginsMap["type"] = plugins.Type + } + + if plugins.UpdatedAt != nil { + pluginsMap["updated_at"] = plugins.UpdatedAt + } + + if plugins.FileId != nil { + pluginsMap["file_id"] = plugins.FileId + } + + pluginsList = append(pluginsList, pluginsMap) + } + + jobsMap["plugins"] = pluginsList + } + + if jobs.CronId != nil { + jobsMap["cron_id"] = jobs.CronId + } + + if jobs.Type != nil { + jobsMap["type"] = jobs.Type + } + + if jobs.DomainNameConfig != nil { + domainNameConfigMap := map[string]interface{}{} + + if jobs.DomainNameConfig.HostAliases != nil { + hostAliasesList := []interface{}{} + for _, hostAliases := range jobs.DomainNameConfig.HostAliases { + hostAliasesMap := map[string]interface{}{} + + if hostAliases.HostNames != nil { + hostAliasesMap["host_names"] = hostAliases.HostNames + } + + if hostAliases.IP != nil { + hostAliasesMap["ip"] = hostAliases.IP + } + + hostAliasesList = append(hostAliasesList, hostAliasesMap) + } + + domainNameConfigMap["host_aliases"] = hostAliasesList + } + + if jobs.DomainNameConfig.DNSConfig != nil { + dNSConfigMap := map[string]interface{}{} + + if jobs.DomainNameConfig.DNSConfig.Nameservers != nil { + dNSConfigMap["nameservers"] = jobs.DomainNameConfig.DNSConfig.Nameservers + } + + domainNameConfigMap["dns_config"] = []interface{}{dNSConfigMap} + } + + jobsMap["domain_name_config"] = []interface{}{domainNameConfigMap} + } + + if jobs.Debug != nil { + jobsMap["debug"] = jobs.Debug + } + + if jobs.AbortReason != nil { + jobsMap["abort_reason"] = jobs.AbortReason + } + + if jobs.CreatedAt != nil { + jobsMap["created_at"] = jobs.CreatedAt + } + + if jobs.ProjectId != nil { + jobsMap["project_id"] = jobs.ProjectId + } + + if jobs.NotificationHooks != nil { + notificationHooksList := []interface{}{} + for _, notificationHooks := range jobs.NotificationHooks { + notificationHooksMap := map[string]interface{}{} + + if notificationHooks.Events != nil { + notificationHooksMap["events"] = notificationHooks.Events + } + + if notificationHooks.URL != nil { + notificationHooksMap["url"] = notificationHooks.URL + } + + notificationHooksList = append(notificationHooksList, notificationHooksMap) + } + + jobsMap["notification_hooks"] = notificationHooksList + } + + if jobs.NetworkReceiveRate != nil { + jobsMap["network_receive_rate"] = jobs.NetworkReceiveRate + } + + if jobs.NetworkSendRate != nil { + jobsMap["network_send_rate"] = jobs.NetworkSendRate + } + + if jobs.Message != nil { + jobsMap["message"] = jobs.Message + } + + if jobs.ProjectName != nil { + jobsMap["project_name"] = jobs.ProjectName + } + + if jobs.ScenarioName != nil { + jobsMap["scenario_name"] = jobs.ScenarioName + } + + jobsList = append(jobsList, jobsMap) + } + + scenarioWithJobsMap["jobs"] = jobsList + } + + tmpList = append(tmpList, scenarioWithJobsMap) + } + + _ = d.Set("scenario_with_jobs_set", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_pts_scenario_with_jobs_test.go b/tencentcloud/data_source_tc_pts_scenario_with_jobs_test.go new file mode 100644 index 0000000000..a410bae467 --- /dev/null +++ b/tencentcloud/data_source_tc_pts_scenario_with_jobs_test.go @@ -0,0 +1,63 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +// go test -test.run TestAccTencentCloudPtsScenarioWithJobsDataSource_basic -v +func TestAccTencentCloudPtsScenarioWithJobsDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccPtsScenarioWithJobsDataSource, + Check: resource.ComposeTestCheckFunc( + testAccCheckTencentCloudDataSourceID("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.app_id"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.created_at"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.geo_regions_load_distribution.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.geo_regions_load_distribution.0.percentage"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.geo_regions_load_distribution.0.region"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.geo_regions_load_distribution.0.region_id"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.load_spec.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.load_spec.0.concurrency.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.load_spec.0.concurrency.0.graceful_stop_seconds"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.load_spec.0.concurrency.0.stages.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.load_spec.0.concurrency.0.stages.0.duration_seconds"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.load.0.load_spec.0.concurrency.0.stages.0.target_virtual_users"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.name"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.project_id"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.project_name"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.scenario_id"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.sub_account_uin"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.type"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.uin"), + resource.TestCheckResourceAttrSet("data.tencentcloud_pts_scenario_with_jobs.scenario_with_jobs", "scenario_with_jobs_set.0.scenario.0.updated_at"), + ), + }, + }, + }) +} + +const testAccPtsScenarioWithJobsDataSource = ` + +data "tencentcloud_pts_scenario_with_jobs" "scenario_with_jobs" { + project_ids = ["project-45vw7v82"] + scenario_ids = ["scenario-koakp3h6"] + scenario_name = "pts-jmeter" + ascend = true + ignore_script = true + ignore_dataset = true + scenario_type = "pts-jmeter" +} + +` diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index a51169965d..6f72617558 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -1407,6 +1407,9 @@ Cloud Streaming Services(CSS) tencentcloud_css_domains Performance Testing Service(PTS) + Data Source + tencentcloud_pts_scenario_with_jobs + Resource tencentcloud_pts_project tencentcloud_pts_alert_channel @@ -1415,6 +1418,9 @@ Performance Testing Service(PTS) tencentcloud_pts_job tencentcloud_pts_cron_job tencentcloud_pts_tmp_key_generate + tencentcloud_pts_cron_job_restart + tencentcloud_pts_job_abort + tencentcloud_pts_cron_job_abort TencentCloud Automation Tools(TAT) Data Source @@ -2546,6 +2552,7 @@ func Provider() *schema.Provider { "tencentcloud_ses_send_email_status": dataSourceTencentCloudSesSendEmailStatus(), "tencentcloud_organization_org_financial_by_member": dataSourceTencentCloudOrganizationOrgFinancialByMember(), "tencentcloud_organization_org_auth_node": dataSourceTencentCloudOrganizationOrgAuthNode(), + "tencentcloud_pts_scenario_with_jobs": dataSourceTencentCloudPtsScenarioWithJobs(), }, ResourcesMap: map[string]*schema.Resource{ @@ -3116,6 +3123,9 @@ func Provider() *schema.Provider { "tencentcloud_pts_job": resourceTencentCloudPtsJob(), "tencentcloud_pts_cron_job": resourceTencentCloudPtsCronJob(), "tencentcloud_pts_tmp_key_generate": resourceTencentCloudPtsTmpKeyGenerate(), + "tencentcloud_pts_cron_job_restart": resourceTencentCloudPtsCronJobRestart(), + "tencentcloud_pts_job_abort": resourceTencentCloudPtsJobAbort(), + "tencentcloud_pts_cron_job_abort": resourceTencentCloudPtsCronJobAbort(), "tencentcloud_tat_command": resourceTencentCloudTatCommand(), "tencentcloud_tat_invoker": resourceTencentCloudTatInvoker(), "tencentcloud_tat_invoker_config": resourceTencentCloudTatInvokerConfig(), diff --git a/tencentcloud/resource_tc_pts_cron_job.go b/tencentcloud/resource_tc_pts_cron_job.go index 83fb9730b5..02b0579082 100644 --- a/tencentcloud/resource_tc_pts_cron_job.go +++ b/tencentcloud/resource_tc_pts_cron_job.go @@ -145,6 +145,12 @@ func resourceTencentCloudPtsCronJob() *schema.Resource { Description: "User ID.", }, + "cron_job_id": { + Type: schema.TypeString, + Computed: true, + Description: "Cron job ID.", + }, + "sub_account_uin": { Type: schema.TypeString, Computed: true, @@ -258,6 +264,8 @@ func resourceTencentCloudPtsCronJobRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("resource `cronJob` %s does not exist", cronJobId) } + _ = d.Set("cron_job_id", cronJobId) + if cronJob.Name != nil { _ = d.Set("name", cronJob.Name) } diff --git a/tencentcloud/resource_tc_pts_cron_job_abort.go b/tencentcloud/resource_tc_pts_cron_job_abort.go new file mode 100644 index 0000000000..1ffec28ae0 --- /dev/null +++ b/tencentcloud/resource_tc_pts_cron_job_abort.go @@ -0,0 +1,100 @@ +/* +Provides a resource to create a pts cron_job_abort + +Example Usage + +```hcl +resource "tencentcloud_pts_cron_job_abort" "cron_job_abort" { + project_id = "project-abc" + cron_job_id = "job-dtm93vx0" +} +``` +*/ +package tencentcloud + +import ( + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + pts "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func resourceTencentCloudPtsCronJobAbort() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudPtsCronJobAbortCreate, + Read: resourceTencentCloudPtsCronJobAbortRead, + Delete: resourceTencentCloudPtsCronJobAbortDelete, + + Schema: map[string]*schema.Schema{ + "project_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Project ID.", + }, + + "cron_job_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Cron job ID.", + }, + }, + } +} + +func resourceTencentCloudPtsCronJobAbortCreate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_cron_job_abort.create")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + var ( + request = pts.NewAbortCronJobsRequest() + projectId string + cronJobId string + ) + if v, ok := d.GetOk("project_id"); ok { + projectId = v.(string) + request.ProjectId = helper.String(v.(string)) + } + + if v, ok := d.GetOk("cron_job_id"); ok { + cronJobId = v.(string) + request.CronJobIds = append(request.CronJobIds, helper.String(cronJobId)) + } + + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + result, e := meta.(*TencentCloudClient).apiV3Conn.UsePtsClient().AbortCronJobs(request) + if e != nil { + return retryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s operate pts cronJobAbort failed, reason:%+v", logId, err) + return err + } + + d.SetId(projectId + FILED_SP + cronJobId) + + return resourceTencentCloudPtsCronJobAbortRead(d, meta) +} + +func resourceTencentCloudPtsCronJobAbortRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_cron_job_abort.read")() + defer inconsistentCheck(d, meta)() + + return nil +} + +func resourceTencentCloudPtsCronJobAbortDelete(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_cron_job_abort.delete")() + defer inconsistentCheck(d, meta)() + + return nil +} diff --git a/tencentcloud/resource_tc_pts_cron_job_abort_test.go b/tencentcloud/resource_tc_pts_cron_job_abort_test.go new file mode 100644 index 0000000000..a8ea7ae14f --- /dev/null +++ b/tencentcloud/resource_tc_pts_cron_job_abort_test.go @@ -0,0 +1,32 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudPtsCronJobAbortResource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccPtsCronJobAbort, + Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_pts_cron_job_abort.cron_job_abort", "id")), + }, + }, + }) +} + +const testAccPtsCronJobAbort = ` + +resource "tencentcloud_pts_cron_job_abort" "cron_job_abort" { + project_id = "project-abc" + cron_job_id = "job-dtm93vx0" +} + +` diff --git a/tencentcloud/resource_tc_pts_cron_job_restart.go b/tencentcloud/resource_tc_pts_cron_job_restart.go new file mode 100644 index 0000000000..d867354ba5 --- /dev/null +++ b/tencentcloud/resource_tc_pts_cron_job_restart.go @@ -0,0 +1,99 @@ +/* +Provides a resource to create a pts cron_job_restart, restart a scheduled task whose status is `JobAborting` + +Example Usage + +```hcl +resource "tencentcloud_pts_cron_job_restart" "cron_job_restart" { + project_id = "project-abc" + cron_job_id = "job-dtm93vx0" +} +``` +*/ +package tencentcloud + +import ( + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + pts "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func resourceTencentCloudPtsCronJobRestart() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudPtsCronJobRestartCreate, + Read: resourceTencentCloudPtsCronJobRestartRead, + Delete: resourceTencentCloudPtsCronJobRestartDelete, + + Schema: map[string]*schema.Schema{ + "project_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Project ID.", + }, + + "cron_job_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Cron job ID.", + }, + }, + } +} + +func resourceTencentCloudPtsCronJobRestartCreate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_cron_job_restart.create")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + var ( + request = pts.NewRestartCronJobsRequest() + projectId string + cronJobId string + ) + if v, ok := d.GetOk("project_id"); ok { + request.ProjectId = helper.String(v.(string)) + } + + if v, ok := d.GetOk("cron_job_id"); ok { + cronJobId := v.(string) + request.CronJobIds = append(request.CronJobIds, helper.String(cronJobId)) + } + + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + result, e := meta.(*TencentCloudClient).apiV3Conn.UsePtsClient().RestartCronJobs(request) + if e != nil { + return retryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s operate pts cronJobRestart failed, reason:%+v", logId, err) + return err + } + + d.SetId(projectId + FILED_SP + cronJobId) + + return resourceTencentCloudPtsCronJobRestartRead(d, meta) +} + +func resourceTencentCloudPtsCronJobRestartRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_cron_job_restart.read")() + defer inconsistentCheck(d, meta)() + + return nil +} + +func resourceTencentCloudPtsCronJobRestartDelete(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_cron_job_restart.delete")() + defer inconsistentCheck(d, meta)() + + return nil +} diff --git a/tencentcloud/resource_tc_pts_cron_job_restart_test.go b/tencentcloud/resource_tc_pts_cron_job_restart_test.go new file mode 100644 index 0000000000..4126a09803 --- /dev/null +++ b/tencentcloud/resource_tc_pts_cron_job_restart_test.go @@ -0,0 +1,32 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudNeedFixPtsCronJobRestartResource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccPtsCronJobRestart, + Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_pts_cron_job_restart.cron_job_restart", "id")), + }, + }, + }) +} + +const testAccPtsCronJobRestart = ` + +resource "tencentcloud_pts_cron_job_restart" "cron_job_restart" { + project_id = "project-abc" + cron_job_id = "job-dtm93vx0" +} + +` diff --git a/tencentcloud/resource_tc_pts_job.go b/tencentcloud/resource_tc_pts_job.go index 5eac8d047e..daf451a820 100644 --- a/tencentcloud/resource_tc_pts_job.go +++ b/tencentcloud/resource_tc_pts_job.go @@ -667,6 +667,12 @@ func resourceTencentCloudPtsJob() *schema.Resource { Description: "Cause of interruption.", }, + "job_id": { + Type: schema.TypeString, + Computed: true, + Description: "Job Id.", + }, + "created_at": { Type: schema.TypeString, Computed: true, @@ -786,6 +792,8 @@ func resourceTencentCloudPtsJobRead(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("resource `job` %s does not exist", jobId) } + _ = d.Set("job_id", jobId) + if job.ScenarioId != nil { _ = d.Set("scenario_id", job.ScenarioId) } diff --git a/tencentcloud/resource_tc_pts_job_abort.go b/tencentcloud/resource_tc_pts_job_abort.go new file mode 100644 index 0000000000..79d7b0b3be --- /dev/null +++ b/tencentcloud/resource_tc_pts_job_abort.go @@ -0,0 +1,125 @@ +/* +Provides a resource to create a pts job_abort + +Example Usage + +```hcl +resource "tencentcloud_pts_job_abort" "job_abort" { + job_id = "job-my644ozi" + project_id = "project-45vw7v82" + scenario_id = "scenario-22q19f3k" +} +``` +*/ +package tencentcloud + +import ( + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + pts "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func resourceTencentCloudPtsJobAbort() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudPtsJobAbortCreate, + Read: resourceTencentCloudPtsJobAbortRead, + Delete: resourceTencentCloudPtsJobAbortDelete, + + Schema: map[string]*schema.Schema{ + "job_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Job ID.", + }, + + "project_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Project ID.", + }, + + "scenario_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Scenario ID.", + }, + + "abort_reason": { + Optional: true, + ForceNew: true, + Type: schema.TypeInt, + Description: "The reason for aborting the job.", + }, + }, + } +} + +func resourceTencentCloudPtsJobAbortCreate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_job_abort.create")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + var ( + request = pts.NewAbortJobRequest() + projectId string + scenarioId string + jobId string + ) + if v, ok := d.GetOk("job_id"); ok { + jobId = v.(string) + request.JobId = helper.String(v.(string)) + } + + if v, ok := d.GetOk("project_id"); ok { + projectId = v.(string) + request.ProjectId = helper.String(v.(string)) + } + + if v, ok := d.GetOk("scenario_id"); ok { + scenarioId = v.(string) + request.ScenarioId = helper.String(v.(string)) + } + + if v, _ := d.GetOk("abort_reason"); v != nil { + request.AbortReason = helper.IntInt64(v.(int)) + } + + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + result, e := meta.(*TencentCloudClient).apiV3Conn.UsePtsClient().AbortJob(request) + if e != nil { + return retryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s operate pts jobAbort failed, reason:%+v", logId, err) + return err + } + + d.SetId(projectId + FILED_SP + scenarioId + FILED_SP + jobId) + + return resourceTencentCloudPtsJobAbortRead(d, meta) +} + +func resourceTencentCloudPtsJobAbortRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_job_abort.read")() + defer inconsistentCheck(d, meta)() + + return nil +} + +func resourceTencentCloudPtsJobAbortDelete(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_pts_job_abort.delete")() + defer inconsistentCheck(d, meta)() + + return nil +} diff --git a/tencentcloud/resource_tc_pts_job_abort_test.go b/tencentcloud/resource_tc_pts_job_abort_test.go new file mode 100644 index 0000000000..cbbb569dd6 --- /dev/null +++ b/tencentcloud/resource_tc_pts_job_abort_test.go @@ -0,0 +1,35 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudNeedFixPtsJobAbortResource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccPtsJobAbort, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("tencentcloud_pts_job_abort.job_abort", "id"), + ), + }, + }, + }) +} + +const testAccPtsJobAbort = ` + +resource "tencentcloud_pts_job_abort" "job_abort" { + job_id = "job-my644ozi" + project_id = "project-45vw7v82" + scenario_id = "scenario-22q19f3k" +} + +` diff --git a/tencentcloud/service_tencentcloud_pts.go b/tencentcloud/service_tencentcloud_pts.go index 41ffdde4a9..c1ec363374 100644 --- a/tencentcloud/service_tencentcloud_pts.go +++ b/tencentcloud/service_tencentcloud_pts.go @@ -360,3 +360,75 @@ func (me *PtsService) DeletePtsCronJobById(ctx context.Context, cronJobId, proje return } + +func (me *PtsService) DescribePtsScenarioWithJobsByFilter(ctx context.Context, param map[string]interface{}) (scenarioWithJobs []*pts.ScenarioWithJobs, errRet error) { + var ( + logId = getLogId(ctx) + request = pts.NewDescribeScenarioWithJobsRequest() + ) + + 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()) + } + }() + + for k, v := range param { + if k == "ProjectIds" { + request.ProjectIds = v.([]*string) + } + if k == "ScenarioIds" { + request.ScenarioIds = v.([]*string) + } + if k == "ScenarioName" { + request.ScenarioName = v.(*string) + } + if k == "OrderBy" { + request.OrderBy = v.(*string) + } + if k == "Ascend" { + request.Ascend = v.(*bool) + } + if k == "IgnoreScript" { + request.IgnoreScript = v.(*bool) + } + if k == "IgnoreDataset" { + request.IgnoreDataset = v.(*bool) + } + if k == "ScenarioType" { + request.ScenarioType = v.(*string) + } + if k == "Owner" { + request.Owner = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset int64 = 0 + limit int64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UsePtsClient().DescribeScenarioWithJobs(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 || len(response.Response.ScenarioWithJobsSet) < 1 { + break + } + scenarioWithJobs = append(scenarioWithJobs, response.Response.ScenarioWithJobsSet...) + if len(response.Response.ScenarioWithJobsSet) < int(limit) { + break + } + + offset += limit + } + + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/client.go index 6c0bf3e878..54c0c3c840 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/client.go @@ -331,6 +331,7 @@ func NewCreateCronJobResponse() (response *CreateCronJobResponse) { // 创建定时任务 // // 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" func (c *Client) CreateCronJob(request *CreateCronJobRequest) (response *CreateCronJobResponse, err error) { return c.CreateCronJobWithContext(context.Background(), request) @@ -340,6 +341,7 @@ func (c *Client) CreateCronJob(request *CreateCronJobRequest) (response *CreateC // 创建定时任务 // // 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" func (c *Client) CreateCronJobWithContext(ctx context.Context, request *CreateCronJobRequest) (response *CreateCronJobResponse, err error) { if request == nil { @@ -913,15 +915,7 @@ func NewDescribeAlertChannelsResponse() (response *DescribeAlertChannelsResponse // 查询告警通知接收组 // // 可能返回的错误码: -// AUTHFAILURE = "AuthFailure" -// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" -// FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" -// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" -// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeAlertChannels(request *DescribeAlertChannelsRequest) (response *DescribeAlertChannelsResponse, err error) { return c.DescribeAlertChannelsWithContext(context.Background(), request) } @@ -930,15 +924,7 @@ func (c *Client) DescribeAlertChannels(request *DescribeAlertChannelsRequest) (r // 查询告警通知接收组 // // 可能返回的错误码: -// AUTHFAILURE = "AuthFailure" -// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" -// FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" -// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" -// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeAlertChannelsWithContext(ctx context.Context, request *DescribeAlertChannelsRequest) (response *DescribeAlertChannelsResponse, err error) { if request == nil { request = NewDescribeAlertChannelsRequest() @@ -977,15 +963,7 @@ func NewDescribeAlertRecordsResponse() (response *DescribeAlertRecordsResponse) // 返回告警历史项的列表 // // 可能返回的错误码: -// AUTHFAILURE = "AuthFailure" -// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" -// FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" -// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" -// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeAlertRecords(request *DescribeAlertRecordsRequest) (response *DescribeAlertRecordsResponse, err error) { return c.DescribeAlertRecordsWithContext(context.Background(), request) } @@ -994,15 +972,7 @@ func (c *Client) DescribeAlertRecords(request *DescribeAlertRecordsRequest) (res // 返回告警历史项的列表 // // 可能返回的错误码: -// AUTHFAILURE = "AuthFailure" -// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" -// FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" -// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" -// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeAlertRecordsWithContext(ctx context.Context, request *DescribeAlertRecordsRequest) (response *DescribeAlertRecordsResponse, err error) { if request == nil { request = NewDescribeAlertRecordsRequest() @@ -1041,15 +1011,7 @@ func NewDescribeAvailableMetricsResponse() (response *DescribeAvailableMetricsRe // 查询系统支持的指标 // // 可能返回的错误码: -// AUTHFAILURE = "AuthFailure" -// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" -// FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" -// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" -// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeAvailableMetrics(request *DescribeAvailableMetricsRequest) (response *DescribeAvailableMetricsResponse, err error) { return c.DescribeAvailableMetricsWithContext(context.Background(), request) } @@ -1058,15 +1020,7 @@ func (c *Client) DescribeAvailableMetrics(request *DescribeAvailableMetricsReque // 查询系统支持的指标 // // 可能返回的错误码: -// AUTHFAILURE = "AuthFailure" -// FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" -// FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" -// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" -// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeAvailableMetricsWithContext(ctx context.Context, request *DescribeAvailableMetricsRequest) (response *DescribeAvailableMetricsResponse, err error) { if request == nil { request = NewDescribeAvailableMetricsRequest() @@ -1189,6 +1143,64 @@ func (c *Client) DescribeCronJobsWithContext(ctx context.Context, request *Descr return } +func NewDescribeErrorSummaryRequest() (request *DescribeErrorSummaryRequest) { + request = &DescribeErrorSummaryRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("pts", APIVersion, "DescribeErrorSummary") + + + return +} + +func NewDescribeErrorSummaryResponse() (response *DescribeErrorSummaryResponse) { + response = &DescribeErrorSummaryResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeErrorSummary +// 查询错误详情汇总信息 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeErrorSummary(request *DescribeErrorSummaryRequest) (response *DescribeErrorSummaryResponse, err error) { + return c.DescribeErrorSummaryWithContext(context.Background(), request) +} + +// DescribeErrorSummary +// 查询错误详情汇总信息 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeErrorSummaryWithContext(ctx context.Context, request *DescribeErrorSummaryRequest) (response *DescribeErrorSummaryResponse, err error) { + if request == nil { + request = NewDescribeErrorSummaryRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeErrorSummary require credential") + } + + request.SetContext(ctx) + + response = NewDescribeErrorSummaryResponse() + err = c.Send(request, response) + return +} + func NewDescribeFilesRequest() (request *DescribeFilesRequest) { request = &DescribeFilesRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1211,7 +1223,12 @@ func NewDescribeFilesResponse() (response *DescribeFilesResponse) { // 查询文件列表 // // 可能返回的错误码: -// FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeFiles(request *DescribeFilesRequest) (response *DescribeFilesResponse, err error) { return c.DescribeFilesWithContext(context.Background(), request) } @@ -1220,7 +1237,12 @@ func (c *Client) DescribeFiles(request *DescribeFilesRequest) (response *Describ // 查询文件列表 // // 可能返回的错误码: -// FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeFilesWithContext(ctx context.Context, request *DescribeFilesRequest) (response *DescribeFilesResponse, err error) { if request == nil { request = NewDescribeFilesRequest() @@ -1432,7 +1454,7 @@ func NewDescribeNormalLogsResponse() (response *DescribeNormalLogsResponse) { } // DescribeNormalLogs -// 压测过程日志日志包括引擎输出日志及用户输出日志 +// 压测过程日志包括引擎输出日志及用户输出日志 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" @@ -1446,7 +1468,7 @@ func (c *Client) DescribeNormalLogs(request *DescribeNormalLogsRequest) (respons } // DescribeNormalLogs -// 压测过程日志日志包括引擎输出日志及用户输出日志 +// 压测过程日志包括引擎输出日志及用户输出日志 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" @@ -1494,6 +1516,7 @@ func NewDescribeProjectsResponse() (response *DescribeProjectsResponse) { // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" +// AUTHFAILURE_UNAUTHORIZEDOPERATION = "AuthFailure.UnauthorizedOperation" // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_ACCESSTAGFAIL = "FailedOperation.AccessTagFail" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" @@ -1505,6 +1528,7 @@ func NewDescribeProjectsResponse() (response *DescribeProjectsResponse) { // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" func (c *Client) DescribeProjects(request *DescribeProjectsRequest) (response *DescribeProjectsResponse, err error) { return c.DescribeProjectsWithContext(context.Background(), request) } @@ -1514,6 +1538,7 @@ func (c *Client) DescribeProjects(request *DescribeProjectsRequest) (response *D // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" +// AUTHFAILURE_UNAUTHORIZEDOPERATION = "AuthFailure.UnauthorizedOperation" // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_ACCESSTAGFAIL = "FailedOperation.AccessTagFail" // FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" @@ -1525,6 +1550,7 @@ func (c *Client) DescribeProjects(request *DescribeProjectsRequest) (response *D // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" func (c *Client) DescribeProjectsWithContext(ctx context.Context, request *DescribeProjectsRequest) (response *DescribeProjectsResponse, err error) { if request == nil { request = NewDescribeProjectsRequest() @@ -1961,6 +1987,7 @@ func NewDescribeScenarioWithJobsResponse() (response *DescribeScenarioWithJobsRe // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" @@ -1974,6 +2001,7 @@ func (c *Client) DescribeScenarioWithJobs(request *DescribeScenarioWithJobsReque // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DBQUERYFAILED = "FailedOperation.DbQueryFailed" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" @@ -2192,12 +2220,14 @@ func NewStartJobResponse() (response *StartJobResponse) { // AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" +// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" // FAILEDOPERATION_NOTASKSINJOB = "FailedOperation.NoTasksInJob" // FAILEDOPERATION_NOTSUPPORTEDINENV = "FailedOperation.NotSupportedInEnv" // FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" func (c *Client) StartJob(request *StartJobRequest) (response *StartJobResponse, err error) { return c.StartJobWithContext(context.Background(), request) } @@ -2209,12 +2239,14 @@ func (c *Client) StartJob(request *StartJobRequest) (response *StartJobResponse, // AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_DBRECORDCREATEFAILED = "FailedOperation.DbRecordCreateFailed" +// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" // FAILEDOPERATION_NOTASKSINJOB = "FailedOperation.NoTasksInJob" // FAILEDOPERATION_NOTSUPPORTEDINENV = "FailedOperation.NotSupportedInEnv" // FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" func (c *Client) StartJobWithContext(ctx context.Context, request *StartJobRequest) (response *StartJobResponse, err error) { if request == nil { request = NewStartJobRequest() @@ -2253,6 +2285,7 @@ func NewUpdateCronJobResponse() (response *UpdateCronJobResponse) { // 更新定时任务 // // 可能返回的错误码: +// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" // FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" func (c *Client) UpdateCronJob(request *UpdateCronJobRequest) (response *UpdateCronJobResponse, err error) { return c.UpdateCronJobWithContext(context.Background(), request) @@ -2262,6 +2295,7 @@ func (c *Client) UpdateCronJob(request *UpdateCronJobRequest) (response *UpdateC // 更新定时任务 // // 可能返回的错误码: +// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" // FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" func (c *Client) UpdateCronJobWithContext(ctx context.Context, request *UpdateCronJobRequest) (response *UpdateCronJobResponse, err error) { if request == nil { @@ -2301,6 +2335,7 @@ func NewUpdateFileScenarioRelationResponse() (response *UpdateFileScenarioRelati // 更新关联文件场景 // // 可能返回的错误码: +// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" // FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" func (c *Client) UpdateFileScenarioRelation(request *UpdateFileScenarioRelationRequest) (response *UpdateFileScenarioRelationResponse, err error) { return c.UpdateFileScenarioRelationWithContext(context.Background(), request) @@ -2310,6 +2345,7 @@ func (c *Client) UpdateFileScenarioRelation(request *UpdateFileScenarioRelationR // 更新关联文件场景 // // 可能返回的错误码: +// FAILEDOPERATION_DBRECORDUPDATEFAILED = "FailedOperation.DbRecordUpdateFailed" // FAILEDOPERATION_RESOURCENOTFOUND = "FailedOperation.ResourceNotFound" func (c *Client) UpdateFileScenarioRelationWithContext(ctx context.Context, request *UpdateFileScenarioRelationRequest) (response *UpdateFileScenarioRelationResponse, err error) { if request == nil { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/errors.go index 65057f9d74..0c95c546af 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/errors.go @@ -20,6 +20,9 @@ const ( // CAM签名/鉴权错误。 AUTHFAILURE = "AuthFailure" + // 当前请求未经CAM授权。 + AUTHFAILURE_UNAUTHORIZEDOPERATION = "AuthFailure.UnauthorizedOperation" + // 操作失败。 FAILEDOPERATION = "FailedOperation" @@ -59,6 +62,12 @@ const ( // 参数取值错误。 INVALIDPARAMETERVALUE = "InvalidParameterValue" + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + // 资源不存在。 RESOURCENOTFOUND = "ResourceNotFound" + + // 未授权操作。 + UNAUTHORIZEDOPERATION = "UnauthorizedOperation" ) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/models.go index 916dd5b84b..a9f284abf0 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728/models.go @@ -15,28 +15,28 @@ package v20210728 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" ) // Predefined struct for user type AbortCronJobsRequestParams struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` } type AbortCronJobsRequest struct { *tchttp.BaseRequest // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` } func (r *AbortCronJobsRequest) ToJsonString() string { @@ -62,7 +62,7 @@ func (r *AbortCronJobsRequest) FromJsonString(s string) error { // Predefined struct for user type AbortCronJobsResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type AbortCronJobsResponse struct { @@ -84,32 +84,32 @@ func (r *AbortCronJobsResponse) FromJsonString(s string) error { // Predefined struct for user type AbortJobRequestParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 中断原因 - AbortReason *int64 `json:"AbortReason,omitempty" name:"AbortReason"` + AbortReason *int64 `json:"AbortReason,omitnil" name:"AbortReason"` } type AbortJobRequest struct { *tchttp.BaseRequest // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 中断原因 - AbortReason *int64 `json:"AbortReason,omitempty" name:"AbortReason"` + AbortReason *int64 `json:"AbortReason,omitnil" name:"AbortReason"` } func (r *AbortJobRequest) ToJsonString() string { @@ -137,7 +137,7 @@ func (r *AbortJobRequest) FromJsonString(s string) error { // Predefined struct for user type AbortJobResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type AbortJobResponse struct { @@ -159,20 +159,20 @@ func (r *AbortJobResponse) FromJsonString(s string) error { // Predefined struct for user type AdjustJobSpeedRequestParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 目标RPS - TargetRequestsPerSecond *int64 `json:"TargetRequestsPerSecond,omitempty" name:"TargetRequestsPerSecond"` + TargetRequestsPerSecond *int64 `json:"TargetRequestsPerSecond,omitnil" name:"TargetRequestsPerSecond"` } type AdjustJobSpeedRequest struct { *tchttp.BaseRequest // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 目标RPS - TargetRequestsPerSecond *int64 `json:"TargetRequestsPerSecond,omitempty" name:"TargetRequestsPerSecond"` + TargetRequestsPerSecond *int64 `json:"TargetRequestsPerSecond,omitnil" name:"TargetRequestsPerSecond"` } func (r *AdjustJobSpeedRequest) ToJsonString() string { @@ -198,7 +198,7 @@ func (r *AdjustJobSpeedRequest) FromJsonString(s string) error { // Predefined struct for user type AdjustJobSpeedResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type AdjustJobSpeedResponse struct { @@ -219,205 +219,209 @@ func (r *AdjustJobSpeedResponse) FromJsonString(s string) error { type AggregationLegend struct { // 指标支持的聚合函数 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 聚合函数作用于指标后对应的描述 - Legend *string `json:"Legend,omitempty" name:"Legend"` + Legend *string `json:"Legend,omitnil" name:"Legend"` // 聚合之后的指标单位 - Unit *string `json:"Unit,omitempty" name:"Unit"` + Unit *string `json:"Unit,omitnil" name:"Unit"` } type AlertChannel struct { // 通知模板ID // 注意:此字段可能返回 null,表示取不到有效值。 - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` // AMP consumer ID // 注意:此字段可能返回 null,表示取不到有效值。 - AMPConsumerId *string `json:"AMPConsumerId,omitempty" name:"AMPConsumerId"` + AMPConsumerId *string `json:"AMPConsumerId,omitnil" name:"AMPConsumerId"` } type AlertChannelRecord struct { // Notice ID // 注意:此字段可能返回 null,表示取不到有效值。 - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` // Consumer ID // 注意:此字段可能返回 null,表示取不到有效值。 - AMPConsumerId *string `json:"AMPConsumerId,omitempty" name:"AMPConsumerId"` + AMPConsumerId *string `json:"AMPConsumerId,omitnil" name:"AMPConsumerId"` // 项目 ID // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 状态 // 注意:此字段可能返回 null,表示取不到有效值。 - Status *uint64 `json:"Status,omitempty" name:"Status"` + Status *uint64 `json:"Status,omitnil" name:"Status"` // 创建时间 // 注意:此字段可能返回 null,表示取不到有效值。 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 更新时间 // 注意:此字段可能返回 null,表示取不到有效值。 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // App ID // 注意:此字段可能返回 null,表示取不到有效值。 - AppId *int64 `json:"AppId,omitempty" name:"AppId"` + AppId *int64 `json:"AppId,omitnil" name:"AppId"` // 主账号 // 注意:此字段可能返回 null,表示取不到有效值。 - Uin *string `json:"Uin,omitempty" name:"Uin"` + Uin *string `json:"Uin,omitnil" name:"Uin"` // 子账号 // 注意:此字段可能返回 null,表示取不到有效值。 - SubAccountUin *string `json:"SubAccountUin,omitempty" name:"SubAccountUin"` + SubAccountUin *string `json:"SubAccountUin,omitnil" name:"SubAccountUin"` } type AlertRecord struct { // 告警历史记录项 ID // 注意:此字段可能返回 null,表示取不到有效值。 - AlertRecordId *string `json:"AlertRecordId,omitempty" name:"AlertRecordId"` + AlertRecordId *string `json:"AlertRecordId,omitnil" name:"AlertRecordId"` // 项目 ID // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景 ID // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 状态 // 注意:此字段可能返回 null,表示取不到有效值。 - Status *AlertRecordStatus `json:"Status,omitempty" name:"Status"` + Status *AlertRecordStatus `json:"Status,omitnil" name:"Status"` // 创建时间 // 注意:此字段可能返回 null,表示取不到有效值。 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 修改时间 // 注意:此字段可能返回 null,表示取不到有效值。 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // 任务 ID // 注意:此字段可能返回 null,表示取不到有效值。 - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // App ID // 注意:此字段可能返回 null,表示取不到有效值。 - AppId *int64 `json:"AppId,omitempty" name:"AppId"` + AppId *int64 `json:"AppId,omitnil" name:"AppId"` // 主账号 // 注意:此字段可能返回 null,表示取不到有效值。 - Uin *string `json:"Uin,omitempty" name:"Uin"` + Uin *string `json:"Uin,omitnil" name:"Uin"` // 子账号 // 注意:此字段可能返回 null,表示取不到有效值。 - SubAccountUin *string `json:"SubAccountUin,omitempty" name:"SubAccountUin"` + SubAccountUin *string `json:"SubAccountUin,omitnil" name:"SubAccountUin"` // 场景名称 // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 告警对象 // 注意:此字段可能返回 null,表示取不到有效值。 - Target *string `json:"Target,omitempty" name:"Target"` + Target *string `json:"Target,omitnil" name:"Target"` // 告警规则 ID // 注意:此字段可能返回 null,表示取不到有效值。 - JobSLAId *string `json:"JobSLAId,omitempty" name:"JobSLAId"` + JobSLAId *string `json:"JobSLAId,omitnil" name:"JobSLAId"` // 告警规则描述 // 注意:此字段可能返回 null,表示取不到有效值。 - JobSLADescription *string `json:"JobSLADescription,omitempty" name:"JobSLADescription"` + JobSLADescription *string `json:"JobSLADescription,omitnil" name:"JobSLADescription"` } type AlertRecordStatus struct { // 停止压测任务成功与否 // 注意:此字段可能返回 null,表示取不到有效值。 - AbortJob *uint64 `json:"AbortJob,omitempty" name:"AbortJob"` + AbortJob *uint64 `json:"AbortJob,omitnil" name:"AbortJob"` // 发送告警通知成功与否 // 注意:此字段可能返回 null,表示取不到有效值。 - SendNotice *uint64 `json:"SendNotice,omitempty" name:"SendNotice"` + SendNotice *uint64 `json:"SendNotice,omitnil" name:"SendNotice"` } type Attributes struct { // 采用请求返回码 // 注意:此字段可能返回 null,表示取不到有效值。 - Status *string `json:"Status,omitempty" name:"Status"` + Status *string `json:"Status,omitnil" name:"Status"` // 采样请求结果码 // 注意:此字段可能返回 null,表示取不到有效值。 - Result *string `json:"Result,omitempty" name:"Result"` + Result *string `json:"Result,omitnil" name:"Result"` // 采样请求API // 注意:此字段可能返回 null,表示取不到有效值。 - Service *string `json:"Service,omitempty" name:"Service"` + Service *string `json:"Service,omitnil" name:"Service"` // 采样请求调用方法 // 注意:此字段可能返回 null,表示取不到有效值。 - Method *string `json:"Method,omitempty" name:"Method"` + Method *string `json:"Method,omitnil" name:"Method"` // 采样请求延时时间 // 注意:此字段可能返回 null,表示取不到有效值。 - Duration *string `json:"Duration,omitempty" name:"Duration"` + Duration *string `json:"Duration,omitnil" name:"Duration"` } type CheckSummary struct { // 检查点名字 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 检查点所在步骤名字 - Step *string `json:"Step,omitempty" name:"Step"` + Step *string `json:"Step,omitnil" name:"Step"` // 检查点成功次数 - SuccessCount *int64 `json:"SuccessCount,omitempty" name:"SuccessCount"` + SuccessCount *int64 `json:"SuccessCount,omitnil" name:"SuccessCount"` // 检查失败次数 - FailCount *int64 `json:"FailCount,omitempty" name:"FailCount"` + FailCount *int64 `json:"FailCount,omitnil" name:"FailCount"` // 错误比例 - ErrorRate *float64 `json:"ErrorRate,omitempty" name:"ErrorRate"` + ErrorRate *float64 `json:"ErrorRate,omitnil" name:"ErrorRate"` } type Concurrency struct { // 多阶段配置数组 // 注意:此字段可能返回 null,表示取不到有效值。 - Stages []*Stage `json:"Stages,omitempty" name:"Stages"` + Stages []*Stage `json:"Stages,omitnil" name:"Stages"` // 运行次数 // 注意:此字段可能返回 null,表示取不到有效值。 - IterationCount *int64 `json:"IterationCount,omitempty" name:"IterationCount"` + IterationCount *int64 `json:"IterationCount,omitnil" name:"IterationCount"` // 最大RPS // 注意:此字段可能返回 null,表示取不到有效值。 - MaxRequestsPerSecond *int64 `json:"MaxRequestsPerSecond,omitempty" name:"MaxRequestsPerSecond"` + MaxRequestsPerSecond *int64 `json:"MaxRequestsPerSecond,omitnil" name:"MaxRequestsPerSecond"` // 优雅终止任务的等待时间 // 注意:此字段可能返回 null,表示取不到有效值。 - GracefulStopSeconds *int64 `json:"GracefulStopSeconds,omitempty" name:"GracefulStopSeconds"` + GracefulStopSeconds *int64 `json:"GracefulStopSeconds,omitnil" name:"GracefulStopSeconds"` + + // 资源数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Resources *int64 `json:"Resources,omitnil" name:"Resources"` } // Predefined struct for user type CopyScenarioRequestParams struct { // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景 ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` } type CopyScenarioRequest struct { *tchttp.BaseRequest // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景 ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` } func (r *CopyScenarioRequest) ToJsonString() string { @@ -443,10 +447,10 @@ func (r *CopyScenarioRequest) FromJsonString(s string) error { // Predefined struct for user type CopyScenarioResponseParams struct { // 复制出的新场景 ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type CopyScenarioResponse struct { @@ -468,26 +472,26 @@ func (r *CopyScenarioResponse) FromJsonString(s string) error { // Predefined struct for user type CreateAlertChannelRequestParams struct { // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // AMP Consumer ID - AMPConsumerId *string `json:"AMPConsumerId,omitempty" name:"AMPConsumerId"` + AMPConsumerId *string `json:"AMPConsumerId,omitnil" name:"AMPConsumerId"` } type CreateAlertChannelRequest struct { *tchttp.BaseRequest // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // AMP Consumer ID - AMPConsumerId *string `json:"AMPConsumerId,omitempty" name:"AMPConsumerId"` + AMPConsumerId *string `json:"AMPConsumerId,omitnil" name:"AMPConsumerId"` } func (r *CreateAlertChannelRequest) ToJsonString() string { @@ -514,7 +518,7 @@ func (r *CreateAlertChannelRequest) FromJsonString(s string) error { // Predefined struct for user type CreateAlertChannelResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type CreateAlertChannelResponse struct { @@ -536,68 +540,68 @@ func (r *CreateAlertChannelResponse) FromJsonString(s string) error { // Predefined struct for user type CreateCronJobRequestParams struct { // 定时任务名字 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名称 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 执行频率类型,1:只执行一次; 2:日粒度; 3:周粒度; 4:高级 - FrequencyType *int64 `json:"FrequencyType,omitempty" name:"FrequencyType"` + FrequencyType *int64 `json:"FrequencyType,omitnil" name:"FrequencyType"` // cron表达式 - CronExpression *string `json:"CronExpression,omitempty" name:"CronExpression"` + CronExpression *string `json:"CronExpression,omitnil" name:"CronExpression"` // 任务发起人 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` // 结束时间 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` // 备注 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` } type CreateCronJobRequest struct { *tchttp.BaseRequest // 定时任务名字 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名称 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 执行频率类型,1:只执行一次; 2:日粒度; 3:周粒度; 4:高级 - FrequencyType *int64 `json:"FrequencyType,omitempty" name:"FrequencyType"` + FrequencyType *int64 `json:"FrequencyType,omitnil" name:"FrequencyType"` // cron表达式 - CronExpression *string `json:"CronExpression,omitempty" name:"CronExpression"` + CronExpression *string `json:"CronExpression,omitnil" name:"CronExpression"` // 任务发起人 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` // 结束时间 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` // 备注 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` } func (r *CreateCronJobRequest) ToJsonString() string { @@ -631,10 +635,10 @@ func (r *CreateCronJobRequest) FromJsonString(s string) error { // Predefined struct for user type CreateCronJobResponseParams struct { // 定时任务ID - CronJobId *string `json:"CronJobId,omitempty" name:"CronJobId"` + CronJobId *string `json:"CronJobId,omitnil" name:"CronJobId"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type CreateCronJobResponse struct { @@ -656,80 +660,80 @@ func (r *CreateCronJobResponse) FromJsonString(s string) error { // Predefined struct for user type CreateFileRequestParams struct { // 文件 ID - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 文件种类,参数文件-1,协议文件-2,请求文件-3 - Kind *int64 `json:"Kind,omitempty" name:"Kind"` + Kind *int64 `json:"Kind,omitnil" name:"Kind"` // 文件名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 文件大小 - Size *int64 `json:"Size,omitempty" name:"Size"` + Size *int64 `json:"Size,omitnil" name:"Size"` // 文件类型,文件夹-folder - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 行数 - LineCount *int64 `json:"LineCount,omitempty" name:"LineCount"` + LineCount *int64 `json:"LineCount,omitnil" name:"LineCount"` // 前几行数据 - HeadLines []*string `json:"HeadLines,omitempty" name:"HeadLines"` + HeadLines []*string `json:"HeadLines,omitnil" name:"HeadLines"` // 后几行数据 - TailLines []*string `json:"TailLines,omitempty" name:"TailLines"` + TailLines []*string `json:"TailLines,omitnil" name:"TailLines"` // 表头是否在文件内 - HeaderInFile *bool `json:"HeaderInFile,omitempty" name:"HeaderInFile"` + HeaderInFile *bool `json:"HeaderInFile,omitnil" name:"HeaderInFile"` // 表头 - HeaderColumns []*string `json:"HeaderColumns,omitempty" name:"HeaderColumns"` + HeaderColumns []*string `json:"HeaderColumns,omitnil" name:"HeaderColumns"` // 文件夹中的文件 - FileInfos []*FileInfo `json:"FileInfos,omitempty" name:"FileInfos"` + FileInfos []*FileInfo `json:"FileInfos,omitnil" name:"FileInfos"` } type CreateFileRequest struct { *tchttp.BaseRequest // 文件 ID - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 文件种类,参数文件-1,协议文件-2,请求文件-3 - Kind *int64 `json:"Kind,omitempty" name:"Kind"` + Kind *int64 `json:"Kind,omitnil" name:"Kind"` // 文件名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 文件大小 - Size *int64 `json:"Size,omitempty" name:"Size"` + Size *int64 `json:"Size,omitnil" name:"Size"` // 文件类型,文件夹-folder - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 行数 - LineCount *int64 `json:"LineCount,omitempty" name:"LineCount"` + LineCount *int64 `json:"LineCount,omitnil" name:"LineCount"` // 前几行数据 - HeadLines []*string `json:"HeadLines,omitempty" name:"HeadLines"` + HeadLines []*string `json:"HeadLines,omitnil" name:"HeadLines"` // 后几行数据 - TailLines []*string `json:"TailLines,omitempty" name:"TailLines"` + TailLines []*string `json:"TailLines,omitnil" name:"TailLines"` // 表头是否在文件内 - HeaderInFile *bool `json:"HeaderInFile,omitempty" name:"HeaderInFile"` + HeaderInFile *bool `json:"HeaderInFile,omitnil" name:"HeaderInFile"` // 表头 - HeaderColumns []*string `json:"HeaderColumns,omitempty" name:"HeaderColumns"` + HeaderColumns []*string `json:"HeaderColumns,omitnil" name:"HeaderColumns"` // 文件夹中的文件 - FileInfos []*FileInfo `json:"FileInfos,omitempty" name:"FileInfos"` + FileInfos []*FileInfo `json:"FileInfos,omitnil" name:"FileInfos"` } func (r *CreateFileRequest) ToJsonString() string { @@ -765,7 +769,7 @@ func (r *CreateFileRequest) FromJsonString(s string) error { // Predefined struct for user type CreateFileResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type CreateFileResponse struct { @@ -787,26 +791,26 @@ func (r *CreateFileResponse) FromJsonString(s string) error { // Predefined struct for user type CreateProjectRequestParams struct { // 项目名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 标签数组 - Tags []*TagSpec `json:"Tags,omitempty" name:"Tags"` + Tags []*TagSpec `json:"Tags,omitnil" name:"Tags"` } type CreateProjectRequest struct { *tchttp.BaseRequest // 项目名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 标签数组 - Tags []*TagSpec `json:"Tags,omitempty" name:"Tags"` + Tags []*TagSpec `json:"Tags,omitnil" name:"Tags"` } func (r *CreateProjectRequest) ToJsonString() string { @@ -833,10 +837,10 @@ func (r *CreateProjectRequest) FromJsonString(s string) error { // Predefined struct for user type CreateProjectResponseParams struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type CreateProjectResponse struct { @@ -858,110 +862,116 @@ func (r *CreateProjectResponse) FromJsonString(s string) error { // Predefined struct for user type CreateScenarioRequestParams struct { // 场景名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 压测引擎类型 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 施压配置 - Load *Load `json:"Load,omitempty" name:"Load"` + Load *Load `json:"Load,omitnil" name:"Load"` // deprecated - Configs []*string `json:"Configs,omitempty" name:"Configs"` + Configs []*string `json:"Configs,omitnil" name:"Configs"` // 测试数据集 - Datasets []*TestData `json:"Datasets,omitempty" name:"Datasets"` + Datasets []*TestData `json:"Datasets,omitnil" name:"Datasets"` // deprecated - Extensions []*string `json:"Extensions,omitempty" name:"Extensions"` + Extensions []*string `json:"Extensions,omitnil" name:"Extensions"` // deprecated - SLAId *string `json:"SLAId,omitempty" name:"SLAId"` + SLAId *string `json:"SLAId,omitnil" name:"SLAId"` // cron job ID - CronId *string `json:"CronId,omitempty" name:"CronId"` + CronId *string `json:"CronId,omitnil" name:"CronId"` // deprecated - Scripts []*string `json:"Scripts,omitempty" name:"Scripts"` + Scripts []*string `json:"Scripts,omitnil" name:"Scripts"` // 测试脚本文件信息 - TestScripts []*ScriptInfo `json:"TestScripts,omitempty" name:"TestScripts"` + TestScripts []*ScriptInfo `json:"TestScripts,omitnil" name:"TestScripts"` // 协议文件路径 - Protocols []*ProtocolInfo `json:"Protocols,omitempty" name:"Protocols"` + Protocols []*ProtocolInfo `json:"Protocols,omitnil" name:"Protocols"` // 请求文件路径 - RequestFiles []*FileInfo `json:"RequestFiles,omitempty" name:"RequestFiles"` + RequestFiles []*FileInfo `json:"RequestFiles,omitnil" name:"RequestFiles"` // SLA 策略 - SLAPolicy *SLAPolicy `json:"SLAPolicy,omitempty" name:"SLAPolicy"` + SLAPolicy *SLAPolicy `json:"SLAPolicy,omitnil" name:"SLAPolicy"` // 拓展包文件路径 - Plugins []*FileInfo `json:"Plugins,omitempty" name:"Plugins"` + Plugins []*FileInfo `json:"Plugins,omitnil" name:"Plugins"` // 域名解析配置 - DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitempty" name:"DomainNameConfig"` + DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitnil" name:"DomainNameConfig"` + + // 创建人名 + Owner *string `json:"Owner,omitnil" name:"Owner"` } type CreateScenarioRequest struct { *tchttp.BaseRequest // 场景名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 压测引擎类型 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 施压配置 - Load *Load `json:"Load,omitempty" name:"Load"` + Load *Load `json:"Load,omitnil" name:"Load"` // deprecated - Configs []*string `json:"Configs,omitempty" name:"Configs"` + Configs []*string `json:"Configs,omitnil" name:"Configs"` // 测试数据集 - Datasets []*TestData `json:"Datasets,omitempty" name:"Datasets"` + Datasets []*TestData `json:"Datasets,omitnil" name:"Datasets"` // deprecated - Extensions []*string `json:"Extensions,omitempty" name:"Extensions"` + Extensions []*string `json:"Extensions,omitnil" name:"Extensions"` // deprecated - SLAId *string `json:"SLAId,omitempty" name:"SLAId"` + SLAId *string `json:"SLAId,omitnil" name:"SLAId"` // cron job ID - CronId *string `json:"CronId,omitempty" name:"CronId"` + CronId *string `json:"CronId,omitnil" name:"CronId"` // deprecated - Scripts []*string `json:"Scripts,omitempty" name:"Scripts"` + Scripts []*string `json:"Scripts,omitnil" name:"Scripts"` // 测试脚本文件信息 - TestScripts []*ScriptInfo `json:"TestScripts,omitempty" name:"TestScripts"` + TestScripts []*ScriptInfo `json:"TestScripts,omitnil" name:"TestScripts"` // 协议文件路径 - Protocols []*ProtocolInfo `json:"Protocols,omitempty" name:"Protocols"` + Protocols []*ProtocolInfo `json:"Protocols,omitnil" name:"Protocols"` // 请求文件路径 - RequestFiles []*FileInfo `json:"RequestFiles,omitempty" name:"RequestFiles"` + RequestFiles []*FileInfo `json:"RequestFiles,omitnil" name:"RequestFiles"` // SLA 策略 - SLAPolicy *SLAPolicy `json:"SLAPolicy,omitempty" name:"SLAPolicy"` + SLAPolicy *SLAPolicy `json:"SLAPolicy,omitnil" name:"SLAPolicy"` // 拓展包文件路径 - Plugins []*FileInfo `json:"Plugins,omitempty" name:"Plugins"` + Plugins []*FileInfo `json:"Plugins,omitnil" name:"Plugins"` // 域名解析配置 - DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitempty" name:"DomainNameConfig"` + DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitnil" name:"DomainNameConfig"` + + // 创建人名 + Owner *string `json:"Owner,omitnil" name:"Owner"` } func (r *CreateScenarioRequest) ToJsonString() string { @@ -993,6 +1003,7 @@ func (r *CreateScenarioRequest) FromJsonString(s string) error { delete(f, "SLAPolicy") delete(f, "Plugins") delete(f, "DomainNameConfig") + delete(f, "Owner") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateScenarioRequest has unknown keys!", "") } @@ -1002,10 +1013,10 @@ func (r *CreateScenarioRequest) FromJsonString(s string) error { // Predefined struct for user type CreateScenarioResponseParams struct { // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type CreateScenarioResponse struct { @@ -1026,154 +1037,154 @@ func (r *CreateScenarioResponse) FromJsonString(s string) error { type Credentials struct { // 临时secret ID - TmpSecretId *string `json:"TmpSecretId,omitempty" name:"TmpSecretId"` + TmpSecretId *string `json:"TmpSecretId,omitnil" name:"TmpSecretId"` // 临时secret key - TmpSecretKey *string `json:"TmpSecretKey,omitempty" name:"TmpSecretKey"` + TmpSecretKey *string `json:"TmpSecretKey,omitnil" name:"TmpSecretKey"` // 临时token - Token *string `json:"Token,omitempty" name:"Token"` + Token *string `json:"Token,omitnil" name:"Token"` } type CronJob struct { // 定时任务ID // 注意:此字段可能返回 null,表示取不到有效值。 - CronJobId *string `json:"CronJobId,omitempty" name:"CronJobId"` + CronJobId *string `json:"CronJobId,omitnil" name:"CronJobId"` // 定时任务名字 // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目ID // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名称 // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // cron 表达式 // 注意:此字段可能返回 null,表示取不到有效值。 - CronExpression *string `json:"CronExpression,omitempty" name:"CronExpression"` + CronExpression *string `json:"CronExpression,omitnil" name:"CronExpression"` // 结束时间 // 注意:此字段可能返回 null,表示取不到有效值。 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // 中止原因 // 注意:此字段可能返回 null,表示取不到有效值。 - AbortReason *int64 `json:"AbortReason,omitempty" name:"AbortReason"` + AbortReason *int64 `json:"AbortReason,omitnil" name:"AbortReason"` // 定时任务状态 // 注意:此字段可能返回 null,表示取不到有效值。 - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // Notice ID // 注意:此字段可能返回 null,表示取不到有效值。 - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` // 创建时间 // 注意:此字段可能返回 null,表示取不到有效值。 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 更新时间 // 注意:此字段可能返回 null,表示取不到有效值。 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // 执行频率类型 // 注意:此字段可能返回 null,表示取不到有效值。 - FrequencyType *int64 `json:"FrequencyType,omitempty" name:"FrequencyType"` + FrequencyType *int64 `json:"FrequencyType,omitnil" name:"FrequencyType"` // 备注 // 注意:此字段可能返回 null,表示取不到有效值。 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` // tom // 注意:此字段可能返回 null,表示取不到有效值。 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` // App ID // 注意:此字段可能返回 null,表示取不到有效值。 - AppId *int64 `json:"AppId,omitempty" name:"AppId"` + AppId *int64 `json:"AppId,omitnil" name:"AppId"` // 主账号 // 注意:此字段可能返回 null,表示取不到有效值。 - Uin *string `json:"Uin,omitempty" name:"Uin"` + Uin *string `json:"Uin,omitnil" name:"Uin"` // 子账号 // 注意:此字段可能返回 null,表示取不到有效值。 - SubAccountUin *string `json:"SubAccountUin,omitempty" name:"SubAccountUin"` + SubAccountUin *string `json:"SubAccountUin,omitnil" name:"SubAccountUin"` } type CustomSample struct { // 指标名 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 聚合条件 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 过滤条件 // 注意:此字段可能返回 null,表示取不到有效值。 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` + Labels []*Label `json:"Labels,omitnil" name:"Labels"` // 查询值 - Value *float64 `json:"Value,omitempty" name:"Value"` + Value *float64 `json:"Value,omitnil" name:"Value"` // Time is the number of milliseconds since the epoch // // (1970-01-01 00:00 UTC) excluding leap seconds. - Timestamp *int64 `json:"Timestamp,omitempty" name:"Timestamp"` + Timestamp *int64 `json:"Timestamp,omitnil" name:"Timestamp"` // 指标对应的单位,当前单位有:s,bytes,bytes/s,reqs,reqs/s,checks,checks/s,iters,iters/s,VUs, % - Unit *string `json:"Unit,omitempty" name:"Unit"` + Unit *string `json:"Unit,omitnil" name:"Unit"` // 指标序列名字 // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` } type CustomSampleMatrix struct { // 指标名字 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 聚合函数 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 指标单位 // 注意:此字段可能返回 null,表示取不到有效值。 - Unit *string `json:"Unit,omitempty" name:"Unit"` + Unit *string `json:"Unit,omitnil" name:"Unit"` // 指标序列数组 // 注意:此字段可能返回 null,表示取不到有效值。 - Streams []*SampleStream `json:"Streams,omitempty" name:"Streams"` + Streams []*SampleStream `json:"Streams,omitnil" name:"Streams"` } type DNSConfig struct { // DNS IP 列表 // 注意:此字段可能返回 null,表示取不到有效值。 - Nameservers []*string `json:"Nameservers,omitempty" name:"Nameservers"` + Nameservers []*string `json:"Nameservers,omitnil" name:"Nameservers"` } // Predefined struct for user type DeleteAlertChannelRequestParams struct { // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` } type DeleteAlertChannelRequest struct { *tchttp.BaseRequest // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` } func (r *DeleteAlertChannelRequest) ToJsonString() string { @@ -1199,7 +1210,7 @@ func (r *DeleteAlertChannelRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteAlertChannelResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DeleteAlertChannelResponse struct { @@ -1221,20 +1232,20 @@ func (r *DeleteAlertChannelResponse) FromJsonString(s string) error { // Predefined struct for user type DeleteCronJobsRequestParams struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` } type DeleteCronJobsRequest struct { *tchttp.BaseRequest // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` } func (r *DeleteCronJobsRequest) ToJsonString() string { @@ -1260,7 +1271,7 @@ func (r *DeleteCronJobsRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteCronJobsResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DeleteCronJobsResponse struct { @@ -1282,20 +1293,20 @@ func (r *DeleteCronJobsResponse) FromJsonString(s string) error { // Predefined struct for user type DeleteFilesRequestParams struct { // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 文件 ID 数组 - FileIds []*string `json:"FileIds,omitempty" name:"FileIds"` + FileIds []*string `json:"FileIds,omitnil" name:"FileIds"` } type DeleteFilesRequest struct { *tchttp.BaseRequest // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 文件 ID 数组 - FileIds []*string `json:"FileIds,omitempty" name:"FileIds"` + FileIds []*string `json:"FileIds,omitnil" name:"FileIds"` } func (r *DeleteFilesRequest) ToJsonString() string { @@ -1321,7 +1332,7 @@ func (r *DeleteFilesRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteFilesResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DeleteFilesResponse struct { @@ -1343,26 +1354,26 @@ func (r *DeleteFilesResponse) FromJsonString(s string) error { // Predefined struct for user type DeleteJobsRequestParams struct { // 任务ID数组 - JobIds []*string `json:"JobIds,omitempty" name:"JobIds"` + JobIds []*string `json:"JobIds,omitnil" name:"JobIds"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` } type DeleteJobsRequest struct { *tchttp.BaseRequest // 任务ID数组 - JobIds []*string `json:"JobIds,omitempty" name:"JobIds"` + JobIds []*string `json:"JobIds,omitnil" name:"JobIds"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` } func (r *DeleteJobsRequest) ToJsonString() string { @@ -1389,7 +1400,7 @@ func (r *DeleteJobsRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteJobsResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DeleteJobsResponse struct { @@ -1411,26 +1422,26 @@ func (r *DeleteJobsResponse) FromJsonString(s string) error { // Predefined struct for user type DeleteProjectsRequestParams struct { // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 是否删除项目相关的场景。默认为否。 - DeleteScenarios *bool `json:"DeleteScenarios,omitempty" name:"DeleteScenarios"` + DeleteScenarios *bool `json:"DeleteScenarios,omitnil" name:"DeleteScenarios"` // 是否删除项目相关的任务。默认为否。 - DeleteJobs *bool `json:"DeleteJobs,omitempty" name:"DeleteJobs"` + DeleteJobs *bool `json:"DeleteJobs,omitnil" name:"DeleteJobs"` } type DeleteProjectsRequest struct { *tchttp.BaseRequest // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 是否删除项目相关的场景。默认为否。 - DeleteScenarios *bool `json:"DeleteScenarios,omitempty" name:"DeleteScenarios"` + DeleteScenarios *bool `json:"DeleteScenarios,omitnil" name:"DeleteScenarios"` // 是否删除项目相关的任务。默认为否。 - DeleteJobs *bool `json:"DeleteJobs,omitempty" name:"DeleteJobs"` + DeleteJobs *bool `json:"DeleteJobs,omitnil" name:"DeleteJobs"` } func (r *DeleteProjectsRequest) ToJsonString() string { @@ -1457,7 +1468,7 @@ func (r *DeleteProjectsRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteProjectsResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DeleteProjectsResponse struct { @@ -1479,26 +1490,26 @@ func (r *DeleteProjectsResponse) FromJsonString(s string) error { // Predefined struct for user type DeleteScenariosRequestParams struct { // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 是否删除场景相关的任务。默认为否。 - DeleteJobs *bool `json:"DeleteJobs,omitempty" name:"DeleteJobs"` + DeleteJobs *bool `json:"DeleteJobs,omitnil" name:"DeleteJobs"` } type DeleteScenariosRequest struct { *tchttp.BaseRequest // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 是否删除场景相关的任务。默认为否。 - DeleteJobs *bool `json:"DeleteJobs,omitempty" name:"DeleteJobs"` + DeleteJobs *bool `json:"DeleteJobs,omitnil" name:"DeleteJobs"` } func (r *DeleteScenariosRequest) ToJsonString() string { @@ -1525,7 +1536,7 @@ func (r *DeleteScenariosRequest) FromJsonString(s string) error { // Predefined struct for user type DeleteScenariosResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DeleteScenariosResponse struct { @@ -1547,44 +1558,44 @@ func (r *DeleteScenariosResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeAlertChannelsRequestParams struct { // 项目 ID 列表 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 偏移量,默认为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` // Notice ID 列表 - NoticeIds []*string `json:"NoticeIds,omitempty" name:"NoticeIds"` + NoticeIds []*string `json:"NoticeIds,omitnil" name:"NoticeIds"` // 排序项 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` } type DescribeAlertChannelsRequest struct { *tchttp.BaseRequest // 项目 ID 列表 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 偏移量,默认为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` // Notice ID 列表 - NoticeIds []*string `json:"NoticeIds,omitempty" name:"NoticeIds"` + NoticeIds []*string `json:"NoticeIds,omitnil" name:"NoticeIds"` // 排序项 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` } func (r *DescribeAlertChannelsRequest) ToJsonString() string { @@ -1615,14 +1626,14 @@ func (r *DescribeAlertChannelsRequest) FromJsonString(s string) error { type DescribeAlertChannelsResponseParams struct { // 告警通知接收组列表 // 注意:此字段可能返回 null,表示取不到有效值。 - AlertChannelSet []*AlertChannelRecord `json:"AlertChannelSet,omitempty" name:"AlertChannelSet"` + AlertChannelSet []*AlertChannelRecord `json:"AlertChannelSet,omitnil" name:"AlertChannelSet"` // 告警通知接收组数目 // 注意:此字段可能返回 null,表示取不到有效值。 - Total *uint64 `json:"Total,omitempty" name:"Total"` + Total *uint64 `json:"Total,omitnil" name:"Total"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeAlertChannelsResponse struct { @@ -1644,56 +1655,56 @@ func (r *DescribeAlertChannelsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeAlertRecordsRequestParams struct { // 项目 ID 列表 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 场景 ID 列表 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 任务 ID 列表 - JobIds []*string `json:"JobIds,omitempty" name:"JobIds"` + JobIds []*string `json:"JobIds,omitnil" name:"JobIds"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 排序项 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 偏移量,默认为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` // 按场景名筛选 - ScenarioNames []*string `json:"ScenarioNames,omitempty" name:"ScenarioNames"` + ScenarioNames []*string `json:"ScenarioNames,omitnil" name:"ScenarioNames"` } type DescribeAlertRecordsRequest struct { *tchttp.BaseRequest // 项目 ID 列表 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 场景 ID 列表 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 任务 ID 列表 - JobIds []*string `json:"JobIds,omitempty" name:"JobIds"` + JobIds []*string `json:"JobIds,omitnil" name:"JobIds"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 排序项 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 偏移量,默认为0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` // 按场景名筛选 - ScenarioNames []*string `json:"ScenarioNames,omitempty" name:"ScenarioNames"` + ScenarioNames []*string `json:"ScenarioNames,omitnil" name:"ScenarioNames"` } func (r *DescribeAlertRecordsRequest) ToJsonString() string { @@ -1726,14 +1737,14 @@ func (r *DescribeAlertRecordsRequest) FromJsonString(s string) error { type DescribeAlertRecordsResponseParams struct { // 告警历史 // 注意:此字段可能返回 null,表示取不到有效值。 - AlertRecordSet []*AlertRecord `json:"AlertRecordSet,omitempty" name:"AlertRecordSet"` + AlertRecordSet []*AlertRecord `json:"AlertRecordSet,omitnil" name:"AlertRecordSet"` // 告警历史记录的总数 // 注意:此字段可能返回 null,表示取不到有效值。 - Total *uint64 `json:"Total,omitempty" name:"Total"` + Total *uint64 `json:"Total,omitnil" name:"Total"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeAlertRecordsResponse struct { @@ -1784,10 +1795,10 @@ func (r *DescribeAvailableMetricsRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeAvailableMetricsResponseParams struct { // 系统支持的所有指标 - MetricSet []*MetricInfo `json:"MetricSet,omitempty" name:"MetricSet"` + MetricSet []*MetricInfo `json:"MetricSet,omitnil" name:"MetricSet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeAvailableMetricsResponse struct { @@ -1809,26 +1820,26 @@ func (r *DescribeAvailableMetricsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeCheckSummaryRequestParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } type DescribeCheckSummaryRequest struct { *tchttp.BaseRequest // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } func (r *DescribeCheckSummaryRequest) ToJsonString() string { @@ -1856,10 +1867,10 @@ func (r *DescribeCheckSummaryRequest) FromJsonString(s string) error { type DescribeCheckSummaryResponseParams struct { // 检查点汇总信息 // 注意:此字段可能返回 null,表示取不到有效值。 - CheckSummarySet []*CheckSummary `json:"CheckSummarySet,omitempty" name:"CheckSummarySet"` + CheckSummarySet []*CheckSummary `json:"CheckSummarySet,omitnil" name:"CheckSummarySet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeCheckSummaryResponse struct { @@ -1881,56 +1892,56 @@ func (r *DescribeCheckSummaryResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeCronJobsRequestParams struct { // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 偏移量,默认为0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` // 定时任务名字,模糊查询 - CronJobName *string `json:"CronJobName,omitempty" name:"CronJobName"` + CronJobName *string `json:"CronJobName,omitnil" name:"CronJobName"` // 定时任务状态数组 - CronJobStatus []*int64 `json:"CronJobStatus,omitempty" name:"CronJobStatus"` + CronJobStatus []*int64 `json:"CronJobStatus,omitnil" name:"CronJobStatus"` // 排序的列 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` } type DescribeCronJobsRequest struct { *tchttp.BaseRequest // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 偏移量,默认为0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` // 定时任务名字,模糊查询 - CronJobName *string `json:"CronJobName,omitempty" name:"CronJobName"` + CronJobName *string `json:"CronJobName,omitnil" name:"CronJobName"` // 定时任务状态数组 - CronJobStatus []*int64 `json:"CronJobStatus,omitempty" name:"CronJobStatus"` + CronJobStatus []*int64 `json:"CronJobStatus,omitnil" name:"CronJobStatus"` // 排序的列 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` } func (r *DescribeCronJobsRequest) ToJsonString() string { @@ -1962,14 +1973,14 @@ func (r *DescribeCronJobsRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeCronJobsResponseParams struct { // 定时任务总数 - Total *int64 `json:"Total,omitempty" name:"Total"` + Total *int64 `json:"Total,omitnil" name:"Total"` // 定时任务信息 // 注意:此字段可能返回 null,表示取不到有效值。 - CronJobSet []*CronJob `json:"CronJobSet,omitempty" name:"CronJobSet"` + CronJobSet []*CronJob `json:"CronJobSet,omitnil" name:"CronJobSet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeCronJobsResponse struct { @@ -1988,47 +1999,126 @@ func (r *DescribeCronJobsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribeErrorSummaryRequestParams struct { + // 任务ID + JobId *string `json:"JobId,omitnil" name:"JobId"` + + // 场景ID + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` + + // 项目ID + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` + + // 过滤参数 + Filters []*Filter `json:"Filters,omitnil" name:"Filters"` +} + +type DescribeErrorSummaryRequest struct { + *tchttp.BaseRequest + + // 任务ID + JobId *string `json:"JobId,omitnil" name:"JobId"` + + // 场景ID + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` + + // 项目ID + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` + + // 过滤参数 + Filters []*Filter `json:"Filters,omitnil" name:"Filters"` +} + +func (r *DescribeErrorSummaryRequest) 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 *DescribeErrorSummaryRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "JobId") + delete(f, "ScenarioId") + delete(f, "ProjectId") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeErrorSummaryRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeErrorSummaryResponseParams struct { + // 错误汇总信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorSummarySet []*ErrorSummary `json:"ErrorSummarySet,omitnil" name:"ErrorSummarySet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DescribeErrorSummaryResponse struct { + *tchttp.BaseResponse + Response *DescribeErrorSummaryResponseParams `json:"Response"` +} + +func (r *DescribeErrorSummaryResponse) 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 *DescribeErrorSummaryResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeFilesRequestParams struct { // 项目 ID 数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 文件 ID 数组 - FileIds []*string `json:"FileIds,omitempty" name:"FileIds"` + FileIds []*string `json:"FileIds,omitnil" name:"FileIds"` // 文件名 - FileName *string `json:"FileName,omitempty" name:"FileName"` + FileName *string `json:"FileName,omitnil" name:"FileName"` // 偏移量,默认为 0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为 20,最大为 100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 文件种类,参数文件-1,协议文件-2,请求文件-3 - Kind *int64 `json:"Kind,omitempty" name:"Kind"` + Kind *int64 `json:"Kind,omitnil" name:"Kind"` } type DescribeFilesRequest struct { *tchttp.BaseRequest // 项目 ID 数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 文件 ID 数组 - FileIds []*string `json:"FileIds,omitempty" name:"FileIds"` + FileIds []*string `json:"FileIds,omitnil" name:"FileIds"` // 文件名 - FileName *string `json:"FileName,omitempty" name:"FileName"` + FileName *string `json:"FileName,omitnil" name:"FileName"` // 偏移量,默认为 0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为 20,最大为 100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 文件种类,参数文件-1,协议文件-2,请求文件-3 - Kind *int64 `json:"Kind,omitempty" name:"Kind"` + Kind *int64 `json:"Kind,omitnil" name:"Kind"` } func (r *DescribeFilesRequest) ToJsonString() string { @@ -2059,14 +2149,14 @@ func (r *DescribeFilesRequest) FromJsonString(s string) error { type DescribeFilesResponseParams struct { // 文件列表 // 注意:此字段可能返回 null,表示取不到有效值。 - FileSet []*File `json:"FileSet,omitempty" name:"FileSet"` + FileSet []*File `json:"FileSet,omitnil" name:"FileSet"` // 文件总数 // 注意:此字段可能返回 null,表示取不到有效值。 - Total *int64 `json:"Total,omitempty" name:"Total"` + Total *int64 `json:"Total,omitnil" name:"Total"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeFilesResponse struct { @@ -2088,74 +2178,74 @@ func (r *DescribeFilesResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeJobsRequestParams struct { // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 分页起始位置 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 每页最大数目 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 任务ID数组 - JobIds []*string `json:"JobIds,omitempty" name:"JobIds"` + JobIds []*string `json:"JobIds,omitnil" name:"JobIds"` // 按字段排序 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 升序/降序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 任务开始时间 - StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + StartTime *string `json:"StartTime,omitnil" name:"StartTime"` // 任务结束时间 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // 调试任务标记 - Debug *bool `json:"Debug,omitempty" name:"Debug"` + Debug *bool `json:"Debug,omitnil" name:"Debug"` // 任务的状态 - Status []*int64 `json:"Status,omitempty" name:"Status"` + Status []*int64 `json:"Status,omitnil" name:"Status"` } type DescribeJobsRequest struct { *tchttp.BaseRequest // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 分页起始位置 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 每页最大数目 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 任务ID数组 - JobIds []*string `json:"JobIds,omitempty" name:"JobIds"` + JobIds []*string `json:"JobIds,omitnil" name:"JobIds"` // 按字段排序 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 升序/降序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 任务开始时间 - StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + StartTime *string `json:"StartTime,omitnil" name:"StartTime"` // 任务结束时间 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // 调试任务标记 - Debug *bool `json:"Debug,omitempty" name:"Debug"` + Debug *bool `json:"Debug,omitnil" name:"Debug"` // 任务的状态 - Status []*int64 `json:"Status,omitempty" name:"Status"` + Status []*int64 `json:"Status,omitnil" name:"Status"` } func (r *DescribeJobsRequest) ToJsonString() string { @@ -2191,14 +2281,14 @@ func (r *DescribeJobsRequest) FromJsonString(s string) error { type DescribeJobsResponseParams struct { // 任务列表 // 注意:此字段可能返回 null,表示取不到有效值。 - JobSet []*Job `json:"JobSet,omitempty" name:"JobSet"` + JobSet []*Job `json:"JobSet,omitnil" name:"JobSet"` // 任务数量 // 注意:此字段可能返回 null,表示取不到有效值。 - Total *int64 `json:"Total,omitempty" name:"Total"` + Total *int64 `json:"Total,omitnil" name:"Total"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeJobsResponse struct { @@ -2220,38 +2310,38 @@ func (r *DescribeJobsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeLabelValuesRequestParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 指标名称 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 查询标签名称 - LabelName *string `json:"LabelName,omitempty" name:"LabelName"` + LabelName *string `json:"LabelName,omitnil" name:"LabelName"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } type DescribeLabelValuesRequest struct { *tchttp.BaseRequest // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 指标名称 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 查询标签名称 - LabelName *string `json:"LabelName,omitempty" name:"LabelName"` + LabelName *string `json:"LabelName,omitnil" name:"LabelName"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } func (r *DescribeLabelValuesRequest) ToJsonString() string { @@ -2281,10 +2371,10 @@ func (r *DescribeLabelValuesRequest) FromJsonString(s string) error { type DescribeLabelValuesResponseParams struct { // 标签值数组 // 注意:此字段可能返回 null,表示取不到有效值。 - LabelValueSet []*string `json:"LabelValueSet,omitempty" name:"LabelValueSet"` + LabelValueSet []*string `json:"LabelValueSet,omitnil" name:"LabelValueSet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeLabelValuesResponse struct { @@ -2306,26 +2396,26 @@ func (r *DescribeLabelValuesResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeMetricLabelWithValuesRequestParams struct { // job id - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // project id - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // scenario id - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` } type DescribeMetricLabelWithValuesRequest struct { *tchttp.BaseRequest // job id - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // project id - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // scenario id - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` } func (r *DescribeMetricLabelWithValuesRequest) ToJsonString() string { @@ -2353,10 +2443,10 @@ func (r *DescribeMetricLabelWithValuesRequest) FromJsonString(s string) error { type DescribeMetricLabelWithValuesResponseParams struct { // 指标所有的label和values数组 // 注意:此字段可能返回 null,表示取不到有效值。 - MetricLabelWithValuesSet []*MetricLabelWithValues `json:"MetricLabelWithValuesSet,omitempty" name:"MetricLabelWithValuesSet"` + MetricLabelWithValuesSet []*MetricLabelWithValues `json:"MetricLabelWithValuesSet,omitnil" name:"MetricLabelWithValuesSet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeMetricLabelWithValuesResponse struct { @@ -2378,74 +2468,74 @@ func (r *DescribeMetricLabelWithValuesResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeNormalLogsRequestParams struct { // 压测项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 测试场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 压测任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 日志上下文,加载更多日志时使用,透传上次返回的Context值,获取后续的日志内容。过期时间1小时 - Context *string `json:"Context,omitempty" name:"Context"` + Context *string `json:"Context,omitnil" name:"Context"` // 日志开始时间 - From *string `json:"From,omitempty" name:"From"` + From *string `json:"From,omitnil" name:"From"` // 日志结束时间 - To *string `json:"To,omitempty" name:"To"` + To *string `json:"To,omitnil" name:"To"` // 日志级别,可取debug/info/error - SeverityText *string `json:"SeverityText,omitempty" name:"SeverityText"` + SeverityText *string `json:"SeverityText,omitnil" name:"SeverityText"` // 施压节点IP - Instance *string `json:"Instance,omitempty" name:"Instance"` + Instance *string `json:"Instance,omitnil" name:"Instance"` // 施压节点所在地域 - InstanceRegion *string `json:"InstanceRegion,omitempty" name:"InstanceRegion"` + InstanceRegion *string `json:"InstanceRegion,omitnil" name:"InstanceRegion"` // 日志类型, console代表用户输出,engine代表引擎输出 - LogType *string `json:"LogType,omitempty" name:"LogType"` + LogType *string `json:"LogType,omitnil" name:"LogType"` // 返回日志条数限制,最大100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` } type DescribeNormalLogsRequest struct { *tchttp.BaseRequest // 压测项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 测试场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 压测任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 日志上下文,加载更多日志时使用,透传上次返回的Context值,获取后续的日志内容。过期时间1小时 - Context *string `json:"Context,omitempty" name:"Context"` + Context *string `json:"Context,omitnil" name:"Context"` // 日志开始时间 - From *string `json:"From,omitempty" name:"From"` + From *string `json:"From,omitnil" name:"From"` // 日志结束时间 - To *string `json:"To,omitempty" name:"To"` + To *string `json:"To,omitnil" name:"To"` // 日志级别,可取debug/info/error - SeverityText *string `json:"SeverityText,omitempty" name:"SeverityText"` + SeverityText *string `json:"SeverityText,omitnil" name:"SeverityText"` // 施压节点IP - Instance *string `json:"Instance,omitempty" name:"Instance"` + Instance *string `json:"Instance,omitnil" name:"Instance"` // 施压节点所在地域 - InstanceRegion *string `json:"InstanceRegion,omitempty" name:"InstanceRegion"` + InstanceRegion *string `json:"InstanceRegion,omitnil" name:"InstanceRegion"` // 日志类型, console代表用户输出,engine代表引擎输出 - LogType *string `json:"LogType,omitempty" name:"LogType"` + LogType *string `json:"LogType,omitnil" name:"LogType"` // 返回日志条数限制,最大100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` } func (r *DescribeNormalLogsRequest) ToJsonString() string { @@ -2481,14 +2571,14 @@ func (r *DescribeNormalLogsRequest) FromJsonString(s string) error { type DescribeNormalLogsResponseParams struct { // 日志上下文,加载更多日志时使用,透传上次返回的Context值,获取后续的日志内容。过期时间1小时 // 注意:此字段可能返回 null,表示取不到有效值。 - Context *string `json:"Context,omitempty" name:"Context"` + Context *string `json:"Context,omitnil" name:"Context"` // 日志数组 // 注意:此字段可能返回 null,表示取不到有效值。 - NormalLogs []*NormalLog `json:"NormalLogs,omitempty" name:"NormalLogs"` + NormalLogs []*NormalLog `json:"NormalLogs,omitnil" name:"NormalLogs"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeNormalLogsResponse struct { @@ -2510,50 +2600,50 @@ func (r *DescribeNormalLogsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeProjectsRequestParams struct { // 分页offset - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 每页limit - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 项目名 - ProjectName *string `json:"ProjectName,omitempty" name:"ProjectName"` + ProjectName *string `json:"ProjectName,omitnil" name:"ProjectName"` // 按字段排序 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 升序/降序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 标签数组 - TagFilters []*TagSpec `json:"TagFilters,omitempty" name:"TagFilters"` + TagFilters []*TagSpec `json:"TagFilters,omitnil" name:"TagFilters"` } type DescribeProjectsRequest struct { *tchttp.BaseRequest // 分页offset - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 每页limit - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 项目名 - ProjectName *string `json:"ProjectName,omitempty" name:"ProjectName"` + ProjectName *string `json:"ProjectName,omitnil" name:"ProjectName"` // 按字段排序 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 升序/降序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 标签数组 - TagFilters []*TagSpec `json:"TagFilters,omitempty" name:"TagFilters"` + TagFilters []*TagSpec `json:"TagFilters,omitnil" name:"TagFilters"` } func (r *DescribeProjectsRequest) ToJsonString() string { @@ -2585,13 +2675,13 @@ func (r *DescribeProjectsRequest) FromJsonString(s string) error { type DescribeProjectsResponseParams struct { // 项目数组 // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectSet []*Project `json:"ProjectSet,omitempty" name:"ProjectSet"` + ProjectSet []*Project `json:"ProjectSet,omitnil" name:"ProjectSet"` // 项目数量 - Total *int64 `json:"Total,omitempty" name:"Total"` + Total *int64 `json:"Total,omitnil" name:"Total"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeProjectsResponse struct { @@ -2643,10 +2733,10 @@ func (r *DescribeRegionsRequest) FromJsonString(s string) error { type DescribeRegionsResponseParams struct { // 地域数组 // 注意:此字段可能返回 null,表示取不到有效值。 - RegionSet []*RegionDetail `json:"RegionSet,omitempty" name:"RegionSet"` + RegionSet []*RegionDetail `json:"RegionSet,omitnil" name:"RegionSet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeRegionsResponse struct { @@ -2668,26 +2758,26 @@ func (r *DescribeRegionsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeRequestSummaryRequestParams struct { // 压测任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 压测场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 压测项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } type DescribeRequestSummaryRequest struct { *tchttp.BaseRequest // 压测任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 压测场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 压测项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } func (r *DescribeRequestSummaryRequest) ToJsonString() string { @@ -2715,10 +2805,10 @@ func (r *DescribeRequestSummaryRequest) FromJsonString(s string) error { type DescribeRequestSummaryResponseParams struct { // 请求汇总信息 // 注意:此字段可能返回 null,表示取不到有效值。 - RequestSummarySet []*RequestSummary `json:"RequestSummarySet,omitempty" name:"RequestSummarySet"` + RequestSummarySet []*RequestSummary `json:"RequestSummarySet,omitnil" name:"RequestSummarySet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeRequestSummaryResponse struct { @@ -2740,32 +2830,32 @@ func (r *DescribeRequestSummaryResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeSampleBatchQueryRequestParams struct { // job id - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景id - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 查询指标数组 - Queries []*InternalMetricQuery `json:"Queries,omitempty" name:"Queries"` + Queries []*InternalMetricQuery `json:"Queries,omitnil" name:"Queries"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } type DescribeSampleBatchQueryRequest struct { *tchttp.BaseRequest // job id - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景id - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 查询指标数组 - Queries []*InternalMetricQuery `json:"Queries,omitempty" name:"Queries"` + Queries []*InternalMetricQuery `json:"Queries,omitnil" name:"Queries"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` } func (r *DescribeSampleBatchQueryRequest) ToJsonString() string { @@ -2794,10 +2884,10 @@ func (r *DescribeSampleBatchQueryRequest) FromJsonString(s string) error { type DescribeSampleBatchQueryResponseParams struct { // 返回指标内容 // 注意:此字段可能返回 null,表示取不到有效值。 - MetricSampleSet []*CustomSample `json:"MetricSampleSet,omitempty" name:"MetricSampleSet"` + MetricSampleSet []*CustomSample `json:"MetricSampleSet,omitnil" name:"MetricSampleSet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeSampleBatchQueryResponse struct { @@ -2819,104 +2909,104 @@ func (r *DescribeSampleBatchQueryResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeSampleLogsRequestParams struct { // 测试项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 测试场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 测试任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 加载更多日志时使用,透传上次返回的Context值,获取后续的日志内容。过期时间1小时 - Context *string `json:"Context,omitempty" name:"Context"` + Context *string `json:"Context,omitnil" name:"Context"` // 日志开始时间 - From *string `json:"From,omitempty" name:"From"` + From *string `json:"From,omitnil" name:"From"` // 日志结束时间 - To *string `json:"To,omitempty" name:"To"` + To *string `json:"To,omitnil" name:"To"` // 日志级别debug,info,error - SeverityText *string `json:"SeverityText,omitempty" name:"SeverityText"` + SeverityText *string `json:"SeverityText,omitnil" name:"SeverityText"` // ap-shanghai, ap-guangzhou - InstanceRegion *string `json:"InstanceRegion,omitempty" name:"InstanceRegion"` + InstanceRegion *string `json:"InstanceRegion,omitnil" name:"InstanceRegion"` // 施压引擎节点IP - Instance *string `json:"Instance,omitempty" name:"Instance"` + Instance *string `json:"Instance,omitnil" name:"Instance"` // request 代表采样日志,可为不填 - LogType *string `json:"LogType,omitempty" name:"LogType"` + LogType *string `json:"LogType,omitnil" name:"LogType"` // 返回日志条数,最大100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 采样日志响应时间范围 - ReactionTimeRange *ReactionTimeRange `json:"ReactionTimeRange,omitempty" name:"ReactionTimeRange"` + ReactionTimeRange *ReactionTimeRange `json:"ReactionTimeRange,omitnil" name:"ReactionTimeRange"` // 采样请求状态码 - Status *string `json:"Status,omitempty" name:"Status"` + Status *string `json:"Status,omitnil" name:"Status"` // 采样请求结果码 - Result *string `json:"Result,omitempty" name:"Result"` + Result *string `json:"Result,omitnil" name:"Result"` // 采样请求方法 - Method *string `json:"Method,omitempty" name:"Method"` + Method *string `json:"Method,omitnil" name:"Method"` // 采样服务API - Service *string `json:"Service,omitempty" name:"Service"` + Service *string `json:"Service,omitnil" name:"Service"` } type DescribeSampleLogsRequest struct { *tchttp.BaseRequest // 测试项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 测试场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 测试任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 加载更多日志时使用,透传上次返回的Context值,获取后续的日志内容。过期时间1小时 - Context *string `json:"Context,omitempty" name:"Context"` + Context *string `json:"Context,omitnil" name:"Context"` // 日志开始时间 - From *string `json:"From,omitempty" name:"From"` + From *string `json:"From,omitnil" name:"From"` // 日志结束时间 - To *string `json:"To,omitempty" name:"To"` + To *string `json:"To,omitnil" name:"To"` // 日志级别debug,info,error - SeverityText *string `json:"SeverityText,omitempty" name:"SeverityText"` + SeverityText *string `json:"SeverityText,omitnil" name:"SeverityText"` // ap-shanghai, ap-guangzhou - InstanceRegion *string `json:"InstanceRegion,omitempty" name:"InstanceRegion"` + InstanceRegion *string `json:"InstanceRegion,omitnil" name:"InstanceRegion"` // 施压引擎节点IP - Instance *string `json:"Instance,omitempty" name:"Instance"` + Instance *string `json:"Instance,omitnil" name:"Instance"` // request 代表采样日志,可为不填 - LogType *string `json:"LogType,omitempty" name:"LogType"` + LogType *string `json:"LogType,omitnil" name:"LogType"` // 返回日志条数,最大100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 采样日志响应时间范围 - ReactionTimeRange *ReactionTimeRange `json:"ReactionTimeRange,omitempty" name:"ReactionTimeRange"` + ReactionTimeRange *ReactionTimeRange `json:"ReactionTimeRange,omitnil" name:"ReactionTimeRange"` // 采样请求状态码 - Status *string `json:"Status,omitempty" name:"Status"` + Status *string `json:"Status,omitnil" name:"Status"` // 采样请求结果码 - Result *string `json:"Result,omitempty" name:"Result"` + Result *string `json:"Result,omitnil" name:"Result"` // 采样请求方法 - Method *string `json:"Method,omitempty" name:"Method"` + Method *string `json:"Method,omitnil" name:"Method"` // 采样服务API - Service *string `json:"Service,omitempty" name:"Service"` + Service *string `json:"Service,omitnil" name:"Service"` } func (r *DescribeSampleLogsRequest) ToJsonString() string { @@ -2956,18 +3046,18 @@ func (r *DescribeSampleLogsRequest) FromJsonString(s string) error { // Predefined struct for user type DescribeSampleLogsResponseParams struct { // 日志总数 - Total *int64 `json:"Total,omitempty" name:"Total"` + Total *int64 `json:"Total,omitnil" name:"Total"` // 日志上下文,加载更多日志时使用,透传上次返回的Context值,获取后续的日志内容。过期时间1小时 // 注意:此字段可能返回 null,表示取不到有效值。 - Context *string `json:"Context,omitempty" name:"Context"` + Context *string `json:"Context,omitnil" name:"Context"` // 采样日志数组 // 注意:此字段可能返回 null,表示取不到有效值。 - SampleLogs []*SampleLog `json:"SampleLogs,omitempty" name:"SampleLogs"` + SampleLogs []*SampleLog `json:"SampleLogs,omitnil" name:"SampleLogs"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeSampleLogsResponse struct { @@ -2989,32 +3079,32 @@ func (r *DescribeSampleLogsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeSampleMatrixBatchQueryRequestParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 查询语句 - Queries []*InternalMetricQuery `json:"Queries,omitempty" name:"Queries"` + Queries []*InternalMetricQuery `json:"Queries,omitnil" name:"Queries"` } type DescribeSampleMatrixBatchQueryRequest struct { *tchttp.BaseRequest // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 查询语句 - Queries []*InternalMetricQuery `json:"Queries,omitempty" name:"Queries"` + Queries []*InternalMetricQuery `json:"Queries,omitnil" name:"Queries"` } func (r *DescribeSampleMatrixBatchQueryRequest) ToJsonString() string { @@ -3043,10 +3133,10 @@ func (r *DescribeSampleMatrixBatchQueryRequest) FromJsonString(s string) error { type DescribeSampleMatrixBatchQueryResponseParams struct { // 批量指标矩阵 // 注意:此字段可能返回 null,表示取不到有效值。 - MetricSampleMatrixSet []*CustomSampleMatrix `json:"MetricSampleMatrixSet,omitempty" name:"MetricSampleMatrixSet"` + MetricSampleMatrixSet []*CustomSampleMatrix `json:"MetricSampleMatrixSet,omitnil" name:"MetricSampleMatrixSet"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeSampleMatrixBatchQueryResponse struct { @@ -3068,50 +3158,50 @@ func (r *DescribeSampleMatrixBatchQueryResponse) FromJsonString(s string) error // Predefined struct for user type DescribeSampleMatrixQueryRequestParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 指标名字 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 聚合函数 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 指标过滤 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + Filters []*Filter `json:"Filters,omitnil" name:"Filters"` // 分组 - GroupBy []*string `json:"GroupBy,omitempty" name:"GroupBy"` + GroupBy []*string `json:"GroupBy,omitnil" name:"GroupBy"` } type DescribeSampleMatrixQueryRequest struct { *tchttp.BaseRequest // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 指标名字 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 聚合函数 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 指标过滤 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + Filters []*Filter `json:"Filters,omitnil" name:"Filters"` // 分组 - GroupBy []*string `json:"GroupBy,omitempty" name:"GroupBy"` + GroupBy []*string `json:"GroupBy,omitnil" name:"GroupBy"` } func (r *DescribeSampleMatrixQueryRequest) ToJsonString() string { @@ -3143,10 +3233,10 @@ func (r *DescribeSampleMatrixQueryRequest) FromJsonString(s string) error { type DescribeSampleMatrixQueryResponseParams struct { // 指标矩阵 // 注意:此字段可能返回 null,表示取不到有效值。 - MetricSampleMatrix *CustomSampleMatrix `json:"MetricSampleMatrix,omitempty" name:"MetricSampleMatrix"` + MetricSampleMatrix *CustomSampleMatrix `json:"MetricSampleMatrix,omitnil" name:"MetricSampleMatrix"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeSampleMatrixQueryResponse struct { @@ -3168,44 +3258,44 @@ func (r *DescribeSampleMatrixQueryResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeSampleQueryRequestParams struct { // job id - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景Id - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 指标名 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 聚合条件 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 过滤条件 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` + Labels []*Label `json:"Labels,omitnil" name:"Labels"` } type DescribeSampleQueryRequest struct { *tchttp.BaseRequest // job id - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 场景Id - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 指标名 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 聚合条件 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 过滤条件 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` + Labels []*Label `json:"Labels,omitnil" name:"Labels"` } func (r *DescribeSampleQueryRequest) ToJsonString() string { @@ -3236,10 +3326,10 @@ func (r *DescribeSampleQueryRequest) FromJsonString(s string) error { type DescribeSampleQueryResponseParams struct { // 返回指标内容 // 注意:此字段可能返回 null,表示取不到有效值。 - MetricSample *CustomSample `json:"MetricSample,omitempty" name:"MetricSample"` + MetricSample *CustomSample `json:"MetricSample,omitnil" name:"MetricSample"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeSampleQueryResponse struct { @@ -3261,74 +3351,86 @@ func (r *DescribeSampleQueryResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeScenarioWithJobsRequestParams struct { // 偏移量,默认为0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 场景名 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 场景状态数组 - ScenarioStatus *int64 `json:"ScenarioStatus,omitempty" name:"ScenarioStatus"` + ScenarioStatus *int64 `json:"ScenarioStatus,omitnil" name:"ScenarioStatus"` // 排序的列 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // job相关参数 - ScenarioRelatedJobsParams *ScenarioRelatedJobsParams `json:"ScenarioRelatedJobsParams,omitempty" name:"ScenarioRelatedJobsParams"` + ScenarioRelatedJobsParams *ScenarioRelatedJobsParams `json:"ScenarioRelatedJobsParams,omitnil" name:"ScenarioRelatedJobsParams"` // 是否需要返回场景的脚本内容 - IgnoreScript *bool `json:"IgnoreScript,omitempty" name:"IgnoreScript"` + IgnoreScript *bool `json:"IgnoreScript,omitnil" name:"IgnoreScript"` // 是否需要返回测试数据文件信息 - IgnoreDataset *bool `json:"IgnoreDataset,omitempty" name:"IgnoreDataset"` + IgnoreDataset *bool `json:"IgnoreDataset,omitnil" name:"IgnoreDataset"` + + // 场景类型,如pts-http, pts-js, pts-trpc, pts-jmeter + ScenarioType *string `json:"ScenarioType,omitnil" name:"ScenarioType"` + + // 创建人员 + Owner *string `json:"Owner,omitnil" name:"Owner"` } type DescribeScenarioWithJobsRequest struct { *tchttp.BaseRequest // 偏移量,默认为0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 场景名 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 场景状态数组 - ScenarioStatus *int64 `json:"ScenarioStatus,omitempty" name:"ScenarioStatus"` + ScenarioStatus *int64 `json:"ScenarioStatus,omitnil" name:"ScenarioStatus"` // 排序的列 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // job相关参数 - ScenarioRelatedJobsParams *ScenarioRelatedJobsParams `json:"ScenarioRelatedJobsParams,omitempty" name:"ScenarioRelatedJobsParams"` + ScenarioRelatedJobsParams *ScenarioRelatedJobsParams `json:"ScenarioRelatedJobsParams,omitnil" name:"ScenarioRelatedJobsParams"` // 是否需要返回场景的脚本内容 - IgnoreScript *bool `json:"IgnoreScript,omitempty" name:"IgnoreScript"` + IgnoreScript *bool `json:"IgnoreScript,omitnil" name:"IgnoreScript"` // 是否需要返回测试数据文件信息 - IgnoreDataset *bool `json:"IgnoreDataset,omitempty" name:"IgnoreDataset"` + IgnoreDataset *bool `json:"IgnoreDataset,omitnil" name:"IgnoreDataset"` + + // 场景类型,如pts-http, pts-js, pts-trpc, pts-jmeter + ScenarioType *string `json:"ScenarioType,omitnil" name:"ScenarioType"` + + // 创建人员 + Owner *string `json:"Owner,omitnil" name:"Owner"` } func (r *DescribeScenarioWithJobsRequest) ToJsonString() string { @@ -3354,6 +3456,8 @@ func (r *DescribeScenarioWithJobsRequest) FromJsonString(s string) error { delete(f, "ScenarioRelatedJobsParams") delete(f, "IgnoreScript") delete(f, "IgnoreDataset") + delete(f, "ScenarioType") + delete(f, "Owner") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeScenarioWithJobsRequest has unknown keys!", "") } @@ -3364,13 +3468,13 @@ func (r *DescribeScenarioWithJobsRequest) FromJsonString(s string) error { type DescribeScenarioWithJobsResponseParams struct { // 场景配置以及附带的job内容 // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioWithJobsSet []*ScenarioWithJobs `json:"ScenarioWithJobsSet,omitempty" name:"ScenarioWithJobsSet"` + ScenarioWithJobsSet []*ScenarioWithJobs `json:"ScenarioWithJobsSet,omitnil" name:"ScenarioWithJobsSet"` // 场景总数 - Total *int64 `json:"Total,omitempty" name:"Total"` + Total *int64 `json:"Total,omitnil" name:"Total"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeScenarioWithJobsResponse struct { @@ -3392,62 +3496,62 @@ func (r *DescribeScenarioWithJobsResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeScenariosRequestParams struct { // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 场景名 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 场景状态数组 - ScenarioStatus []*int64 `json:"ScenarioStatus,omitempty" name:"ScenarioStatus"` + ScenarioStatus []*int64 `json:"ScenarioStatus,omitnil" name:"ScenarioStatus"` // 偏移量,默认为0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 排序的列 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 场景类型 - ScenarioType *string `json:"ScenarioType,omitempty" name:"ScenarioType"` + ScenarioType *string `json:"ScenarioType,omitnil" name:"ScenarioType"` } type DescribeScenariosRequest struct { *tchttp.BaseRequest // 场景ID数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` // 场景名 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 场景状态数组 - ScenarioStatus []*int64 `json:"ScenarioStatus,omitempty" name:"ScenarioStatus"` + ScenarioStatus []*int64 `json:"ScenarioStatus,omitnil" name:"ScenarioStatus"` // 偏移量,默认为0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 返回数量,默认为20,最大为100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 排序的列 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否正序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` // 项目ID数组 - ProjectIds []*string `json:"ProjectIds,omitempty" name:"ProjectIds"` + ProjectIds []*string `json:"ProjectIds,omitnil" name:"ProjectIds"` // 场景类型 - ScenarioType *string `json:"ScenarioType,omitempty" name:"ScenarioType"` + ScenarioType *string `json:"ScenarioType,omitnil" name:"ScenarioType"` } func (r *DescribeScenariosRequest) ToJsonString() string { @@ -3481,13 +3585,13 @@ func (r *DescribeScenariosRequest) FromJsonString(s string) error { type DescribeScenariosResponseParams struct { // 场景列表 // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioSet []*Scenario `json:"ScenarioSet,omitempty" name:"ScenarioSet"` + ScenarioSet []*Scenario `json:"ScenarioSet,omitnil" name:"ScenarioSet"` // 场景总数 - Total *int64 `json:"Total,omitempty" name:"Total"` + Total *int64 `json:"Total,omitnil" name:"Total"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type DescribeScenariosResponse struct { @@ -3509,139 +3613,177 @@ func (r *DescribeScenariosResponse) FromJsonString(s string) error { type DomainNameConfig struct { // 域名绑定配置 // 注意:此字段可能返回 null,表示取不到有效值。 - HostAliases []*HostAlias `json:"HostAliases,omitempty" name:"HostAliases"` + HostAliases []*HostAlias `json:"HostAliases,omitnil" name:"HostAliases"` // DNS 配置 // 注意:此字段可能返回 null,表示取不到有效值。 - DNSConfig *DNSConfig `json:"DNSConfig,omitempty" name:"DNSConfig"` + DNSConfig *DNSConfig `json:"DNSConfig,omitnil" name:"DNSConfig"` +} + +type ErrorSummary struct { + // 状态码 + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitnil" name:"Status"` + + // 结果码 + // 注意:此字段可能返回 null,表示取不到有效值。 + Result *string `json:"Result,omitnil" name:"Result"` + + // 错误出现次数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Count *int64 `json:"Count,omitnil" name:"Count"` + + // 错误率 + // 注意:此字段可能返回 null,表示取不到有效值。 + Rate *float64 `json:"Rate,omitnil" name:"Rate"` + + // 错误信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Message *string `json:"Message,omitnil" name:"Message"` + + // 请求协议类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + Proto *string `json:"Proto,omitnil" name:"Proto"` } type File struct { // 文件 ID - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` // 文件种类,参数文件-1,协议文件-2,请求文件-3 - Kind *int64 `json:"Kind,omitempty" name:"Kind"` + Kind *int64 `json:"Kind,omitnil" name:"Kind"` // 文件名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 文件字节数 - Size *int64 `json:"Size,omitempty" name:"Size"` + Size *int64 `json:"Size,omitnil" name:"Size"` // 文件类型 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 更新时间 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // 文件行数 // 注意:此字段可能返回 null,表示取不到有效值。 - LineCount *int64 `json:"LineCount,omitempty" name:"LineCount"` + LineCount *int64 `json:"LineCount,omitnil" name:"LineCount"` // 头部数据行 // 注意:此字段可能返回 null,表示取不到有效值。 - HeadLines []*string `json:"HeadLines,omitempty" name:"HeadLines"` + HeadLines []*string `json:"HeadLines,omitnil" name:"HeadLines"` // 尾部数据行 // 注意:此字段可能返回 null,表示取不到有效值。 - TailLines []*string `json:"TailLines,omitempty" name:"TailLines"` + TailLines []*string `json:"TailLines,omitnil" name:"TailLines"` // 首行是否为参数名 // 注意:此字段可能返回 null,表示取不到有效值。 - HeaderInFile *bool `json:"HeaderInFile,omitempty" name:"HeaderInFile"` + HeaderInFile *bool `json:"HeaderInFile,omitnil" name:"HeaderInFile"` // 参数名数组 // 注意:此字段可能返回 null,表示取不到有效值。 - HeaderColumns []*string `json:"HeaderColumns,omitempty" name:"HeaderColumns"` + HeaderColumns []*string `json:"HeaderColumns,omitnil" name:"HeaderColumns"` // 文件夹中的文件 // 注意:此字段可能返回 null,表示取不到有效值。 - FileInfos []*FileInfo `json:"FileInfos,omitempty" name:"FileInfos"` + FileInfos []*FileInfo `json:"FileInfos,omitnil" name:"FileInfos"` // 关联场景 // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioSet []*Scenario `json:"ScenarioSet,omitempty" name:"ScenarioSet"` + ScenarioSet []*Scenario `json:"ScenarioSet,omitnil" name:"ScenarioSet"` // 文件状态 // 注意:此字段可能返回 null,表示取不到有效值。 - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 创建时间 // 注意:此字段可能返回 null,表示取不到有效值。 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 项目 ID // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` - // 用户账号的 App ID + // 此字段不再使用 // 注意:此字段可能返回 null,表示取不到有效值。 - AppID *int64 `json:"AppID,omitempty" name:"AppID"` + AppID *int64 `json:"AppID,omitnil" name:"AppID"` // 用户主账号 // 注意:此字段可能返回 null,表示取不到有效值。 - Uin *string `json:"Uin,omitempty" name:"Uin"` + Uin *string `json:"Uin,omitnil" name:"Uin"` // 用户子账号 // 注意:此字段可能返回 null,表示取不到有效值。 - SubAccountUin *string `json:"SubAccountUin,omitempty" name:"SubAccountUin"` + SubAccountUin *string `json:"SubAccountUin,omitnil" name:"SubAccountUin"` // 用户账号的 App ID // 注意:此字段可能返回 null,表示取不到有效值。 - AppId *int64 `json:"AppId,omitempty" name:"AppId"` + AppId *int64 `json:"AppId,omitnil" name:"AppId"` } type FileInfo struct { // 文件名 // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 文件大小 // 注意:此字段可能返回 null,表示取不到有效值。 - Size *int64 `json:"Size,omitempty" name:"Size"` + Size *int64 `json:"Size,omitnil" name:"Size"` // 文件类型 // 注意:此字段可能返回 null,表示取不到有效值。 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 更新时间 // 注意:此字段可能返回 null,表示取不到有效值。 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // 文件 ID // 注意:此字段可能返回 null,表示取不到有效值。 - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` } type Filter struct { // 等于:0,不等于:1 - Operator *int64 `json:"Operator,omitempty" name:"Operator"` - - // 指标名 - LabelName *string `json:"LabelName,omitempty" name:"LabelName"` - - // 指标值 - LabelValue *string `json:"LabelValue,omitempty" name:"LabelValue"` + Operator *int64 `json:"Operator,omitnil" name:"Operator"` + + // 标签名,可选值包括: + // 1. method,请求方法名; + // 2. proto:协议名; + // 3. service:服务名; + // 4. status:响应状态码; + // 5. result:响应详情; + // 6. check:检查名。 + LabelName *string `json:"LabelName,omitnil" name:"LabelName"` + + // 标签值: + // 1. method:请求方法名,以 http 协议为例,method 为 GET、POST、PUT 等; + // 2. proto:协议名,以 http 协议为例,proto 为 HTTP/1.1、HTTP/2 等; + // 3. service:服务名,以 http 协议为例,service 为请求 url,如 http://httpbin.org/get 等; + // 4. status:响应状态码,以 http 协议为例,状态码包括 200、404、500 等; + // 5. result:响应详情,通过 result 判断请求成功或失败;请求正常,result 标签值为 ok;请求失败,result 标签携带错误码和描述; + // 6. check:检查名,标签值为用户设置的检查点名称。 + LabelValue *string `json:"LabelValue,omitnil" name:"LabelValue"` } // Predefined struct for user type GenerateTmpKeyRequestParams struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` } type GenerateTmpKeyRequest struct { *tchttp.BaseRequest // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` } func (r *GenerateTmpKeyRequest) ToJsonString() string { @@ -3667,16 +3809,16 @@ func (r *GenerateTmpKeyRequest) FromJsonString(s string) error { // Predefined struct for user type GenerateTmpKeyResponseParams struct { // 临时访问凭证获取时刻的时间戳(单位秒) - StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` + StartTime *int64 `json:"StartTime,omitnil" name:"StartTime"` // 临时访问凭证超时 时刻的时间戳(单位秒) - ExpiredTime *int64 `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + ExpiredTime *int64 `json:"ExpiredTime,omitnil" name:"ExpiredTime"` // 临时访问凭证 - Credentials *Credentials `json:"Credentials,omitempty" name:"Credentials"` + Credentials *Credentials `json:"Credentials,omitnil" name:"Credentials"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type GenerateTmpKeyResponse struct { @@ -3697,495 +3839,515 @@ func (r *GenerateTmpKeyResponse) FromJsonString(s string) error { type GeoRegionsLoadItem struct { // 地域ID - RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` + RegionId *int64 `json:"RegionId,omitnil" name:"RegionId"` // 地域 - Region *string `json:"Region,omitempty" name:"Region"` + Region *string `json:"Region,omitnil" name:"Region"` // 百分比 - Percentage *int64 `json:"Percentage,omitempty" name:"Percentage"` + Percentage *int64 `json:"Percentage,omitnil" name:"Percentage"` } type HostAlias struct { // 需绑定的域名列表 // 注意:此字段可能返回 null,表示取不到有效值。 - HostNames []*string `json:"HostNames,omitempty" name:"HostNames"` + HostNames []*string `json:"HostNames,omitnil" name:"HostNames"` // 需绑定的 IP 地址 // 注意:此字段可能返回 null,表示取不到有效值。 - IP *string `json:"IP,omitempty" name:"IP"` + IP *string `json:"IP,omitnil" name:"IP"` } type InternalMetricQuery struct { // 指标名 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 聚合函数 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // deprecated, 请使用Filters - Labels []*Label `json:"Labels,omitempty" name:"Labels"` + Labels []*Label `json:"Labels,omitnil" name:"Labels"` // 指标过滤 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + Filters []*Filter `json:"Filters,omitnil" name:"Filters"` // 指标分组 - GroupBy []*string `json:"GroupBy,omitempty" name:"GroupBy"` + GroupBy []*string `json:"GroupBy,omitnil" name:"GroupBy"` } type Job struct { // 任务的JobID // 注意:此字段可能返回 null,表示取不到有效值。 - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 任务的场景ID // 注意:此字段可能返回 null,表示取不到有效值。 - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 任务的施压配置 // 注意:此字段可能返回 null,表示取不到有效值。 - Load *Load `json:"Load,omitempty" name:"Load"` + Load *Load `json:"Load,omitnil" name:"Load"` - // deprecated + // 此字段不再使用 // 注意:此字段可能返回 null,表示取不到有效值。 - Configs []*string `json:"Configs,omitempty" name:"Configs"` + Configs []*string `json:"Configs,omitnil" name:"Configs"` // 任务的数据集文件 // 注意:此字段可能返回 null,表示取不到有效值。 - Datasets []*TestData `json:"Datasets,omitempty" name:"Datasets"` + Datasets []*TestData `json:"Datasets,omitnil" name:"Datasets"` - // deprecated + // 此字段不再使用 // 注意:此字段可能返回 null,表示取不到有效值。 - Extensions []*string `json:"Extensions,omitempty" name:"Extensions"` + Extensions []*string `json:"Extensions,omitnil" name:"Extensions"` // 任务的运行状态, JobUnknown: 0,JobCreated:1,JobPending:2, JobPreparing:3,JobSelectClustering:4,JobCreateTasking:5,JobSyncTasking:6 // JobRunning:11,JobFinished:12,JobPrepareException:13,JobFinishException:14,JobAborting:15,JobAborted:16,JobAbortException:17,JobDeleted:18, // JobSelectClusterException:19,JobCreateTaskException:20,JobSyncTaskException:21 // 注意:此字段可能返回 null,表示取不到有效值。 - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 任务的开始时间 // 注意:此字段可能返回 null,表示取不到有效值。 - StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + StartTime *string `json:"StartTime,omitnil" name:"StartTime"` // 任务的结束时间 // 注意:此字段可能返回 null,表示取不到有效值。 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // 任务的最大VU数 // 注意:此字段可能返回 null,表示取不到有效值。 - MaxVirtualUserCount *int64 `json:"MaxVirtualUserCount,omitempty" name:"MaxVirtualUserCount"` + MaxVirtualUserCount *int64 `json:"MaxVirtualUserCount,omitnil" name:"MaxVirtualUserCount"` // 任务的备注信息 // 注意:此字段可能返回 null,表示取不到有效值。 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` // 错误率百分比 // 注意:此字段可能返回 null,表示取不到有效值。 - ErrorRate *float64 `json:"ErrorRate,omitempty" name:"ErrorRate"` + ErrorRate *float64 `json:"ErrorRate,omitnil" name:"ErrorRate"` // 任务发起人 // 注意:此字段可能返回 null,表示取不到有效值。 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` - // deprecated + // 此字段不再使用 // 注意:此字段可能返回 null,表示取不到有效值。 - LoadSources *LoadSource `json:"LoadSources,omitempty" name:"LoadSources"` + LoadSources *LoadSource `json:"LoadSources,omitnil" name:"LoadSources"` // 任务时长 // 注意:此字段可能返回 null,表示取不到有效值。 - Duration *int64 `json:"Duration,omitempty" name:"Duration"` + Duration *int64 `json:"Duration,omitnil" name:"Duration"` // 最大每秒请求数 // 注意:此字段可能返回 null,表示取不到有效值。 - MaxRequestsPerSecond *int64 `json:"MaxRequestsPerSecond,omitempty" name:"MaxRequestsPerSecond"` + MaxRequestsPerSecond *int64 `json:"MaxRequestsPerSecond,omitnil" name:"MaxRequestsPerSecond"` // 总请求数 // 注意:此字段可能返回 null,表示取不到有效值。 - RequestTotal *float64 `json:"RequestTotal,omitempty" name:"RequestTotal"` + RequestTotal *float64 `json:"RequestTotal,omitnil" name:"RequestTotal"` // 平均每秒请求数 // 注意:此字段可能返回 null,表示取不到有效值。 - RequestsPerSecond *float64 `json:"RequestsPerSecond,omitempty" name:"RequestsPerSecond"` + RequestsPerSecond *float64 `json:"RequestsPerSecond,omitnil" name:"RequestsPerSecond"` // 平均响应时间 // 注意:此字段可能返回 null,表示取不到有效值。 - ResponseTimeAverage *float64 `json:"ResponseTimeAverage,omitempty" name:"ResponseTimeAverage"` + ResponseTimeAverage *float64 `json:"ResponseTimeAverage,omitnil" name:"ResponseTimeAverage"` // 响应时间第99百分位 // 注意:此字段可能返回 null,表示取不到有效值。 - ResponseTimeP99 *float64 `json:"ResponseTimeP99,omitempty" name:"ResponseTimeP99"` + ResponseTimeP99 *float64 `json:"ResponseTimeP99,omitnil" name:"ResponseTimeP99"` // 响应时间第95百分位 // 注意:此字段可能返回 null,表示取不到有效值。 - ResponseTimeP95 *float64 `json:"ResponseTimeP95,omitempty" name:"ResponseTimeP95"` + ResponseTimeP95 *float64 `json:"ResponseTimeP95,omitnil" name:"ResponseTimeP95"` // 响应时间第90百分位 // 注意:此字段可能返回 null,表示取不到有效值。 - ResponseTimeP90 *float64 `json:"ResponseTimeP90,omitempty" name:"ResponseTimeP90"` + ResponseTimeP90 *float64 `json:"ResponseTimeP90,omitnil" name:"ResponseTimeP90"` - // deprecated + // 此字段不再使用 // 注意:此字段可能返回 null,表示取不到有效值。 - Scripts []*string `json:"Scripts,omitempty" name:"Scripts"` + Scripts []*string `json:"Scripts,omitnil" name:"Scripts"` // 最大响应时间 // 注意:此字段可能返回 null,表示取不到有效值。 - ResponseTimeMax *float64 `json:"ResponseTimeMax,omitempty" name:"ResponseTimeMax"` + ResponseTimeMax *float64 `json:"ResponseTimeMax,omitnil" name:"ResponseTimeMax"` // 最小响应时间 // 注意:此字段可能返回 null,表示取不到有效值。 - ResponseTimeMin *float64 `json:"ResponseTimeMin,omitempty" name:"ResponseTimeMin"` + ResponseTimeMin *float64 `json:"ResponseTimeMin,omitnil" name:"ResponseTimeMin"` // 发压host信息 // 注意:此字段可能返回 null,表示取不到有效值。 - LoadSourceInfos []*LoadSource `json:"LoadSourceInfos,omitempty" name:"LoadSourceInfos"` + LoadSourceInfos []*LoadSource `json:"LoadSourceInfos,omitnil" name:"LoadSourceInfos"` // 测试脚本信息 // 注意:此字段可能返回 null,表示取不到有效值。 - TestScripts []*ScriptInfo `json:"TestScripts,omitempty" name:"TestScripts"` + TestScripts []*ScriptInfo `json:"TestScripts,omitnil" name:"TestScripts"` // 协议脚本信息 // 注意:此字段可能返回 null,表示取不到有效值。 - Protocols []*ProtocolInfo `json:"Protocols,omitempty" name:"Protocols"` + Protocols []*ProtocolInfo `json:"Protocols,omitnil" name:"Protocols"` // 请求文件信息 // 注意:此字段可能返回 null,表示取不到有效值。 - RequestFiles []*FileInfo `json:"RequestFiles,omitempty" name:"RequestFiles"` + RequestFiles []*FileInfo `json:"RequestFiles,omitnil" name:"RequestFiles"` // 拓展包文件信息 // 注意:此字段可能返回 null,表示取不到有效值。 - Plugins []*FileInfo `json:"Plugins,omitempty" name:"Plugins"` + Plugins []*FileInfo `json:"Plugins,omitnil" name:"Plugins"` // 定时任务ID // 注意:此字段可能返回 null,表示取不到有效值。 - CronId *string `json:"CronId,omitempty" name:"CronId"` + CronId *string `json:"CronId,omitnil" name:"CronId"` // 场景类型 // 注意:此字段可能返回 null,表示取不到有效值。 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 域名绑定配置 // 注意:此字段可能返回 null,表示取不到有效值。 - DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitempty" name:"DomainNameConfig"` + DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitnil" name:"DomainNameConfig"` // false // 注意:此字段可能返回 null,表示取不到有效值。 - Debug *bool `json:"Debug,omitempty" name:"Debug"` + Debug *bool `json:"Debug,omitnil" name:"Debug"` // 中断原因 // 注意:此字段可能返回 null,表示取不到有效值。 - AbortReason *int64 `json:"AbortReason,omitempty" name:"AbortReason"` + AbortReason *int64 `json:"AbortReason,omitnil" name:"AbortReason"` // 任务的创建时间 // 注意:此字段可能返回 null,表示取不到有效值。 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 项目ID // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 通知事件回调 // 注意:此字段可能返回 null,表示取不到有效值。 - NotificationHooks []*NotificationHook `json:"NotificationHooks,omitempty" name:"NotificationHooks"` + NotificationHooks []*NotificationHook `json:"NotificationHooks,omitnil" name:"NotificationHooks"` + + // 每秒接收字节数 + // 注意:此字段可能返回 null,表示取不到有效值。 + NetworkReceiveRate *float64 `json:"NetworkReceiveRate,omitnil" name:"NetworkReceiveRate"` + + // 每秒发送字节数 + // 注意:此字段可能返回 null,表示取不到有效值。 + NetworkSendRate *float64 `json:"NetworkSendRate,omitnil" name:"NetworkSendRate"` + + // 任务状态描述 + // 注意:此字段可能返回 null,表示取不到有效值。 + Message *string `json:"Message,omitnil" name:"Message"` + + // test-project + // 注意:此字段可能返回 null,表示取不到有效值。 + ProjectName *string `json:"ProjectName,omitnil" name:"ProjectName"` + + // test-scenario + // 注意:此字段可能返回 null,表示取不到有效值。 + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` } type Label struct { // label名字 - LabelName *string `json:"LabelName,omitempty" name:"LabelName"` + LabelName *string `json:"LabelName,omitnil" name:"LabelName"` // label值 - LabelValue *string `json:"LabelValue,omitempty" name:"LabelValue"` + LabelValue *string `json:"LabelValue,omitnil" name:"LabelValue"` } type LabelWithValues struct { // 标签名称 - LabelName *string `json:"LabelName,omitempty" name:"LabelName"` + LabelName *string `json:"LabelName,omitnil" name:"LabelName"` // 标签值 - LabelValues []*string `json:"LabelValues,omitempty" name:"LabelValues"` + LabelValues []*string `json:"LabelValues,omitnil" name:"LabelValues"` } type Load struct { // 施压配置 // 注意:此字段可能返回 null,表示取不到有效值。 - LoadSpec *LoadSpec `json:"LoadSpec,omitempty" name:"LoadSpec"` + LoadSpec *LoadSpec `json:"LoadSpec,omitnil" name:"LoadSpec"` // 压力来源 // 注意:此字段可能返回 null,表示取不到有效值。 - VpcLoadDistribution *VpcLoadDistribution `json:"VpcLoadDistribution,omitempty" name:"VpcLoadDistribution"` + VpcLoadDistribution *VpcLoadDistribution `json:"VpcLoadDistribution,omitnil" name:"VpcLoadDistribution"` // 压力分布 // 注意:此字段可能返回 null,表示取不到有效值。 - GeoRegionsLoadDistribution []*GeoRegionsLoadItem `json:"GeoRegionsLoadDistribution,omitempty" name:"GeoRegionsLoadDistribution"` + GeoRegionsLoadDistribution []*GeoRegionsLoadItem `json:"GeoRegionsLoadDistribution,omitnil" name:"GeoRegionsLoadDistribution"` } type LoadSource struct { // 发压host的IP // 注意:此字段可能返回 null,表示取不到有效值。 - IP *string `json:"IP,omitempty" name:"IP"` + IP *string `json:"IP,omitnil" name:"IP"` // 发压host所在的pod // 注意:此字段可能返回 null,表示取不到有效值。 - PodName *string `json:"PodName,omitempty" name:"PodName"` + PodName *string `json:"PodName,omitnil" name:"PodName"` // 所属地域 // 注意:此字段可能返回 null,表示取不到有效值。 - Region *string `json:"Region,omitempty" name:"Region"` + Region *string `json:"Region,omitnil" name:"Region"` } type LoadSpec struct { // 并发施压模式的配置 // 注意:此字段可能返回 null,表示取不到有效值。 - Concurrency *Concurrency `json:"Concurrency,omitempty" name:"Concurrency"` + Concurrency *Concurrency `json:"Concurrency,omitnil" name:"Concurrency"` // RPS施压模式的配置 // 注意:此字段可能返回 null,表示取不到有效值。 - RequestsPerSecond *RequestsPerSecond `json:"RequestsPerSecond,omitempty" name:"RequestsPerSecond"` + RequestsPerSecond *RequestsPerSecond `json:"RequestsPerSecond,omitnil" name:"RequestsPerSecond"` // 脚本内置压力模式 // 注意:此字段可能返回 null,表示取不到有效值。 - ScriptOrigin *ScriptOrigin `json:"ScriptOrigin,omitempty" name:"ScriptOrigin"` + ScriptOrigin *ScriptOrigin `json:"ScriptOrigin,omitnil" name:"ScriptOrigin"` } type MetricInfo struct { // 后台指标 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 前台展示指标名称 - Alias *string `json:"Alias,omitempty" name:"Alias"` + Alias *string `json:"Alias,omitnil" name:"Alias"` // 指标描述 // 注意:此字段可能返回 null,表示取不到有效值。 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 指标类型 - MetricType *string `json:"MetricType,omitempty" name:"MetricType"` + MetricType *string `json:"MetricType,omitnil" name:"MetricType"` // 默认指标单位 - Unit *string `json:"Unit,omitempty" name:"Unit"` + Unit *string `json:"Unit,omitnil" name:"Unit"` // 指标支持的聚合函数 - Aggregations []*AggregationLegend `json:"Aggregations,omitempty" name:"Aggregations"` + Aggregations []*AggregationLegend `json:"Aggregations,omitnil" name:"Aggregations"` // 是否内部指标,内部指标不可在前台提供用户自由选择 - InnerMetric *bool `json:"InnerMetric,omitempty" name:"InnerMetric"` + InnerMetric *bool `json:"InnerMetric,omitnil" name:"InnerMetric"` } type MetricLabelWithValues struct { // metric 名字 - MetricName *string `json:"MetricName,omitempty" name:"MetricName"` + MetricName *string `json:"MetricName,omitnil" name:"MetricName"` // label及values 数组 - LabelValuesSet []*LabelWithValues `json:"LabelValuesSet,omitempty" name:"LabelValuesSet"` + LabelValuesSet []*LabelWithValues `json:"LabelValuesSet,omitnil" name:"LabelValuesSet"` } type NormalLog struct { // 毫秒时间戳 // 注意:此字段可能返回 null,表示取不到有效值。 - Timestamp *string `json:"Timestamp,omitempty" name:"Timestamp"` + Timestamp *string `json:"Timestamp,omitnil" name:"Timestamp"` // 日志级别 // 注意:此字段可能返回 null,表示取不到有效值。 - SeverityText *string `json:"SeverityText,omitempty" name:"SeverityText"` + SeverityText *string `json:"SeverityText,omitnil" name:"SeverityText"` // 日志输出内容 // 注意:此字段可能返回 null,表示取不到有效值。 - Body *string `json:"Body,omitempty" name:"Body"` + Body *string `json:"Body,omitnil" name:"Body"` } type Notification struct { // 发生事件 - Events []*string `json:"Events,omitempty" name:"Events"` + Events []*string `json:"Events,omitnil" name:"Events"` // webhook的网址 - URL *string `json:"URL,omitempty" name:"URL"` + URL *string `json:"URL,omitnil" name:"URL"` } type NotificationHook struct { // 通知事件 // 注意:此字段可能返回 null,表示取不到有效值。 - Events []*string `json:"Events,omitempty" name:"Events"` + Events []*string `json:"Events,omitnil" name:"Events"` // 回调 URL // 注意:此字段可能返回 null,表示取不到有效值。 - URL *string `json:"URL,omitempty" name:"URL"` + URL *string `json:"URL,omitnil" name:"URL"` } type Project struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 项目名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目描述 // 注意:此字段可能返回 null,表示取不到有效值。 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 标签数组 // 注意:此字段可能返回 null,表示取不到有效值。 - Tags []*TagSpec `json:"Tags,omitempty" name:"Tags"` + Tags []*TagSpec `json:"Tags,omitnil" name:"Tags"` // 项目状态 - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 创建时间 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 修改时间 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // App ID - AppId *int64 `json:"AppId,omitempty" name:"AppId"` + AppId *int64 `json:"AppId,omitnil" name:"AppId"` // 用户ID - Uin *string `json:"Uin,omitempty" name:"Uin"` + Uin *string `json:"Uin,omitnil" name:"Uin"` // 子用户ID - SubAccountUin *string `json:"SubAccountUin,omitempty" name:"SubAccountUin"` + SubAccountUin *string `json:"SubAccountUin,omitnil" name:"SubAccountUin"` } type ProtocolInfo struct { // 协议详情 // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 文件大小 // 注意:此字段可能返回 null,表示取不到有效值。 - Size *int64 `json:"Size,omitempty" name:"Size"` + Size *int64 `json:"Size,omitnil" name:"Size"` // 文件类型 // 注意:此字段可能返回 null,表示取不到有效值。 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 更新时间 // 注意:此字段可能返回 null,表示取不到有效值。 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // 文件 ID // 注意:此字段可能返回 null,表示取不到有效值。 - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` } type ReactionTimeRange struct { // 最小响应时间,单位ms - Min *string `json:"Min,omitempty" name:"Min"` + Min *string `json:"Min,omitnil" name:"Min"` // 最大响应时间,单位ms - Max *string `json:"Max,omitempty" name:"Max"` + Max *string `json:"Max,omitnil" name:"Max"` } type RegionDetail struct { // 地域代码 - Region *string `json:"Region,omitempty" name:"Region"` + Region *string `json:"Region,omitnil" name:"Region"` // 地域ID - RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` + RegionId *int64 `json:"RegionId,omitnil" name:"RegionId"` // 地域所在的地区 - Area *string `json:"Area,omitempty" name:"Area"` + Area *string `json:"Area,omitnil" name:"Area"` // 地域名称 - RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + RegionName *string `json:"RegionName,omitnil" name:"RegionName"` // 地域状态 - RegionState *int64 `json:"RegionState,omitempty" name:"RegionState"` + RegionState *int64 `json:"RegionState,omitnil" name:"RegionState"` // 地域简称 - RegionShortName *string `json:"RegionShortName,omitempty" name:"RegionShortName"` + RegionShortName *string `json:"RegionShortName,omitnil" name:"RegionShortName"` // 创建时间 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 更新时间 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` } type RequestSummary struct { // 请求URL - Service *string `json:"Service,omitempty" name:"Service"` + Service *string `json:"Service,omitnil" name:"Service"` // 请求方法 - Method *string `json:"Method,omitempty" name:"Method"` + Method *string `json:"Method,omitnil" name:"Method"` // 请求次数 - Count *int64 `json:"Count,omitempty" name:"Count"` + Count *int64 `json:"Count,omitnil" name:"Count"` // 请求响应平均耗时,单位秒 - Average *float64 `json:"Average,omitempty" name:"Average"` + Average *float64 `json:"Average,omitnil" name:"Average"` // 请求p90耗时,单位秒 - P90 *float64 `json:"P90,omitempty" name:"P90"` + P90 *float64 `json:"P90,omitnil" name:"P90"` // 请求p95耗时,单位秒 - P95 *float64 `json:"P95,omitempty" name:"P95"` + P95 *float64 `json:"P95,omitnil" name:"P95"` // 请求最小耗时,单位秒 - Min *float64 `json:"Min,omitempty" name:"Min"` + Min *float64 `json:"Min,omitnil" name:"Min"` // 请求最大耗时,单位秒 - Max *float64 `json:"Max,omitempty" name:"Max"` + Max *float64 `json:"Max,omitnil" name:"Max"` // 请求错误率 - ErrorPercentage *float64 `json:"ErrorPercentage,omitempty" name:"ErrorPercentage"` + ErrorPercentage *float64 `json:"ErrorPercentage,omitnil" name:"ErrorPercentage"` // 请求p99耗时,单位秒 - P99 *float64 `json:"P99,omitempty" name:"P99"` + P99 *float64 `json:"P99,omitnil" name:"P99"` // 响应状态码 - Status *string `json:"Status,omitempty" name:"Status"` + Status *string `json:"Status,omitnil" name:"Status"` // 响应详情 - Result *string `json:"Result,omitempty" name:"Result"` + Result *string `json:"Result,omitnil" name:"Result"` } type RequestsPerSecond struct { // 最大RPS // 注意:此字段可能返回 null,表示取不到有效值。 - MaxRequestsPerSecond *int64 `json:"MaxRequestsPerSecond,omitempty" name:"MaxRequestsPerSecond"` + MaxRequestsPerSecond *int64 `json:"MaxRequestsPerSecond,omitnil" name:"MaxRequestsPerSecond"` // 施压时间 // 注意:此字段可能返回 null,表示取不到有效值。 - DurationSeconds *int64 `json:"DurationSeconds,omitempty" name:"DurationSeconds"` + DurationSeconds *int64 `json:"DurationSeconds,omitnil" name:"DurationSeconds"` // deprecated // 注意:此字段可能返回 null,表示取不到有效值。 - TargetVirtualUsers *int64 `json:"TargetVirtualUsers,omitempty" name:"TargetVirtualUsers"` + TargetVirtualUsers *int64 `json:"TargetVirtualUsers,omitnil" name:"TargetVirtualUsers"` // 资源数 // 注意:此字段可能返回 null,表示取不到有效值。 - Resources *int64 `json:"Resources,omitempty" name:"Resources"` + Resources *int64 `json:"Resources,omitnil" name:"Resources"` // 起始RPS // 注意:此字段可能返回 null,表示取不到有效值。 - StartRequestsPerSecond *int64 `json:"StartRequestsPerSecond,omitempty" name:"StartRequestsPerSecond"` + StartRequestsPerSecond *int64 `json:"StartRequestsPerSecond,omitnil" name:"StartRequestsPerSecond"` // 目标RPS,入参无效 // 注意:此字段可能返回 null,表示取不到有效值。 - TargetRequestsPerSecond *int64 `json:"TargetRequestsPerSecond,omitempty" name:"TargetRequestsPerSecond"` + TargetRequestsPerSecond *int64 `json:"TargetRequestsPerSecond,omitnil" name:"TargetRequestsPerSecond"` // 优雅关停的等待时间 // 注意:此字段可能返回 null,表示取不到有效值。 - GracefulStopSeconds *int64 `json:"GracefulStopSeconds,omitempty" name:"GracefulStopSeconds"` + GracefulStopSeconds *int64 `json:"GracefulStopSeconds,omitnil" name:"GracefulStopSeconds"` } // Predefined struct for user type RestartCronJobsRequestParams struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` } type RestartCronJobsRequest struct { *tchttp.BaseRequest // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID数组 - CronJobIds []*string `json:"CronJobIds,omitempty" name:"CronJobIds"` + CronJobIds []*string `json:"CronJobIds,omitnil" name:"CronJobIds"` } func (r *RestartCronJobsRequest) ToJsonString() string { @@ -4211,7 +4373,7 @@ func (r *RestartCronJobsRequest) FromJsonString(s string) error { // Predefined struct for user type RestartCronJobsResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type RestartCronJobsResponse struct { @@ -4233,300 +4395,308 @@ func (r *RestartCronJobsResponse) FromJsonString(s string) error { type SLALabel struct { // 标签名 // 注意:此字段可能返回 null,表示取不到有效值。 - LabelName *string `json:"LabelName,omitempty" name:"LabelName"` + LabelName *string `json:"LabelName,omitnil" name:"LabelName"` // 标签值 // 注意:此字段可能返回 null,表示取不到有效值。 - LabelValue *string `json:"LabelValue,omitempty" name:"LabelValue"` + LabelValue *string `json:"LabelValue,omitnil" name:"LabelValue"` } type SLAPolicy struct { // SLA 规则 // 注意:此字段可能返回 null,表示取不到有效值。 - SLARules []*SLARule `json:"SLARules,omitempty" name:"SLARules"` + SLARules []*SLARule `json:"SLARules,omitnil" name:"SLARules"` // 告警通知渠道 // 注意:此字段可能返回 null,表示取不到有效值。 - AlertChannel *AlertChannel `json:"AlertChannel,omitempty" name:"AlertChannel"` + AlertChannel *AlertChannel `json:"AlertChannel,omitnil" name:"AlertChannel"` } type SLARule struct { // 压测指标 // 注意:此字段可能返回 null,表示取不到有效值。 - Metric *string `json:"Metric,omitempty" name:"Metric"` + Metric *string `json:"Metric,omitnil" name:"Metric"` // 压测指标聚合方法 // 注意:此字段可能返回 null,表示取不到有效值。 - Aggregation *string `json:"Aggregation,omitempty" name:"Aggregation"` + Aggregation *string `json:"Aggregation,omitnil" name:"Aggregation"` // 压测指标条件判断符号 // 注意:此字段可能返回 null,表示取不到有效值。 - Condition *string `json:"Condition,omitempty" name:"Condition"` + Condition *string `json:"Condition,omitnil" name:"Condition"` // 阈值 // 注意:此字段可能返回 null,表示取不到有效值。 - Value *float64 `json:"Value,omitempty" name:"Value"` + Value *float64 `json:"Value,omitnil" name:"Value"` // 标签 // 注意:此字段可能返回 null,表示取不到有效值。 - LabelFilter []*SLALabel `json:"LabelFilter,omitempty" name:"LabelFilter"` + LabelFilter []*SLALabel `json:"LabelFilter,omitnil" name:"LabelFilter"` // 是否停止压测任务 // 注意:此字段可能返回 null,表示取不到有效值。 - AbortFlag *bool `json:"AbortFlag,omitempty" name:"AbortFlag"` + AbortFlag *bool `json:"AbortFlag,omitnil" name:"AbortFlag"` // 持续时长 // 注意:此字段可能返回 null,表示取不到有效值。 - For *string `json:"For,omitempty" name:"For"` + For *string `json:"For,omitnil" name:"For"` } type SampleLog struct { // 日志毫秒时间戳 // 注意:此字段可能返回 null,表示取不到有效值。 - Timestamp *string `json:"Timestamp,omitempty" name:"Timestamp"` + Timestamp *string `json:"Timestamp,omitnil" name:"Timestamp"` // 采样日志属性 // 注意:此字段可能返回 null,表示取不到有效值。 - Attributes *Attributes `json:"Attributes,omitempty" name:"Attributes"` + Attributes *Attributes `json:"Attributes,omitnil" name:"Attributes"` // har格式的采样请求 // 注意:此字段可能返回 null,表示取不到有效值。 - Body *string `json:"Body,omitempty" name:"Body"` + Body *string `json:"Body,omitnil" name:"Body"` } type SamplePair struct { // is the number of milliseconds since the epoch (1970-01-01 00:00 UTC) excluding leap seconds. - Timestamp *int64 `json:"Timestamp,omitempty" name:"Timestamp"` + Timestamp *int64 `json:"Timestamp,omitnil" name:"Timestamp"` // is a representation of a value for a given sample at a given time. - Value *float64 `json:"Value,omitempty" name:"Value"` + Value *float64 `json:"Value,omitnil" name:"Value"` } type SampleStream struct { // labels描述 // 注意:此字段可能返回 null,表示取不到有效值。 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` + Labels []*Label `json:"Labels,omitnil" name:"Labels"` // 指标采样数组 - Values []*SamplePair `json:"Values,omitempty" name:"Values"` + Values []*SamplePair `json:"Values,omitnil" name:"Values"` // 指标序列名字 // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` } type Scenario struct { // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 场景描述 // 注意:此字段可能返回 null,表示取不到有效值。 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 场景类型,如pts-http, pts-js, pts-trpc, pts-jmeter // 注意:此字段可能返回 null,表示取不到有效值。 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 场景状态 // 注意:此字段可能返回 null,表示取不到有效值。 - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 施压配置 // 注意:此字段可能返回 null,表示取不到有效值。 - Load *Load `json:"Load,omitempty" name:"Load"` + Load *Load `json:"Load,omitnil" name:"Load"` // deprecated // 注意:此字段可能返回 null,表示取不到有效值。 - EncodedScripts *string `json:"EncodedScripts,omitempty" name:"EncodedScripts"` + EncodedScripts *string `json:"EncodedScripts,omitnil" name:"EncodedScripts"` // deprecated // 注意:此字段可能返回 null,表示取不到有效值。 - Configs []*string `json:"Configs,omitempty" name:"Configs"` + Configs []*string `json:"Configs,omitnil" name:"Configs"` // deprecated // 注意:此字段可能返回 null,表示取不到有效值。 - Extensions []*string `json:"Extensions,omitempty" name:"Extensions"` + Extensions []*string `json:"Extensions,omitnil" name:"Extensions"` // 测试数据集 // 注意:此字段可能返回 null,表示取不到有效值。 - Datasets []*TestData `json:"Datasets,omitempty" name:"Datasets"` + Datasets []*TestData `json:"Datasets,omitnil" name:"Datasets"` // SLA规则的ID // 注意:此字段可能返回 null,表示取不到有效值。 - SLAId *string `json:"SLAId,omitempty" name:"SLAId"` + SLAId *string `json:"SLAId,omitnil" name:"SLAId"` // Cron Job规则的ID // 注意:此字段可能返回 null,表示取不到有效值。 - CronId *string `json:"CronId,omitempty" name:"CronId"` + CronId *string `json:"CronId,omitnil" name:"CronId"` // 场景创建时间 - CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` + CreatedAt *string `json:"CreatedAt,omitnil" name:"CreatedAt"` // 场景修改时间 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // 项目ID // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // App ID // 注意:此字段可能返回 null,表示取不到有效值。 - AppId *int64 `json:"AppId,omitempty" name:"AppId"` + AppId *int64 `json:"AppId,omitnil" name:"AppId"` // 用户ID // 注意:此字段可能返回 null,表示取不到有效值。 - Uin *string `json:"Uin,omitempty" name:"Uin"` + Uin *string `json:"Uin,omitnil" name:"Uin"` // 子用户ID // 注意:此字段可能返回 null,表示取不到有效值。 - SubAccountUin *string `json:"SubAccountUin,omitempty" name:"SubAccountUin"` + SubAccountUin *string `json:"SubAccountUin,omitnil" name:"SubAccountUin"` // 测试脚本信息 // 注意:此字段可能返回 null,表示取不到有效值。 - TestScripts []*ScriptInfo `json:"TestScripts,omitempty" name:"TestScripts"` + TestScripts []*ScriptInfo `json:"TestScripts,omitnil" name:"TestScripts"` // 协议文件信息 // 注意:此字段可能返回 null,表示取不到有效值。 - Protocols []*ProtocolInfo `json:"Protocols,omitempty" name:"Protocols"` + Protocols []*ProtocolInfo `json:"Protocols,omitnil" name:"Protocols"` // 请求文件信息 // 注意:此字段可能返回 null,表示取不到有效值。 - RequestFiles []*FileInfo `json:"RequestFiles,omitempty" name:"RequestFiles"` + RequestFiles []*FileInfo `json:"RequestFiles,omitnil" name:"RequestFiles"` // SLA 策略 // 注意:此字段可能返回 null,表示取不到有效值。 - SLAPolicy *SLAPolicy `json:"SLAPolicy,omitempty" name:"SLAPolicy"` + SLAPolicy *SLAPolicy `json:"SLAPolicy,omitnil" name:"SLAPolicy"` // 扩展包信息 // 注意:此字段可能返回 null,表示取不到有效值。 - Plugins []*FileInfo `json:"Plugins,omitempty" name:"Plugins"` + Plugins []*FileInfo `json:"Plugins,omitnil" name:"Plugins"` // 域名解析配置 // 注意:此字段可能返回 null,表示取不到有效值。 - DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitempty" name:"DomainNameConfig"` + DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitnil" name:"DomainNameConfig"` // 通知事件回调 // 注意:此字段可能返回 null,表示取不到有效值。 - NotificationHooks []*NotificationHook `json:"NotificationHooks,omitempty" name:"NotificationHooks"` + NotificationHooks []*NotificationHook `json:"NotificationHooks,omitnil" name:"NotificationHooks"` + + // 创建人员 + // 注意:此字段可能返回 null,表示取不到有效值。 + Owner *string `json:"Owner,omitnil" name:"Owner"` + + // 场景所在的项目的名字 + // 注意:此字段可能返回 null,表示取不到有效值。 + ProjectName *string `json:"ProjectName,omitnil" name:"ProjectName"` } type ScenarioRelatedJobsParams struct { // job偏移量 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` + Offset *int64 `json:"Offset,omitnil" name:"Offset"` // 限制最多查询的job数 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` + Limit *int64 `json:"Limit,omitnil" name:"Limit"` // 排序字段 - OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` + OrderBy *string `json:"OrderBy,omitnil" name:"OrderBy"` // 是否升序 - Ascend *bool `json:"Ascend,omitempty" name:"Ascend"` + Ascend *bool `json:"Ascend,omitnil" name:"Ascend"` } type ScenarioWithJobs struct { // scecario结果 // 注意:此字段可能返回 null,表示取不到有效值。 - Scenario *Scenario `json:"Scenario,omitempty" name:"Scenario"` + Scenario *Scenario `json:"Scenario,omitnil" name:"Scenario"` // job结果 // 注意:此字段可能返回 null,表示取不到有效值。 - Jobs []*Job `json:"Jobs,omitempty" name:"Jobs"` + Jobs []*Job `json:"Jobs,omitnil" name:"Jobs"` } type ScriptInfo struct { // 文件名 // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 文件大小 // 注意:此字段可能返回 null,表示取不到有效值。 - Size *int64 `json:"Size,omitempty" name:"Size"` + Size *int64 `json:"Size,omitnil" name:"Size"` // 文件类型 // 注意:此字段可能返回 null,表示取不到有效值。 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 更新时间 // 注意:此字段可能返回 null,表示取不到有效值。 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // base64编码后的文件内容 // 注意:此字段可能返回 null,表示取不到有效值。 - EncodedContent *string `json:"EncodedContent,omitempty" name:"EncodedContent"` + EncodedContent *string `json:"EncodedContent,omitnil" name:"EncodedContent"` // base64编码后的har结构体 // 注意:此字段可能返回 null,表示取不到有效值。 - EncodedHttpArchive *string `json:"EncodedHttpArchive,omitempty" name:"EncodedHttpArchive"` + EncodedHttpArchive *string `json:"EncodedHttpArchive,omitnil" name:"EncodedHttpArchive"` // 脚本权重,范围 1-100 // 注意:此字段可能返回 null,表示取不到有效值。 - LoadWeight *int64 `json:"LoadWeight,omitempty" name:"LoadWeight"` + LoadWeight *int64 `json:"LoadWeight,omitnil" name:"LoadWeight"` // 文件 ID // 注意:此字段可能返回 null,表示取不到有效值。 - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` } type ScriptOrigin struct { // 机器数量 - MachineNumber *int64 `json:"MachineNumber,omitempty" name:"MachineNumber"` + MachineNumber *int64 `json:"MachineNumber,omitnil" name:"MachineNumber"` // 机器规格 - MachineSpecification *string `json:"MachineSpecification,omitempty" name:"MachineSpecification"` + MachineSpecification *string `json:"MachineSpecification,omitnil" name:"MachineSpecification"` // 压测时长 - DurationSeconds *int64 `json:"DurationSeconds,omitempty" name:"DurationSeconds"` + DurationSeconds *int64 `json:"DurationSeconds,omitnil" name:"DurationSeconds"` } type Stage struct { // 施压时间 // 注意:此字段可能返回 null,表示取不到有效值。 - DurationSeconds *int64 `json:"DurationSeconds,omitempty" name:"DurationSeconds"` + DurationSeconds *int64 `json:"DurationSeconds,omitnil" name:"DurationSeconds"` // 虚拟用户数 // 注意:此字段可能返回 null,表示取不到有效值。 - TargetVirtualUsers *int64 `json:"TargetVirtualUsers,omitempty" name:"TargetVirtualUsers"` + TargetVirtualUsers *int64 `json:"TargetVirtualUsers,omitnil" name:"TargetVirtualUsers"` } // Predefined struct for user type StartJobRequestParams struct { // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 任务发起人 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 是否调试 - Debug *bool `json:"Debug,omitempty" name:"Debug"` + Debug *bool `json:"Debug,omitnil" name:"Debug"` // 备注 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` } type StartJobRequest struct { *tchttp.BaseRequest // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 任务发起人 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 是否调试 - Debug *bool `json:"Debug,omitempty" name:"Debug"` + Debug *bool `json:"Debug,omitnil" name:"Debug"` // 备注 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` } func (r *StartJobRequest) ToJsonString() string { @@ -4555,10 +4725,10 @@ func (r *StartJobRequest) FromJsonString(s string) error { // Predefined struct for user type StartJobResponseParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type StartJobResponse struct { @@ -4580,130 +4750,130 @@ func (r *StartJobResponse) FromJsonString(s string) error { type TagSpec struct { // 标签键 // 注意:此字段可能返回 null,表示取不到有效值。 - TagKey *string `json:"TagKey,omitempty" name:"TagKey"` + TagKey *string `json:"TagKey,omitnil" name:"TagKey"` // 标签值 // 注意:此字段可能返回 null,表示取不到有效值。 - TagValue *string `json:"TagValue,omitempty" name:"TagValue"` + TagValue *string `json:"TagValue,omitnil" name:"TagValue"` } type TestData struct { // 测试数据集所在的文件名 // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 测试数据集是否分片 // 注意:此字段可能返回 null,表示取不到有效值。 - Split *bool `json:"Split,omitempty" name:"Split"` + Split *bool `json:"Split,omitnil" name:"Split"` // 首行是否为参数名 // 注意:此字段可能返回 null,表示取不到有效值。 - HeaderInFile *bool `json:"HeaderInFile,omitempty" name:"HeaderInFile"` + HeaderInFile *bool `json:"HeaderInFile,omitnil" name:"HeaderInFile"` // 参数名数组 // 注意:此字段可能返回 null,表示取不到有效值。 - HeaderColumns []*string `json:"HeaderColumns,omitempty" name:"HeaderColumns"` + HeaderColumns []*string `json:"HeaderColumns,omitnil" name:"HeaderColumns"` // 文件行数 // 注意:此字段可能返回 null,表示取不到有效值。 - LineCount *int64 `json:"LineCount,omitempty" name:"LineCount"` + LineCount *int64 `json:"LineCount,omitnil" name:"LineCount"` // 更新时间 // 注意:此字段可能返回 null,表示取不到有效值。 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + UpdatedAt *string `json:"UpdatedAt,omitnil" name:"UpdatedAt"` // 文件字节数 // 注意:此字段可能返回 null,表示取不到有效值。 - Size *int64 `json:"Size,omitempty" name:"Size"` + Size *int64 `json:"Size,omitnil" name:"Size"` // 头部数据行 // 注意:此字段可能返回 null,表示取不到有效值。 - HeadLines []*string `json:"HeadLines,omitempty" name:"HeadLines"` + HeadLines []*string `json:"HeadLines,omitnil" name:"HeadLines"` // 尾部数据行 // 注意:此字段可能返回 null,表示取不到有效值。 - TailLines []*string `json:"TailLines,omitempty" name:"TailLines"` + TailLines []*string `json:"TailLines,omitnil" name:"TailLines"` // 文件类型 // 注意:此字段可能返回 null,表示取不到有效值。 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 文件 ID // 注意:此字段可能返回 null,表示取不到有效值。 - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` } // Predefined struct for user type UpdateCronJobRequestParams struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID - CronJobId *string `json:"CronJobId,omitempty" name:"CronJobId"` + CronJobId *string `json:"CronJobId,omitnil" name:"CronJobId"` // 备注 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` // cron表达式 - CronExpression *string `json:"CronExpression,omitempty" name:"CronExpression"` + CronExpression *string `json:"CronExpression,omitnil" name:"CronExpression"` // 执行频率类型,1:只执行一次; 2:日粒度; 3:周粒度; 4:高级 - FrequencyType *int64 `json:"FrequencyType,omitempty" name:"FrequencyType"` + FrequencyType *int64 `json:"FrequencyType,omitnil" name:"FrequencyType"` // 定时任务名字 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名称 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 任务发起人 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` // 结束时间 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` } type UpdateCronJobRequest struct { *tchttp.BaseRequest // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 定时任务ID - CronJobId *string `json:"CronJobId,omitempty" name:"CronJobId"` + CronJobId *string `json:"CronJobId,omitnil" name:"CronJobId"` // 备注 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` // cron表达式 - CronExpression *string `json:"CronExpression,omitempty" name:"CronExpression"` + CronExpression *string `json:"CronExpression,omitnil" name:"CronExpression"` // 执行频率类型,1:只执行一次; 2:日粒度; 3:周粒度; 4:高级 - FrequencyType *int64 `json:"FrequencyType,omitempty" name:"FrequencyType"` + FrequencyType *int64 `json:"FrequencyType,omitnil" name:"FrequencyType"` // 定时任务名字 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名称 - ScenarioName *string `json:"ScenarioName,omitempty" name:"ScenarioName"` + ScenarioName *string `json:"ScenarioName,omitnil" name:"ScenarioName"` // 任务发起人 - JobOwner *string `json:"JobOwner,omitempty" name:"JobOwner"` + JobOwner *string `json:"JobOwner,omitnil" name:"JobOwner"` // 结束时间 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + EndTime *string `json:"EndTime,omitnil" name:"EndTime"` // Notice ID - NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` + NoticeId *string `json:"NoticeId,omitnil" name:"NoticeId"` } func (r *UpdateCronJobRequest) ToJsonString() string { @@ -4738,7 +4908,7 @@ func (r *UpdateCronJobRequest) FromJsonString(s string) error { // Predefined struct for user type UpdateCronJobResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type UpdateCronJobResponse struct { @@ -4760,26 +4930,26 @@ func (r *UpdateCronJobResponse) FromJsonString(s string) error { // Predefined struct for user type UpdateFileScenarioRelationRequestParams struct { // 文件 ID - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景 ID 数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` } type UpdateFileScenarioRelationRequest struct { *tchttp.BaseRequest // 文件 ID - FileId *string `json:"FileId,omitempty" name:"FileId"` + FileId *string `json:"FileId,omitnil" name:"FileId"` // 项目 ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景 ID 数组 - ScenarioIds []*string `json:"ScenarioIds,omitempty" name:"ScenarioIds"` + ScenarioIds []*string `json:"ScenarioIds,omitnil" name:"ScenarioIds"` } func (r *UpdateFileScenarioRelationRequest) ToJsonString() string { @@ -4806,7 +4976,7 @@ func (r *UpdateFileScenarioRelationRequest) FromJsonString(s string) error { // Predefined struct for user type UpdateFileScenarioRelationResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type UpdateFileScenarioRelationResponse struct { @@ -4828,32 +4998,32 @@ func (r *UpdateFileScenarioRelationResponse) FromJsonString(s string) error { // Predefined struct for user type UpdateJobRequestParams struct { // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 任务备注信息 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` } type UpdateJobRequest struct { *tchttp.BaseRequest // 任务ID - JobId *string `json:"JobId,omitempty" name:"JobId"` + JobId *string `json:"JobId,omitnil" name:"JobId"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 任务备注信息 - Note *string `json:"Note,omitempty" name:"Note"` + Note *string `json:"Note,omitnil" name:"Note"` } func (r *UpdateJobRequest) ToJsonString() string { @@ -4881,7 +5051,7 @@ func (r *UpdateJobRequest) FromJsonString(s string) error { // Predefined struct for user type UpdateJobResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type UpdateJobResponse struct { @@ -4903,38 +5073,38 @@ func (r *UpdateJobResponse) FromJsonString(s string) error { // Predefined struct for user type UpdateProjectRequestParams struct { // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 项目名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 项目状态,默认传递1 - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 标签数组 - Tags []*TagSpec `json:"Tags,omitempty" name:"Tags"` + Tags []*TagSpec `json:"Tags,omitnil" name:"Tags"` } type UpdateProjectRequest struct { *tchttp.BaseRequest // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 项目名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 项目描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 项目状态,默认传递1 - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 标签数组 - Tags []*TagSpec `json:"Tags,omitempty" name:"Tags"` + Tags []*TagSpec `json:"Tags,omitnil" name:"Tags"` } func (r *UpdateProjectRequest) ToJsonString() string { @@ -4963,7 +5133,7 @@ func (r *UpdateProjectRequest) FromJsonString(s string) error { // Predefined struct for user type UpdateProjectResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type UpdateProjectResponse struct { @@ -4985,128 +5155,140 @@ func (r *UpdateProjectResponse) FromJsonString(s string) error { // Predefined struct for user type UpdateScenarioRequestParams struct { // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 场景描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 压测引擎类型 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 施压配置 - Load *Load `json:"Load,omitempty" name:"Load"` + Load *Load `json:"Load,omitnil" name:"Load"` // deprecated - EncodedScripts *string `json:"EncodedScripts,omitempty" name:"EncodedScripts"` + EncodedScripts *string `json:"EncodedScripts,omitnil" name:"EncodedScripts"` // deprecated - Configs []*string `json:"Configs,omitempty" name:"Configs"` + Configs []*string `json:"Configs,omitnil" name:"Configs"` // 测试数据集 - Datasets []*TestData `json:"Datasets,omitempty" name:"Datasets"` + Datasets []*TestData `json:"Datasets,omitnil" name:"Datasets"` // deprecated - Extensions []*string `json:"Extensions,omitempty" name:"Extensions"` + Extensions []*string `json:"Extensions,omitnil" name:"Extensions"` // SLA规则ID - SLAId *string `json:"SLAId,omitempty" name:"SLAId"` + SLAId *string `json:"SLAId,omitnil" name:"SLAId"` // cron job ID - CronId *string `json:"CronId,omitempty" name:"CronId"` + CronId *string `json:"CronId,omitnil" name:"CronId"` // 场景状态(注:现已无需传递该参数) - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 测试脚本路径 - TestScripts []*ScriptInfo `json:"TestScripts,omitempty" name:"TestScripts"` + TestScripts []*ScriptInfo `json:"TestScripts,omitnil" name:"TestScripts"` // 协议文件路径 - Protocols []*ProtocolInfo `json:"Protocols,omitempty" name:"Protocols"` + Protocols []*ProtocolInfo `json:"Protocols,omitnil" name:"Protocols"` // 请求文件路径 - RequestFiles []*FileInfo `json:"RequestFiles,omitempty" name:"RequestFiles"` + RequestFiles []*FileInfo `json:"RequestFiles,omitnil" name:"RequestFiles"` // SLA 策略 - SLAPolicy *SLAPolicy `json:"SLAPolicy,omitempty" name:"SLAPolicy"` + SLAPolicy *SLAPolicy `json:"SLAPolicy,omitnil" name:"SLAPolicy"` // 拓展包文件路径 - Plugins []*FileInfo `json:"Plugins,omitempty" name:"Plugins"` + Plugins []*FileInfo `json:"Plugins,omitnil" name:"Plugins"` // 域名解析配置 - DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitempty" name:"DomainNameConfig"` + DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitnil" name:"DomainNameConfig"` // WebHook请求配置 - NotificationHooks []*Notification `json:"NotificationHooks,omitempty" name:"NotificationHooks"` + NotificationHooks []*Notification `json:"NotificationHooks,omitnil" name:"NotificationHooks"` + + // 创建人名 + Owner *string `json:"Owner,omitnil" name:"Owner"` + + // 环境ID + EnvId *string `json:"EnvId,omitnil" name:"EnvId"` } type UpdateScenarioRequest struct { *tchttp.BaseRequest // 场景ID - ScenarioId *string `json:"ScenarioId,omitempty" name:"ScenarioId"` + ScenarioId *string `json:"ScenarioId,omitnil" name:"ScenarioId"` // 场景名 - Name *string `json:"Name,omitempty" name:"Name"` + Name *string `json:"Name,omitnil" name:"Name"` // 场景描述 - Description *string `json:"Description,omitempty" name:"Description"` + Description *string `json:"Description,omitnil" name:"Description"` // 压测引擎类型 - Type *string `json:"Type,omitempty" name:"Type"` + Type *string `json:"Type,omitnil" name:"Type"` // 施压配置 - Load *Load `json:"Load,omitempty" name:"Load"` + Load *Load `json:"Load,omitnil" name:"Load"` // deprecated - EncodedScripts *string `json:"EncodedScripts,omitempty" name:"EncodedScripts"` + EncodedScripts *string `json:"EncodedScripts,omitnil" name:"EncodedScripts"` // deprecated - Configs []*string `json:"Configs,omitempty" name:"Configs"` + Configs []*string `json:"Configs,omitnil" name:"Configs"` // 测试数据集 - Datasets []*TestData `json:"Datasets,omitempty" name:"Datasets"` + Datasets []*TestData `json:"Datasets,omitnil" name:"Datasets"` // deprecated - Extensions []*string `json:"Extensions,omitempty" name:"Extensions"` + Extensions []*string `json:"Extensions,omitnil" name:"Extensions"` // SLA规则ID - SLAId *string `json:"SLAId,omitempty" name:"SLAId"` + SLAId *string `json:"SLAId,omitnil" name:"SLAId"` // cron job ID - CronId *string `json:"CronId,omitempty" name:"CronId"` + CronId *string `json:"CronId,omitnil" name:"CronId"` // 场景状态(注:现已无需传递该参数) - Status *int64 `json:"Status,omitempty" name:"Status"` + Status *int64 `json:"Status,omitnil" name:"Status"` // 项目ID - ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + ProjectId *string `json:"ProjectId,omitnil" name:"ProjectId"` // 测试脚本路径 - TestScripts []*ScriptInfo `json:"TestScripts,omitempty" name:"TestScripts"` + TestScripts []*ScriptInfo `json:"TestScripts,omitnil" name:"TestScripts"` // 协议文件路径 - Protocols []*ProtocolInfo `json:"Protocols,omitempty" name:"Protocols"` + Protocols []*ProtocolInfo `json:"Protocols,omitnil" name:"Protocols"` // 请求文件路径 - RequestFiles []*FileInfo `json:"RequestFiles,omitempty" name:"RequestFiles"` + RequestFiles []*FileInfo `json:"RequestFiles,omitnil" name:"RequestFiles"` // SLA 策略 - SLAPolicy *SLAPolicy `json:"SLAPolicy,omitempty" name:"SLAPolicy"` + SLAPolicy *SLAPolicy `json:"SLAPolicy,omitnil" name:"SLAPolicy"` // 拓展包文件路径 - Plugins []*FileInfo `json:"Plugins,omitempty" name:"Plugins"` + Plugins []*FileInfo `json:"Plugins,omitnil" name:"Plugins"` // 域名解析配置 - DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitempty" name:"DomainNameConfig"` + DomainNameConfig *DomainNameConfig `json:"DomainNameConfig,omitnil" name:"DomainNameConfig"` // WebHook请求配置 - NotificationHooks []*Notification `json:"NotificationHooks,omitempty" name:"NotificationHooks"` + NotificationHooks []*Notification `json:"NotificationHooks,omitnil" name:"NotificationHooks"` + + // 创建人名 + Owner *string `json:"Owner,omitnil" name:"Owner"` + + // 环境ID + EnvId *string `json:"EnvId,omitnil" name:"EnvId"` } func (r *UpdateScenarioRequest) ToJsonString() string { @@ -5141,6 +5323,8 @@ func (r *UpdateScenarioRequest) FromJsonString(s string) error { delete(f, "Plugins") delete(f, "DomainNameConfig") delete(f, "NotificationHooks") + delete(f, "Owner") + delete(f, "EnvId") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateScenarioRequest has unknown keys!", "") } @@ -5150,7 +5334,7 @@ func (r *UpdateScenarioRequest) FromJsonString(s string) error { // Predefined struct for user type UpdateScenarioResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } type UpdateScenarioResponse struct { @@ -5171,16 +5355,16 @@ func (r *UpdateScenarioResponse) FromJsonString(s string) error { type VpcLoadDistribution struct { // 地域ID - RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` + RegionId *int64 `json:"RegionId,omitnil" name:"RegionId"` // 地域 - Region *string `json:"Region,omitempty" name:"Region"` + Region *string `json:"Region,omitnil" name:"Region"` // VPC ID // 注意:此字段可能返回 null,表示取不到有效值。 - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + VpcId *string `json:"VpcId,omitnil" name:"VpcId"` // 子网ID列表 // 注意:此字段可能返回 null,表示取不到有效值。 - SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + SubnetIds []*string `json:"SubnetIds,omitnil" name:"SubnetIds"` } \ No newline at end of file diff --git a/vendor/modules.txt b/vendor/modules.txt index a4feb125c9..4369bb8ee7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1215,7 +1215,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.751 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.533 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.657 diff --git a/website/docs/d/pts_scenario_with_jobs.html.markdown b/website/docs/d/pts_scenario_with_jobs.html.markdown new file mode 100644 index 0000000000..82db22c9bc --- /dev/null +++ b/website/docs/d/pts_scenario_with_jobs.html.markdown @@ -0,0 +1,282 @@ +--- +subcategory: "Performance Testing Service(PTS)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_pts_scenario_with_jobs" +sidebar_current: "docs-tencentcloud-datasource-pts_scenario_with_jobs" +description: |- + Use this data source to query detailed information of pts scenario_with_jobs +--- + +# tencentcloud_pts_scenario_with_jobs + +Use this data source to query detailed information of pts scenario_with_jobs + +## Example Usage + +```hcl +data "tencentcloud_pts_scenario_with_jobs" "scenario_with_jobs" { + project_ids = ["project-45vw7v82"] + scenario_ids = ["scenario-koakp3h6"] + scenario_name = "pts-jmeter" + ascend = true + ignore_script = true + ignore_dataset = true + scenario_type = "pts-jmeter" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `project_ids` - (Required, Set: [`String`]) Project ID list. +* `ascend` - (Optional, Bool) Whether to use ascending order. +* `ignore_dataset` - (Optional, Bool) Whether to ignore the dataset. +* `ignore_script` - (Optional, Bool) Whether to ignore the script content. +* `order_by` - (Optional, String) The field column used for ordering. +* `owner` - (Optional, String) The job owner. +* `result_output_file` - (Optional, String) Used to save results. +* `scenario_ids` - (Optional, Set: [`String`]) Scenario ID list. +* `scenario_name` - (Optional, String) Scenario name. +* `scenario_type` - (Optional, String) Scenario type, e.g.: pts-http, pts-js, pts-trpc, pts-jmeter. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `scenario_with_jobs_set` - The scenario configuration and its jobs. + * `jobs` - Jobs related to the scenario. + * `abort_reason` - The reason for aborting the job. + * `configs` - Deprecated. + * `created_at` - The job creation time. + * `cron_id` - Cron job ID. + * `datasets` - The test data sets. + * `file_id` - File ID. + * `head_lines` - The header lines of the file. + * `header_columns` - The parameter name list. + * `header_in_file` - Whether the first line contains the parameter names. + * `line_count` - The line count of the file. + * `name` - Test data set name. + * `size` - File size. + * `split` - Whether to split the test data. + * `tail_lines` - The tail lines of the file. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `debug` - Whether to run the job in the debug mode. The default value is false. + * `domain_name_config` - The configuration for parsing domain names. + * `dns_config` - The DNS configuration. + * `nameservers` - DNS IP list. + * `host_aliases` - The configuration for host aliases. + * `host_names` - Host names. + * `ip` - IP. + * `duration` - Job running duration. + * `end_time` - The job ending time. + * `error_rate` - Error rate. + * `extensions` - Deprecated. + * `job_id` - Job ID. + * `job_owner` - Job owner. + * `load_source_infos` - The load source information. + * `ip` - The IP of the load source. + * `pod_name` - The pod name of the load source. + * `region` - Region. + * `load_sources` - Deprecated. + * `ip` - The IP of the load source. + * `pod_name` - The pod name of the load source. + * `region` - Region. + * `load` - The configuration of the load. + * `geo_regions_load_distribution` - The geographical distribution of the load source. + * `percentage` - Percentage. + * `region_id` - Region ID. + * `region` - Region. + * `load_spec` - The specification of the load configuration. + * `concurrency` - The configuration of the concurrency load test mode. + * `graceful_stop_seconds` - The waiting period for a graceful shutdown. + * `iteration_count` - The iteration count. + * `max_requests_per_second` - The maximum RPS. + * `resources` - The count of the load test resource. + * `stages` - The multi-stage configuration. + * `duration_seconds` - The execution time. + * `target_virtual_users` - The target count of the virtual users. + * `requests_per_second` - The configuration of the RPS mode load test. + * `duration_seconds` - The execution time. + * `graceful_stop_seconds` - The waiting period for a gracefulshutdown. + * `max_requests_per_second` - The maximum RPS. + * `resources` - The count of the load test resource. + * `start_requests_per_second` - The starting minimum RPS. + * `target_requests_per_second` - The target RPS. + * `target_virtual_users` - Deprecated. + * `script_origin` - The script origin. + * `duration_seconds` - The execution time. + * `machine_number` - Machine number. + * `machine_specification` - Machine specification. + * `vpc_load_distribution` - The distribution of the load source. + * `region_id` - Region ID. + * `region` - Region. + * `subnet_ids` - The subnet ID list. + * `vpc_id` - VPC ID. + * `max_requests_per_second` - The maximum RPS. + * `max_virtual_user_count` - The maximum VU of the job. + * `message` - The message describing the job running status. + * `network_receive_rate` - The rate of receiving bytes. + * `network_send_rate` - The rate of sending bytes. + * `note` - The note of the job. + * `notification_hooks` - Notification hooks. + * `events` - Notification hook. + * `url` - The callback URL. + * `plugins` - Plugins. + * `file_id` - File ID. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `project_id` - Project ID. + * `project_name` - Project name. + * `protocols` - The protocol file. + * `file_id` - File ID. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `request_files` - The files in the request. + * `file_id` - File ID. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `request_total` - The total reqeust count. + * `requests_per_second` - RPS. + * `response_time_average` - The average response time. + * `response_time_max` - The maximum response time. + * `response_time_min` - The minimum response time. + * `response_time_p90` - The 90 percentile of the response time. + * `response_time_p95` - The 95 percentile of the response time. + * `response_time_p99` - The 99 percentile of the response time. + * `scenario_id` - Scenario ID. + * `scenario_name` - Scenario name. + * `scripts` - Deprecated. + * `start_time` - The job starting time. + * `status` - Job running status. JobUnknown: 0,JobCreated:1,JobPending:2, JobPreparing:3,JobSelectClustering:4,JobCreateTasking:5,JobSyncTasking:6 JobRunning:11,JobFinished:12,JobPrepareException:13,JobFinishException:14,JobAborting:15,JobAborted:16,JobAbortException:17,JobDeleted:18, JobSelectClusterException:19,JobCreateTaskException:20,JobSyncTaskException:21. + * `test_scripts` - Test scripts. + * `encoded_content` - The base64 encoded content. + * `encoded_http_archive` - The base64 encoded HAR. + * `file_id` - File ID. + * `load_weight` - The weight of the script, ranging from 1 to 100. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `type` - Scenario type. + * `scenario` - The returned scenario. + * `app_id` - AppId. + * `configs` - Deprecated. + * `created_at` - The creation time of the scenario. + * `cron_id` - The cron job ID. + * `datasets` - The test data sets for the load test. + * `file_id` - The file ID. + * `head_lines` - The header lines of the file. + * `header_columns` - The parameter name list. + * `header_in_file` - Whether the first line contains the parameter names. + * `line_count` - The line count of the file. + * `name` - The file name of the test data sets. + * `size` - The byte count of the file. + * `split` - Whether to split the test data. + * `tail_lines` - The tail lines of the file. + * `type` - The file type. + * `updated_at` - The update time of the file. + * `description` - Scenario description. + * `domain_name_config` - The configuration for parsing domain names. + * `dns_config` - The DNS configuration. + * `nameservers` - DNS IP list. + * `host_aliases` - The configuration for host aliases. + * `host_names` - Host names. + * `ip` - IP. + * `encoded_scripts` - Deprecated. + * `extensions` - Deprecated. + * `load` - Scenario is load test configuration. + * `geo_regions_load_distribution` - The geographical distribution of the load source. + * `percentage` - Percentage. + * `region_id` - Region ID. + * `region` - Region. + * `load_spec` - Scenario is load specification. + * `concurrency` - The configuration for the concurrency mode. + * `graceful_stop_seconds` - The waiting period for a graceful shutdown. + * `iteration_count` - The iteration count of the load test. + * `max_requests_per_second` - The maximum RPS. + * `resources` - The resource count of the load test. + * `stages` - The configuration for the multi-stage load test. + * `duration_seconds` - The execution time for the load test. + * `target_virtual_users` - The number of the target virtual users. + * `requests_per_second` - The configuration of the RPS mode load test. + * `duration_seconds` - The execution time of the load test. + * `graceful_stop_seconds` - The waiting period for a graceful shutdown. + * `max_requests_per_second` - The maximum RPS. + * `resources` - The recource count of the load test. + * `start_requests_per_second` - The starting minimum RPS. + * `target_requests_per_second` - The target RPS. + * `target_virtual_users` - Deprecated. + * `script_origin` - The script origin. + * `duration_seconds` - The load test execution time. + * `machine_number` - The load test machine number. + * `machine_specification` - The load test machine specification. + * `vpc_load_distribution` - The distribution of the load source. + * `region_id` - Region ID. + * `region` - Region. + * `subnet_ids` - The subnet ID list. + * `vpc_id` - The VPC ID. + * `name` - Scenario name. + * `notification_hooks` - The notification hooks. + * `events` - The notification hook. + * `url` - The callback URL. + * `owner` - The owner. + * `plugins` - Plugins. + * `file_id` - File ID. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `project_id` - Project ID. + * `project_name` - Project name. + * `protocols` - The protocol file. + * `file_id` - File ID. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `request_files` - The files in the request. + * `file_id` - File ID. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `scenario_id` - Scenario ID. + * `sla_id` - The ID of the SLA policy. + * `sla_policy` - The SLA policy. + * `alert_channel` - The alert channel. + * `amp_consumer_id` - AMP consumer ID. + * `notice_id` - The notice ID bound with this alert channel. + * `sla_rules` - The SLA rules. + * `abort_flag` - Whether to abort the load test job. + * `aggregation` - The aggregation method of the metrics. + * `condition` - The operator for checking the condition. + * `for` - The duration for checking the condition. + * `label_filter` - The label filter. + * `label_name` - Label name. + * `label_value` - Label value. + * `metric` - The load test metrics. + * `value` - The threshold in the condition. + * `status` - Scenario status. + * `sub_account_uin` - SubAccountUin. + * `test_scripts` - The script of the load test. + * `encoded_content` - The base64 encoded content. + * `encoded_http_archive` - The base64 encoded HAR. + * `file_id` - File ID. + * `load_weight` - The weight of the script, ranging from 1 to 100. + * `name` - File name. + * `size` - File size. + * `type` - File type. + * `updated_at` - The time of the most recent update. + * `type` - Scenario type, e.g.: pts-http, pts-js, pts-trpc, pts-jmeter. + * `uin` - Uin. + * `updated_at` - The updating time of the scenario. + + diff --git a/website/docs/r/pts_cron_job.html.markdown b/website/docs/r/pts_cron_job.html.markdown index 2608c0e596..9009c5c9c9 100644 --- a/website/docs/r/pts_cron_job.html.markdown +++ b/website/docs/r/pts_cron_job.html.markdown @@ -51,6 +51,7 @@ In addition to all arguments above, the following attributes are exported: * `abort_reason` - Reason for suspension. * `app_id` - App ID. * `created_at` - Creation time; type: Timestamp ISO8601. +* `cron_job_id` - Cron job ID. * `status` - Scheduled task status. * `sub_account_uin` - Sub-user ID. * `uin` - User ID. diff --git a/website/docs/r/pts_cron_job_abort.html.markdown b/website/docs/r/pts_cron_job_abort.html.markdown new file mode 100644 index 0000000000..74977cb8ca --- /dev/null +++ b/website/docs/r/pts_cron_job_abort.html.markdown @@ -0,0 +1,37 @@ +--- +subcategory: "Performance Testing Service(PTS)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_pts_cron_job_abort" +sidebar_current: "docs-tencentcloud-resource-pts_cron_job_abort" +description: |- + Provides a resource to create a pts cron_job_abort +--- + +# tencentcloud_pts_cron_job_abort + +Provides a resource to create a pts cron_job_abort + +## Example Usage + +```hcl +resource "tencentcloud_pts_cron_job_abort" "cron_job_abort" { + project_id = "project-abc" + cron_job_id = "job-dtm93vx0" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `cron_job_id` - (Required, String, ForceNew) Cron job ID. +* `project_id` - (Required, String, ForceNew) Project ID. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + diff --git a/website/docs/r/pts_cron_job_restart.html.markdown b/website/docs/r/pts_cron_job_restart.html.markdown new file mode 100644 index 0000000000..2d4fbf6b19 --- /dev/null +++ b/website/docs/r/pts_cron_job_restart.html.markdown @@ -0,0 +1,37 @@ +--- +subcategory: "Performance Testing Service(PTS)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_pts_cron_job_restart" +sidebar_current: "docs-tencentcloud-resource-pts_cron_job_restart" +description: |- + Provides a resource to create a pts cron_job_restart, restart a scheduled task whose status is `JobAborting` +--- + +# tencentcloud_pts_cron_job_restart + +Provides a resource to create a pts cron_job_restart, restart a scheduled task whose status is `JobAborting` + +## Example Usage + +```hcl +resource "tencentcloud_pts_cron_job_restart" "cron_job_restart" { + project_id = "project-abc" + cron_job_id = "job-dtm93vx0" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `cron_job_id` - (Required, String, ForceNew) Cron job ID. +* `project_id` - (Required, String, ForceNew) Project ID. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + diff --git a/website/docs/r/pts_job.html.markdown b/website/docs/r/pts_job.html.markdown index d983a9b3d3..79af021c23 100644 --- a/website/docs/r/pts_job.html.markdown +++ b/website/docs/r/pts_job.html.markdown @@ -46,6 +46,7 @@ In addition to all arguments above, the following attributes are exported: * `duration` - Job duration. * `end_time` - End time of the job. * `error_rate` - Percentage of error rate. +* `job_id` - Job Id. * `load` - Pressure configuration of job. * `max_requests_per_second` - Maximum requests per second. * `max_virtual_user_count` - Maximum number of VU for the job. diff --git a/website/docs/r/pts_job_abort.html.markdown b/website/docs/r/pts_job_abort.html.markdown new file mode 100644 index 0000000000..ce2d5dab10 --- /dev/null +++ b/website/docs/r/pts_job_abort.html.markdown @@ -0,0 +1,40 @@ +--- +subcategory: "Performance Testing Service(PTS)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_pts_job_abort" +sidebar_current: "docs-tencentcloud-resource-pts_job_abort" +description: |- + Provides a resource to create a pts job_abort +--- + +# tencentcloud_pts_job_abort + +Provides a resource to create a pts job_abort + +## Example Usage + +```hcl +resource "tencentcloud_pts_job_abort" "job_abort" { + job_id = "job-my644ozi" + project_id = "project-45vw7v82" + scenario_id = "scenario-22q19f3k" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `job_id` - (Required, String, ForceNew) Job ID. +* `project_id` - (Required, String, ForceNew) Project ID. +* `scenario_id` - (Required, String, ForceNew) Scenario ID. +* `abort_reason` - (Optional, Int, ForceNew) The reason for aborting the job. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index f03d2dc848..ebbb929e00 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -2232,7 +2232,14 @@