-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmodels.py
More file actions
3636 lines (2966 loc) · 135 KB
/
models.py
File metadata and controls
3636 lines (2966 loc) · 135 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from tencentcloud.common.abstract_model import AbstractModel
class Activity(AbstractModel):
"""Compute environment creation or termination activities
"""
def __init__(self):
"""
:param ActivityId: Activity ID
:type ActivityId: str
:param ComputeNodeId: Compute node ID
:type ComputeNodeId: str
:param ComputeNodeActivityType: Compute node activity type: creation or termination
:type ComputeNodeActivityType: str
:param EnvId: Compute environment ID
:type EnvId: str
:param Cause: Cause
:type Cause: str
:param ActivityState: Active status
:type ActivityState: str
:param StateReason: State reason
:type StateReason: str
:param StartTime: Activity start time
:type StartTime: str
:param EndTime: Activity end time
Note: This field may return null, indicating that no valid values can be obtained.
:type EndTime: str
:param InstanceId: CVM instance ID
Note: This field may return null, indicating that no valid values can be obtained.
:type InstanceId: str
"""
self.ActivityId = None
self.ComputeNodeId = None
self.ComputeNodeActivityType = None
self.EnvId = None
self.Cause = None
self.ActivityState = None
self.StateReason = None
self.StartTime = None
self.EndTime = None
self.InstanceId = None
def _deserialize(self, params):
self.ActivityId = params.get("ActivityId")
self.ComputeNodeId = params.get("ComputeNodeId")
self.ComputeNodeActivityType = params.get("ComputeNodeActivityType")
self.EnvId = params.get("EnvId")
self.Cause = params.get("Cause")
self.ActivityState = params.get("ActivityState")
self.StateReason = params.get("StateReason")
self.StartTime = params.get("StartTime")
self.EndTime = params.get("EndTime")
self.InstanceId = params.get("InstanceId")
class AgentRunningMode(AbstractModel):
"""Agent running mode
"""
def __init__(self):
"""
:param Scene: Scenario type. Windows is supported
:type Scene: str
:param User: The user that runs the Agent
:type User: str
:param Session: The session that runs the Agent
:type Session: str
"""
self.Scene = None
self.User = None
self.Session = None
def _deserialize(self, params):
self.Scene = params.get("Scene")
self.User = params.get("User")
self.Session = params.get("Session")
class AnonymousComputeEnv(AbstractModel):
"""Compute environment
"""
def __init__(self):
"""
:param EnvType: Compute environment management type
:type EnvType: str
:param EnvData: Compute environment's specific parameters
:type EnvData: :class:`tencentcloud.batch.v20170312.models.EnvData`
:param MountDataDisks: Data disk mounting option
:type MountDataDisks: list of MountDataDisk
:param AgentRunningMode: Agent running mode; applicable for Windows
:type AgentRunningMode: :class:`tencentcloud.batch.v20170312.models.AgentRunningMode`
"""
self.EnvType = None
self.EnvData = None
self.MountDataDisks = None
self.AgentRunningMode = None
def _deserialize(self, params):
self.EnvType = params.get("EnvType")
if params.get("EnvData") is not None:
self.EnvData = EnvData()
self.EnvData._deserialize(params.get("EnvData"))
if params.get("MountDataDisks") is not None:
self.MountDataDisks = []
for item in params.get("MountDataDisks"):
obj = MountDataDisk()
obj._deserialize(item)
self.MountDataDisks.append(obj)
if params.get("AgentRunningMode") is not None:
self.AgentRunningMode = AgentRunningMode()
self.AgentRunningMode._deserialize(params.get("AgentRunningMode"))
class Application(AbstractModel):
"""Application information
"""
def __init__(self):
"""
:param Command: Task execution command
:type Command: str
:param DeliveryForm: Delivery form of the application. Value range: PACKAGE, LOCAL, which refer to remotely stored software package and local compute environment, respectively.
:type DeliveryForm: str
:param PackagePath: Remote storage path of the application package
:type PackagePath: str
:param Docker: Relevant configuration of the Docker used by the application. In case that the Docker configuration is used, "LOCAL" DeliveryForm means that the application software inside the Docker image is used directly and run in Docker mode; "PACKAGE" DeliveryForm means that the remote application package is run in Docker mode after being injected into the Docker image. To avoid compatibility issues with different versions of Docker, the Docker installation package and relevant dependencies are taken care of by BatchCompute. For custom images where Docker has already been installed, uninstall Docker first and then use the Docker feature.
:type Docker: :class:`tencentcloud.batch.v20170312.models.Docker`
"""
self.Command = None
self.DeliveryForm = None
self.PackagePath = None
self.Docker = None
def _deserialize(self, params):
self.Command = params.get("Command")
self.DeliveryForm = params.get("DeliveryForm")
self.PackagePath = params.get("PackagePath")
if params.get("Docker") is not None:
self.Docker = Docker()
self.Docker._deserialize(params.get("Docker"))
class AttachInstancesRequest(AbstractModel):
"""AttachInstances request structure.
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
:param Instances: List of instances that added to the compute environment
:type Instances: list of Instance
"""
self.EnvId = None
self.Instances = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
if params.get("Instances") is not None:
self.Instances = []
for item in params.get("Instances"):
obj = Instance()
obj._deserialize(item)
self.Instances.append(obj)
class AttachInstancesResponse(AbstractModel):
"""AttachInstances response structure.
"""
def __init__(self):
"""
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.RequestId = None
def _deserialize(self, params):
self.RequestId = params.get("RequestId")
class Authentication(AbstractModel):
"""Authentication information
"""
def __init__(self):
"""
:param Scene: Authentication scenario such as COS
:type Scene: str
:param SecretId: SecretId
:type SecretId: str
:param SecretKey: SecretKey
:type SecretKey: str
"""
self.Scene = None
self.SecretId = None
self.SecretKey = None
def _deserialize(self, params):
self.Scene = params.get("Scene")
self.SecretId = params.get("SecretId")
self.SecretKey = params.get("SecretKey")
class ComputeEnvCreateInfo(AbstractModel):
"""Compute environment creation information
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
:param EnvName: Compute environment name
Note: This field may return null, indicating that no valid values can be obtained.
:type EnvName: str
:param EnvDescription: Compute environment description
Note: This field may return null, indicating that no valid values can be obtained.
:type EnvDescription: str
:param EnvType: Compute environment type. Only "MANAGED" type is supported
:type EnvType: str
:param EnvData: Compute environment parameter
:type EnvData: :class:`tencentcloud.batch.v20170312.models.EnvData`
:param MountDataDisks: Data disk mounting option
Note: This field may return null, indicating that no valid values can be obtained.
:type MountDataDisks: list of MountDataDisk
:param InputMappings: Input mapping
Note: This field may return null, indicating that no valid values can be obtained.
:type InputMappings: list of InputMapping
:param Authentications: Authorization information
Note: This field may return null, indicating that no valid values can be obtained.
:type Authentications: list of Authentication
:param Notifications: Notification information
Note: This field may return null, indicating that no valid values can be obtained.
:type Notifications: list of Notification
:param DesiredComputeNodeCount: Number of desired compute nodes
:type DesiredComputeNodeCount: int
"""
self.EnvId = None
self.EnvName = None
self.EnvDescription = None
self.EnvType = None
self.EnvData = None
self.MountDataDisks = None
self.InputMappings = None
self.Authentications = None
self.Notifications = None
self.DesiredComputeNodeCount = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
self.EnvName = params.get("EnvName")
self.EnvDescription = params.get("EnvDescription")
self.EnvType = params.get("EnvType")
if params.get("EnvData") is not None:
self.EnvData = EnvData()
self.EnvData._deserialize(params.get("EnvData"))
if params.get("MountDataDisks") is not None:
self.MountDataDisks = []
for item in params.get("MountDataDisks"):
obj = MountDataDisk()
obj._deserialize(item)
self.MountDataDisks.append(obj)
if params.get("InputMappings") is not None:
self.InputMappings = []
for item in params.get("InputMappings"):
obj = InputMapping()
obj._deserialize(item)
self.InputMappings.append(obj)
if params.get("Authentications") is not None:
self.Authentications = []
for item in params.get("Authentications"):
obj = Authentication()
obj._deserialize(item)
self.Authentications.append(obj)
if params.get("Notifications") is not None:
self.Notifications = []
for item in params.get("Notifications"):
obj = Notification()
obj._deserialize(item)
self.Notifications.append(obj)
self.DesiredComputeNodeCount = params.get("DesiredComputeNodeCount")
class ComputeEnvData(AbstractModel):
"""Compute environment attributes
"""
def __init__(self):
"""
:param InstanceTypes: List of CVM instance types
:type InstanceTypes: list of str
"""
self.InstanceTypes = None
def _deserialize(self, params):
self.InstanceTypes = params.get("InstanceTypes")
class ComputeEnvView(AbstractModel):
"""Compute environment information
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
:param EnvName: Compute environment name
:type EnvName: str
:param Placement: Location information
:type Placement: :class:`tencentcloud.batch.v20170312.models.Placement`
:param CreateTime: Creation time
:type CreateTime: str
:param ComputeNodeMetrics: Compute node statistical metrics
:type ComputeNodeMetrics: :class:`tencentcloud.batch.v20170312.models.ComputeNodeMetrics`
:param EnvType: Compute environment type
:type EnvType: str
:param DesiredComputeNodeCount: Number of desired compute nodes
:type DesiredComputeNodeCount: int
"""
self.EnvId = None
self.EnvName = None
self.Placement = None
self.CreateTime = None
self.ComputeNodeMetrics = None
self.EnvType = None
self.DesiredComputeNodeCount = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
self.EnvName = params.get("EnvName")
if params.get("Placement") is not None:
self.Placement = Placement()
self.Placement._deserialize(params.get("Placement"))
self.CreateTime = params.get("CreateTime")
if params.get("ComputeNodeMetrics") is not None:
self.ComputeNodeMetrics = ComputeNodeMetrics()
self.ComputeNodeMetrics._deserialize(params.get("ComputeNodeMetrics"))
self.EnvType = params.get("EnvType")
self.DesiredComputeNodeCount = params.get("DesiredComputeNodeCount")
class ComputeNode(AbstractModel):
"""Compute node
"""
def __init__(self):
"""
:param ComputeNodeId: Compute node ID
:type ComputeNodeId: str
:param ComputeNodeInstanceId: Compute node instance ID. In a CVM scenario, this parameter is the CVM InstanceId
:type ComputeNodeInstanceId: str
:param ComputeNodeState: Compute node state
:type ComputeNodeState: str
:param Cpu: Number of CPU cores
:type Cpu: int
:param Mem: Memory size in GiB
:type Mem: int
:param ResourceCreatedTime: Resource creation time
:type ResourceCreatedTime: str
:param TaskInstanceNumAvailable: Available capacity of the compute node when running TaskInstance. 0 means that the compute node is busy.
:type TaskInstanceNumAvailable: int
:param AgentVersion: BatchCompute Agent version
:type AgentVersion: str
:param PrivateIpAddresses: Private IP of the instance
:type PrivateIpAddresses: list of str
:param PublicIpAddresses: Public IP of the instance
:type PublicIpAddresses: list of str
"""
self.ComputeNodeId = None
self.ComputeNodeInstanceId = None
self.ComputeNodeState = None
self.Cpu = None
self.Mem = None
self.ResourceCreatedTime = None
self.TaskInstanceNumAvailable = None
self.AgentVersion = None
self.PrivateIpAddresses = None
self.PublicIpAddresses = None
def _deserialize(self, params):
self.ComputeNodeId = params.get("ComputeNodeId")
self.ComputeNodeInstanceId = params.get("ComputeNodeInstanceId")
self.ComputeNodeState = params.get("ComputeNodeState")
self.Cpu = params.get("Cpu")
self.Mem = params.get("Mem")
self.ResourceCreatedTime = params.get("ResourceCreatedTime")
self.TaskInstanceNumAvailable = params.get("TaskInstanceNumAvailable")
self.AgentVersion = params.get("AgentVersion")
self.PrivateIpAddresses = params.get("PrivateIpAddresses")
self.PublicIpAddresses = params.get("PublicIpAddresses")
class ComputeNodeMetrics(AbstractModel):
"""Compute node statistical metrics
"""
def __init__(self):
"""
:param SubmittedCount: Number of compute nodes that have been submitted
:type SubmittedCount: int
:param CreatingCount: Number of compute nodes that are being created
:type CreatingCount: int
:param CreationFailedCount: Number of compute nodes that failed to be created
:type CreationFailedCount: int
:param CreatedCount: Number of compute nodes that have been created
:type CreatedCount: int
:param RunningCount: Number of running compute nodes
:type RunningCount: int
:param DeletingCount: Number of compute nodes that are being terminated
:type DeletingCount: int
:param AbnormalCount: Number of exceptional compute nodes
:type AbnormalCount: int
"""
self.SubmittedCount = None
self.CreatingCount = None
self.CreationFailedCount = None
self.CreatedCount = None
self.RunningCount = None
self.DeletingCount = None
self.AbnormalCount = None
def _deserialize(self, params):
self.SubmittedCount = params.get("SubmittedCount")
self.CreatingCount = params.get("CreatingCount")
self.CreationFailedCount = params.get("CreationFailedCount")
self.CreatedCount = params.get("CreatedCount")
self.RunningCount = params.get("RunningCount")
self.DeletingCount = params.get("DeletingCount")
self.AbnormalCount = params.get("AbnormalCount")
class CreateComputeEnvRequest(AbstractModel):
"""CreateComputeEnv request structure.
"""
def __init__(self):
"""
:param ComputeEnv: Compute environment information
:type ComputeEnv: :class:`tencentcloud.batch.v20170312.models.NamedComputeEnv`
:param Placement: Location information
:type Placement: :class:`tencentcloud.batch.v20170312.models.Placement`
:param ClientToken: The string used to guarantee the idempotency of the request, which is generated by the user and must be unique for different requests. The maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
:type ClientToken: str
"""
self.ComputeEnv = None
self.Placement = None
self.ClientToken = None
def _deserialize(self, params):
if params.get("ComputeEnv") is not None:
self.ComputeEnv = NamedComputeEnv()
self.ComputeEnv._deserialize(params.get("ComputeEnv"))
if params.get("Placement") is not None:
self.Placement = Placement()
self.Placement._deserialize(params.get("Placement"))
self.ClientToken = params.get("ClientToken")
class CreateComputeEnvResponse(AbstractModel):
"""CreateComputeEnv response structure.
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.EnvId = None
self.RequestId = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
self.RequestId = params.get("RequestId")
class CreateTaskTemplateRequest(AbstractModel):
"""CreateTaskTemplate request structure.
"""
def __init__(self):
"""
:param TaskTemplateName: Task template name
:type TaskTemplateName: str
:param TaskTemplateInfo: Task template content with the same parameter requirements as the task
:type TaskTemplateInfo: :class:`tencentcloud.batch.v20170312.models.Task`
:param TaskTemplateDescription: Task template description
:type TaskTemplateDescription: str
"""
self.TaskTemplateName = None
self.TaskTemplateInfo = None
self.TaskTemplateDescription = None
def _deserialize(self, params):
self.TaskTemplateName = params.get("TaskTemplateName")
if params.get("TaskTemplateInfo") is not None:
self.TaskTemplateInfo = Task()
self.TaskTemplateInfo._deserialize(params.get("TaskTemplateInfo"))
self.TaskTemplateDescription = params.get("TaskTemplateDescription")
class CreateTaskTemplateResponse(AbstractModel):
"""CreateTaskTemplate response structure.
"""
def __init__(self):
"""
:param TaskTemplateId: Task template ID
:type TaskTemplateId: str
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.TaskTemplateId = None
self.RequestId = None
def _deserialize(self, params):
self.TaskTemplateId = params.get("TaskTemplateId")
self.RequestId = params.get("RequestId")
class DataDisk(AbstractModel):
"""Describes data disk information.
"""
def __init__(self):
"""
:param DiskSize: Data disk size (in GB). The minimum adjustment increment is 10 GB. The value range varies by data disk type. For more information on limits, see [Storage Overview](https://cloud.tencent.com/document/product/213/4952). The default value is 0, indicating that no data disk is purchased. For more information, see the product documentation.
:type DiskSize: int
:param DiskType: The type of the data disk. For more information regarding data disk types and limits, refer to [Storage Overview](https://cloud.tencent.com/document/product/213/4952). Valid values: <br><li>LOCAL_BASIC: local disk<br><li>LOCAL_SSD: local SSD disk<br><li>CLOUD_BASIC: HDD cloud disk<br><li>CLOUD_PREMIUM: premium cloud storage<br><li>CLOUD_SSD: SSD cloud disk<br><br>Default value: LOCAL_BASIC.<br><br>This parameter is invalid for `ResizeInstanceDisk`.
:type DiskType: str
:param DiskId: Data disk ID. Data disks of the type `LOCAL_BASIC` or `LOCAL_SSD` do not have IDs and do not support this parameter.
:type DiskId: str
:param DeleteWithInstance: Whether to terminate the data disk when its CVM is terminated. Valid values:
<li>TRUE: terminate the data disk when its CVM is terminated. This value only supports pay-as-you-go cloud disks billed on an hourly basis.
<li>FALSE: retain the data disk when its CVM is terminated.<br>
Default value: TRUE<br>
Currently this parameter is only used in the `RunInstances` API.
Note: This field may return null, indicating that no valid value is found.
:type DeleteWithInstance: bool
:param SnapshotId: Data disk snapshot ID. The size of the selected data disk snapshot must be smaller than that of the data disk.
Note: This field may return null, indicating that no valid value is found.
:type SnapshotId: str
:param Encrypt: Specifies whether the data disk is encrypted. Valid values:
<li>TRUE: encrypted
<li>FALSE: not encrypted<br>
Default value: FALSE<br>
This parameter is only used with `RunInstances`.
Note: this field may return `null`, indicating that no valid value is obtained.
:type Encrypt: bool
"""
self.DiskSize = None
self.DiskType = None
self.DiskId = None
self.DeleteWithInstance = None
self.SnapshotId = None
self.Encrypt = None
def _deserialize(self, params):
self.DiskSize = params.get("DiskSize")
self.DiskType = params.get("DiskType")
self.DiskId = params.get("DiskId")
self.DeleteWithInstance = params.get("DeleteWithInstance")
self.SnapshotId = params.get("SnapshotId")
self.Encrypt = params.get("Encrypt")
class DeleteComputeEnvRequest(AbstractModel):
"""DeleteComputeEnv request structure.
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
"""
self.EnvId = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
class DeleteComputeEnvResponse(AbstractModel):
"""DeleteComputeEnv response structure.
"""
def __init__(self):
"""
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.RequestId = None
def _deserialize(self, params):
self.RequestId = params.get("RequestId")
class DeleteJobRequest(AbstractModel):
"""DeleteJob request structure.
"""
def __init__(self):
"""
:param JobId: Job ID
:type JobId: str
"""
self.JobId = None
def _deserialize(self, params):
self.JobId = params.get("JobId")
class DeleteJobResponse(AbstractModel):
"""DeleteJob response structure.
"""
def __init__(self):
"""
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.RequestId = None
def _deserialize(self, params):
self.RequestId = params.get("RequestId")
class DeleteTaskTemplatesRequest(AbstractModel):
"""DeleteTaskTemplates request structure.
"""
def __init__(self):
"""
:param TaskTemplateIds: This API is used to delete task template information.
:type TaskTemplateIds: list of str
"""
self.TaskTemplateIds = None
def _deserialize(self, params):
self.TaskTemplateIds = params.get("TaskTemplateIds")
class DeleteTaskTemplatesResponse(AbstractModel):
"""DeleteTaskTemplates response structure.
"""
def __init__(self):
"""
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.RequestId = None
def _deserialize(self, params):
self.RequestId = params.get("RequestId")
class Dependence(AbstractModel):
"""Dependency
"""
def __init__(self):
"""
:param StartTask: Dependency start task name |
:type StartTask: str
:param EndTask: Dependency end task name |
:type EndTask: str
"""
self.StartTask = None
self.EndTask = None
def _deserialize(self, params):
self.StartTask = params.get("StartTask")
self.EndTask = params.get("EndTask")
class DescribeAvailableCvmInstanceTypesRequest(AbstractModel):
"""DescribeAvailableCvmInstanceTypes request structure.
"""
def __init__(self):
"""
:param Filters: Filter.
<li> zone - String - Required: No - (Filter) Filter by availability zone.</li>
<li> instance-family - String - Required: No - (Filter) Filter by model family such as S1, I1, and M1.</li>
:type Filters: list of Filter
"""
self.Filters = None
def _deserialize(self, params):
if params.get("Filters") is not None:
self.Filters = []
for item in params.get("Filters"):
obj = Filter()
obj._deserialize(item)
self.Filters.append(obj)
class DescribeAvailableCvmInstanceTypesResponse(AbstractModel):
"""DescribeAvailableCvmInstanceTypes response structure.
"""
def __init__(self):
"""
:param InstanceTypeConfigSet: Array of model configurations
:type InstanceTypeConfigSet: list of InstanceTypeConfig
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.InstanceTypeConfigSet = None
self.RequestId = None
def _deserialize(self, params):
if params.get("InstanceTypeConfigSet") is not None:
self.InstanceTypeConfigSet = []
for item in params.get("InstanceTypeConfigSet"):
obj = InstanceTypeConfig()
obj._deserialize(item)
self.InstanceTypeConfigSet.append(obj)
self.RequestId = params.get("RequestId")
class DescribeComputeEnvActivitiesRequest(AbstractModel):
"""DescribeComputeEnvActivities request structure.
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
:param Offset: Offset
:type Offset: int
:param Limit: Number of returned results
:type Limit: int
:param Filters: Filter
<li> compute-node-id - String - Required: No - (Filter) Filter by compute node ID.</li>
:type Filters: :class:`tencentcloud.batch.v20170312.models.Filter`
"""
self.EnvId = None
self.Offset = None
self.Limit = None
self.Filters = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
self.Offset = params.get("Offset")
self.Limit = params.get("Limit")
if params.get("Filters") is not None:
self.Filters = Filter()
self.Filters._deserialize(params.get("Filters"))
class DescribeComputeEnvActivitiesResponse(AbstractModel):
"""DescribeComputeEnvActivities response structure.
"""
def __init__(self):
"""
:param ActivitySet: List of activities in the compute environment
:type ActivitySet: list of Activity
:param TotalCount: Number of activities
:type TotalCount: int
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.ActivitySet = None
self.TotalCount = None
self.RequestId = None
def _deserialize(self, params):
if params.get("ActivitySet") is not None:
self.ActivitySet = []
for item in params.get("ActivitySet"):
obj = Activity()
obj._deserialize(item)
self.ActivitySet.append(obj)
self.TotalCount = params.get("TotalCount")
self.RequestId = params.get("RequestId")
class DescribeComputeEnvCreateInfoRequest(AbstractModel):
"""DescribeComputeEnvCreateInfo request structure.
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
"""
self.EnvId = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
class DescribeComputeEnvCreateInfoResponse(AbstractModel):
"""DescribeComputeEnvCreateInfo response structure.
"""
def __init__(self):
"""
:param EnvId: Compute environment ID
:type EnvId: str
:param EnvName: Compute environment name
:type EnvName: str
:param EnvDescription: Compute environment description
Note: This field may return null, indicating that no valid values can be obtained.
:type EnvDescription: str
:param EnvType: Compute environment type. Only "MANAGED" type is supported
:type EnvType: str
:param EnvData: Compute environment parameter
:type EnvData: :class:`tencentcloud.batch.v20170312.models.EnvData`
:param MountDataDisks: Data disk mounting option
:type MountDataDisks: list of MountDataDisk
:param InputMappings: Input mapping
:type InputMappings: list of InputMapping
:param Authentications: Authorization information
:type Authentications: list of Authentication
:param Notifications: Notification information
:type Notifications: list of Notification
:param DesiredComputeNodeCount: Number of desired compute nodes
:type DesiredComputeNodeCount: int
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str
"""
self.EnvId = None
self.EnvName = None
self.EnvDescription = None
self.EnvType = None
self.EnvData = None
self.MountDataDisks = None
self.InputMappings = None
self.Authentications = None
self.Notifications = None
self.DesiredComputeNodeCount = None
self.RequestId = None
def _deserialize(self, params):
self.EnvId = params.get("EnvId")
self.EnvName = params.get("EnvName")
self.EnvDescription = params.get("EnvDescription")
self.EnvType = params.get("EnvType")
if params.get("EnvData") is not None:
self.EnvData = EnvData()
self.EnvData._deserialize(params.get("EnvData"))
if params.get("MountDataDisks") is not None:
self.MountDataDisks = []
for item in params.get("MountDataDisks"):
obj = MountDataDisk()
obj._deserialize(item)
self.MountDataDisks.append(obj)
if params.get("InputMappings") is not None:
self.InputMappings = []
for item in params.get("InputMappings"):
obj = InputMapping()
obj._deserialize(item)
self.InputMappings.append(obj)
if params.get("Authentications") is not None:
self.Authentications = []
for item in params.get("Authentications"):
obj = Authentication()
obj._deserialize(item)
self.Authentications.append(obj)
if params.get("Notifications") is not None:
self.Notifications = []
for item in params.get("Notifications"):
obj = Notification()
obj._deserialize(item)
self.Notifications.append(obj)
self.DesiredComputeNodeCount = params.get("DesiredComputeNodeCount")
self.RequestId = params.get("RequestId")
class DescribeComputeEnvCreateInfosRequest(AbstractModel):
"""DescribeComputeEnvCreateInfos request structure.
"""
def __init__(self):
"""
:param EnvIds: Compute environment ID
:type EnvIds: list of str
:param Filters: Filter
<li> zone - String - Required: No - (Filter) Filter by availability zone.</li>
<li> env-id - String - Required: No - (Filter) Filter by compute environment ID.</li>
<li> env-name - String - Required: No - (Filter) Filter by compute environment name.</li>
:type Filters: list of Filter
:param Offset: Offset
:type Offset: int
:param Limit: Number of returned results
:type Limit: int
"""
self.EnvIds = None
self.Filters = None
self.Offset = None
self.Limit = None
def _deserialize(self, params):
self.EnvIds = params.get("EnvIds")
if params.get("Filters") is not None:
self.Filters = []
for item in params.get("Filters"):
obj = Filter()
obj._deserialize(item)
self.Filters.append(obj)
self.Offset = params.get("Offset")
self.Limit = params.get("Limit")
class DescribeComputeEnvCreateInfosResponse(AbstractModel):
"""DescribeComputeEnvCreateInfos response structure.
"""
def __init__(self):
"""
:param TotalCount: Number of compute environments
:type TotalCount: int
:param ComputeEnvCreateInfoSet: List of compute environment creation information
:type ComputeEnvCreateInfoSet: list of ComputeEnvCreateInfo
:param RequestId: The unique request ID, which is returned for each request. RequestId is required for locating a problem.
:type RequestId: str