tencentcloud-sdk-hai 3.0.698

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e619fb7349e65f493607824cf7a92e2af8a4ee26
4
+ data.tar.gz: c7f2584b615b048b97d0fe3656bf868fbd72c5a1
5
+ SHA512:
6
+ metadata.gz: 4a9f3e70eca9af690e5bdb307f0765c1b199ea2aa32bfe449e70b49b71444f9aeee7fb21e054d0ec25c47f4b9e9e7185043dcdc20bc5145e96b2b799a1d673f9
7
+ data.tar.gz: 1f32859084094e2bb11fbe04fa38ee6fd6d2802895ec75f4bbf2933ec8e660a05239555c8c9be05731f996a9c20923d89b50885ece4a92fcc58cc17c7232fea0
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 3.0.698
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20230812/client'
6
+ require_relative 'v20230812/models'
7
+
8
+ module TencentCloud
9
+ module Hai
10
+ end
11
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Hai
21
+ module V20230812
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2023-08-12'
26
+ api_endpoint = 'hai.tencentcloudapi.com'
27
+ sdk_version = 'HAI_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 本接口 (RunInstances) 用于创建一个或多个指定配置的实例。
33
+
34
+ # @param request: Request instance for RunInstances.
35
+ # @type request: :class:`Tencentcloud::hai::V20230812::RunInstancesRequest`
36
+ # @rtype: :class:`Tencentcloud::hai::V20230812::RunInstancesResponse`
37
+ def RunInstances(request)
38
+ body = send_request('RunInstances', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = RunInstancesResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,108 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Hai
19
+ module V20230812
20
+ # RunInstances请求参数结构体
21
+ class RunInstancesRequest < TencentCloud::Common::AbstractModel
22
+ # @param ApplicationId: 应用ID
23
+ # @type ApplicationId: String
24
+ # @param BundleType: 算力套餐类型
25
+ # @type BundleType: String
26
+ # @param SystemDisk: 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。
27
+ # @type SystemDisk: :class:`Tencentcloud::Hai.v20230812.models.SystemDisk`
28
+ # @param InstanceCount: 购买实例数量。
29
+ # @type InstanceCount: Integer
30
+ # @param InstanceName: 实例显示名称
31
+ # @type InstanceName: String
32
+ # @param ClientToken: 幂等请求的token
33
+ # @type ClientToken: String
34
+ # @param DryRun: DryRun为True就是只验接口连通性,默认为False
35
+ # @type DryRun: Boolean
36
+
37
+ attr_accessor :ApplicationId, :BundleType, :SystemDisk, :InstanceCount, :InstanceName, :ClientToken, :DryRun
38
+
39
+ def initialize(applicationid=nil, bundletype=nil, systemdisk=nil, instancecount=nil, instancename=nil, clienttoken=nil, dryrun=nil)
40
+ @ApplicationId = applicationid
41
+ @BundleType = bundletype
42
+ @SystemDisk = systemdisk
43
+ @InstanceCount = instancecount
44
+ @InstanceName = instancename
45
+ @ClientToken = clienttoken
46
+ @DryRun = dryrun
47
+ end
48
+
49
+ def deserialize(params)
50
+ @ApplicationId = params['ApplicationId']
51
+ @BundleType = params['BundleType']
52
+ unless params['SystemDisk'].nil?
53
+ @SystemDisk = SystemDisk.new
54
+ @SystemDisk.deserialize(params['SystemDisk'])
55
+ end
56
+ @InstanceCount = params['InstanceCount']
57
+ @InstanceName = params['InstanceName']
58
+ @ClientToken = params['ClientToken']
59
+ @DryRun = params['DryRun']
60
+ end
61
+ end
62
+
63
+ # RunInstances返回参数结构体
64
+ class RunInstancesResponse < TencentCloud::Common::AbstractModel
65
+ # @param InstanceIdSet: 实例ID列表
66
+ # @type InstanceIdSet: Array
67
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
68
+ # @type RequestId: String
69
+
70
+ attr_accessor :InstanceIdSet, :RequestId
71
+
72
+ def initialize(instanceidset=nil, requestid=nil)
73
+ @InstanceIdSet = instanceidset
74
+ @RequestId = requestid
75
+ end
76
+
77
+ def deserialize(params)
78
+ @InstanceIdSet = params['InstanceIdSet']
79
+ @RequestId = params['RequestId']
80
+ end
81
+ end
82
+
83
+ # 描述了操作系统所在块设备即系统盘的信息
84
+ class SystemDisk < TencentCloud::Common::AbstractModel
85
+ # @param DiskType: 系统盘类型。系统盘类型限制详见[存储概述](https://cloud.tencent.com/document/product/213/4952)。取值范围:<br><li>LOCAL_BASIC:本地硬盘<br><li>LOCAL_SSD:本地SSD硬盘<br><li>CLOUD_BASIC:普通云硬盘<br><li>CLOUD_SSD:SSD云硬盘<br><li>CLOUD_PREMIUM:高性能云硬盘<br><li>CLOUD_BSSD:通用性SSD云硬盘<br><br>默认取值:当前有库存的硬盘类型。
86
+ # 注意:此字段可能返回 null,表示取不到有效值。
87
+ # @type DiskType: String
88
+ # @param DiskSize: 系统盘大小,单位:GB。默认值为 80
89
+ # 注意:此字段可能返回 null,表示取不到有效值。
90
+ # @type DiskSize: Integer
91
+
92
+ attr_accessor :DiskType, :DiskSize
93
+
94
+ def initialize(disktype=nil, disksize=nil)
95
+ @DiskType = disktype
96
+ @DiskSize = disksize
97
+ end
98
+
99
+ def deserialize(params)
100
+ @DiskType = params['DiskType']
101
+ @DiskSize = params['DiskSize']
102
+ end
103
+ end
104
+
105
+ end
106
+ end
107
+ end
108
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-hai
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.698
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-11-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tencentcloud-sdk-common
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ description: Tencent Cloud Ruby SDK is the official software development kit, which
28
+ allows Ruby developers to write software that makes use of Tencent Cloud service
29
+ HAI.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/tencentcloud-sdk-hai.rb
37
+ - lib/v20230812/client.rb
38
+ - lib/v20230812/models.rb
39
+ - lib/VERSION
40
+ homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
+ licenses:
42
+ - Apache-2.0
43
+ metadata:
44
+ source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-hai
45
+ changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.0.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - HAI
66
+ test_files: []