github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dli/v1/flinkjob/requests.go (about) 1 package flinkjob 2 3 import ( 4 "github.com/chnsz/golangsdk" 5 "github.com/chnsz/golangsdk/openstack/common/tags" 6 ) 7 8 const ( 9 JobTypeFlinkSql = "flink_sql_job" 10 JobTypeFlinkOpenSourceSql = "flink_opensource_sql_job" 11 JobTypeFlinkEdgeSql = "flink_sql_edge_job" 12 JobTypeFlinkJar = "flink_jar_job" 13 14 RunModeSharedCluster = "shared_cluster" 15 RunModeExclusiveCluster = "exclusive_cluster" 16 RunModeEdgeNode = "edge_node" 17 18 CheckpointModeExactlyOnce = "exactly_once" 19 CheckpointModeAtLeastOnce = "at_least_once" 20 ) 21 22 type CreateSqlJobOpts struct { 23 // Name of the job. Length range: 0 to 57 characters. 24 Name string `json:"name" required:"true"` 25 // Job description. Length range: 0 to 512 characters. 26 Desc string `json:"desc,omitempty"` 27 // Template ID. 28 // If both template_id and sql_body are specified, sql_body is used. If template_id is specified but sql_body is 29 // not, fill sql_body with the template_id value. 30 TemplateId *int `json:"template_id,omitempty"` 31 // Name of a queue. Length range: 1 to 128 characters. 32 QueueName string `json:"queue_name,omitempty"` 33 // Stream SQL statement, which includes at least the following three parts: source, query, and sink. 34 // Length range: 1024x1024 characters. 35 SqlBody string `json:"sql_body,omitempty"` 36 // Job running mode. The options are as follows: 37 // shared_cluster: indicates that the job is running on a shared cluster. 38 // exclusive_cluster: indicates that the job is running on an exclusive cluster. 39 // edge_node: indicates that the job is running on an edge node. 40 // The default value is shared_cluster. 41 RunMode string `json:"run_mode,omitempty"` 42 // Number of CUs selected for a job. The default value is 2. 43 CuNumber *int `json:"cu_number,omitempty"` 44 // Number of parallel jobs set by a user. The default value is 1. 45 ParallelNumber *int `json:"parallel_number,omitempty"` 46 // Whether to enable the automatic job snapshot function. 47 // true: indicates to enable the automatic job snapshot function. 48 // false: indicates to disable the automatic job snapshot function. 49 // Default value: false 50 CheckpointEnabled *bool `json:"checkpoint_enabled,omitempty"` 51 // Snapshot mode. There are two options: 52 // 1: ExactlyOnce, indicates that data is processed only once. 53 // 2: AtLeastOnce, indicates that data is processed at least once. 54 // The default value is 1. 55 CheckpointMode *int `json:"checkpoint_mode,omitempty"` 56 // Snapshot interval. The unit is second. The default value is 10. 57 CheckpointInterval *int `json:"checkpoint_interval,omitempty"` 58 // OBS path where users are authorized to save the snapshot. This parameter is valid only when checkpoint_enabled 59 // is set to true. 60 // OBS path where users are authorized to save the snapshot. This parameter is valid only when log_enabled 61 // is set to true. 62 ObsBucket string `json:"obs_bucket,omitempty"` 63 // Whether to enable the function of uploading job logs to users' OBS buckets. The default value is false. 64 LogEnabled *bool `json:"log_enabled,omitempty"` 65 // SMN topic. If a job fails, the system will send a message to users subscribed to the SMN topic. 66 SmnTopic string `json:"smn_topic,omitempty"` 67 // Whether to enable the function of automatically restarting a job upon job exceptions. The default value is false. 68 RestartWhenException *bool `json:"restart_when_exception,omitempty"` 69 // Retention time of the idle state. The unit is hour. The default value is 1. 70 IdleStateRetention *int `json:"idle_state_retention,omitempty"` 71 EdgeGroupIds []string `json:"edge_group_ids,omitempty"` 72 // Job type. This parameter can be set to flink_sql_job, and flink_opensource_sql_job. 73 // If run_mode is set to shared_cluster or exclusive_cluster, this parameter must be flink_sql_job. 74 // The default value is flink_sql_job. 75 JobType string `json:"job_type,omitempty"` 76 // Dirty data policy of a job. 77 // 2:obsDir: Save. obsDir specifies the path for storing dirty data. 78 // 1: Trigger a job exception 79 // 0: Ignore 80 // The default value is 0. 81 DirtyDataStrategy string `json:"dirty_data_strategy,omitempty"` 82 // Name of the resource package that has been uploaded to the DLI resource management system. 83 // The UDF Jar file of the SQL job is specified by this parameter. 84 UdfJarUrl string `json:"udf_jar_url,omitempty"` 85 // Number of CUs in the JobManager selected for a job. The default value is 1. 86 ManagerCuNumber *int `json:"manager_cu_number"` 87 // Number of CUs for each TaskManager. The default value is 1. 88 TmCus *int `json:"tm_cus,omitempty"` 89 // Number of slots in each TaskManager. The default value is (parallel_number*tm_cus)/(cu_number-manager_cu_number). 90 TmSlotNum *int `json:"tm_slot_num,omitempty"` 91 // Whether the abnormal restart is recovered from the checkpoint. 92 ResumeCheckpoint *bool `json:"resume_checkpoint,omitempty"` 93 // Maximum number of retry times upon exceptions. The unit is times/hour. Value range: -1 or greater than 0. 94 // The default value is -1, indicating that the number of times is unlimited. 95 ResumeMaxNum *int `json:"resume_max_num,omitempty"` 96 // Customizes optimization parameters when a Flink job is running. 97 RuntimeConfig string `json:"runtime_config,omitempty"` 98 // Label of a Flink SQL job. For details, see Table 3. 99 Tags []tags.ResourceTag `json:"tags"` 100 // Flink version. The valid value is `1.1`0 or `1.12`. 101 FlinkVersion string `json:"flink_version,omitempty"` 102 } 103 104 type UpdateSqlJobOpts struct { 105 // Name of a job. Length range: 0 to 57 characters. 106 Name string `json:"name,omitempty"` 107 // Job description. Length range: 0 to 512 characters. 108 Desc string `json:"desc,omitempty"` 109 // Name of a queue. Length range: 1 to 128 characters. 110 QueueName string `json:"queue_name,omitempty"` 111 // Stream SQL statement, which includes at least the following three parts: source, query, and sink. 112 // Length range: 0 to 1024x1024 characters. 113 SqlBody string `json:"sql_body,omitempty"` 114 // Job running mode. The options are as follows: 115 // shared_cluster: indicates that the job is running on a shared cluster. 116 // exclusive_cluster: indicates that the job is running on an exclusive cluster. 117 // edge_node: indicates that the job is running on an edge node. 118 // The default value is shared_cluster. 119 RunMode string `json:"run_mode,omitempty"` 120 // Number of CUs selected for a job. The default value is 2. 121 CuNumber *int `json:"cu_number,omitempty"` 122 // Number of parallel jobs set by a user. The default value is 1. 123 ParallelNumber *int `json:"parallel_number,omitempty"` 124 // Whether to enable the automatic job snapshot function. 125 // true: indicates to enable the automatic job snapshot function. 126 // false: indicates to disable the automatic job snapshot function. 127 // Default value: false 128 CheckpointEnabled *bool `json:"checkpoint_enabled,omitempty"` 129 // Snapshot mode. There are two options: 130 // 1: ExactlyOnce, indicates that data is processed only once. 131 // 2: at_least_once, indicates that data is processed at least once. 132 // The default value is 1. 133 CheckpointMode *int `json:"checkpoint_mode,omitempty"` 134 // Snapshot interval. The unit is second. The default value is 10. 135 CheckpointInterval *int `json:"checkpoint_interval,omitempty"` 136 // OBS path where users are authorized to save the snapshot. 137 // This parameter is valid only when checkpoint_enabled is set to true. 138 // OBS path where users are authorized to save the snapshot. 139 // This parameter is valid only when log_enabled is set to true. 140 ObsBucket string `json:"obs_bucket,omitempty"` 141 // Whether to enable the function of uploading job logs to users' OBS buckets. The default value is false. 142 LogEnabled *bool `json:"log_enabled,omitempty"` 143 // SMN topic. If a job fails, the system will send a message to users subscribed to the SMN topic. 144 SmnTopic string `json:"smn_topic,omitempty"` 145 // Whether to enable the function of automatically restarting a job upon job exceptions. The default value is false. 146 RestartWhenException *bool `json:"restart_when_exception,omitempty"` 147 // Expiration time, in seconds. The default value is 3600. 148 IdleStateRetention *int `json:"idle_state_retention,omitempty"` 149 // List of edge computing group IDs. Use commas (,) to separate multiple IDs. 150 EdgeGroupIds []string `json:"edge_group_ids,omitempty"` 151 // Dirty data policy of a job. 152 // 2:obsDir: Save. obsDir specifies the path for storing dirty data. 153 // 1: Trigger a job exception 154 // 0: Ignore 155 // The default value is 0. 156 DirtyDataStrategy string `json:"dirty_data_strategy,omitempty"` 157 // Name of the resource package that has been uploaded to the DLI resource management system. 158 // The UDF Jar file of the SQL job is specified by this parameter. 159 UdfJarUrl string `json:"udf_jar_url,omitempty"` 160 // Number of CUs in the JobManager selected for a job. The default value is 1. 161 ManagerCuNumber *int `json:"manager_cu_number,omitempty"` 162 // Number of CUs for each TaskManager. The default value is 1. 163 TmCus *int `json:"tm_cus,omitempty"` 164 // Number of slots in each TaskManager. The default value is (parallel_number*tm_cus)/(cu_number-manager_cu_number). 165 TmSlotNum *int `json:"tm_slot_num,omitempty"` 166 // Degree of parallelism (DOP) of an operator. 167 OperatorConfig string `json:"operator_config"` 168 // Whether the abnormal restart is recovered from the checkpoint. 169 ResumeCheckpoint *bool `json:"resume_checkpoint,omitempty"` 170 // Maximum number of retry times upon exceptions. The unit is times/hour. Value range: -1 or greater than 0. 171 // The default value is -1, indicating that the number of times is unlimited. 172 ResumeMaxNum *int `json:"resume_max_num,omitempty"` 173 // Traffic or hit ratio of each operator, which is a character string in JSON format. 174 StaticEstimatorConfig string `json:"static_estimator_config"` 175 // Customizes optimization parameters when a Flink job is running. 176 RuntimeConfig string `json:"runtime_config,omitempty"` 177 // Flink version. The valid value is `1.1`0 or `1.12`. 178 FlinkVersion string `json:"flink_version,omitempty"` 179 } 180 181 type ListOpts struct { 182 Name string `q:"name"` 183 UserName string `q:"user_name"` 184 QueueName string `q:"queue_name"` 185 Status string `q:"status"` 186 JobType string `q:"job_type"` 187 Tags string `q:"tags"` 188 SysEnterpriseProjectName string `q:"sys_enterprise_project_name"` 189 ShowDetail *bool `q:"show_detail"` 190 Order string `q:"order"` 191 Offset *int `q:"offset"` 192 Limit *int `q:"limit"` // default 10 193 //Specifies parent job id of Edge job to query Edge subJob 194 // empty: will dont query Edge subJob 195 RootJobId *int `q:"root_job_id"` 196 } 197 198 type RunJobOpts struct { 199 ResumeSavepoint *bool `json:"resume_savepoint,omitempty"` 200 JobIds []int `json:"job_ids" required:"true"` 201 } 202 203 type ObsBucketsOpts struct { 204 Buckets []string `json:"obs_buckets" required:"true"` 205 } 206 207 type CreateJarJobOpts struct { 208 // Name of the job. Length range: 0 to 57 characters. 209 Name string `json:"name" required:"true"` 210 // Job description. Length range: 0 to 512 characters. 211 Desc string `json:"desc,omitempty"` 212 // Name of a queue. Length range: 1 to 128 characters. 213 QueueName string `json:"queue_name,omitempty"` 214 // Number of CUs selected for a job. 215 CuNumber *int `json:"cu_number,omitempty"` 216 // Number of CUs on the management node selected by the user for a job, 217 // which corresponds to the number of Flink job managers. The default value is 1. 218 ManagerCuNumber *int `json:"manager_cu_number,omitempty"` 219 // Number of parallel operations selected for a job. 220 ParallelNumber *int `json:"parallel_number,omitempty"` 221 // Whether to enable the job log function. 222 // true: indicates to enable the job log function. 223 // false: indicates to disable the job log function. 224 // Default value: false 225 LogEnabled *bool `json:"log_enabled,omitempty"` 226 // OBS bucket where users are authorized to save logs when log_enabled is set to true. 227 ObsBucket string `json:"obs_bucket,omitempty"` 228 // SMN topic. If a job fails, the system will send a message to users subscribed to the SMN topic. 229 SmnTopic string `json:"smn_topic,omitempty"` 230 // Job entry class. 231 MainClass string `json:"main_class,omitempty"` 232 // Job entry parameter. Multiple parameters are separated by spaces. 233 EntrypointArgs string `json:"entrypoint_args,omitempty"` 234 // Whether to enable the function of restart upon exceptions. The default value is false. 235 RestartWhenException *bool `json:"restart_when_exception,omitempty"` 236 // Name of the package that has been uploaded to the DLI resource management system. 237 // This parameter is used to customize the JAR file where the job main class is located. 238 Entrypoint string `json:"entrypoint,omitempty"` 239 // Name of the package that has been uploaded to the DLI resource management system. 240 // This parameter is used to customize other dependency packages. 241 // Example: myGroup/test.jar,myGroup/test1.jar. 242 DependencyJars []string `json:"dependency_jars,omitempty"` 243 // Name of the resource package that has been uploaded to the DLI resource management system. 244 // This parameter is used to customize dependency files. 245 // Example: myGroup/test.cvs,myGroup/test1.csv. 246 // You can add the following content to the application to access the corresponding dependency file: 247 // In the command, fileName indicates the name of the file to be accessed, 248 // and ClassName indicates the name of the class that needs to access the file. 249 // ClassName.class.getClassLoader().getResource("userData/fileName") 250 DependencyFiles []string `json:"dependency_files,omitempty"` 251 // Number of CUs for each TaskManager. The default value is 1. 252 TmCus *int `json:"tm_cus,omitempty"` 253 // Number of slots in each TaskManager. The default value is (parallel_number*tm_cus)/(cu_number-manager_cu_number). 254 TmSlotNum *int `json:"tm_slot_num,omitempty"` 255 // Job feature. Type of the Flink image used by a job. 256 // basic: indicates that the basic Flink image provided by DLI is used. 257 // custom: indicates that the user-defined Flink image is used. 258 Feature string `json:"feature,omitempty"` 259 // Flink version. This parameter is valid only when feature is set to basic. You can use this parameter with the 260 // feature parameter to specify the version of the DLI basic Flink image used for job running. 261 FlinkVersion string `json:"flink_version,omitempty"` 262 // Custom image. The format is Organization name/Image name:Image version. 263 // This parameter is valid only when feature is set to custom. You can use this parameter with the feature 264 // parameter to specify a user-defined Flink image for job running. For details about how to use custom images 265 Image string `json:"image,omitempty"` 266 // Whether the abnormal restart is recovered from the checkpoint. 267 ResumeCheckpoint *bool `json:"resume_checkpoint,omitempty"` 268 // Maximum number of retry times upon exceptions. The unit is times/hour. Value range: -1 or greater than 0. 269 // The default value is -1, indicating that the number of times is unlimited. 270 ResumeMaxNum *int `json:"resume_max_num,omitempty"` 271 // Storage address of the checkpoint in the JAR file of the user. The path must be unique. 272 CheckpointPath string `json:"checkpoint_path,omitempty"` 273 // Label of a Flink JAR job. For details, see Table 3. 274 Tags []tags.ResourceTag `json:"tags"` 275 // Customizes optimization parameters when a Flink job is running. 276 RuntimeConfig string `json:"runtime_config,omitempty"` 277 } 278 279 type UpdateJarJobOpts struct { 280 // Name of the job. Length range: 0 to 57 characters. 281 Name string `json:"name,omitempty"` 282 // Job description. Length range: 0 to 512 characters. 283 Desc string `json:"desc,omitempty"` 284 // Name of a queue. Length range: 1 to 128 characters. 285 QueueName string `json:"queue_name,omitempty"` 286 // Number of CUs selected for a job. The default value is 2. 287 CuNumber *int `json:"cu_number,omitempty"` 288 // Number of CUs on the management node selected by the user for a job, which corresponds to the number of Flink 289 // job managers. The default value is 1. 290 ManagerCuNumber *int `json:"manager_cu_number,omitempty"` 291 // Number of parallel operations selected for a job. The default value is 1. 292 ParallelNumber *int `json:"parallel_number,omitempty"` 293 // Whether to enable the job log function. 294 // true: indicates to enable the job log function. 295 // false: indicates to disable the job log function. 296 // Default value: false 297 LogEnabled *bool `json:"log_enabled,omitempty"` 298 // OBS path where users are authorized to save logs when log_enabled is set to true. 299 ObsBucket string `json:"obs_bucket,omitempty"` 300 // SMN topic. If a job fails, the system will send a message to users subscribed to the SMN topic. 301 SmnTopic string `json:"smn_topic,omitempty"` 302 // Job entry class. 303 MainClass string `json:"main_class,omitempty"` 304 // Job entry parameter. Multiple parameters are separated by spaces. 305 EntrypointArgs string `json:"entrypoint_args,omitempty"` 306 // Whether to enable the function of restart upon exceptions. The default value is false. 307 RestartWhenException *bool `json:"restart_when_exception,omitempty"` 308 // Name of the package that has been uploaded to the DLI resource management system. This parameter is used to 309 // customize the JAR file where the job main class is located. 310 Entrypoint string `json:"entrypoint,omitempty"` 311 // Name of the package that has been uploaded to the DLI resource management system. This parameter is used to 312 // customize other dependency packages. 313 // Example: myGroup/test.jar,myGroup/test1.jar. 314 DependencyJars []string `json:"dependency_jars,omitempty"` 315 // Name of the resource package that has been uploaded to the DLI resource management system. This parameter is 316 // used to customize dependency files. 317 // Example: myGroup/test.cvs,myGroup/test1.csv. 318 DependencyFiles []string `json:"dependency_files,omitempty"` 319 // Number of CUs for each TaskManager. The default value is 1. 320 TmCus *int `json:"tm_cus,omitempty"` 321 // Number of slots in each TaskManager. The default value is (parallel_number*tm_cus)/(cu_number-manager_cu_number). 322 TmSlotNum *int `json:"tm_slot_num,omitempty"` 323 // Job feature. Type of the Flink image used by a job. 324 // basic: indicates that the basic Flink image provided by DLI is used. 325 // custom: indicates that the user-defined Flink image is used. 326 Feature string `json:"feature,omitempty"` 327 // Flink version. This parameter is valid only when feature is set to basic. You can use this parameter with the 328 // feature parameter to specify the version of the DLI basic Flink image used for job running. 329 FlinkVersion string `json:"flink_version,omitempty"` 330 // Custom image. The format is Organization name/Image name:Image version. 331 // This parameter is valid only when feature is set to custom. You can use this parameter with the feature 332 // parameter to specify a user-defined Flink image for job running. For details about how to use custom images. 333 Image string `json:"image,omitempty"` 334 // Whether the abnormal restart is recovered from the checkpoint. 335 ResumeCheckpoint *bool `json:"resume_checkpoint,omitempty"` 336 // Maximum number of retry times upon exceptions. The unit is times/hour. Value range: -1 or greater than 0. 337 // The default value is -1, indicating that the number of times is unlimited. 338 ResumeMaxNum *int `json:"resume_max_num,omitempty"` 339 // Storage address of the checkpoint in the JAR file of the user. The path must be unique. 340 CheckpointPath string `json:"checkpoint_path,omitempty"` 341 // Customizes optimization parameters when a Flink job is running. 342 RuntimeConfig string `json:"runtime_config,omitempty"` 343 } 344 345 type StopFlinkJobInBatch struct { 346 TriggerSavepoint *bool `json:"trigger_savepoint,omitempty"` 347 JobIds []int `json:"job_ids" required:"true"` 348 } 349 350 var RequestOpts = golangsdk.RequestOpts{ 351 MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, 352 } 353 354 func CreateSqlJob(c *golangsdk.ServiceClient, opts CreateSqlJobOpts) (*CreateJobResp, error) { 355 b, err := golangsdk.BuildRequestBody(opts, "") 356 if err != nil { 357 return nil, err 358 } 359 360 var rst CreateJobResp 361 _, err = c.Post(createFlinkSqlUrl(c), b, &rst, &golangsdk.RequestOpts{ 362 MoreHeaders: RequestOpts.MoreHeaders, 363 }) 364 365 return &rst, err 366 } 367 368 func UpdateSqlJob(c *golangsdk.ServiceClient, jobId int, opts UpdateSqlJobOpts) (*UpdateJobResp, error) { 369 b, err := golangsdk.BuildRequestBody(opts, "") 370 if err != nil { 371 return nil, err 372 } 373 374 var rst UpdateJobResp 375 _, err = c.Put(updateFlinkSqlURL(c, jobId), b, &rst, &golangsdk.RequestOpts{ 376 MoreHeaders: RequestOpts.MoreHeaders, 377 }) 378 379 return &rst, err 380 } 381 382 func Run(c *golangsdk.ServiceClient, opts RunJobOpts) (*[]CommonResp, error) { 383 b, err := golangsdk.BuildRequestBody(opts, "") 384 if err != nil { 385 return nil, err 386 } 387 388 var rst []CommonResp 389 _, err = c.Post(runFlinkJobURL(c), b, &rst, &golangsdk.RequestOpts{ 390 MoreHeaders: RequestOpts.MoreHeaders, 391 }) 392 393 return &rst, err 394 } 395 396 func Get(c *golangsdk.ServiceClient, jobId int) (*GetJobResp, error) { 397 var rst GetJobResp 398 _, err := c.Get(getURL(c, jobId), &rst, &golangsdk.RequestOpts{ 399 MoreHeaders: RequestOpts.MoreHeaders, 400 }) 401 402 return &rst, err 403 } 404 405 func List(c *golangsdk.ServiceClient, opts ListOpts) (*ListResp, error) { 406 url := listURL(c) 407 query, err := golangsdk.BuildQueryString(opts) 408 if err != nil { 409 return nil, err 410 } 411 url += query.String() 412 413 var rst ListResp 414 _, err = c.Get(url, &rst, &golangsdk.RequestOpts{ 415 MoreHeaders: RequestOpts.MoreHeaders, 416 }) 417 418 return &rst, err 419 } 420 421 func Delete(c *golangsdk.ServiceClient, jobId int) (*CommonResp, error) { 422 var rst CommonResp 423 _, err := c.DeleteWithResponse(deleteURL(c, jobId), &rst, &golangsdk.RequestOpts{ 424 MoreHeaders: RequestOpts.MoreHeaders, 425 }) 426 427 return &rst, err 428 } 429 430 func AuthorizeBucket(c *golangsdk.ServiceClient, opts ObsBucketsOpts) (*CommonResp, error) { 431 b, err := golangsdk.BuildRequestBody(opts, "") 432 if err != nil { 433 return nil, err 434 } 435 436 var rst CommonResp 437 _, err = c.Post(authorizeBucketURL(c), b, &rst, &golangsdk.RequestOpts{ 438 MoreHeaders: RequestOpts.MoreHeaders, 439 }) 440 441 return &rst, err 442 } 443 444 func CreateJarJob(c *golangsdk.ServiceClient, opts CreateJarJobOpts) (*CreateJobResp, error) { 445 b, err := golangsdk.BuildRequestBody(opts, "") 446 if err != nil { 447 return nil, err 448 } 449 450 var rst CreateJobResp 451 _, err = c.Post(createJarJobURL(c), b, &rst, &golangsdk.RequestOpts{ 452 MoreHeaders: RequestOpts.MoreHeaders, 453 }) 454 455 return &rst, err 456 } 457 458 func UpdateJarJob(c *golangsdk.ServiceClient, jobId int, opts UpdateJarJobOpts) (*UpdateJobResp, error) { 459 b, err := golangsdk.BuildRequestBody(opts, "") 460 if err != nil { 461 return nil, err 462 } 463 464 var rst UpdateJobResp 465 _, err = c.Put(updateJarJobURL(c, jobId), b, &rst, &golangsdk.RequestOpts{ 466 MoreHeaders: RequestOpts.MoreHeaders, 467 }) 468 469 return &rst, err 470 } 471 472 func Stop(c *golangsdk.ServiceClient, opts StopFlinkJobInBatch) (*[]CommonResp, error) { 473 b, err := golangsdk.BuildRequestBody(opts, "") 474 if err != nil { 475 return nil, err 476 } 477 478 var rst []CommonResp 479 _, err = c.Post(stopJobURL(c), b, &rst, &golangsdk.RequestOpts{ 480 MoreHeaders: RequestOpts.MoreHeaders, 481 }) 482 483 return &rst, err 484 }