oci 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/oci.rb +1 -0
- data/lib/oci/audit/audit_client_composite_operations.rb +16 -6
- data/lib/oci/container_engine/container_engine.rb +47 -0
- data/lib/oci/container_engine/container_engine_client.rb +1276 -0
- data/lib/oci/container_engine/container_engine_client_composite_operations.rb +320 -0
- data/lib/oci/container_engine/models/add_on_options.rb +164 -0
- data/lib/oci/container_engine/models/cluster.rb +296 -0
- data/lib/oci/container_engine/models/cluster_create_options.rb +178 -0
- data/lib/oci/container_engine/models/cluster_endpoints.rb +146 -0
- data/lib/oci/container_engine/models/cluster_lifecycle_state.rb +14 -0
- data/lib/oci/container_engine/models/cluster_metadata.rb +262 -0
- data/lib/oci/container_engine/models/cluster_options.rb +150 -0
- data/lib/oci/container_engine/models/cluster_summary.rb +296 -0
- data/lib/oci/container_engine/models/create_cluster_details.rb +198 -0
- data/lib/oci/container_engine/models/create_cluster_kubeconfig_content_details.rb +162 -0
- data/lib/oci/container_engine/models/create_node_pool_details.rb +272 -0
- data/lib/oci/container_engine/models/key_value.rb +156 -0
- data/lib/oci/container_engine/models/kubernetes_network_config.rb +164 -0
- data/lib/oci/container_engine/models/node.rb +281 -0
- data/lib/oci/container_engine/models/node_error.rb +180 -0
- data/lib/oci/container_engine/models/node_pool.rb +306 -0
- data/lib/oci/container_engine/models/node_pool_options.rb +170 -0
- data/lib/oci/container_engine/models/node_pool_summary.rb +296 -0
- data/lib/oci/container_engine/models/sort_order.rb +10 -0
- data/lib/oci/container_engine/models/update_cluster_details.rb +160 -0
- data/lib/oci/container_engine/models/update_node_pool_details.rb +202 -0
- data/lib/oci/container_engine/models/work_request.rb +288 -0
- data/lib/oci/container_engine/models/work_request_error.rb +167 -0
- data/lib/oci/container_engine/models/work_request_log_entry.rb +156 -0
- data/lib/oci/container_engine/models/work_request_operation_type.rb +15 -0
- data/lib/oci/container_engine/models/work_request_resource.rb +214 -0
- data/lib/oci/container_engine/models/work_request_status.rb +14 -0
- data/lib/oci/container_engine/models/work_request_summary.rb +288 -0
- data/lib/oci/container_engine/util.rb +46 -0
- data/lib/oci/errors.rb +21 -2
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +336 -133
- data/lib/oci/load_balancer/util.rb +19 -32
- data/lib/oci/regions.rb +2 -1
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waiter.rb +47 -0
- metadata +34 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74e11a3369d230ad53a90d5a69a01409142bf910
|
4
|
+
data.tar.gz: d24081b78b18865bf42f47b8d650e2c0ac24aa5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fd4d70a112e9f49c13908ccefda50f6e155f4335de92daeafd0174bfb7dd2e72bf4af9ec04ad0dc7614c7cc2d6ec8b79b8d93fdbfec5dbaaaac153c4b6d4c1f
|
7
|
+
data.tar.gz: 06ecbf27fb26d73deaf3f4a82a75f1c437d8a88cfd5a03f9ea3d5ac0a419ea566c7475fbe09a37dbd5b2479681f50a93345ca1af0bb7292e25f63e66a8b6ed73
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Oracle Cloud Infrastructure Ruby SDK
|
2
|
-
**Version 2.
|
2
|
+
**Version 2.3.0**
|
3
3
|
|
4
4
|
This topic describes how to install, configure, and use the Oracle Cloud Infrastructure Ruby SDK.
|
5
5
|
|
@@ -16,6 +16,7 @@ The Ruby SDK supports the following services:
|
|
16
16
|
* Domain Name System Service
|
17
17
|
* File Storage Service
|
18
18
|
* Email Service
|
19
|
+
* Container Engine
|
19
20
|
|
20
21
|
**Licensing:** This SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License.
|
21
22
|
|
data/lib/oci.rb
CHANGED
@@ -38,18 +38,28 @@ module OCI
|
|
38
38
|
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Audit::Models::WorkRequest}
|
39
39
|
def update_configuration_and_wait_for_state(compartment_id, update_configuration_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
40
40
|
operation_result = @service_client.update_configuration(compartment_id, update_configuration_details, base_operation_opts)
|
41
|
+
use_util = OCI::Audit::Util.respond_to?(:wait_on_work_request)
|
41
42
|
|
42
|
-
return operation_result if wait_for_states.empty?
|
43
|
+
return operation_result if wait_for_states.empty? && !use_util
|
43
44
|
|
44
45
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
45
46
|
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
46
47
|
|
47
48
|
begin
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
if use_util
|
50
|
+
waiter_result = OCI::Audit::Util.wait_on_work_request(
|
51
|
+
@service_client,
|
52
|
+
wait_for_resource_id,
|
53
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
54
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
55
|
+
)
|
56
|
+
else
|
57
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
58
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
59
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
60
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
61
|
+
)
|
62
|
+
end
|
53
63
|
result_to_return = waiter_result
|
54
64
|
|
55
65
|
return result_to_return
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
module OCI
|
4
|
+
module ContainerEngine
|
5
|
+
# Module containing models for requests made to, and responses received from,
|
6
|
+
# OCI ContainerEngine services
|
7
|
+
module Models
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Require models
|
13
|
+
require 'oci/container_engine/models/add_on_options'
|
14
|
+
require 'oci/container_engine/models/cluster'
|
15
|
+
require 'oci/container_engine/models/cluster_create_options'
|
16
|
+
require 'oci/container_engine/models/cluster_endpoints'
|
17
|
+
require 'oci/container_engine/models/cluster_lifecycle_state'
|
18
|
+
require 'oci/container_engine/models/cluster_metadata'
|
19
|
+
require 'oci/container_engine/models/cluster_options'
|
20
|
+
require 'oci/container_engine/models/cluster_summary'
|
21
|
+
require 'oci/container_engine/models/create_cluster_details'
|
22
|
+
require 'oci/container_engine/models/create_cluster_kubeconfig_content_details'
|
23
|
+
require 'oci/container_engine/models/create_node_pool_details'
|
24
|
+
require 'oci/container_engine/models/key_value'
|
25
|
+
require 'oci/container_engine/models/kubernetes_network_config'
|
26
|
+
require 'oci/container_engine/models/node'
|
27
|
+
require 'oci/container_engine/models/node_error'
|
28
|
+
require 'oci/container_engine/models/node_pool'
|
29
|
+
require 'oci/container_engine/models/node_pool_options'
|
30
|
+
require 'oci/container_engine/models/node_pool_summary'
|
31
|
+
require 'oci/container_engine/models/sort_order'
|
32
|
+
require 'oci/container_engine/models/update_cluster_details'
|
33
|
+
require 'oci/container_engine/models/update_node_pool_details'
|
34
|
+
require 'oci/container_engine/models/work_request'
|
35
|
+
require 'oci/container_engine/models/work_request_error'
|
36
|
+
require 'oci/container_engine/models/work_request_log_entry'
|
37
|
+
require 'oci/container_engine/models/work_request_operation_type'
|
38
|
+
require 'oci/container_engine/models/work_request_resource'
|
39
|
+
require 'oci/container_engine/models/work_request_status'
|
40
|
+
require 'oci/container_engine/models/work_request_summary'
|
41
|
+
|
42
|
+
# Require generated clients
|
43
|
+
require 'oci/container_engine/container_engine_client'
|
44
|
+
require 'oci/container_engine/container_engine_client_composite_operations'
|
45
|
+
|
46
|
+
# Require service utilities
|
47
|
+
require 'oci/container_engine/util'
|
@@ -0,0 +1,1276 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'uri'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# Container Engine for Kubernetes API
|
9
|
+
class ContainerEngine::ContainerEngineClient
|
10
|
+
# Client used to make HTTP requests.
|
11
|
+
# @return [OCI::ApiClient]
|
12
|
+
attr_reader :api_client
|
13
|
+
|
14
|
+
# Fully qualified endpoint URL
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :endpoint
|
17
|
+
|
18
|
+
# The default retry configuration to apply to all operations in this service client. This can be overridden
|
19
|
+
# on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
20
|
+
# will not perform any retries
|
21
|
+
# @return [OCI::Retry::RetryConfig]
|
22
|
+
attr_reader :retry_config
|
23
|
+
|
24
|
+
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :region
|
27
|
+
|
28
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
29
|
+
|
30
|
+
|
31
|
+
# Creates a new ContainerEngineClient.
|
32
|
+
# If a config is not specified, then the global OCI.config will be used.
|
33
|
+
#
|
34
|
+
# A region must be specified in either the config or the region parameter. If specified
|
35
|
+
# in both, then the region parameter will be used.
|
36
|
+
#
|
37
|
+
# @param [Config] config A Config object.
|
38
|
+
# @param [String] region A region used to determine the service endpoint. This will usually
|
39
|
+
# correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
40
|
+
# @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
|
41
|
+
# a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
|
42
|
+
# so that the instance principals signer can be provided to the client
|
43
|
+
# @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
|
44
|
+
# the details for the proxy can be provided in this parameter
|
45
|
+
# @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
|
46
|
+
# apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
47
|
+
# will not perform any retries
|
48
|
+
def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
49
|
+
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
50
|
+
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
51
|
+
# and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
|
52
|
+
# pass it to this constructor.
|
53
|
+
#
|
54
|
+
# If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
|
55
|
+
# so try and load the config from the default file.
|
56
|
+
config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
57
|
+
config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
58
|
+
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
59
|
+
|
60
|
+
if signer.nil?
|
61
|
+
signer = OCI::Signer.new(
|
62
|
+
config.user,
|
63
|
+
config.fingerprint,
|
64
|
+
config.tenancy,
|
65
|
+
config.key_file,
|
66
|
+
pass_phrase: config.pass_phrase,
|
67
|
+
private_key_content: config.key_content
|
68
|
+
)
|
69
|
+
end
|
70
|
+
|
71
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
72
|
+
@retry_config = retry_config
|
73
|
+
|
74
|
+
region ||= config.region
|
75
|
+
region ||= signer.region if signer.respond_to?(:region)
|
76
|
+
self.region = region
|
77
|
+
end
|
78
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
79
|
+
|
80
|
+
# Set the region that will be used to determine the service endpoint.
|
81
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
82
|
+
# but may be an arbitrary string.
|
83
|
+
def region=(new_region)
|
84
|
+
@region = new_region
|
85
|
+
|
86
|
+
raise 'A region must be specified.' unless @region
|
87
|
+
|
88
|
+
@endpoint = OCI::Regions.get_service_endpoint(@region, :ContainerEngineClient) + '/20180222'
|
89
|
+
logger.info "ContainerEngineClient endpoint set to '#{endpoint}'." if logger
|
90
|
+
end
|
91
|
+
|
92
|
+
# @return [Logger] The logger for this client. May be nil.
|
93
|
+
def logger
|
94
|
+
@api_client.config.logger
|
95
|
+
end
|
96
|
+
|
97
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
98
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
99
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
100
|
+
|
101
|
+
|
102
|
+
# Create a new cluster.
|
103
|
+
# @param [OCI::ContainerEngine::Models::CreateClusterDetails] create_cluster_details The details of the cluster to create.
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
106
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
107
|
+
# @option opts [String] :opc_retry_token A token you supply to uniquely identify the request and provide idempotency if
|
108
|
+
# the request is retried. Idempotency tokens expire after 24 hours.
|
109
|
+
#
|
110
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
111
|
+
# Oracle about a particular request, please provide the request ID.
|
112
|
+
#
|
113
|
+
# @return [Response] A Response object with data of type nil
|
114
|
+
def create_cluster(create_cluster_details, opts = {})
|
115
|
+
logger.debug 'Calling operation ContainerEngineClient#create_cluster.' if logger
|
116
|
+
|
117
|
+
raise "Missing the required parameter 'create_cluster_details' when calling create_cluster." if create_cluster_details.nil?
|
118
|
+
|
119
|
+
path = '/clusters'
|
120
|
+
operation_signing_strategy = :standard
|
121
|
+
|
122
|
+
# rubocop:disable Style/NegatedIf
|
123
|
+
# Query Params
|
124
|
+
query_params = {}
|
125
|
+
|
126
|
+
# Header Params
|
127
|
+
header_params = {}
|
128
|
+
header_params['accept'] = 'application/json'
|
129
|
+
header_params['content-type'] = 'application/json'
|
130
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
131
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
132
|
+
# rubocop:enable Style/NegatedIf
|
133
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
134
|
+
|
135
|
+
post_body = @api_client.object_to_http_body(create_cluster_details)
|
136
|
+
|
137
|
+
# rubocop:disable Metrics/BlockLength
|
138
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_cluster') do
|
139
|
+
@api_client.call_api(
|
140
|
+
:POST,
|
141
|
+
path,
|
142
|
+
endpoint,
|
143
|
+
header_params: header_params,
|
144
|
+
query_params: query_params,
|
145
|
+
operation_signing_strategy: operation_signing_strategy,
|
146
|
+
body: post_body
|
147
|
+
)
|
148
|
+
end
|
149
|
+
# rubocop:enable Metrics/BlockLength
|
150
|
+
end
|
151
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
152
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
153
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
154
|
+
|
155
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
156
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
157
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
158
|
+
|
159
|
+
|
160
|
+
# Create the Kubeconfig YAML for a cluster.
|
161
|
+
# @param [String] cluster_id The OCID of the cluster.
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
164
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
165
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
166
|
+
# Oracle about a particular request, please provide the request ID.
|
167
|
+
#
|
168
|
+
# @option opts [OCI::ContainerEngine::Models::CreateClusterKubeconfigContentDetails] :create_cluster_kubeconfig_content_details The details of the cluster kubeconfig to create.
|
169
|
+
# @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given
|
170
|
+
# @option [Block] &block Streaming http body to the block
|
171
|
+
# @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data
|
172
|
+
def create_kubeconfig(cluster_id, opts = {}, &block)
|
173
|
+
logger.debug 'Calling operation ContainerEngineClient#create_kubeconfig.' if logger
|
174
|
+
|
175
|
+
raise "Missing the required parameter 'cluster_id' when calling create_kubeconfig." if cluster_id.nil?
|
176
|
+
raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)
|
177
|
+
|
178
|
+
path = '/clusters/{clusterId}/kubeconfig/content'.sub('{clusterId}', cluster_id.to_s)
|
179
|
+
operation_signing_strategy = :standard
|
180
|
+
|
181
|
+
# rubocop:disable Style/NegatedIf
|
182
|
+
# Query Params
|
183
|
+
query_params = {}
|
184
|
+
|
185
|
+
# Header Params
|
186
|
+
header_params = {}
|
187
|
+
header_params['accept'] = 'application/x-yaml'
|
188
|
+
header_params['content-type'] = 'application/json'
|
189
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
190
|
+
# rubocop:enable Style/NegatedIf
|
191
|
+
|
192
|
+
post_body = @api_client.object_to_http_body(opts[:create_cluster_kubeconfig_content_details])
|
193
|
+
|
194
|
+
# rubocop:disable Metrics/BlockLength
|
195
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_kubeconfig') do
|
196
|
+
if !block.nil?
|
197
|
+
@api_client.call_api(
|
198
|
+
:POST,
|
199
|
+
path,
|
200
|
+
endpoint,
|
201
|
+
header_params: header_params,
|
202
|
+
query_params: query_params,
|
203
|
+
operation_signing_strategy: operation_signing_strategy,
|
204
|
+
body: post_body,
|
205
|
+
return_type: 'Stream',
|
206
|
+
&block
|
207
|
+
)
|
208
|
+
elsif opts[:response_target]
|
209
|
+
if opts[:response_target].respond_to? :write
|
210
|
+
@api_client.call_api(
|
211
|
+
:POST,
|
212
|
+
path,
|
213
|
+
endpoint,
|
214
|
+
header_params: header_params,
|
215
|
+
query_params: query_params,
|
216
|
+
operation_signing_strategy: operation_signing_strategy,
|
217
|
+
body: post_body,
|
218
|
+
return_type: 'Stream',
|
219
|
+
&proc { |chunk, _response| opts[:response_target].write(chunk) }
|
220
|
+
)
|
221
|
+
elsif opts[:response_target].is_a?(String)
|
222
|
+
File.open(opts[:response_target], 'wb') do |output|
|
223
|
+
return @api_client.call_api(
|
224
|
+
:POST,
|
225
|
+
path,
|
226
|
+
endpoint,
|
227
|
+
header_params: header_params,
|
228
|
+
query_params: query_params,
|
229
|
+
operation_signing_strategy: operation_signing_strategy,
|
230
|
+
body: post_body,
|
231
|
+
return_type: 'Stream',
|
232
|
+
&proc { |chunk, _response| output.write(chunk) }
|
233
|
+
)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
else
|
237
|
+
@api_client.call_api(
|
238
|
+
:POST,
|
239
|
+
path,
|
240
|
+
endpoint,
|
241
|
+
header_params: header_params,
|
242
|
+
query_params: query_params,
|
243
|
+
operation_signing_strategy: operation_signing_strategy,
|
244
|
+
body: post_body,
|
245
|
+
return_type: 'String'
|
246
|
+
)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
# rubocop:enable Metrics/BlockLength
|
250
|
+
end
|
251
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
252
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
253
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
254
|
+
|
255
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
256
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
257
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
258
|
+
|
259
|
+
|
260
|
+
# Create a new node pool.
|
261
|
+
# @param [OCI::ContainerEngine::Models::CreateNodePoolDetails] create_node_pool_details The details of the node pool to create.
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
264
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
265
|
+
# @option opts [String] :opc_retry_token A token you supply to uniquely identify the request and provide idempotency if
|
266
|
+
# the request is retried. Idempotency tokens expire after 24 hours.
|
267
|
+
#
|
268
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
269
|
+
# Oracle about a particular request, please provide the request ID.
|
270
|
+
#
|
271
|
+
# @return [Response] A Response object with data of type nil
|
272
|
+
def create_node_pool(create_node_pool_details, opts = {})
|
273
|
+
logger.debug 'Calling operation ContainerEngineClient#create_node_pool.' if logger
|
274
|
+
|
275
|
+
raise "Missing the required parameter 'create_node_pool_details' when calling create_node_pool." if create_node_pool_details.nil?
|
276
|
+
|
277
|
+
path = '/nodePools'
|
278
|
+
operation_signing_strategy = :standard
|
279
|
+
|
280
|
+
# rubocop:disable Style/NegatedIf
|
281
|
+
# Query Params
|
282
|
+
query_params = {}
|
283
|
+
|
284
|
+
# Header Params
|
285
|
+
header_params = {}
|
286
|
+
header_params['accept'] = 'application/json'
|
287
|
+
header_params['content-type'] = 'application/json'
|
288
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
289
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
290
|
+
# rubocop:enable Style/NegatedIf
|
291
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
292
|
+
|
293
|
+
post_body = @api_client.object_to_http_body(create_node_pool_details)
|
294
|
+
|
295
|
+
# rubocop:disable Metrics/BlockLength
|
296
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_node_pool') do
|
297
|
+
@api_client.call_api(
|
298
|
+
:POST,
|
299
|
+
path,
|
300
|
+
endpoint,
|
301
|
+
header_params: header_params,
|
302
|
+
query_params: query_params,
|
303
|
+
operation_signing_strategy: operation_signing_strategy,
|
304
|
+
body: post_body
|
305
|
+
)
|
306
|
+
end
|
307
|
+
# rubocop:enable Metrics/BlockLength
|
308
|
+
end
|
309
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
310
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
311
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
312
|
+
|
313
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
314
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
315
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
316
|
+
|
317
|
+
|
318
|
+
# Delete a cluster.
|
319
|
+
# @param [String] cluster_id The OCID of the cluster.
|
320
|
+
# @param [Hash] opts the optional parameters
|
321
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
322
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
323
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
324
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
325
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
326
|
+
#
|
327
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
328
|
+
# Oracle about a particular request, please provide the request ID.
|
329
|
+
#
|
330
|
+
# @return [Response] A Response object with data of type nil
|
331
|
+
def delete_cluster(cluster_id, opts = {})
|
332
|
+
logger.debug 'Calling operation ContainerEngineClient#delete_cluster.' if logger
|
333
|
+
|
334
|
+
raise "Missing the required parameter 'cluster_id' when calling delete_cluster." if cluster_id.nil?
|
335
|
+
raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)
|
336
|
+
|
337
|
+
path = '/clusters/{clusterId}'.sub('{clusterId}', cluster_id.to_s)
|
338
|
+
operation_signing_strategy = :standard
|
339
|
+
|
340
|
+
# rubocop:disable Style/NegatedIf
|
341
|
+
# Query Params
|
342
|
+
query_params = {}
|
343
|
+
|
344
|
+
# Header Params
|
345
|
+
header_params = {}
|
346
|
+
header_params['accept'] = 'application/json'
|
347
|
+
header_params['content-type'] = 'application/json'
|
348
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
349
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
350
|
+
# rubocop:enable Style/NegatedIf
|
351
|
+
|
352
|
+
post_body = nil
|
353
|
+
|
354
|
+
# rubocop:disable Metrics/BlockLength
|
355
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_cluster') do
|
356
|
+
@api_client.call_api(
|
357
|
+
:DELETE,
|
358
|
+
path,
|
359
|
+
endpoint,
|
360
|
+
header_params: header_params,
|
361
|
+
query_params: query_params,
|
362
|
+
operation_signing_strategy: operation_signing_strategy,
|
363
|
+
body: post_body
|
364
|
+
)
|
365
|
+
end
|
366
|
+
# rubocop:enable Metrics/BlockLength
|
367
|
+
end
|
368
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
369
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
370
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
371
|
+
|
372
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
373
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
374
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
375
|
+
|
376
|
+
|
377
|
+
# Delete a node pool.
|
378
|
+
# @param [String] node_pool_id The OCID of the node pool.
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
381
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
382
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
383
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
384
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
385
|
+
#
|
386
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
387
|
+
# Oracle about a particular request, please provide the request ID.
|
388
|
+
#
|
389
|
+
# @return [Response] A Response object with data of type nil
|
390
|
+
def delete_node_pool(node_pool_id, opts = {})
|
391
|
+
logger.debug 'Calling operation ContainerEngineClient#delete_node_pool.' if logger
|
392
|
+
|
393
|
+
raise "Missing the required parameter 'node_pool_id' when calling delete_node_pool." if node_pool_id.nil?
|
394
|
+
raise "Parameter value for 'node_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_id)
|
395
|
+
|
396
|
+
path = '/nodePools/{nodePoolId}'.sub('{nodePoolId}', node_pool_id.to_s)
|
397
|
+
operation_signing_strategy = :standard
|
398
|
+
|
399
|
+
# rubocop:disable Style/NegatedIf
|
400
|
+
# Query Params
|
401
|
+
query_params = {}
|
402
|
+
|
403
|
+
# Header Params
|
404
|
+
header_params = {}
|
405
|
+
header_params['accept'] = 'application/json'
|
406
|
+
header_params['content-type'] = 'application/json'
|
407
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
408
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
409
|
+
# rubocop:enable Style/NegatedIf
|
410
|
+
|
411
|
+
post_body = nil
|
412
|
+
|
413
|
+
# rubocop:disable Metrics/BlockLength
|
414
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_node_pool') do
|
415
|
+
@api_client.call_api(
|
416
|
+
:DELETE,
|
417
|
+
path,
|
418
|
+
endpoint,
|
419
|
+
header_params: header_params,
|
420
|
+
query_params: query_params,
|
421
|
+
operation_signing_strategy: operation_signing_strategy,
|
422
|
+
body: post_body
|
423
|
+
)
|
424
|
+
end
|
425
|
+
# rubocop:enable Metrics/BlockLength
|
426
|
+
end
|
427
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
428
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
429
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
430
|
+
|
431
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
432
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
433
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
434
|
+
|
435
|
+
|
436
|
+
# Cancel a work request that has not started.
|
437
|
+
# @param [String] work_request_id The OCID of the work request.
|
438
|
+
# @param [Hash] opts the optional parameters
|
439
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
440
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
441
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
442
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
443
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
444
|
+
#
|
445
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
446
|
+
# Oracle about a particular request, please provide the request ID.
|
447
|
+
#
|
448
|
+
# @return [Response] A Response object with data of type nil
|
449
|
+
def delete_work_request(work_request_id, opts = {})
|
450
|
+
logger.debug 'Calling operation ContainerEngineClient#delete_work_request.' if logger
|
451
|
+
|
452
|
+
raise "Missing the required parameter 'work_request_id' when calling delete_work_request." if work_request_id.nil?
|
453
|
+
raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
|
454
|
+
|
455
|
+
path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
|
456
|
+
operation_signing_strategy = :standard
|
457
|
+
|
458
|
+
# rubocop:disable Style/NegatedIf
|
459
|
+
# Query Params
|
460
|
+
query_params = {}
|
461
|
+
|
462
|
+
# Header Params
|
463
|
+
header_params = {}
|
464
|
+
header_params['accept'] = 'application/json'
|
465
|
+
header_params['content-type'] = 'application/json'
|
466
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
467
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
468
|
+
# rubocop:enable Style/NegatedIf
|
469
|
+
|
470
|
+
post_body = nil
|
471
|
+
|
472
|
+
# rubocop:disable Metrics/BlockLength
|
473
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_work_request') do
|
474
|
+
@api_client.call_api(
|
475
|
+
:DELETE,
|
476
|
+
path,
|
477
|
+
endpoint,
|
478
|
+
header_params: header_params,
|
479
|
+
query_params: query_params,
|
480
|
+
operation_signing_strategy: operation_signing_strategy,
|
481
|
+
body: post_body
|
482
|
+
)
|
483
|
+
end
|
484
|
+
# rubocop:enable Metrics/BlockLength
|
485
|
+
end
|
486
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
487
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
488
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
489
|
+
|
490
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
491
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
492
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
493
|
+
|
494
|
+
|
495
|
+
# Get the details of a cluster.
|
496
|
+
# @param [String] cluster_id The OCID of the cluster.
|
497
|
+
# @param [Hash] opts the optional parameters
|
498
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
499
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
500
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
501
|
+
# Oracle about a particular request, please provide the request ID.
|
502
|
+
#
|
503
|
+
# @return [Response] A Response object with data of type {OCI::ContainerEngine::Models::Cluster Cluster}
|
504
|
+
def get_cluster(cluster_id, opts = {})
|
505
|
+
logger.debug 'Calling operation ContainerEngineClient#get_cluster.' if logger
|
506
|
+
|
507
|
+
raise "Missing the required parameter 'cluster_id' when calling get_cluster." if cluster_id.nil?
|
508
|
+
raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)
|
509
|
+
|
510
|
+
path = '/clusters/{clusterId}'.sub('{clusterId}', cluster_id.to_s)
|
511
|
+
operation_signing_strategy = :standard
|
512
|
+
|
513
|
+
# rubocop:disable Style/NegatedIf
|
514
|
+
# Query Params
|
515
|
+
query_params = {}
|
516
|
+
|
517
|
+
# Header Params
|
518
|
+
header_params = {}
|
519
|
+
header_params['accept'] = 'application/json'
|
520
|
+
header_params['content-type'] = 'application/json'
|
521
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
522
|
+
# rubocop:enable Style/NegatedIf
|
523
|
+
|
524
|
+
post_body = nil
|
525
|
+
|
526
|
+
# rubocop:disable Metrics/BlockLength
|
527
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_cluster') do
|
528
|
+
@api_client.call_api(
|
529
|
+
:GET,
|
530
|
+
path,
|
531
|
+
endpoint,
|
532
|
+
header_params: header_params,
|
533
|
+
query_params: query_params,
|
534
|
+
operation_signing_strategy: operation_signing_strategy,
|
535
|
+
body: post_body,
|
536
|
+
return_type: 'OCI::ContainerEngine::Models::Cluster'
|
537
|
+
)
|
538
|
+
end
|
539
|
+
# rubocop:enable Metrics/BlockLength
|
540
|
+
end
|
541
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
542
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
543
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
544
|
+
|
545
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
546
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
547
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
548
|
+
|
549
|
+
|
550
|
+
# Get options available for clusters.
|
551
|
+
# @param [String] cluster_option_id The id of the option set to retrieve. Only \"all\" is supported.
|
552
|
+
# @param [Hash] opts the optional parameters
|
553
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
554
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
555
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
556
|
+
# Oracle about a particular request, please provide the request ID.
|
557
|
+
#
|
558
|
+
# @return [Response] A Response object with data of type {OCI::ContainerEngine::Models::ClusterOptions ClusterOptions}
|
559
|
+
def get_cluster_options(cluster_option_id, opts = {})
|
560
|
+
logger.debug 'Calling operation ContainerEngineClient#get_cluster_options.' if logger
|
561
|
+
|
562
|
+
raise "Missing the required parameter 'cluster_option_id' when calling get_cluster_options." if cluster_option_id.nil?
|
563
|
+
raise "Parameter value for 'cluster_option_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_option_id)
|
564
|
+
|
565
|
+
path = '/clusterOptions/{clusterOptionId}'.sub('{clusterOptionId}', cluster_option_id.to_s)
|
566
|
+
operation_signing_strategy = :standard
|
567
|
+
|
568
|
+
# rubocop:disable Style/NegatedIf
|
569
|
+
# Query Params
|
570
|
+
query_params = {}
|
571
|
+
|
572
|
+
# Header Params
|
573
|
+
header_params = {}
|
574
|
+
header_params['accept'] = 'application/json'
|
575
|
+
header_params['content-type'] = 'application/json'
|
576
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
577
|
+
# rubocop:enable Style/NegatedIf
|
578
|
+
|
579
|
+
post_body = nil
|
580
|
+
|
581
|
+
# rubocop:disable Metrics/BlockLength
|
582
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_cluster_options') do
|
583
|
+
@api_client.call_api(
|
584
|
+
:GET,
|
585
|
+
path,
|
586
|
+
endpoint,
|
587
|
+
header_params: header_params,
|
588
|
+
query_params: query_params,
|
589
|
+
operation_signing_strategy: operation_signing_strategy,
|
590
|
+
body: post_body,
|
591
|
+
return_type: 'OCI::ContainerEngine::Models::ClusterOptions'
|
592
|
+
)
|
593
|
+
end
|
594
|
+
# rubocop:enable Metrics/BlockLength
|
595
|
+
end
|
596
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
597
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
598
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
599
|
+
|
600
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
601
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
602
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
603
|
+
|
604
|
+
|
605
|
+
# Get the details of a node pool.
|
606
|
+
# @param [String] node_pool_id The OCID of the node pool.
|
607
|
+
# @param [Hash] opts the optional parameters
|
608
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
609
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
610
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
611
|
+
# Oracle about a particular request, please provide the request ID.
|
612
|
+
#
|
613
|
+
# @return [Response] A Response object with data of type {OCI::ContainerEngine::Models::NodePool NodePool}
|
614
|
+
def get_node_pool(node_pool_id, opts = {})
|
615
|
+
logger.debug 'Calling operation ContainerEngineClient#get_node_pool.' if logger
|
616
|
+
|
617
|
+
raise "Missing the required parameter 'node_pool_id' when calling get_node_pool." if node_pool_id.nil?
|
618
|
+
raise "Parameter value for 'node_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_id)
|
619
|
+
|
620
|
+
path = '/nodePools/{nodePoolId}'.sub('{nodePoolId}', node_pool_id.to_s)
|
621
|
+
operation_signing_strategy = :standard
|
622
|
+
|
623
|
+
# rubocop:disable Style/NegatedIf
|
624
|
+
# Query Params
|
625
|
+
query_params = {}
|
626
|
+
|
627
|
+
# Header Params
|
628
|
+
header_params = {}
|
629
|
+
header_params['accept'] = 'application/json'
|
630
|
+
header_params['content-type'] = 'application/json'
|
631
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
632
|
+
# rubocop:enable Style/NegatedIf
|
633
|
+
|
634
|
+
post_body = nil
|
635
|
+
|
636
|
+
# rubocop:disable Metrics/BlockLength
|
637
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_node_pool') do
|
638
|
+
@api_client.call_api(
|
639
|
+
:GET,
|
640
|
+
path,
|
641
|
+
endpoint,
|
642
|
+
header_params: header_params,
|
643
|
+
query_params: query_params,
|
644
|
+
operation_signing_strategy: operation_signing_strategy,
|
645
|
+
body: post_body,
|
646
|
+
return_type: 'OCI::ContainerEngine::Models::NodePool'
|
647
|
+
)
|
648
|
+
end
|
649
|
+
# rubocop:enable Metrics/BlockLength
|
650
|
+
end
|
651
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
652
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
653
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
654
|
+
|
655
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
656
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
657
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
658
|
+
|
659
|
+
|
660
|
+
# Get options available for node pools.
|
661
|
+
# @param [String] node_pool_option_id The id of the option set to retrieve. Use \"all\" get all options, or use a cluster ID to get options specific to the provided cluster.
|
662
|
+
# @param [Hash] opts the optional parameters
|
663
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
664
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
665
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
666
|
+
# Oracle about a particular request, please provide the request ID.
|
667
|
+
#
|
668
|
+
# @return [Response] A Response object with data of type {OCI::ContainerEngine::Models::NodePoolOptions NodePoolOptions}
|
669
|
+
def get_node_pool_options(node_pool_option_id, opts = {})
|
670
|
+
logger.debug 'Calling operation ContainerEngineClient#get_node_pool_options.' if logger
|
671
|
+
|
672
|
+
raise "Missing the required parameter 'node_pool_option_id' when calling get_node_pool_options." if node_pool_option_id.nil?
|
673
|
+
raise "Parameter value for 'node_pool_option_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_option_id)
|
674
|
+
|
675
|
+
path = '/nodePoolOptions/{nodePoolOptionId}'.sub('{nodePoolOptionId}', node_pool_option_id.to_s)
|
676
|
+
operation_signing_strategy = :standard
|
677
|
+
|
678
|
+
# rubocop:disable Style/NegatedIf
|
679
|
+
# Query Params
|
680
|
+
query_params = {}
|
681
|
+
|
682
|
+
# Header Params
|
683
|
+
header_params = {}
|
684
|
+
header_params['accept'] = 'application/json'
|
685
|
+
header_params['content-type'] = 'application/json'
|
686
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
687
|
+
# rubocop:enable Style/NegatedIf
|
688
|
+
|
689
|
+
post_body = nil
|
690
|
+
|
691
|
+
# rubocop:disable Metrics/BlockLength
|
692
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_node_pool_options') do
|
693
|
+
@api_client.call_api(
|
694
|
+
:GET,
|
695
|
+
path,
|
696
|
+
endpoint,
|
697
|
+
header_params: header_params,
|
698
|
+
query_params: query_params,
|
699
|
+
operation_signing_strategy: operation_signing_strategy,
|
700
|
+
body: post_body,
|
701
|
+
return_type: 'OCI::ContainerEngine::Models::NodePoolOptions'
|
702
|
+
)
|
703
|
+
end
|
704
|
+
# rubocop:enable Metrics/BlockLength
|
705
|
+
end
|
706
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
707
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
708
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
709
|
+
|
710
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
711
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
712
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
713
|
+
|
714
|
+
|
715
|
+
# Get the details of a work request.
|
716
|
+
# @param [String] work_request_id The OCID of the work request.
|
717
|
+
# @param [Hash] opts the optional parameters
|
718
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
719
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
720
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
721
|
+
# Oracle about a particular request, please provide the request ID.
|
722
|
+
#
|
723
|
+
# @return [Response] A Response object with data of type {OCI::ContainerEngine::Models::WorkRequest WorkRequest}
|
724
|
+
def get_work_request(work_request_id, opts = {})
|
725
|
+
logger.debug 'Calling operation ContainerEngineClient#get_work_request.' if logger
|
726
|
+
|
727
|
+
raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
|
728
|
+
raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
|
729
|
+
|
730
|
+
path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
|
731
|
+
operation_signing_strategy = :standard
|
732
|
+
|
733
|
+
# rubocop:disable Style/NegatedIf
|
734
|
+
# Query Params
|
735
|
+
query_params = {}
|
736
|
+
|
737
|
+
# Header Params
|
738
|
+
header_params = {}
|
739
|
+
header_params['accept'] = 'application/json'
|
740
|
+
header_params['content-type'] = 'application/json'
|
741
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
742
|
+
# rubocop:enable Style/NegatedIf
|
743
|
+
|
744
|
+
post_body = nil
|
745
|
+
|
746
|
+
# rubocop:disable Metrics/BlockLength
|
747
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_work_request') do
|
748
|
+
@api_client.call_api(
|
749
|
+
:GET,
|
750
|
+
path,
|
751
|
+
endpoint,
|
752
|
+
header_params: header_params,
|
753
|
+
query_params: query_params,
|
754
|
+
operation_signing_strategy: operation_signing_strategy,
|
755
|
+
body: post_body,
|
756
|
+
return_type: 'OCI::ContainerEngine::Models::WorkRequest'
|
757
|
+
)
|
758
|
+
end
|
759
|
+
# rubocop:enable Metrics/BlockLength
|
760
|
+
end
|
761
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
762
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
763
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
764
|
+
|
765
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
766
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
767
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
768
|
+
|
769
|
+
|
770
|
+
# List all the cluster objects in a compartment.
|
771
|
+
# @param [String] compartment_id The OCID of the compartment.
|
772
|
+
# @param [Hash] opts the optional parameters
|
773
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
774
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
775
|
+
# @option opts [Array<String>] :lifecycle_state A cluster lifecycle state to filter on. Can have multiple parameters of this name.
|
776
|
+
# Allowed values are: CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING
|
777
|
+
# @option opts [String] :name The name to filter on.
|
778
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
779
|
+
#
|
780
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
781
|
+
#
|
782
|
+
# @option opts [String] :sort_order The optional order in which to sort the results.
|
783
|
+
# @option opts [String] :sort_by The optional field to sort the results by.
|
784
|
+
# Allowed values are: ID, NAME, TIME_CREATED
|
785
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
786
|
+
# Oracle about a particular request, please provide the request ID.
|
787
|
+
#
|
788
|
+
# @return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::ClusterSummary ClusterSummary}>
|
789
|
+
def list_clusters(compartment_id, opts = {})
|
790
|
+
logger.debug 'Calling operation ContainerEngineClient#list_clusters.' if logger
|
791
|
+
|
792
|
+
raise "Missing the required parameter 'compartment_id' when calling list_clusters." if compartment_id.nil?
|
793
|
+
|
794
|
+
|
795
|
+
lifecycle_state_allowable_values = %w[CREATING ACTIVE FAILED DELETING DELETED UPDATING]
|
796
|
+
if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
|
797
|
+
opts[:lifecycle_state].each do |val_to_check|
|
798
|
+
unless lifecycle_state_allowable_values.include?(val_to_check)
|
799
|
+
raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING.'
|
800
|
+
end
|
801
|
+
end
|
802
|
+
end
|
803
|
+
|
804
|
+
if opts[:sort_order] && !OCI::ContainerEngine::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
|
805
|
+
raise 'Invalid value for "sort_order", must be one of the values in OCI::ContainerEngine::Models::SORT_ORDER_ENUM.'
|
806
|
+
end
|
807
|
+
|
808
|
+
if opts[:sort_by] && !%w[ID NAME TIME_CREATED].include?(opts[:sort_by])
|
809
|
+
raise 'Invalid value for "sort_by", must be one of ID, NAME, TIME_CREATED.'
|
810
|
+
end
|
811
|
+
|
812
|
+
path = '/clusters'
|
813
|
+
operation_signing_strategy = :standard
|
814
|
+
|
815
|
+
# rubocop:disable Style/NegatedIf
|
816
|
+
# Query Params
|
817
|
+
query_params = {}
|
818
|
+
query_params[:compartmentId] = compartment_id
|
819
|
+
query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
|
820
|
+
query_params[:name] = opts[:name] if opts[:name]
|
821
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
822
|
+
query_params[:page] = opts[:page] if opts[:page]
|
823
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
824
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
825
|
+
|
826
|
+
# Header Params
|
827
|
+
header_params = {}
|
828
|
+
header_params['accept'] = 'application/json'
|
829
|
+
header_params['content-type'] = 'application/json'
|
830
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
831
|
+
# rubocop:enable Style/NegatedIf
|
832
|
+
|
833
|
+
post_body = nil
|
834
|
+
|
835
|
+
# rubocop:disable Metrics/BlockLength
|
836
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_clusters') do
|
837
|
+
@api_client.call_api(
|
838
|
+
:GET,
|
839
|
+
path,
|
840
|
+
endpoint,
|
841
|
+
header_params: header_params,
|
842
|
+
query_params: query_params,
|
843
|
+
operation_signing_strategy: operation_signing_strategy,
|
844
|
+
body: post_body,
|
845
|
+
return_type: 'Array<OCI::ContainerEngine::Models::ClusterSummary>'
|
846
|
+
)
|
847
|
+
end
|
848
|
+
# rubocop:enable Metrics/BlockLength
|
849
|
+
end
|
850
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
851
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
852
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
853
|
+
|
854
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
855
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
856
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
857
|
+
|
858
|
+
|
859
|
+
# List all the node pools in a compartment, and optionally filter by cluster.
|
860
|
+
# @param [String] compartment_id The OCID of the compartment.
|
861
|
+
# @param [Hash] opts the optional parameters
|
862
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
863
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
864
|
+
# @option opts [String] :cluster_id The OCID of the cluster.
|
865
|
+
# @option opts [String] :name The name to filter on.
|
866
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
867
|
+
#
|
868
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
869
|
+
#
|
870
|
+
# @option opts [String] :sort_order The optional order in which to sort the results.
|
871
|
+
# @option opts [String] :sort_by The optional field to sort the results by.
|
872
|
+
# Allowed values are: ID, NAME, TIME_CREATED
|
873
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
874
|
+
# Oracle about a particular request, please provide the request ID.
|
875
|
+
#
|
876
|
+
# @return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::NodePoolSummary NodePoolSummary}>
|
877
|
+
def list_node_pools(compartment_id, opts = {})
|
878
|
+
logger.debug 'Calling operation ContainerEngineClient#list_node_pools.' if logger
|
879
|
+
|
880
|
+
raise "Missing the required parameter 'compartment_id' when calling list_node_pools." if compartment_id.nil?
|
881
|
+
|
882
|
+
if opts[:sort_order] && !OCI::ContainerEngine::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
|
883
|
+
raise 'Invalid value for "sort_order", must be one of the values in OCI::ContainerEngine::Models::SORT_ORDER_ENUM.'
|
884
|
+
end
|
885
|
+
|
886
|
+
if opts[:sort_by] && !%w[ID NAME TIME_CREATED].include?(opts[:sort_by])
|
887
|
+
raise 'Invalid value for "sort_by", must be one of ID, NAME, TIME_CREATED.'
|
888
|
+
end
|
889
|
+
|
890
|
+
path = '/nodePools'
|
891
|
+
operation_signing_strategy = :standard
|
892
|
+
|
893
|
+
# rubocop:disable Style/NegatedIf
|
894
|
+
# Query Params
|
895
|
+
query_params = {}
|
896
|
+
query_params[:compartmentId] = compartment_id
|
897
|
+
query_params[:clusterId] = opts[:cluster_id] if opts[:cluster_id]
|
898
|
+
query_params[:name] = opts[:name] if opts[:name]
|
899
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
900
|
+
query_params[:page] = opts[:page] if opts[:page]
|
901
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
902
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
903
|
+
|
904
|
+
# Header Params
|
905
|
+
header_params = {}
|
906
|
+
header_params['accept'] = 'application/json'
|
907
|
+
header_params['content-type'] = 'application/json'
|
908
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
909
|
+
# rubocop:enable Style/NegatedIf
|
910
|
+
|
911
|
+
post_body = nil
|
912
|
+
|
913
|
+
# rubocop:disable Metrics/BlockLength
|
914
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_node_pools') do
|
915
|
+
@api_client.call_api(
|
916
|
+
:GET,
|
917
|
+
path,
|
918
|
+
endpoint,
|
919
|
+
header_params: header_params,
|
920
|
+
query_params: query_params,
|
921
|
+
operation_signing_strategy: operation_signing_strategy,
|
922
|
+
body: post_body,
|
923
|
+
return_type: 'Array<OCI::ContainerEngine::Models::NodePoolSummary>'
|
924
|
+
)
|
925
|
+
end
|
926
|
+
# rubocop:enable Metrics/BlockLength
|
927
|
+
end
|
928
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
929
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
930
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
931
|
+
|
932
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
933
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
934
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
935
|
+
|
936
|
+
|
937
|
+
# Get the errors of a work request.
|
938
|
+
# @param [String] compartment_id The OCID of the compartment.
|
939
|
+
# @param [String] work_request_id The OCID of the work request.
|
940
|
+
# @param [Hash] opts the optional parameters
|
941
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
942
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
943
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
944
|
+
# Oracle about a particular request, please provide the request ID.
|
945
|
+
#
|
946
|
+
# @return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::WorkRequestError WorkRequestError}>
|
947
|
+
def list_work_request_errors(compartment_id, work_request_id, opts = {})
|
948
|
+
logger.debug 'Calling operation ContainerEngineClient#list_work_request_errors.' if logger
|
949
|
+
|
950
|
+
raise "Missing the required parameter 'compartment_id' when calling list_work_request_errors." if compartment_id.nil?
|
951
|
+
raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?
|
952
|
+
raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
|
953
|
+
|
954
|
+
path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
|
955
|
+
operation_signing_strategy = :standard
|
956
|
+
|
957
|
+
# rubocop:disable Style/NegatedIf
|
958
|
+
# Query Params
|
959
|
+
query_params = {}
|
960
|
+
query_params[:compartmentId] = compartment_id
|
961
|
+
|
962
|
+
# Header Params
|
963
|
+
header_params = {}
|
964
|
+
header_params['accept'] = 'application/json'
|
965
|
+
header_params['content-type'] = 'application/json'
|
966
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
967
|
+
# rubocop:enable Style/NegatedIf
|
968
|
+
|
969
|
+
post_body = nil
|
970
|
+
|
971
|
+
# rubocop:disable Metrics/BlockLength
|
972
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_work_request_errors') do
|
973
|
+
@api_client.call_api(
|
974
|
+
:GET,
|
975
|
+
path,
|
976
|
+
endpoint,
|
977
|
+
header_params: header_params,
|
978
|
+
query_params: query_params,
|
979
|
+
operation_signing_strategy: operation_signing_strategy,
|
980
|
+
body: post_body,
|
981
|
+
return_type: 'Array<OCI::ContainerEngine::Models::WorkRequestError>'
|
982
|
+
)
|
983
|
+
end
|
984
|
+
# rubocop:enable Metrics/BlockLength
|
985
|
+
end
|
986
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
987
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
988
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
989
|
+
|
990
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
991
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
992
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
993
|
+
|
994
|
+
|
995
|
+
# Get the logs of a work request.
|
996
|
+
# @param [String] compartment_id The OCID of the compartment.
|
997
|
+
# @param [String] work_request_id The OCID of the work request.
|
998
|
+
# @param [Hash] opts the optional parameters
|
999
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
1000
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
1001
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
1002
|
+
# Oracle about a particular request, please provide the request ID.
|
1003
|
+
#
|
1004
|
+
# @return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::WorkRequestLogEntry WorkRequestLogEntry}>
|
1005
|
+
def list_work_request_logs(compartment_id, work_request_id, opts = {})
|
1006
|
+
logger.debug 'Calling operation ContainerEngineClient#list_work_request_logs.' if logger
|
1007
|
+
|
1008
|
+
raise "Missing the required parameter 'compartment_id' when calling list_work_request_logs." if compartment_id.nil?
|
1009
|
+
raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?
|
1010
|
+
raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
|
1011
|
+
|
1012
|
+
path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
|
1013
|
+
operation_signing_strategy = :standard
|
1014
|
+
|
1015
|
+
# rubocop:disable Style/NegatedIf
|
1016
|
+
# Query Params
|
1017
|
+
query_params = {}
|
1018
|
+
query_params[:compartmentId] = compartment_id
|
1019
|
+
|
1020
|
+
# Header Params
|
1021
|
+
header_params = {}
|
1022
|
+
header_params['accept'] = 'application/json'
|
1023
|
+
header_params['content-type'] = 'application/json'
|
1024
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1025
|
+
# rubocop:enable Style/NegatedIf
|
1026
|
+
|
1027
|
+
post_body = nil
|
1028
|
+
|
1029
|
+
# rubocop:disable Metrics/BlockLength
|
1030
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_work_request_logs') do
|
1031
|
+
@api_client.call_api(
|
1032
|
+
:GET,
|
1033
|
+
path,
|
1034
|
+
endpoint,
|
1035
|
+
header_params: header_params,
|
1036
|
+
query_params: query_params,
|
1037
|
+
operation_signing_strategy: operation_signing_strategy,
|
1038
|
+
body: post_body,
|
1039
|
+
return_type: 'Array<OCI::ContainerEngine::Models::WorkRequestLogEntry>'
|
1040
|
+
)
|
1041
|
+
end
|
1042
|
+
# rubocop:enable Metrics/BlockLength
|
1043
|
+
end
|
1044
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1045
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1046
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1047
|
+
|
1048
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1049
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1050
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1051
|
+
|
1052
|
+
|
1053
|
+
# List all work requests in a compartment.
|
1054
|
+
# @param [String] compartment_id The OCID of the compartment.
|
1055
|
+
# @param [Hash] opts the optional parameters
|
1056
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
1057
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
1058
|
+
# @option opts [String] :cluster_id The OCID of the cluster.
|
1059
|
+
# @option opts [String] :resource_id The OCID of the resource associated with a work request
|
1060
|
+
# @option opts [String] :resource_type Type of the resource associated with a work request
|
1061
|
+
# Allowed values are: CLUSTER, NODEPOOL
|
1062
|
+
# @option opts [Array<String>] :status A work request status to filter on. Can have multiple parameters of this name.
|
1063
|
+
# Allowed values are: ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED
|
1064
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1065
|
+
#
|
1066
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1067
|
+
#
|
1068
|
+
# @option opts [String] :sort_order The optional order in which to sort the results.
|
1069
|
+
# @option opts [String] :sort_by The optional field to sort the results by.
|
1070
|
+
# Allowed values are: ID, OPERATION_TYPE, STATUS, TIME_ACCEPTED, TIME_STARTED, TIME_FINISHED
|
1071
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
1072
|
+
# Oracle about a particular request, please provide the request ID.
|
1073
|
+
#
|
1074
|
+
# @return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::WorkRequestSummary WorkRequestSummary}>
|
1075
|
+
def list_work_requests(compartment_id, opts = {})
|
1076
|
+
logger.debug 'Calling operation ContainerEngineClient#list_work_requests.' if logger
|
1077
|
+
|
1078
|
+
raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?
|
1079
|
+
|
1080
|
+
if opts[:resource_type] && !%w[CLUSTER NODEPOOL].include?(opts[:resource_type])
|
1081
|
+
raise 'Invalid value for "resource_type", must be one of CLUSTER, NODEPOOL.'
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
|
1085
|
+
status_allowable_values = %w[ACCEPTED IN_PROGRESS FAILED SUCCEEDED CANCELING CANCELED]
|
1086
|
+
if opts[:status] && !opts[:status].empty?
|
1087
|
+
opts[:status].each do |val_to_check|
|
1088
|
+
unless status_allowable_values.include?(val_to_check)
|
1089
|
+
raise 'Invalid value for "status", must be one of ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED.'
|
1090
|
+
end
|
1091
|
+
end
|
1092
|
+
end
|
1093
|
+
|
1094
|
+
if opts[:sort_order] && !OCI::ContainerEngine::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
|
1095
|
+
raise 'Invalid value for "sort_order", must be one of the values in OCI::ContainerEngine::Models::SORT_ORDER_ENUM.'
|
1096
|
+
end
|
1097
|
+
|
1098
|
+
if opts[:sort_by] && !%w[ID OPERATION_TYPE STATUS TIME_ACCEPTED TIME_STARTED TIME_FINISHED].include?(opts[:sort_by])
|
1099
|
+
raise 'Invalid value for "sort_by", must be one of ID, OPERATION_TYPE, STATUS, TIME_ACCEPTED, TIME_STARTED, TIME_FINISHED.'
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
path = '/workRequests'
|
1103
|
+
operation_signing_strategy = :standard
|
1104
|
+
|
1105
|
+
# rubocop:disable Style/NegatedIf
|
1106
|
+
# Query Params
|
1107
|
+
query_params = {}
|
1108
|
+
query_params[:compartmentId] = compartment_id
|
1109
|
+
query_params[:clusterId] = opts[:cluster_id] if opts[:cluster_id]
|
1110
|
+
query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
|
1111
|
+
query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
|
1112
|
+
query_params[:status] = OCI::ApiClient.build_collection_params(opts[:status], :multi) if opts[:status] && !opts[:status].empty?
|
1113
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
1114
|
+
query_params[:page] = opts[:page] if opts[:page]
|
1115
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
1116
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
1117
|
+
|
1118
|
+
# Header Params
|
1119
|
+
header_params = {}
|
1120
|
+
header_params['accept'] = 'application/json'
|
1121
|
+
header_params['content-type'] = 'application/json'
|
1122
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1123
|
+
# rubocop:enable Style/NegatedIf
|
1124
|
+
|
1125
|
+
post_body = nil
|
1126
|
+
|
1127
|
+
# rubocop:disable Metrics/BlockLength
|
1128
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_work_requests') do
|
1129
|
+
@api_client.call_api(
|
1130
|
+
:GET,
|
1131
|
+
path,
|
1132
|
+
endpoint,
|
1133
|
+
header_params: header_params,
|
1134
|
+
query_params: query_params,
|
1135
|
+
operation_signing_strategy: operation_signing_strategy,
|
1136
|
+
body: post_body,
|
1137
|
+
return_type: 'Array<OCI::ContainerEngine::Models::WorkRequestSummary>'
|
1138
|
+
)
|
1139
|
+
end
|
1140
|
+
# rubocop:enable Metrics/BlockLength
|
1141
|
+
end
|
1142
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1143
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1144
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1145
|
+
|
1146
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1147
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1148
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1149
|
+
|
1150
|
+
|
1151
|
+
# Update the details of a cluster.
|
1152
|
+
# @param [String] cluster_id The OCID of the cluster.
|
1153
|
+
# @param [OCI::ContainerEngine::Models::UpdateClusterDetails] update_cluster_details The details of the cluster to update.
|
1154
|
+
# @param [Hash] opts the optional parameters
|
1155
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
1156
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
1157
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1158
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1159
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1160
|
+
#
|
1161
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
1162
|
+
# Oracle about a particular request, please provide the request ID.
|
1163
|
+
#
|
1164
|
+
# @return [Response] A Response object with data of type nil
|
1165
|
+
def update_cluster(cluster_id, update_cluster_details, opts = {})
|
1166
|
+
logger.debug 'Calling operation ContainerEngineClient#update_cluster.' if logger
|
1167
|
+
|
1168
|
+
raise "Missing the required parameter 'cluster_id' when calling update_cluster." if cluster_id.nil?
|
1169
|
+
raise "Missing the required parameter 'update_cluster_details' when calling update_cluster." if update_cluster_details.nil?
|
1170
|
+
raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)
|
1171
|
+
|
1172
|
+
path = '/clusters/{clusterId}'.sub('{clusterId}', cluster_id.to_s)
|
1173
|
+
operation_signing_strategy = :standard
|
1174
|
+
|
1175
|
+
# rubocop:disable Style/NegatedIf
|
1176
|
+
# Query Params
|
1177
|
+
query_params = {}
|
1178
|
+
|
1179
|
+
# Header Params
|
1180
|
+
header_params = {}
|
1181
|
+
header_params['accept'] = 'application/json'
|
1182
|
+
header_params['content-type'] = 'application/json'
|
1183
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
1184
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1185
|
+
# rubocop:enable Style/NegatedIf
|
1186
|
+
|
1187
|
+
post_body = @api_client.object_to_http_body(update_cluster_details)
|
1188
|
+
|
1189
|
+
# rubocop:disable Metrics/BlockLength
|
1190
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_cluster') do
|
1191
|
+
@api_client.call_api(
|
1192
|
+
:PUT,
|
1193
|
+
path,
|
1194
|
+
endpoint,
|
1195
|
+
header_params: header_params,
|
1196
|
+
query_params: query_params,
|
1197
|
+
operation_signing_strategy: operation_signing_strategy,
|
1198
|
+
body: post_body
|
1199
|
+
)
|
1200
|
+
end
|
1201
|
+
# rubocop:enable Metrics/BlockLength
|
1202
|
+
end
|
1203
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1204
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1205
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1206
|
+
|
1207
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1208
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1209
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1210
|
+
|
1211
|
+
|
1212
|
+
# Update the details of a node pool.
|
1213
|
+
# @param [String] node_pool_id The OCID of the node pool.
|
1214
|
+
# @param [OCI::ContainerEngine::Models::UpdateNodePoolDetails] update_node_pool_details The fields to update in a node pool.
|
1215
|
+
# @param [Hash] opts the optional parameters
|
1216
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
1217
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
1218
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1219
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1220
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1221
|
+
#
|
1222
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
|
1223
|
+
# Oracle about a particular request, please provide the request ID.
|
1224
|
+
#
|
1225
|
+
# @return [Response] A Response object with data of type nil
|
1226
|
+
def update_node_pool(node_pool_id, update_node_pool_details, opts = {})
|
1227
|
+
logger.debug 'Calling operation ContainerEngineClient#update_node_pool.' if logger
|
1228
|
+
|
1229
|
+
raise "Missing the required parameter 'node_pool_id' when calling update_node_pool." if node_pool_id.nil?
|
1230
|
+
raise "Missing the required parameter 'update_node_pool_details' when calling update_node_pool." if update_node_pool_details.nil?
|
1231
|
+
raise "Parameter value for 'node_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_id)
|
1232
|
+
|
1233
|
+
path = '/nodePools/{nodePoolId}'.sub('{nodePoolId}', node_pool_id.to_s)
|
1234
|
+
operation_signing_strategy = :standard
|
1235
|
+
|
1236
|
+
# rubocop:disable Style/NegatedIf
|
1237
|
+
# Query Params
|
1238
|
+
query_params = {}
|
1239
|
+
|
1240
|
+
# Header Params
|
1241
|
+
header_params = {}
|
1242
|
+
header_params['accept'] = 'application/json'
|
1243
|
+
header_params['content-type'] = 'application/json'
|
1244
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
1245
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1246
|
+
# rubocop:enable Style/NegatedIf
|
1247
|
+
|
1248
|
+
post_body = @api_client.object_to_http_body(update_node_pool_details)
|
1249
|
+
|
1250
|
+
# rubocop:disable Metrics/BlockLength
|
1251
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_node_pool') do
|
1252
|
+
@api_client.call_api(
|
1253
|
+
:PUT,
|
1254
|
+
path,
|
1255
|
+
endpoint,
|
1256
|
+
header_params: header_params,
|
1257
|
+
query_params: query_params,
|
1258
|
+
operation_signing_strategy: operation_signing_strategy,
|
1259
|
+
body: post_body
|
1260
|
+
)
|
1261
|
+
end
|
1262
|
+
# rubocop:enable Metrics/BlockLength
|
1263
|
+
end
|
1264
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1265
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1266
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1267
|
+
|
1268
|
+
private
|
1269
|
+
|
1270
|
+
def applicable_retry_config(opts = {})
|
1271
|
+
return @retry_config unless opts.key?(:retry_config)
|
1272
|
+
opts[:retry_config]
|
1273
|
+
end
|
1274
|
+
end
|
1275
|
+
end
|
1276
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|