1// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package v20180423 16 17import ( 18 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" 19 tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" 20 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" 21) 22 23const APIVersion = "2018-04-23" 24 25type Client struct { 26 common.Client 27} 28 29// Deprecated 30func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { 31 cpf := profile.NewClientProfile() 32 client = &Client{} 33 client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf) 34 return 35} 36 37func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { 38 client = &Client{} 39 client.Init(region). 40 WithCredential(credential). 41 WithProfile(clientProfile) 42 return 43} 44 45 46func NewAttachCamRoleRequest() (request *AttachCamRoleRequest) { 47 request = &AttachCamRoleRequest{ 48 BaseRequest: &tchttp.BaseRequest{}, 49 } 50 request.Init().WithApiInfo("bm", APIVersion, "AttachCamRole") 51 return 52} 53 54func NewAttachCamRoleResponse() (response *AttachCamRoleResponse) { 55 response = &AttachCamRoleResponse{ 56 BaseResponse: &tchttp.BaseResponse{}, 57 } 58 return 59} 60 61// AttachCamRole 62// 服务器绑定CAM角色,该角色授权访问黑石物理服务器服务,为黑石物理服务器提供了访问资源的权限,如请求服务器的临时证书 63// 64// 可能返回的错误码: 65// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 66func (c *Client) AttachCamRole(request *AttachCamRoleRequest) (response *AttachCamRoleResponse, err error) { 67 if request == nil { 68 request = NewAttachCamRoleRequest() 69 } 70 response = NewAttachCamRoleResponse() 71 err = c.Send(request, response) 72 return 73} 74 75func NewBindPsaTagRequest() (request *BindPsaTagRequest) { 76 request = &BindPsaTagRequest{ 77 BaseRequest: &tchttp.BaseRequest{}, 78 } 79 request.Init().WithApiInfo("bm", APIVersion, "BindPsaTag") 80 return 81} 82 83func NewBindPsaTagResponse() (response *BindPsaTagResponse) { 84 response = &BindPsaTagResponse{ 85 BaseResponse: &tchttp.BaseResponse{}, 86 } 87 return 88} 89 90// BindPsaTag 91// 为预授权规则绑定标签 92// 93// 可能返回的错误码: 94// FAILEDOPERATION = "FailedOperation" 95// INVALIDPARAMETER = "InvalidParameter" 96// INVALIDPARAMETERVALUE_INVALIDPARAMETER = "InvalidParameterValue.InvalidParameter" 97// LIMITEXCEEDED = "LimitExceeded" 98// RESOURCEUNAVAILABLE = "ResourceUnavailable" 99// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 100func (c *Client) BindPsaTag(request *BindPsaTagRequest) (response *BindPsaTagResponse, err error) { 101 if request == nil { 102 request = NewBindPsaTagRequest() 103 } 104 response = NewBindPsaTagResponse() 105 err = c.Send(request, response) 106 return 107} 108 109func NewBuyDevicesRequest() (request *BuyDevicesRequest) { 110 request = &BuyDevicesRequest{ 111 BaseRequest: &tchttp.BaseRequest{}, 112 } 113 request.Init().WithApiInfo("bm", APIVersion, "BuyDevices") 114 return 115} 116 117func NewBuyDevicesResponse() (response *BuyDevicesResponse) { 118 response = &BuyDevicesResponse{ 119 BaseResponse: &tchttp.BaseResponse{}, 120 } 121 return 122} 123 124// BuyDevices 125// 购买黑石物理机 126// 127// 可能返回的错误码: 128// FAILEDOPERATION = "FailedOperation" 129// INVALIDPARAMETER = "InvalidParameter" 130// LIMITEXCEEDED = "LimitExceeded" 131// RESOURCEINUSE_FLOWBUSY = "ResourceInUse.FlowBusy" 132// RESOURCEINSUFFICIENT_DEVICEINSUFFICIENT = "ResourceInsufficient.DeviceInsufficient" 133// RESOURCEUNAVAILABLE = "ResourceUnavailable" 134// UNSUPPORTEDOPERATION = "UnsupportedOperation" 135// UNSUPPORTEDOPERATION_FUNDINSUFFICIENT = "UnsupportedOperation.FundInsufficient" 136func (c *Client) BuyDevices(request *BuyDevicesRequest) (response *BuyDevicesResponse, err error) { 137 if request == nil { 138 request = NewBuyDevicesRequest() 139 } 140 response = NewBuyDevicesResponse() 141 err = c.Send(request, response) 142 return 143} 144 145func NewCreateCustomImageRequest() (request *CreateCustomImageRequest) { 146 request = &CreateCustomImageRequest{ 147 BaseRequest: &tchttp.BaseRequest{}, 148 } 149 request.Init().WithApiInfo("bm", APIVersion, "CreateCustomImage") 150 return 151} 152 153func NewCreateCustomImageResponse() (response *CreateCustomImageResponse) { 154 response = &CreateCustomImageResponse{ 155 BaseResponse: &tchttp.BaseResponse{}, 156 } 157 return 158} 159 160// CreateCustomImage 161// 创建自定义镜像<br> 162// 163// 每个AppId在每个可用区最多保留20个自定义镜像 164// 165// 可能返回的错误码: 166// FAILEDOPERATION = "FailedOperation" 167// INVALIDPARAMETER = "InvalidParameter" 168// LIMITEXCEEDED = "LimitExceeded" 169// RESOURCEUNAVAILABLE = "ResourceUnavailable" 170// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 171// UNSUPPORTEDOPERATION = "UnsupportedOperation" 172func (c *Client) CreateCustomImage(request *CreateCustomImageRequest) (response *CreateCustomImageResponse, err error) { 173 if request == nil { 174 request = NewCreateCustomImageRequest() 175 } 176 response = NewCreateCustomImageResponse() 177 err = c.Send(request, response) 178 return 179} 180 181func NewCreatePsaRegulationRequest() (request *CreatePsaRegulationRequest) { 182 request = &CreatePsaRegulationRequest{ 183 BaseRequest: &tchttp.BaseRequest{}, 184 } 185 request.Init().WithApiInfo("bm", APIVersion, "CreatePsaRegulation") 186 return 187} 188 189func NewCreatePsaRegulationResponse() (response *CreatePsaRegulationResponse) { 190 response = &CreatePsaRegulationResponse{ 191 BaseResponse: &tchttp.BaseResponse{}, 192 } 193 return 194} 195 196// CreatePsaRegulation 197// 创建预授权规则 198// 199// 可能返回的错误码: 200// FAILEDOPERATION = "FailedOperation" 201// INVALIDPARAMETER = "InvalidParameter" 202// LIMITEXCEEDED = "LimitExceeded" 203// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 204func (c *Client) CreatePsaRegulation(request *CreatePsaRegulationRequest) (response *CreatePsaRegulationResponse, err error) { 205 if request == nil { 206 request = NewCreatePsaRegulationRequest() 207 } 208 response = NewCreatePsaRegulationResponse() 209 err = c.Send(request, response) 210 return 211} 212 213func NewCreateSpotDeviceRequest() (request *CreateSpotDeviceRequest) { 214 request = &CreateSpotDeviceRequest{ 215 BaseRequest: &tchttp.BaseRequest{}, 216 } 217 request.Init().WithApiInfo("bm", APIVersion, "CreateSpotDevice") 218 return 219} 220 221func NewCreateSpotDeviceResponse() (response *CreateSpotDeviceResponse) { 222 response = &CreateSpotDeviceResponse{ 223 BaseResponse: &tchttp.BaseResponse{}, 224 } 225 return 226} 227 228// CreateSpotDevice 229// 创建黑石竞价实例 230// 231// 可能返回的错误码: 232// INVALIDPARAMETER = "InvalidParameter" 233// LIMITEXCEEDED = "LimitExceeded" 234// RESOURCEINSUFFICIENT = "ResourceInsufficient" 235func (c *Client) CreateSpotDevice(request *CreateSpotDeviceRequest) (response *CreateSpotDeviceResponse, err error) { 236 if request == nil { 237 request = NewCreateSpotDeviceRequest() 238 } 239 response = NewCreateSpotDeviceResponse() 240 err = c.Send(request, response) 241 return 242} 243 244func NewCreateUserCmdRequest() (request *CreateUserCmdRequest) { 245 request = &CreateUserCmdRequest{ 246 BaseRequest: &tchttp.BaseRequest{}, 247 } 248 request.Init().WithApiInfo("bm", APIVersion, "CreateUserCmd") 249 return 250} 251 252func NewCreateUserCmdResponse() (response *CreateUserCmdResponse) { 253 response = &CreateUserCmdResponse{ 254 BaseResponse: &tchttp.BaseResponse{}, 255 } 256 return 257} 258 259// CreateUserCmd 260// 创建自定义脚本 261// 262// 可能返回的错误码: 263// FAILEDOPERATION = "FailedOperation" 264// INVALIDPARAMETER = "InvalidParameter" 265// LIMITEXCEEDED = "LimitExceeded" 266// LIMITEXCEEDED_USERCMDCOUNT = "LimitExceeded.UserCmdCount" 267// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 268func (c *Client) CreateUserCmd(request *CreateUserCmdRequest) (response *CreateUserCmdResponse, err error) { 269 if request == nil { 270 request = NewCreateUserCmdRequest() 271 } 272 response = NewCreateUserCmdResponse() 273 err = c.Send(request, response) 274 return 275} 276 277func NewDeleteCustomImagesRequest() (request *DeleteCustomImagesRequest) { 278 request = &DeleteCustomImagesRequest{ 279 BaseRequest: &tchttp.BaseRequest{}, 280 } 281 request.Init().WithApiInfo("bm", APIVersion, "DeleteCustomImages") 282 return 283} 284 285func NewDeleteCustomImagesResponse() (response *DeleteCustomImagesResponse) { 286 response = &DeleteCustomImagesResponse{ 287 BaseResponse: &tchttp.BaseResponse{}, 288 } 289 return 290} 291 292// DeleteCustomImages 293// 删除自定义镜像<br> 294// 295// 正用于部署或重装中的镜像被删除后,镜像文件将保留一段时间,直到部署或重装结束 296// 297// 可能返回的错误码: 298// FAILEDOPERATION = "FailedOperation" 299// INVALIDPARAMETER = "InvalidParameter" 300// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 301func (c *Client) DeleteCustomImages(request *DeleteCustomImagesRequest) (response *DeleteCustomImagesResponse, err error) { 302 if request == nil { 303 request = NewDeleteCustomImagesRequest() 304 } 305 response = NewDeleteCustomImagesResponse() 306 err = c.Send(request, response) 307 return 308} 309 310func NewDeletePsaRegulationRequest() (request *DeletePsaRegulationRequest) { 311 request = &DeletePsaRegulationRequest{ 312 BaseRequest: &tchttp.BaseRequest{}, 313 } 314 request.Init().WithApiInfo("bm", APIVersion, "DeletePsaRegulation") 315 return 316} 317 318func NewDeletePsaRegulationResponse() (response *DeletePsaRegulationResponse) { 319 response = &DeletePsaRegulationResponse{ 320 BaseResponse: &tchttp.BaseResponse{}, 321 } 322 return 323} 324 325// DeletePsaRegulation 326// 删除预授权规则 327// 328// 可能返回的错误码: 329// FAILEDOPERATION = "FailedOperation" 330// INVALIDPARAMETER = "InvalidParameter" 331// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 332func (c *Client) DeletePsaRegulation(request *DeletePsaRegulationRequest) (response *DeletePsaRegulationResponse, err error) { 333 if request == nil { 334 request = NewDeletePsaRegulationRequest() 335 } 336 response = NewDeletePsaRegulationResponse() 337 err = c.Send(request, response) 338 return 339} 340 341func NewDeleteUserCmdsRequest() (request *DeleteUserCmdsRequest) { 342 request = &DeleteUserCmdsRequest{ 343 BaseRequest: &tchttp.BaseRequest{}, 344 } 345 request.Init().WithApiInfo("bm", APIVersion, "DeleteUserCmds") 346 return 347} 348 349func NewDeleteUserCmdsResponse() (response *DeleteUserCmdsResponse) { 350 response = &DeleteUserCmdsResponse{ 351 BaseResponse: &tchttp.BaseResponse{}, 352 } 353 return 354} 355 356// DeleteUserCmds 357// 删除自定义脚本 358// 359// 可能返回的错误码: 360// FAILEDOPERATION = "FailedOperation" 361// INVALIDPARAMETER = "InvalidParameter" 362// UNSUPPORTEDOPERATION = "UnsupportedOperation" 363func (c *Client) DeleteUserCmds(request *DeleteUserCmdsRequest) (response *DeleteUserCmdsResponse, err error) { 364 if request == nil { 365 request = NewDeleteUserCmdsRequest() 366 } 367 response = NewDeleteUserCmdsResponse() 368 err = c.Send(request, response) 369 return 370} 371 372func NewDescribeCustomImageProcessRequest() (request *DescribeCustomImageProcessRequest) { 373 request = &DescribeCustomImageProcessRequest{ 374 BaseRequest: &tchttp.BaseRequest{}, 375 } 376 request.Init().WithApiInfo("bm", APIVersion, "DescribeCustomImageProcess") 377 return 378} 379 380func NewDescribeCustomImageProcessResponse() (response *DescribeCustomImageProcessResponse) { 381 response = &DescribeCustomImageProcessResponse{ 382 BaseResponse: &tchttp.BaseResponse{}, 383 } 384 return 385} 386 387// DescribeCustomImageProcess 388// 查询自定义镜像制作进度 389// 390// 可能返回的错误码: 391// FAILEDOPERATION = "FailedOperation" 392// INVALIDPARAMETER = "InvalidParameter" 393// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 394func (c *Client) DescribeCustomImageProcess(request *DescribeCustomImageProcessRequest) (response *DescribeCustomImageProcessResponse, err error) { 395 if request == nil { 396 request = NewDescribeCustomImageProcessRequest() 397 } 398 response = NewDescribeCustomImageProcessResponse() 399 err = c.Send(request, response) 400 return 401} 402 403func NewDescribeCustomImagesRequest() (request *DescribeCustomImagesRequest) { 404 request = &DescribeCustomImagesRequest{ 405 BaseRequest: &tchttp.BaseRequest{}, 406 } 407 request.Init().WithApiInfo("bm", APIVersion, "DescribeCustomImages") 408 return 409} 410 411func NewDescribeCustomImagesResponse() (response *DescribeCustomImagesResponse) { 412 response = &DescribeCustomImagesResponse{ 413 BaseResponse: &tchttp.BaseResponse{}, 414 } 415 return 416} 417 418// DescribeCustomImages 419// 查看自定义镜像列表 420// 421// 可能返回的错误码: 422// FAILEDOPERATION = "FailedOperation" 423// INVALIDPARAMETER = "InvalidParameter" 424// LIMITEXCEEDED = "LimitExceeded" 425// RESOURCEUNAVAILABLE = "ResourceUnavailable" 426// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 427func (c *Client) DescribeCustomImages(request *DescribeCustomImagesRequest) (response *DescribeCustomImagesResponse, err error) { 428 if request == nil { 429 request = NewDescribeCustomImagesRequest() 430 } 431 response = NewDescribeCustomImagesResponse() 432 err = c.Send(request, response) 433 return 434} 435 436func NewDescribeDeviceClassRequest() (request *DescribeDeviceClassRequest) { 437 request = &DescribeDeviceClassRequest{ 438 BaseRequest: &tchttp.BaseRequest{}, 439 } 440 request.Init().WithApiInfo("bm", APIVersion, "DescribeDeviceClass") 441 return 442} 443 444func NewDescribeDeviceClassResponse() (response *DescribeDeviceClassResponse) { 445 response = &DescribeDeviceClassResponse{ 446 BaseResponse: &tchttp.BaseResponse{}, 447 } 448 return 449} 450 451// DescribeDeviceClass 452// 获取设备类型 453// 454// 可能返回的错误码: 455// FAILEDOPERATION = "FailedOperation" 456// INVALIDPARAMETER = "InvalidParameter" 457// LIMITEXCEEDED = "LimitExceeded" 458// RESOURCEUNAVAILABLE = "ResourceUnavailable" 459// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 460func (c *Client) DescribeDeviceClass(request *DescribeDeviceClassRequest) (response *DescribeDeviceClassResponse, err error) { 461 if request == nil { 462 request = NewDescribeDeviceClassRequest() 463 } 464 response = NewDescribeDeviceClassResponse() 465 err = c.Send(request, response) 466 return 467} 468 469func NewDescribeDeviceClassPartitionRequest() (request *DescribeDeviceClassPartitionRequest) { 470 request = &DescribeDeviceClassPartitionRequest{ 471 BaseRequest: &tchttp.BaseRequest{}, 472 } 473 request.Init().WithApiInfo("bm", APIVersion, "DescribeDeviceClassPartition") 474 return 475} 476 477func NewDescribeDeviceClassPartitionResponse() (response *DescribeDeviceClassPartitionResponse) { 478 response = &DescribeDeviceClassPartitionResponse{ 479 BaseResponse: &tchttp.BaseResponse{}, 480 } 481 return 482} 483 484// DescribeDeviceClassPartition 485// 查询机型支持的RAID方式, 并返回系统盘的分区和逻辑盘的列表 486// 487// 可能返回的错误码: 488// FAILEDOPERATION = "FailedOperation" 489// INVALIDPARAMETER = "InvalidParameter" 490func (c *Client) DescribeDeviceClassPartition(request *DescribeDeviceClassPartitionRequest) (response *DescribeDeviceClassPartitionResponse, err error) { 491 if request == nil { 492 request = NewDescribeDeviceClassPartitionRequest() 493 } 494 response = NewDescribeDeviceClassPartitionResponse() 495 err = c.Send(request, response) 496 return 497} 498 499func NewDescribeDeviceHardwareInfoRequest() (request *DescribeDeviceHardwareInfoRequest) { 500 request = &DescribeDeviceHardwareInfoRequest{ 501 BaseRequest: &tchttp.BaseRequest{}, 502 } 503 request.Init().WithApiInfo("bm", APIVersion, "DescribeDeviceHardwareInfo") 504 return 505} 506 507func NewDescribeDeviceHardwareInfoResponse() (response *DescribeDeviceHardwareInfoResponse) { 508 response = &DescribeDeviceHardwareInfoResponse{ 509 BaseResponse: &tchttp.BaseResponse{}, 510 } 511 return 512} 513 514// DescribeDeviceHardwareInfo 515// 查询设备硬件配置信息,如 CPU 型号,内存大小,磁盘大小和数量 516// 517// 可能返回的错误码: 518// FAILEDOPERATION = "FailedOperation" 519// INVALIDPARAMETER = "InvalidParameter" 520// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 521func (c *Client) DescribeDeviceHardwareInfo(request *DescribeDeviceHardwareInfoRequest) (response *DescribeDeviceHardwareInfoResponse, err error) { 522 if request == nil { 523 request = NewDescribeDeviceHardwareInfoRequest() 524 } 525 response = NewDescribeDeviceHardwareInfoResponse() 526 err = c.Send(request, response) 527 return 528} 529 530func NewDescribeDeviceInventoryRequest() (request *DescribeDeviceInventoryRequest) { 531 request = &DescribeDeviceInventoryRequest{ 532 BaseRequest: &tchttp.BaseRequest{}, 533 } 534 request.Init().WithApiInfo("bm", APIVersion, "DescribeDeviceInventory") 535 return 536} 537 538func NewDescribeDeviceInventoryResponse() (response *DescribeDeviceInventoryResponse) { 539 response = &DescribeDeviceInventoryResponse{ 540 BaseResponse: &tchttp.BaseResponse{}, 541 } 542 return 543} 544 545// DescribeDeviceInventory 546// 查询设备库存 547// 548// 可能返回的错误码: 549// FAILEDOPERATION = "FailedOperation" 550// INVALIDPARAMETER = "InvalidParameter" 551func (c *Client) DescribeDeviceInventory(request *DescribeDeviceInventoryRequest) (response *DescribeDeviceInventoryResponse, err error) { 552 if request == nil { 553 request = NewDescribeDeviceInventoryRequest() 554 } 555 response = NewDescribeDeviceInventoryResponse() 556 err = c.Send(request, response) 557 return 558} 559 560func NewDescribeDeviceOperationLogRequest() (request *DescribeDeviceOperationLogRequest) { 561 request = &DescribeDeviceOperationLogRequest{ 562 BaseRequest: &tchttp.BaseRequest{}, 563 } 564 request.Init().WithApiInfo("bm", APIVersion, "DescribeDeviceOperationLog") 565 return 566} 567 568func NewDescribeDeviceOperationLogResponse() (response *DescribeDeviceOperationLogResponse) { 569 response = &DescribeDeviceOperationLogResponse{ 570 BaseResponse: &tchttp.BaseResponse{}, 571 } 572 return 573} 574 575// DescribeDeviceOperationLog 576// 查询设备操作日志, 如设备重启,重装,设置密码等操作 577// 578// 可能返回的错误码: 579// FAILEDOPERATION = "FailedOperation" 580// INVALIDPARAMETER = "InvalidParameter" 581// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 582func (c *Client) DescribeDeviceOperationLog(request *DescribeDeviceOperationLogRequest) (response *DescribeDeviceOperationLogResponse, err error) { 583 if request == nil { 584 request = NewDescribeDeviceOperationLogRequest() 585 } 586 response = NewDescribeDeviceOperationLogResponse() 587 err = c.Send(request, response) 588 return 589} 590 591func NewDescribeDevicePartitionRequest() (request *DescribeDevicePartitionRequest) { 592 request = &DescribeDevicePartitionRequest{ 593 BaseRequest: &tchttp.BaseRequest{}, 594 } 595 request.Init().WithApiInfo("bm", APIVersion, "DescribeDevicePartition") 596 return 597} 598 599func NewDescribeDevicePartitionResponse() (response *DescribeDevicePartitionResponse) { 600 response = &DescribeDevicePartitionResponse{ 601 BaseResponse: &tchttp.BaseResponse{}, 602 } 603 return 604} 605 606// DescribeDevicePartition 607// 获取物理机的分区格式 608// 609// 可能返回的错误码: 610// FAILEDOPERATION = "FailedOperation" 611// INVALIDPARAMETER = "InvalidParameter" 612// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 613func (c *Client) DescribeDevicePartition(request *DescribeDevicePartitionRequest) (response *DescribeDevicePartitionResponse, err error) { 614 if request == nil { 615 request = NewDescribeDevicePartitionRequest() 616 } 617 response = NewDescribeDevicePartitionResponse() 618 err = c.Send(request, response) 619 return 620} 621 622func NewDescribeDevicePositionRequest() (request *DescribeDevicePositionRequest) { 623 request = &DescribeDevicePositionRequest{ 624 BaseRequest: &tchttp.BaseRequest{}, 625 } 626 request.Init().WithApiInfo("bm", APIVersion, "DescribeDevicePosition") 627 return 628} 629 630func NewDescribeDevicePositionResponse() (response *DescribeDevicePositionResponse) { 631 response = &DescribeDevicePositionResponse{ 632 BaseResponse: &tchttp.BaseResponse{}, 633 } 634 return 635} 636 637// DescribeDevicePosition 638// 查询服务器所在的位置,如机架,上联交换机等信息 639// 640// 可能返回的错误码: 641// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 642func (c *Client) DescribeDevicePosition(request *DescribeDevicePositionRequest) (response *DescribeDevicePositionResponse, err error) { 643 if request == nil { 644 request = NewDescribeDevicePositionRequest() 645 } 646 response = NewDescribeDevicePositionResponse() 647 err = c.Send(request, response) 648 return 649} 650 651func NewDescribeDevicePriceInfoRequest() (request *DescribeDevicePriceInfoRequest) { 652 request = &DescribeDevicePriceInfoRequest{ 653 BaseRequest: &tchttp.BaseRequest{}, 654 } 655 request.Init().WithApiInfo("bm", APIVersion, "DescribeDevicePriceInfo") 656 return 657} 658 659func NewDescribeDevicePriceInfoResponse() (response *DescribeDevicePriceInfoResponse) { 660 response = &DescribeDevicePriceInfoResponse{ 661 BaseResponse: &tchttp.BaseResponse{}, 662 } 663 return 664} 665 666// DescribeDevicePriceInfo 667// 查询服务器价格信息,支持设备的批量查找,支持标准机型和弹性机型的混合查找 668// 669// 可能返回的错误码: 670// FAILEDOPERATION = "FailedOperation" 671// INVALIDPARAMETER = "InvalidParameter" 672// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 673func (c *Client) DescribeDevicePriceInfo(request *DescribeDevicePriceInfoRequest) (response *DescribeDevicePriceInfoResponse, err error) { 674 if request == nil { 675 request = NewDescribeDevicePriceInfoRequest() 676 } 677 response = NewDescribeDevicePriceInfoResponse() 678 err = c.Send(request, response) 679 return 680} 681 682func NewDescribeDevicesRequest() (request *DescribeDevicesRequest) { 683 request = &DescribeDevicesRequest{ 684 BaseRequest: &tchttp.BaseRequest{}, 685 } 686 request.Init().WithApiInfo("bm", APIVersion, "DescribeDevices") 687 return 688} 689 690func NewDescribeDevicesResponse() (response *DescribeDevicesResponse) { 691 response = &DescribeDevicesResponse{ 692 BaseResponse: &tchttp.BaseResponse{}, 693 } 694 return 695} 696 697// DescribeDevices 698// 查询物理服务器,可以按照实例,业务IP等过滤 699// 700// 可能返回的错误码: 701// FAILEDOPERATION = "FailedOperation" 702// INVALIDPARAMETER = "InvalidParameter" 703// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 704func (c *Client) DescribeDevices(request *DescribeDevicesRequest) (response *DescribeDevicesResponse, err error) { 705 if request == nil { 706 request = NewDescribeDevicesRequest() 707 } 708 response = NewDescribeDevicesResponse() 709 err = c.Send(request, response) 710 return 711} 712 713func NewDescribeHardwareSpecificationRequest() (request *DescribeHardwareSpecificationRequest) { 714 request = &DescribeHardwareSpecificationRequest{ 715 BaseRequest: &tchttp.BaseRequest{}, 716 } 717 request.Init().WithApiInfo("bm", APIVersion, "DescribeHardwareSpecification") 718 return 719} 720 721func NewDescribeHardwareSpecificationResponse() (response *DescribeHardwareSpecificationResponse) { 722 response = &DescribeHardwareSpecificationResponse{ 723 BaseResponse: &tchttp.BaseResponse{}, 724 } 725 return 726} 727 728// DescribeHardwareSpecification 729// 查询自定义机型部件信息,包括CpuId对应的型号,DiskTypeId对应的磁盘类型 730// 731// 可能返回的错误码: 732// FAILEDOPERATION = "FailedOperation" 733// INVALIDPARAMETER = "InvalidParameter" 734// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 735func (c *Client) DescribeHardwareSpecification(request *DescribeHardwareSpecificationRequest) (response *DescribeHardwareSpecificationResponse, err error) { 736 if request == nil { 737 request = NewDescribeHardwareSpecificationRequest() 738 } 739 response = NewDescribeHardwareSpecificationResponse() 740 err = c.Send(request, response) 741 return 742} 743 744func NewDescribeHostedDeviceOutBandInfoRequest() (request *DescribeHostedDeviceOutBandInfoRequest) { 745 request = &DescribeHostedDeviceOutBandInfoRequest{ 746 BaseRequest: &tchttp.BaseRequest{}, 747 } 748 request.Init().WithApiInfo("bm", APIVersion, "DescribeHostedDeviceOutBandInfo") 749 return 750} 751 752func NewDescribeHostedDeviceOutBandInfoResponse() (response *DescribeHostedDeviceOutBandInfoResponse) { 753 response = &DescribeHostedDeviceOutBandInfoResponse{ 754 BaseResponse: &tchttp.BaseResponse{}, 755 } 756 return 757} 758 759// DescribeHostedDeviceOutBandInfo 760// 查询托管设备带外信息 761// 762// 可能返回的错误码: 763// FAILEDOPERATION = "FailedOperation" 764// INVALIDPARAMETER = "InvalidParameter" 765// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 766// UNSUPPORTEDOPERATION = "UnsupportedOperation" 767func (c *Client) DescribeHostedDeviceOutBandInfo(request *DescribeHostedDeviceOutBandInfoRequest) (response *DescribeHostedDeviceOutBandInfoResponse, err error) { 768 if request == nil { 769 request = NewDescribeHostedDeviceOutBandInfoRequest() 770 } 771 response = NewDescribeHostedDeviceOutBandInfoResponse() 772 err = c.Send(request, response) 773 return 774} 775 776func NewDescribeOperationResultRequest() (request *DescribeOperationResultRequest) { 777 request = &DescribeOperationResultRequest{ 778 BaseRequest: &tchttp.BaseRequest{}, 779 } 780 request.Init().WithApiInfo("bm", APIVersion, "DescribeOperationResult") 781 return 782} 783 784func NewDescribeOperationResultResponse() (response *DescribeOperationResultResponse) { 785 response = &DescribeOperationResultResponse{ 786 BaseResponse: &tchttp.BaseResponse{}, 787 } 788 return 789} 790 791// DescribeOperationResult 792// 获取异步操作状态的完成状态 793// 794// 可能返回的错误码: 795// FAILEDOPERATION = "FailedOperation" 796// INVALIDPARAMETER = "InvalidParameter" 797// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 798func (c *Client) DescribeOperationResult(request *DescribeOperationResultRequest) (response *DescribeOperationResultResponse, err error) { 799 if request == nil { 800 request = NewDescribeOperationResultRequest() 801 } 802 response = NewDescribeOperationResultResponse() 803 err = c.Send(request, response) 804 return 805} 806 807func NewDescribeOsInfoRequest() (request *DescribeOsInfoRequest) { 808 request = &DescribeOsInfoRequest{ 809 BaseRequest: &tchttp.BaseRequest{}, 810 } 811 request.Init().WithApiInfo("bm", APIVersion, "DescribeOsInfo") 812 return 813} 814 815func NewDescribeOsInfoResponse() (response *DescribeOsInfoResponse) { 816 response = &DescribeOsInfoResponse{ 817 BaseResponse: &tchttp.BaseResponse{}, 818 } 819 return 820} 821 822// DescribeOsInfo 823// 查询指定机型所支持的操作系统 824// 825// 可能返回的错误码: 826// FAILEDOPERATION = "FailedOperation" 827// INVALIDPARAMETER = "InvalidParameter" 828func (c *Client) DescribeOsInfo(request *DescribeOsInfoRequest) (response *DescribeOsInfoResponse, err error) { 829 if request == nil { 830 request = NewDescribeOsInfoRequest() 831 } 832 response = NewDescribeOsInfoResponse() 833 err = c.Send(request, response) 834 return 835} 836 837func NewDescribePsaRegulationsRequest() (request *DescribePsaRegulationsRequest) { 838 request = &DescribePsaRegulationsRequest{ 839 BaseRequest: &tchttp.BaseRequest{}, 840 } 841 request.Init().WithApiInfo("bm", APIVersion, "DescribePsaRegulations") 842 return 843} 844 845func NewDescribePsaRegulationsResponse() (response *DescribePsaRegulationsResponse) { 846 response = &DescribePsaRegulationsResponse{ 847 BaseResponse: &tchttp.BaseResponse{}, 848 } 849 return 850} 851 852// DescribePsaRegulations 853// 获取预授权规则列表 854// 855// 可能返回的错误码: 856// FAILEDOPERATION = "FailedOperation" 857// INVALIDPARAMETER = "InvalidParameter" 858// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 859func (c *Client) DescribePsaRegulations(request *DescribePsaRegulationsRequest) (response *DescribePsaRegulationsResponse, err error) { 860 if request == nil { 861 request = NewDescribePsaRegulationsRequest() 862 } 863 response = NewDescribePsaRegulationsResponse() 864 err = c.Send(request, response) 865 return 866} 867 868func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { 869 request = &DescribeRegionsRequest{ 870 BaseRequest: &tchttp.BaseRequest{}, 871 } 872 request.Init().WithApiInfo("bm", APIVersion, "DescribeRegions") 873 return 874} 875 876func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) { 877 response = &DescribeRegionsResponse{ 878 BaseResponse: &tchttp.BaseResponse{}, 879 } 880 return 881} 882 883// DescribeRegions 884// 查询地域以及可用区 885// 886// 可能返回的错误码: 887// FAILEDOPERATION = "FailedOperation" 888// INVALIDPARAMETER = "InvalidParameter" 889// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 890func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { 891 if request == nil { 892 request = NewDescribeRegionsRequest() 893 } 894 response = NewDescribeRegionsResponse() 895 err = c.Send(request, response) 896 return 897} 898 899func NewDescribeRepairTaskConstantRequest() (request *DescribeRepairTaskConstantRequest) { 900 request = &DescribeRepairTaskConstantRequest{ 901 BaseRequest: &tchttp.BaseRequest{}, 902 } 903 request.Init().WithApiInfo("bm", APIVersion, "DescribeRepairTaskConstant") 904 return 905} 906 907func NewDescribeRepairTaskConstantResponse() (response *DescribeRepairTaskConstantResponse) { 908 response = &DescribeRepairTaskConstantResponse{ 909 BaseResponse: &tchttp.BaseResponse{}, 910 } 911 return 912} 913 914// DescribeRepairTaskConstant 915// 维修任务配置获取 916// 917// 可能返回的错误码: 918// FAILEDOPERATION = "FailedOperation" 919// INVALIDPARAMETER = "InvalidParameter" 920// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 921func (c *Client) DescribeRepairTaskConstant(request *DescribeRepairTaskConstantRequest) (response *DescribeRepairTaskConstantResponse, err error) { 922 if request == nil { 923 request = NewDescribeRepairTaskConstantRequest() 924 } 925 response = NewDescribeRepairTaskConstantResponse() 926 err = c.Send(request, response) 927 return 928} 929 930func NewDescribeTaskInfoRequest() (request *DescribeTaskInfoRequest) { 931 request = &DescribeTaskInfoRequest{ 932 BaseRequest: &tchttp.BaseRequest{}, 933 } 934 request.Init().WithApiInfo("bm", APIVersion, "DescribeTaskInfo") 935 return 936} 937 938func NewDescribeTaskInfoResponse() (response *DescribeTaskInfoResponse) { 939 response = &DescribeTaskInfoResponse{ 940 BaseResponse: &tchttp.BaseResponse{}, 941 } 942 return 943} 944 945// DescribeTaskInfo 946// 获取用户维修任务列表及详细信息<br> 947// 948// <br> 949// 950// TaskStatus(任务状态ID)与状态中文名的对应关系如下:<br> 951// 952// 1:未授权<br> 953// 954// 2:处理中<br> 955// 956// 3:待确认<br> 957// 958// 4:未授权-暂不处理<br> 959// 960// 5:已恢复<br> 961// 962// 6:待确认-未恢复<br> 963// 964// 可能返回的错误码: 965// FAILEDOPERATION = "FailedOperation" 966// INVALIDPARAMETER = "InvalidParameter" 967// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 968func (c *Client) DescribeTaskInfo(request *DescribeTaskInfoRequest) (response *DescribeTaskInfoResponse, err error) { 969 if request == nil { 970 request = NewDescribeTaskInfoRequest() 971 } 972 response = NewDescribeTaskInfoResponse() 973 err = c.Send(request, response) 974 return 975} 976 977func NewDescribeTaskOperationLogRequest() (request *DescribeTaskOperationLogRequest) { 978 request = &DescribeTaskOperationLogRequest{ 979 BaseRequest: &tchttp.BaseRequest{}, 980 } 981 request.Init().WithApiInfo("bm", APIVersion, "DescribeTaskOperationLog") 982 return 983} 984 985func NewDescribeTaskOperationLogResponse() (response *DescribeTaskOperationLogResponse) { 986 response = &DescribeTaskOperationLogResponse{ 987 BaseResponse: &tchttp.BaseResponse{}, 988 } 989 return 990} 991 992// DescribeTaskOperationLog 993// 获取维修任务操作日志 994// 995// 可能返回的错误码: 996// FAILEDOPERATION = "FailedOperation" 997// INVALIDPARAMETER = "InvalidParameter" 998// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 999func (c *Client) DescribeTaskOperationLog(request *DescribeTaskOperationLogRequest) (response *DescribeTaskOperationLogResponse, err error) { 1000 if request == nil { 1001 request = NewDescribeTaskOperationLogRequest() 1002 } 1003 response = NewDescribeTaskOperationLogResponse() 1004 err = c.Send(request, response) 1005 return 1006} 1007 1008func NewDescribeUserCmdTaskInfoRequest() (request *DescribeUserCmdTaskInfoRequest) { 1009 request = &DescribeUserCmdTaskInfoRequest{ 1010 BaseRequest: &tchttp.BaseRequest{}, 1011 } 1012 request.Init().WithApiInfo("bm", APIVersion, "DescribeUserCmdTaskInfo") 1013 return 1014} 1015 1016func NewDescribeUserCmdTaskInfoResponse() (response *DescribeUserCmdTaskInfoResponse) { 1017 response = &DescribeUserCmdTaskInfoResponse{ 1018 BaseResponse: &tchttp.BaseResponse{}, 1019 } 1020 return 1021} 1022 1023// DescribeUserCmdTaskInfo 1024// 获取自定义脚本任务详细信息 1025// 1026// 可能返回的错误码: 1027// FAILEDOPERATION = "FailedOperation" 1028// INVALIDPARAMETER = "InvalidParameter" 1029// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1030func (c *Client) DescribeUserCmdTaskInfo(request *DescribeUserCmdTaskInfoRequest) (response *DescribeUserCmdTaskInfoResponse, err error) { 1031 if request == nil { 1032 request = NewDescribeUserCmdTaskInfoRequest() 1033 } 1034 response = NewDescribeUserCmdTaskInfoResponse() 1035 err = c.Send(request, response) 1036 return 1037} 1038 1039func NewDescribeUserCmdTasksRequest() (request *DescribeUserCmdTasksRequest) { 1040 request = &DescribeUserCmdTasksRequest{ 1041 BaseRequest: &tchttp.BaseRequest{}, 1042 } 1043 request.Init().WithApiInfo("bm", APIVersion, "DescribeUserCmdTasks") 1044 return 1045} 1046 1047func NewDescribeUserCmdTasksResponse() (response *DescribeUserCmdTasksResponse) { 1048 response = &DescribeUserCmdTasksResponse{ 1049 BaseResponse: &tchttp.BaseResponse{}, 1050 } 1051 return 1052} 1053 1054// DescribeUserCmdTasks 1055// 获取自定义脚本任务列表 1056// 1057// 可能返回的错误码: 1058// FAILEDOPERATION = "FailedOperation" 1059// INVALIDPARAMETER = "InvalidParameter" 1060// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1061func (c *Client) DescribeUserCmdTasks(request *DescribeUserCmdTasksRequest) (response *DescribeUserCmdTasksResponse, err error) { 1062 if request == nil { 1063 request = NewDescribeUserCmdTasksRequest() 1064 } 1065 response = NewDescribeUserCmdTasksResponse() 1066 err = c.Send(request, response) 1067 return 1068} 1069 1070func NewDescribeUserCmdsRequest() (request *DescribeUserCmdsRequest) { 1071 request = &DescribeUserCmdsRequest{ 1072 BaseRequest: &tchttp.BaseRequest{}, 1073 } 1074 request.Init().WithApiInfo("bm", APIVersion, "DescribeUserCmds") 1075 return 1076} 1077 1078func NewDescribeUserCmdsResponse() (response *DescribeUserCmdsResponse) { 1079 response = &DescribeUserCmdsResponse{ 1080 BaseResponse: &tchttp.BaseResponse{}, 1081 } 1082 return 1083} 1084 1085// DescribeUserCmds 1086// 获取自定义脚本信息列表 1087// 1088// 可能返回的错误码: 1089// FAILEDOPERATION = "FailedOperation" 1090// INVALIDPARAMETER = "InvalidParameter" 1091// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1092// UNSUPPORTEDOPERATION = "UnsupportedOperation" 1093func (c *Client) DescribeUserCmds(request *DescribeUserCmdsRequest) (response *DescribeUserCmdsResponse, err error) { 1094 if request == nil { 1095 request = NewDescribeUserCmdsRequest() 1096 } 1097 response = NewDescribeUserCmdsResponse() 1098 err = c.Send(request, response) 1099 return 1100} 1101 1102func NewDetachCamRoleRequest() (request *DetachCamRoleRequest) { 1103 request = &DetachCamRoleRequest{ 1104 BaseRequest: &tchttp.BaseRequest{}, 1105 } 1106 request.Init().WithApiInfo("bm", APIVersion, "DetachCamRole") 1107 return 1108} 1109 1110func NewDetachCamRoleResponse() (response *DetachCamRoleResponse) { 1111 response = &DetachCamRoleResponse{ 1112 BaseResponse: &tchttp.BaseResponse{}, 1113 } 1114 return 1115} 1116 1117// DetachCamRole 1118// 服务器绑定CAM角色 1119// 1120// 可能返回的错误码: 1121// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1122func (c *Client) DetachCamRole(request *DetachCamRoleRequest) (response *DetachCamRoleResponse, err error) { 1123 if request == nil { 1124 request = NewDetachCamRoleRequest() 1125 } 1126 response = NewDetachCamRoleResponse() 1127 err = c.Send(request, response) 1128 return 1129} 1130 1131func NewModifyCustomImageAttributeRequest() (request *ModifyCustomImageAttributeRequest) { 1132 request = &ModifyCustomImageAttributeRequest{ 1133 BaseRequest: &tchttp.BaseRequest{}, 1134 } 1135 request.Init().WithApiInfo("bm", APIVersion, "ModifyCustomImageAttribute") 1136 return 1137} 1138 1139func NewModifyCustomImageAttributeResponse() (response *ModifyCustomImageAttributeResponse) { 1140 response = &ModifyCustomImageAttributeResponse{ 1141 BaseResponse: &tchttp.BaseResponse{}, 1142 } 1143 return 1144} 1145 1146// ModifyCustomImageAttribute 1147// 用于修改自定义镜像名或描述 1148// 1149// 可能返回的错误码: 1150// FAILEDOPERATION = "FailedOperation" 1151// INVALIDPARAMETER = "InvalidParameter" 1152// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1153func (c *Client) ModifyCustomImageAttribute(request *ModifyCustomImageAttributeRequest) (response *ModifyCustomImageAttributeResponse, err error) { 1154 if request == nil { 1155 request = NewModifyCustomImageAttributeRequest() 1156 } 1157 response = NewModifyCustomImageAttributeResponse() 1158 err = c.Send(request, response) 1159 return 1160} 1161 1162func NewModifyDeviceAliasesRequest() (request *ModifyDeviceAliasesRequest) { 1163 request = &ModifyDeviceAliasesRequest{ 1164 BaseRequest: &tchttp.BaseRequest{}, 1165 } 1166 request.Init().WithApiInfo("bm", APIVersion, "ModifyDeviceAliases") 1167 return 1168} 1169 1170func NewModifyDeviceAliasesResponse() (response *ModifyDeviceAliasesResponse) { 1171 response = &ModifyDeviceAliasesResponse{ 1172 BaseResponse: &tchttp.BaseResponse{}, 1173 } 1174 return 1175} 1176 1177// ModifyDeviceAliases 1178// 修改服务器名称 1179// 1180// 可能返回的错误码: 1181// FAILEDOPERATION = "FailedOperation" 1182// INVALIDPARAMETER = "InvalidParameter" 1183// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1184func (c *Client) ModifyDeviceAliases(request *ModifyDeviceAliasesRequest) (response *ModifyDeviceAliasesResponse, err error) { 1185 if request == nil { 1186 request = NewModifyDeviceAliasesRequest() 1187 } 1188 response = NewModifyDeviceAliasesResponse() 1189 err = c.Send(request, response) 1190 return 1191} 1192 1193func NewModifyDeviceAutoRenewFlagRequest() (request *ModifyDeviceAutoRenewFlagRequest) { 1194 request = &ModifyDeviceAutoRenewFlagRequest{ 1195 BaseRequest: &tchttp.BaseRequest{}, 1196 } 1197 request.Init().WithApiInfo("bm", APIVersion, "ModifyDeviceAutoRenewFlag") 1198 return 1199} 1200 1201func NewModifyDeviceAutoRenewFlagResponse() (response *ModifyDeviceAutoRenewFlagResponse) { 1202 response = &ModifyDeviceAutoRenewFlagResponse{ 1203 BaseResponse: &tchttp.BaseResponse{}, 1204 } 1205 return 1206} 1207 1208// ModifyDeviceAutoRenewFlag 1209// 修改物理机服务器自动续费标志 1210// 1211// 可能返回的错误码: 1212// FAILEDOPERATION = "FailedOperation" 1213// INVALIDPARAMETER = "InvalidParameter" 1214// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1215func (c *Client) ModifyDeviceAutoRenewFlag(request *ModifyDeviceAutoRenewFlagRequest) (response *ModifyDeviceAutoRenewFlagResponse, err error) { 1216 if request == nil { 1217 request = NewModifyDeviceAutoRenewFlagRequest() 1218 } 1219 response = NewModifyDeviceAutoRenewFlagResponse() 1220 err = c.Send(request, response) 1221 return 1222} 1223 1224func NewModifyLanIpRequest() (request *ModifyLanIpRequest) { 1225 request = &ModifyLanIpRequest{ 1226 BaseRequest: &tchttp.BaseRequest{}, 1227 } 1228 request.Init().WithApiInfo("bm", APIVersion, "ModifyLanIp") 1229 return 1230} 1231 1232func NewModifyLanIpResponse() (response *ModifyLanIpResponse) { 1233 response = &ModifyLanIpResponse{ 1234 BaseResponse: &tchttp.BaseResponse{}, 1235 } 1236 return 1237} 1238 1239// ModifyLanIp 1240// 修改物理机内网IP(不重装系统) 1241// 1242// 可能返回的错误码: 1243// FAILEDOPERATION = "FailedOperation" 1244// FAILEDOPERATION_TSCAGENTOFFLINE = "FailedOperation.TscAgentOffline" 1245// INVALIDPARAMETER = "InvalidParameter" 1246// RESOURCEUNAVAILABLE = "ResourceUnavailable" 1247// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1248// UNSUPPORTEDOPERATION = "UnsupportedOperation" 1249// UNSUPPORTEDOPERATION_INVALIDOPERATION = "UnsupportedOperation.InvalidOperation" 1250func (c *Client) ModifyLanIp(request *ModifyLanIpRequest) (response *ModifyLanIpResponse, err error) { 1251 if request == nil { 1252 request = NewModifyLanIpRequest() 1253 } 1254 response = NewModifyLanIpResponse() 1255 err = c.Send(request, response) 1256 return 1257} 1258 1259func NewModifyPayModePre2PostRequest() (request *ModifyPayModePre2PostRequest) { 1260 request = &ModifyPayModePre2PostRequest{ 1261 BaseRequest: &tchttp.BaseRequest{}, 1262 } 1263 request.Init().WithApiInfo("bm", APIVersion, "ModifyPayModePre2Post") 1264 return 1265} 1266 1267func NewModifyPayModePre2PostResponse() (response *ModifyPayModePre2PostResponse) { 1268 response = &ModifyPayModePre2PostResponse{ 1269 BaseResponse: &tchttp.BaseResponse{}, 1270 } 1271 return 1272} 1273 1274// ModifyPayModePre2Post 1275// 将设备的预付费模式修改为后付费计费模式,支持批量转换。(前提是客户要加入黑石物理机后付费计费的白名单,申请黑石物理机后付费可以联系腾讯云客服) 1276// 1277// 可能返回的错误码: 1278// FAILEDOPERATION = "FailedOperation" 1279// INVALIDPARAMETER = "InvalidParameter" 1280// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1281// UNSUPPORTEDOPERATION = "UnsupportedOperation" 1282func (c *Client) ModifyPayModePre2Post(request *ModifyPayModePre2PostRequest) (response *ModifyPayModePre2PostResponse, err error) { 1283 if request == nil { 1284 request = NewModifyPayModePre2PostRequest() 1285 } 1286 response = NewModifyPayModePre2PostResponse() 1287 err = c.Send(request, response) 1288 return 1289} 1290 1291func NewModifyPsaRegulationRequest() (request *ModifyPsaRegulationRequest) { 1292 request = &ModifyPsaRegulationRequest{ 1293 BaseRequest: &tchttp.BaseRequest{}, 1294 } 1295 request.Init().WithApiInfo("bm", APIVersion, "ModifyPsaRegulation") 1296 return 1297} 1298 1299func NewModifyPsaRegulationResponse() (response *ModifyPsaRegulationResponse) { 1300 response = &ModifyPsaRegulationResponse{ 1301 BaseResponse: &tchttp.BaseResponse{}, 1302 } 1303 return 1304} 1305 1306// ModifyPsaRegulation 1307// 允许修改规则信息及关联故障类型 1308// 1309// 可能返回的错误码: 1310// FAILEDOPERATION = "FailedOperation" 1311// INVALIDPARAMETER = "InvalidParameter" 1312// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1313func (c *Client) ModifyPsaRegulation(request *ModifyPsaRegulationRequest) (response *ModifyPsaRegulationResponse, err error) { 1314 if request == nil { 1315 request = NewModifyPsaRegulationRequest() 1316 } 1317 response = NewModifyPsaRegulationResponse() 1318 err = c.Send(request, response) 1319 return 1320} 1321 1322func NewModifyUserCmdRequest() (request *ModifyUserCmdRequest) { 1323 request = &ModifyUserCmdRequest{ 1324 BaseRequest: &tchttp.BaseRequest{}, 1325 } 1326 request.Init().WithApiInfo("bm", APIVersion, "ModifyUserCmd") 1327 return 1328} 1329 1330func NewModifyUserCmdResponse() (response *ModifyUserCmdResponse) { 1331 response = &ModifyUserCmdResponse{ 1332 BaseResponse: &tchttp.BaseResponse{}, 1333 } 1334 return 1335} 1336 1337// ModifyUserCmd 1338// 修改自定义脚本 1339// 1340// 可能返回的错误码: 1341// FAILEDOPERATION = "FailedOperation" 1342// INVALIDPARAMETER = "InvalidParameter" 1343// LIMITEXCEEDED = "LimitExceeded" 1344// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1345// UNSUPPORTEDOPERATION = "UnsupportedOperation" 1346func (c *Client) ModifyUserCmd(request *ModifyUserCmdRequest) (response *ModifyUserCmdResponse, err error) { 1347 if request == nil { 1348 request = NewModifyUserCmdRequest() 1349 } 1350 response = NewModifyUserCmdResponse() 1351 err = c.Send(request, response) 1352 return 1353} 1354 1355func NewOfflineDevicesRequest() (request *OfflineDevicesRequest) { 1356 request = &OfflineDevicesRequest{ 1357 BaseRequest: &tchttp.BaseRequest{}, 1358 } 1359 request.Init().WithApiInfo("bm", APIVersion, "OfflineDevices") 1360 return 1361} 1362 1363func NewOfflineDevicesResponse() (response *OfflineDevicesResponse) { 1364 response = &OfflineDevicesResponse{ 1365 BaseResponse: &tchttp.BaseResponse{}, 1366 } 1367 return 1368} 1369 1370// OfflineDevices 1371// 销毁黑石物理机实例:可以销毁物理机列表中的竞价实例,或回收站列表中所有计费模式的实例 1372// 1373// 可能返回的错误码: 1374// FAILEDOPERATION = "FailedOperation" 1375// INVALIDPARAMETER = "InvalidParameter" 1376// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1377func (c *Client) OfflineDevices(request *OfflineDevicesRequest) (response *OfflineDevicesResponse, err error) { 1378 if request == nil { 1379 request = NewOfflineDevicesRequest() 1380 } 1381 response = NewOfflineDevicesResponse() 1382 err = c.Send(request, response) 1383 return 1384} 1385 1386func NewRebootDevicesRequest() (request *RebootDevicesRequest) { 1387 request = &RebootDevicesRequest{ 1388 BaseRequest: &tchttp.BaseRequest{}, 1389 } 1390 request.Init().WithApiInfo("bm", APIVersion, "RebootDevices") 1391 return 1392} 1393 1394func NewRebootDevicesResponse() (response *RebootDevicesResponse) { 1395 response = &RebootDevicesResponse{ 1396 BaseResponse: &tchttp.BaseResponse{}, 1397 } 1398 return 1399} 1400 1401// RebootDevices 1402// 重启机器 1403// 1404// 可能返回的错误码: 1405// FAILEDOPERATION = "FailedOperation" 1406// INVALIDPARAMETER = "InvalidParameter" 1407// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1408func (c *Client) RebootDevices(request *RebootDevicesRequest) (response *RebootDevicesResponse, err error) { 1409 if request == nil { 1410 request = NewRebootDevicesRequest() 1411 } 1412 response = NewRebootDevicesResponse() 1413 err = c.Send(request, response) 1414 return 1415} 1416 1417func NewRecoverDevicesRequest() (request *RecoverDevicesRequest) { 1418 request = &RecoverDevicesRequest{ 1419 BaseRequest: &tchttp.BaseRequest{}, 1420 } 1421 request.Init().WithApiInfo("bm", APIVersion, "RecoverDevices") 1422 return 1423} 1424 1425func NewRecoverDevicesResponse() (response *RecoverDevicesResponse) { 1426 response = &RecoverDevicesResponse{ 1427 BaseResponse: &tchttp.BaseResponse{}, 1428 } 1429 return 1430} 1431 1432// RecoverDevices 1433// 恢复回收站中的物理机(仅限后付费的物理机) 1434// 1435// 可能返回的错误码: 1436// FAILEDOPERATION = "FailedOperation" 1437// INVALIDPARAMETER = "InvalidParameter" 1438func (c *Client) RecoverDevices(request *RecoverDevicesRequest) (response *RecoverDevicesResponse, err error) { 1439 if request == nil { 1440 request = NewRecoverDevicesRequest() 1441 } 1442 response = NewRecoverDevicesResponse() 1443 err = c.Send(request, response) 1444 return 1445} 1446 1447func NewReloadDeviceOsRequest() (request *ReloadDeviceOsRequest) { 1448 request = &ReloadDeviceOsRequest{ 1449 BaseRequest: &tchttp.BaseRequest{}, 1450 } 1451 request.Init().WithApiInfo("bm", APIVersion, "ReloadDeviceOs") 1452 return 1453} 1454 1455func NewReloadDeviceOsResponse() (response *ReloadDeviceOsResponse) { 1456 response = &ReloadDeviceOsResponse{ 1457 BaseResponse: &tchttp.BaseResponse{}, 1458 } 1459 return 1460} 1461 1462// ReloadDeviceOs 1463// 重装操作系统 1464// 1465// 可能返回的错误码: 1466// FAILEDOPERATION = "FailedOperation" 1467// FAILEDOPERATION_EXISTREPAIRTASK = "FailedOperation.ExistRepairTask" 1468// INVALIDPARAMETER = "InvalidParameter" 1469// UNSUPPORTEDOPERATION = "UnsupportedOperation" 1470func (c *Client) ReloadDeviceOs(request *ReloadDeviceOsRequest) (response *ReloadDeviceOsResponse, err error) { 1471 if request == nil { 1472 request = NewReloadDeviceOsRequest() 1473 } 1474 response = NewReloadDeviceOsResponse() 1475 err = c.Send(request, response) 1476 return 1477} 1478 1479func NewRepairTaskControlRequest() (request *RepairTaskControlRequest) { 1480 request = &RepairTaskControlRequest{ 1481 BaseRequest: &tchttp.BaseRequest{}, 1482 } 1483 request.Init().WithApiInfo("bm", APIVersion, "RepairTaskControl") 1484 return 1485} 1486 1487func NewRepairTaskControlResponse() (response *RepairTaskControlResponse) { 1488 response = &RepairTaskControlResponse{ 1489 BaseResponse: &tchttp.BaseResponse{}, 1490 } 1491 return 1492} 1493 1494// RepairTaskControl 1495// 此接口用于操作维修任务<br> 1496// 1497// 入参TaskId为维修任务ID<br> 1498// 1499// 入参Operate表示对维修任务的操作,支持如下取值:<br> 1500// 1501// AuthorizeRepair(授权维修)<br> 1502// 1503// Ignore(暂不提醒)<br> 1504// 1505// ConfirmRecovered(维修完成后,确认故障恢复)<br> 1506// 1507// ConfirmUnRecovered(维修完成后,确认故障未恢复,该操作已不推荐用)<br> 1508// 1509// NeedRepairAgain(维修完成后,故障未恢复,需要重新维修,推荐用此操作打回)<br> 1510// 1511// 入参OperateRemark仅在Operate为NeedRepairAgain时有效,表示打回重修原因,建议给出打回的具体原因。<br> 1512// 1513// <br> 1514// 1515// 操作约束(当前任务状态(TaskStatus)->对应可执行的操作):<br> 1516// 1517// 未授权(1)->授权维修;暂不处理<br> 1518// 1519// 暂不处理(4)->授权维修<br> 1520// 1521// 待确认(3)->确认故障恢复;确认故障未恢复;需要重新维修<br> 1522// 1523// 未恢复(6)->确认故障恢复<br> 1524// 1525// <br> 1526// 1527// 对于Ping不可达故障的任务,还允许:<br> 1528// 1529// 未授权->确认故障恢复<br> 1530// 1531// 暂不处理->确认故障恢复<br> 1532// 1533// <br> 1534// 1535// 处理中与已恢复状态的任务不允许进行操作。<br> 1536// 1537// <br> 1538// 1539// 详细信息请访问:https://cloud.tencent.com/document/product/386/18190 1540// 1541// 可能返回的错误码: 1542// FAILEDOPERATION = "FailedOperation" 1543// INVALIDPARAMETER = "InvalidParameter" 1544// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1545func (c *Client) RepairTaskControl(request *RepairTaskControlRequest) (response *RepairTaskControlResponse, err error) { 1546 if request == nil { 1547 request = NewRepairTaskControlRequest() 1548 } 1549 response = NewRepairTaskControlResponse() 1550 err = c.Send(request, response) 1551 return 1552} 1553 1554func NewResetDevicePasswordRequest() (request *ResetDevicePasswordRequest) { 1555 request = &ResetDevicePasswordRequest{ 1556 BaseRequest: &tchttp.BaseRequest{}, 1557 } 1558 request.Init().WithApiInfo("bm", APIVersion, "ResetDevicePassword") 1559 return 1560} 1561 1562func NewResetDevicePasswordResponse() (response *ResetDevicePasswordResponse) { 1563 response = &ResetDevicePasswordResponse{ 1564 BaseResponse: &tchttp.BaseResponse{}, 1565 } 1566 return 1567} 1568 1569// ResetDevicePassword 1570// 重置服务器密码 1571// 1572// 可能返回的错误码: 1573// FAILEDOPERATION = "FailedOperation" 1574// INVALIDPARAMETER = "InvalidParameter" 1575// RESOURCEUNAVAILABLE = "ResourceUnavailable" 1576// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1577func (c *Client) ResetDevicePassword(request *ResetDevicePasswordRequest) (response *ResetDevicePasswordResponse, err error) { 1578 if request == nil { 1579 request = NewResetDevicePasswordRequest() 1580 } 1581 response = NewResetDevicePasswordResponse() 1582 err = c.Send(request, response) 1583 return 1584} 1585 1586func NewReturnDevicesRequest() (request *ReturnDevicesRequest) { 1587 request = &ReturnDevicesRequest{ 1588 BaseRequest: &tchttp.BaseRequest{}, 1589 } 1590 request.Init().WithApiInfo("bm", APIVersion, "ReturnDevices") 1591 return 1592} 1593 1594func NewReturnDevicesResponse() (response *ReturnDevicesResponse) { 1595 response = &ReturnDevicesResponse{ 1596 BaseResponse: &tchttp.BaseResponse{}, 1597 } 1598 return 1599} 1600 1601// ReturnDevices 1602// 退回物理机至回收站,支持批量退还不同计费模式的物理机(包括预付费、后付费、预付费转后付费) 1603// 1604// 可能返回的错误码: 1605// FAILEDOPERATION = "FailedOperation" 1606// INVALIDPARAMETER = "InvalidParameter" 1607func (c *Client) ReturnDevices(request *ReturnDevicesRequest) (response *ReturnDevicesResponse, err error) { 1608 if request == nil { 1609 request = NewReturnDevicesRequest() 1610 } 1611 response = NewReturnDevicesResponse() 1612 err = c.Send(request, response) 1613 return 1614} 1615 1616func NewRunUserCmdRequest() (request *RunUserCmdRequest) { 1617 request = &RunUserCmdRequest{ 1618 BaseRequest: &tchttp.BaseRequest{}, 1619 } 1620 request.Init().WithApiInfo("bm", APIVersion, "RunUserCmd") 1621 return 1622} 1623 1624func NewRunUserCmdResponse() (response *RunUserCmdResponse) { 1625 response = &RunUserCmdResponse{ 1626 BaseResponse: &tchttp.BaseResponse{}, 1627 } 1628 return 1629} 1630 1631// RunUserCmd 1632// 运行自定义脚本 1633// 1634// 可能返回的错误码: 1635// FAILEDOPERATION = "FailedOperation" 1636// INVALIDPARAMETER = "InvalidParameter" 1637// UNSUPPORTEDOPERATION = "UnsupportedOperation" 1638func (c *Client) RunUserCmd(request *RunUserCmdRequest) (response *RunUserCmdResponse, err error) { 1639 if request == nil { 1640 request = NewRunUserCmdRequest() 1641 } 1642 response = NewRunUserCmdResponse() 1643 err = c.Send(request, response) 1644 return 1645} 1646 1647func NewSetOutBandVpnAuthPasswordRequest() (request *SetOutBandVpnAuthPasswordRequest) { 1648 request = &SetOutBandVpnAuthPasswordRequest{ 1649 BaseRequest: &tchttp.BaseRequest{}, 1650 } 1651 request.Init().WithApiInfo("bm", APIVersion, "SetOutBandVpnAuthPassword") 1652 return 1653} 1654 1655func NewSetOutBandVpnAuthPasswordResponse() (response *SetOutBandVpnAuthPasswordResponse) { 1656 response = &SetOutBandVpnAuthPasswordResponse{ 1657 BaseResponse: &tchttp.BaseResponse{}, 1658 } 1659 return 1660} 1661 1662// SetOutBandVpnAuthPassword 1663// 设置带外VPN认证用户密码 1664// 1665// 可能返回的错误码: 1666// FAILEDOPERATION = "FailedOperation" 1667// INVALIDPARAMETER = "InvalidParameter" 1668// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1669// UNSUPPORTEDOPERATION = "UnsupportedOperation" 1670func (c *Client) SetOutBandVpnAuthPassword(request *SetOutBandVpnAuthPasswordRequest) (response *SetOutBandVpnAuthPasswordResponse, err error) { 1671 if request == nil { 1672 request = NewSetOutBandVpnAuthPasswordRequest() 1673 } 1674 response = NewSetOutBandVpnAuthPasswordResponse() 1675 err = c.Send(request, response) 1676 return 1677} 1678 1679func NewShutdownDevicesRequest() (request *ShutdownDevicesRequest) { 1680 request = &ShutdownDevicesRequest{ 1681 BaseRequest: &tchttp.BaseRequest{}, 1682 } 1683 request.Init().WithApiInfo("bm", APIVersion, "ShutdownDevices") 1684 return 1685} 1686 1687func NewShutdownDevicesResponse() (response *ShutdownDevicesResponse) { 1688 response = &ShutdownDevicesResponse{ 1689 BaseResponse: &tchttp.BaseResponse{}, 1690 } 1691 return 1692} 1693 1694// ShutdownDevices 1695// 关闭服务器 1696// 1697// 可能返回的错误码: 1698// FAILEDOPERATION = "FailedOperation" 1699// INVALIDPARAMETER = "InvalidParameter" 1700// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1701func (c *Client) ShutdownDevices(request *ShutdownDevicesRequest) (response *ShutdownDevicesResponse, err error) { 1702 if request == nil { 1703 request = NewShutdownDevicesRequest() 1704 } 1705 response = NewShutdownDevicesResponse() 1706 err = c.Send(request, response) 1707 return 1708} 1709 1710func NewStartDevicesRequest() (request *StartDevicesRequest) { 1711 request = &StartDevicesRequest{ 1712 BaseRequest: &tchttp.BaseRequest{}, 1713 } 1714 request.Init().WithApiInfo("bm", APIVersion, "StartDevices") 1715 return 1716} 1717 1718func NewStartDevicesResponse() (response *StartDevicesResponse) { 1719 response = &StartDevicesResponse{ 1720 BaseResponse: &tchttp.BaseResponse{}, 1721 } 1722 return 1723} 1724 1725// StartDevices 1726// 开启服务器 1727// 1728// 可能返回的错误码: 1729// FAILEDOPERATION = "FailedOperation" 1730// INVALIDPARAMETER = "InvalidParameter" 1731// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1732func (c *Client) StartDevices(request *StartDevicesRequest) (response *StartDevicesResponse, err error) { 1733 if request == nil { 1734 request = NewStartDevicesRequest() 1735 } 1736 response = NewStartDevicesResponse() 1737 err = c.Send(request, response) 1738 return 1739} 1740 1741func NewUnbindPsaTagRequest() (request *UnbindPsaTagRequest) { 1742 request = &UnbindPsaTagRequest{ 1743 BaseRequest: &tchttp.BaseRequest{}, 1744 } 1745 request.Init().WithApiInfo("bm", APIVersion, "UnbindPsaTag") 1746 return 1747} 1748 1749func NewUnbindPsaTagResponse() (response *UnbindPsaTagResponse) { 1750 response = &UnbindPsaTagResponse{ 1751 BaseResponse: &tchttp.BaseResponse{}, 1752 } 1753 return 1754} 1755 1756// UnbindPsaTag 1757// 解除标签与预授权规则的绑定 1758// 1759// 可能返回的错误码: 1760// FAILEDOPERATION = "FailedOperation" 1761// INVALIDPARAMETER = "InvalidParameter" 1762// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" 1763func (c *Client) UnbindPsaTag(request *UnbindPsaTagRequest) (response *UnbindPsaTagResponse, err error) { 1764 if request == nil { 1765 request = NewUnbindPsaTagRequest() 1766 } 1767 response = NewUnbindPsaTagResponse() 1768 err = c.Send(request, response) 1769 return 1770} 1771