oci 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -1
- data/lib/oci.rb +4 -7
- data/lib/oci/api_client.rb +51 -6
- data/lib/oci/auth/auth.rb +5 -2
- data/lib/oci/auth/federation_client.rb +2 -2
- data/lib/oci/auth/internal/auth_token_request_signer.rb +2 -2
- data/lib/oci/auth/security_token_container.rb +2 -2
- data/lib/oci/auth/session_key_supplier.rb +3 -4
- data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +30 -17
- data/lib/oci/auth/signers/security_token_signer.rb +13 -6
- data/lib/oci/auth/signers/x509_federation_client_based_security_token_signer.rb +8 -4
- data/lib/oci/auth/url_based_certificate_retriever.rb +3 -4
- data/lib/oci/auth/util.rb +6 -4
- data/lib/oci/base_signer.rb +54 -50
- data/lib/oci/config_file_loader.rb +3 -11
- data/lib/oci/core/blockstorage_client.rb +211 -0
- data/lib/oci/core/compute_client.rb +4 -2
- data/lib/oci/core/core.rb +9 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +5 -1
- data/lib/oci/core/models/attach_volume_details.rb +13 -1
- data/lib/oci/core/models/create_public_ip_details.rb +186 -0
- data/lib/oci/core/models/create_vnic_details.rb +8 -2
- data/lib/oci/core/models/create_volume_backup_details.rb +27 -1
- data/lib/oci/core/models/create_volume_backup_policy_assignment_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +15 -1
- data/lib/oci/core/models/get_public_ip_by_ip_address_details.rb +125 -0
- data/lib/oci/core/models/get_public_ip_by_private_ip_id_details.rb +124 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +5 -1
- data/lib/oci/core/models/public_ip.rb +328 -0
- data/lib/oci/core/models/update_public_ip_details.rb +140 -0
- data/lib/oci/core/models/volume_attachment.rb +13 -1
- data/lib/oci/core/models/volume_backup.rb +72 -1
- data/lib/oci/core/models/volume_backup_policy.rb +161 -0
- data/lib/oci/core/models/volume_backup_policy_assignment.rb +159 -0
- data/lib/oci/core/models/volume_backup_schedule.rb +191 -0
- data/lib/oci/core/virtual_network_client.rb +374 -4
- data/lib/oci/database/database_client.rb +3 -1
- data/lib/oci/dns/dns.rb +34 -0
- data/lib/oci/dns/dns_client.rb +985 -0
- data/lib/oci/dns/models/create_zone_details.rb +174 -0
- data/lib/oci/dns/models/external_master.rb +145 -0
- data/lib/oci/dns/models/patch_domain_records_details.rb +120 -0
- data/lib/oci/dns/models/patch_rr_set_details.rb +120 -0
- data/lib/oci/dns/models/patch_zone_records_details.rb +120 -0
- data/lib/oci/dns/models/record.rb +204 -0
- data/lib/oci/dns/models/record_collection.rb +121 -0
- data/lib/oci/dns/models/record_details.rb +204 -0
- data/lib/oci/dns/models/record_operation.rb +253 -0
- data/lib/oci/dns/models/rr_set.rb +123 -0
- data/lib/oci/dns/models/sort_order.rb +12 -0
- data/lib/oci/dns/models/tsig.rb +149 -0
- data/lib/oci/dns/models/update_domain_records_details.rb +120 -0
- data/lib/oci/dns/models/update_rr_set_details.rb +120 -0
- data/lib/oci/dns/models/update_zone_details.rb +122 -0
- data/lib/oci/dns/models/update_zone_records_details.rb +120 -0
- data/lib/oci/dns/models/zone.rb +272 -0
- data/lib/oci/dns/models/zone_summary.rb +230 -0
- data/lib/oci/dns/util.rb +2 -0
- data/lib/oci/errors.rb +20 -0
- data/lib/oci/identity/identity_client.rb +1 -0
- data/lib/oci/identity/models/create_dynamic_group_details.rb +4 -2
- data/lib/oci/identity/models/dynamic_group.rb +9 -6
- data/lib/oci/identity/models/update_dynamic_group_details.rb +4 -2
- data/lib/oci/load_balancer/load_balancer.rb +6 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +219 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +12 -1
- data/lib/oci/load_balancer/models/create_path_route_set_details.rb +138 -0
- data/lib/oci/load_balancer/models/listener.rb +17 -1
- data/lib/oci/load_balancer/models/listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +12 -1
- data/lib/oci/load_balancer/models/path_match_type.rb +153 -0
- data/lib/oci/load_balancer/models/path_route.rb +161 -0
- data/lib/oci/load_balancer/models/path_route_set.rb +139 -0
- data/lib/oci/load_balancer/models/path_route_set_details.rb +122 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/update_path_route_set_details.rb +122 -0
- data/lib/oci/load_balancer/util.rb +1 -3
- data/lib/oci/object_storage/transfer/multipart/internal/file_part_io_wrapper.rb +111 -0
- data/lib/oci/object_storage/transfer/multipart/internal/multipart_upload_parts_collection.rb +41 -0
- data/lib/oci/object_storage/transfer/multipart/internal/seekable_non_file_part_io_wrapper.rb +48 -0
- data/lib/oci/object_storage/transfer/multipart/internal/stdin_part_io_wrapper.rb +54 -0
- data/lib/oci/object_storage/transfer/multipart/multipart_object_assembler.rb +545 -0
- data/lib/oci/object_storage/transfer/transfer.rb +31 -0
- data/lib/oci/object_storage/transfer/upload_manager.rb +212 -0
- data/lib/oci/object_storage/transfer/upload_manager_config.rb +60 -0
- data/lib/oci/regions.rb +3 -1
- data/lib/oci/response.rb +1 -3
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waiter.rb +16 -11
- data/lib/oraclebmc.rb +1 -1
- metadata +46 -2
data/lib/oci/base_signer.rb
CHANGED
@@ -9,17 +9,16 @@ require 'uri'
|
|
9
9
|
require 'cgi'
|
10
10
|
|
11
11
|
module OCI
|
12
|
-
|
13
12
|
# The base class for other classes which are meant to generate a signature
|
14
13
|
class BaseSigner
|
15
14
|
# enum to define the signing strategy
|
16
|
-
SIGNING_STRATEGY_ENUM = [STANDARD = 'standard', OBJECT_STORAGE = 'object_storage']
|
15
|
+
SIGNING_STRATEGY_ENUM = [STANDARD = 'standard'.freeze, OBJECT_STORAGE = 'object_storage'.freeze].freeze
|
17
16
|
|
18
17
|
# The Oracle Cloud Infrastructure API signature version
|
19
|
-
SIGNATURE_VERSION =
|
18
|
+
SIGNATURE_VERSION = '1'.freeze
|
20
19
|
|
21
|
-
GENERIC_HEADERS = [
|
22
|
-
BODY_HEADERS = [
|
20
|
+
GENERIC_HEADERS = %i[date (request-target) host].freeze
|
21
|
+
BODY_HEADERS = %i[content-length content-type x-content-sha256].freeze
|
23
22
|
|
24
23
|
# Creates a BaseSigner
|
25
24
|
#
|
@@ -27,11 +26,18 @@ module OCI
|
|
27
26
|
# @param [String] private_key_content The private key as a PEM-formatted string
|
28
27
|
# @param [String] pass_phrase Optional the pass phrase for the private key (if any)
|
29
28
|
# @param [SIGNING_STRATEGY_ENUM] signing_strategy Optional signing for standard service or object storage service
|
30
|
-
# @param [Array<String>] headers_to_sign_in_all_requests Optional headers which should be signed on each request
|
29
|
+
# @param [Array<String>] headers_to_sign_in_all_requests Optional headers which should be signed on each request
|
31
30
|
# @param [Array<String>] body_headers_to_sign Optional headers which should be signed on requests with bodies
|
32
|
-
def initialize(
|
33
|
-
|
34
|
-
|
31
|
+
def initialize(
|
32
|
+
api_key,
|
33
|
+
private_key_content,
|
34
|
+
pass_phrase: nil,
|
35
|
+
signing_strategy: STANDARD,
|
36
|
+
headers_to_sign_in_all_requests: GENERIC_HEADERS,
|
37
|
+
body_headers_to_sign: BODY_HEADERS
|
38
|
+
)
|
39
|
+
raise 'Missing required parameter api_key.' unless api_key
|
40
|
+
raise 'Missing required parameter private_key_content.' unless private_key_content
|
35
41
|
|
36
42
|
@key_id = api_key
|
37
43
|
@private_key_content = private_key_content
|
@@ -39,7 +45,7 @@ module OCI
|
|
39
45
|
@signing_strategy = signing_strategy
|
40
46
|
|
41
47
|
@headers_to_sign_all_requests = headers_to_sign_in_all_requests
|
42
|
-
@body_headers_to_sign = body_headers_to_sign
|
48
|
+
@body_headers_to_sign = body_headers_to_sign
|
43
49
|
@operation_header_mapping = {
|
44
50
|
options: [],
|
45
51
|
get: headers_to_sign_in_all_requests,
|
@@ -65,65 +71,63 @@ module OCI
|
|
65
71
|
path = uri.query.nil? ? uri.path : "#{uri.path}?#{uri.query}"
|
66
72
|
inject_missing_headers(method, headers, body, uri)
|
67
73
|
signature = compute_signature(headers, method, path)
|
68
|
-
unless signature.nil?
|
69
|
-
inject_authorization_header(headers, method, signature)
|
70
|
-
end
|
74
|
+
inject_authorization_header(headers, method, signature) unless signature.nil?
|
71
75
|
end
|
72
76
|
|
73
77
|
private
|
74
78
|
|
75
79
|
def inject_missing_headers(method, headers, body, uri)
|
76
|
-
headers[
|
77
|
-
headers[
|
78
|
-
headers[
|
80
|
+
headers['date'] ||= Time.now.utc.httpdate
|
81
|
+
headers['accept'] ||= '*/*'
|
82
|
+
headers['host'] ||= uri.host if @headers_to_sign_all_requests.include?(:host)
|
79
83
|
|
80
84
|
# For object storage service's put method, we don't need to set content type
|
81
85
|
if method != :put || @signing_strategy != OBJECT_STORAGE
|
82
|
-
headers[
|
86
|
+
headers['content-type'] ||= 'application/json'
|
83
87
|
else
|
84
88
|
headers[:'Content-Type'] ||= 'application/octet-stream'
|
85
89
|
end
|
86
90
|
|
87
|
-
|
88
|
-
body ||= ''
|
91
|
+
return unless %i[put post patch].include?(method)
|
89
92
|
|
90
|
-
|
91
|
-
if method != :put || @signing_strategy != OBJECT_STORAGE
|
92
|
-
headers["content-length"] ||= body.length.to_s
|
93
|
-
headers["x-content-sha256"] ||= Digest::SHA256.base64digest(body)
|
94
|
-
else
|
95
|
-
if body.respond_to?(:read) && body.respond_to?(:write)
|
96
|
-
headers['Content-Length'] ||= body.respond_to?('size') ? body.size : body.stat.size
|
97
|
-
else
|
98
|
-
headers['Content-Length'] ||= body.length.to_s
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
93
|
+
body ||= ''
|
103
94
|
|
104
|
-
|
105
|
-
if method
|
106
|
-
|
95
|
+
# For object storage service's put method, we don't need to set content length and x-content sha256
|
96
|
+
if method != :put || @signing_strategy != OBJECT_STORAGE
|
97
|
+
headers['content-length'] ||= body.length.to_s
|
98
|
+
headers['x-content-sha256'] ||= Digest::SHA256.base64digest(body)
|
107
99
|
else
|
108
|
-
|
100
|
+
headers['Content-Length'] ||= if body.respond_to?(:read) && body.respond_to?(:write)
|
101
|
+
body.respond_to?('size') ? body.size : body.stat.size
|
102
|
+
else
|
103
|
+
body.length.to_s
|
104
|
+
end
|
109
105
|
end
|
106
|
+
end
|
110
107
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
108
|
+
def inject_authorization_header(headers, method, signature)
|
109
|
+
header_mapping = if method == :put && @signing_strategy == OBJECT_STORAGE
|
110
|
+
@headers_to_sign_all_requests
|
111
|
+
else
|
112
|
+
@operation_header_mapping[method]
|
113
|
+
end
|
114
|
+
|
115
|
+
signed_headers = header_mapping.map(&:to_s).join(' ')
|
116
|
+
headers['authorization'] = [
|
117
|
+
%(Signature headers="#{signed_headers}"),
|
118
|
+
%(keyId="#{@key_id}"),
|
119
|
+
%(algorithm="rsa-sha256"),
|
120
|
+
%(signature="#{signature}"),
|
121
|
+
%(version="#{SIGNATURE_VERSION}")
|
122
|
+
].join(',')
|
119
123
|
end
|
120
124
|
|
121
125
|
def compute_signature(headers, method, path)
|
122
|
-
if method == :put && @signing_strategy == OBJECT_STORAGE
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
126
|
+
header_mapping = if method == :put && @signing_strategy == OBJECT_STORAGE
|
127
|
+
@headers_to_sign_all_requests
|
128
|
+
else
|
129
|
+
@operation_header_mapping[method]
|
130
|
+
end
|
127
131
|
|
128
132
|
return if header_mapping.empty?
|
129
133
|
signing_string = header_mapping.map do |header|
|
@@ -134,7 +138,7 @@ module OCI
|
|
134
138
|
end
|
135
139
|
end.join("\n")
|
136
140
|
|
137
|
-
signature = private_key.sign(OpenSSL::Digest::SHA256.new, signing_string.encode(
|
141
|
+
signature = private_key.sign(OpenSSL::Digest::SHA256.new, signing_string.encode('ascii'))
|
138
142
|
Base64.strict_encode64(signature)
|
139
143
|
end
|
140
144
|
|
@@ -50,10 +50,7 @@ module OCI
|
|
50
50
|
# @return [Array<Config>] An array containing all the configs found in the given file.
|
51
51
|
def self.load_configs(config_file_location)
|
52
52
|
config_file_location = File.expand_path(config_file_location)
|
53
|
-
|
54
|
-
unless File.file?(config_file_location)
|
55
|
-
raise Errors::ConfigFileNotFoundError, 'Config file does not exist.'
|
56
|
-
end
|
53
|
+
raise Errors::ConfigFileNotFoundError, 'Config file does not exist.' unless File.file?(config_file_location)
|
57
54
|
|
58
55
|
config_file = IniFile.load(config_file_location)
|
59
56
|
configs = {}
|
@@ -65,9 +62,7 @@ module OCI
|
|
65
62
|
config_file.each_section do |section|
|
66
63
|
config = Config.new
|
67
64
|
|
68
|
-
unless section.equal? DEFAULT_PROFILE
|
69
|
-
load_section(config_file[DEFAULT_PROFILE], config)
|
70
|
-
end
|
65
|
+
load_section(config_file[DEFAULT_PROFILE], config) unless section.equal? DEFAULT_PROFILE
|
71
66
|
load_section(config_file[section], config)
|
72
67
|
|
73
68
|
configs[section] = config
|
@@ -83,10 +78,7 @@ module OCI
|
|
83
78
|
|
84
79
|
# key_content is not allowed in configuration file
|
85
80
|
next if key == 'key_content'
|
86
|
-
|
87
|
-
if config.respond_to?("#{key}=") && config.respond_to?(key)
|
88
|
-
config.instance_variable_set('@' + key, value)
|
89
|
-
end
|
81
|
+
config.instance_variable_set('@' + key, value) if config.respond_to?("#{key}=") && config.respond_to?(key)
|
90
82
|
# TODO: log the key been ignored by Ruby SDK
|
91
83
|
end
|
92
84
|
end
|
@@ -168,6 +168,40 @@ module OCI
|
|
168
168
|
:return_type => 'OCI::Core::Models::VolumeBackup')
|
169
169
|
end
|
170
170
|
|
171
|
+
# Assigns a policy to the specified asset, such as a volume. Note that a given asset can
|
172
|
+
# only have one policy assigned to it; if this method is called for an asset that previously
|
173
|
+
# has a different policy assigned, the prior assignment will be silently deleted.
|
174
|
+
#
|
175
|
+
# @param [CreateVolumeBackupPolicyAssignmentDetails] create_volume_backup_policy_assignment_details Request to assign a specified policy to a particular asset.
|
176
|
+
# @param [Hash] opts the optional parameters
|
177
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackupPolicyAssignment
|
178
|
+
def create_volume_backup_policy_assignment(create_volume_backup_policy_assignment_details, opts = {})
|
179
|
+
logger.debug "Calling operation BlockstorageClient#create_volume_backup_policy_assignment." if logger
|
180
|
+
|
181
|
+
fail "Missing the required parameter 'create_volume_backup_policy_assignment_details' when calling create_volume_backup_policy_assignment." if create_volume_backup_policy_assignment_details.nil?
|
182
|
+
|
183
|
+
path = "/volumeBackupPolicyAssignments"
|
184
|
+
|
185
|
+
# Query Params
|
186
|
+
query_params = {}
|
187
|
+
|
188
|
+
# Header Params
|
189
|
+
header_params = {}
|
190
|
+
header_params['accept'] = 'application/json'
|
191
|
+
header_params['content-type'] = 'application/json'
|
192
|
+
|
193
|
+
post_body = @api_client.object_to_http_body(create_volume_backup_policy_assignment_details)
|
194
|
+
|
195
|
+
return @api_client.call_api(
|
196
|
+
:POST,
|
197
|
+
path,
|
198
|
+
endpoint,
|
199
|
+
:header_params => header_params,
|
200
|
+
:query_params => query_params,
|
201
|
+
:body => post_body,
|
202
|
+
:return_type => 'OCI::Core::Models::VolumeBackupPolicyAssignment')
|
203
|
+
end
|
204
|
+
|
171
205
|
# Deletes the specified boot volume. The volume cannot have an active connection to an instance.
|
172
206
|
# To disconnect the boot volume from a connected instance, see
|
173
207
|
# [Disconnecting From a Boot Volume](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/deletingbootvolume.htm).
|
@@ -281,6 +315,41 @@ module OCI
|
|
281
315
|
:body => post_body)
|
282
316
|
end
|
283
317
|
|
318
|
+
# Deletes a volume backup policy assignment (i.e. unassigns the policy from an asset).
|
319
|
+
# @param [String] policy_assignment_id The OCID of the volume backup policy assignment.
|
320
|
+
# @param [Hash] opts the optional parameters
|
321
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
322
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
323
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
324
|
+
#
|
325
|
+
# @return [Response] A Response object with data of type nil
|
326
|
+
def delete_volume_backup_policy_assignment(policy_assignment_id, opts = {})
|
327
|
+
logger.debug "Calling operation BlockstorageClient#delete_volume_backup_policy_assignment." if logger
|
328
|
+
|
329
|
+
fail "Missing the required parameter 'policy_assignment_id' when calling delete_volume_backup_policy_assignment." if policy_assignment_id.nil?
|
330
|
+
|
331
|
+
path = "/volumeBackupPolicyAssignments/{policyAssignmentId}".sub('{policyAssignmentId}', policy_assignment_id.to_s)
|
332
|
+
|
333
|
+
# Query Params
|
334
|
+
query_params = {}
|
335
|
+
|
336
|
+
# Header Params
|
337
|
+
header_params = {}
|
338
|
+
header_params['accept'] = 'application/json'
|
339
|
+
header_params['content-type'] = 'application/json'
|
340
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
341
|
+
|
342
|
+
post_body = nil
|
343
|
+
|
344
|
+
return @api_client.call_api(
|
345
|
+
:DELETE,
|
346
|
+
path,
|
347
|
+
endpoint,
|
348
|
+
:header_params => header_params,
|
349
|
+
:query_params => query_params,
|
350
|
+
:body => post_body)
|
351
|
+
end
|
352
|
+
|
284
353
|
# Gets information for the specified boot volume.
|
285
354
|
# @param [String] boot_volume_id The OCID of the boot volume.
|
286
355
|
# @param [Hash] opts the optional parameters
|
@@ -374,6 +443,111 @@ module OCI
|
|
374
443
|
:return_type => 'OCI::Core::Models::VolumeBackup')
|
375
444
|
end
|
376
445
|
|
446
|
+
# Gets information for the specified volume backup policy.
|
447
|
+
# @param [String] policy_id The OCID of the volume backup policy.
|
448
|
+
# @param [Hash] opts the optional parameters
|
449
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackupPolicy
|
450
|
+
def get_volume_backup_policy(policy_id, opts = {})
|
451
|
+
logger.debug "Calling operation BlockstorageClient#get_volume_backup_policy." if logger
|
452
|
+
|
453
|
+
fail "Missing the required parameter 'policy_id' when calling get_volume_backup_policy." if policy_id.nil?
|
454
|
+
|
455
|
+
path = "/volumeBackupPolicies/{policyId}".sub('{policyId}', policy_id.to_s)
|
456
|
+
|
457
|
+
# Query Params
|
458
|
+
query_params = {}
|
459
|
+
|
460
|
+
# Header Params
|
461
|
+
header_params = {}
|
462
|
+
header_params['accept'] = 'application/json'
|
463
|
+
header_params['content-type'] = 'application/json'
|
464
|
+
|
465
|
+
post_body = nil
|
466
|
+
|
467
|
+
return @api_client.call_api(
|
468
|
+
:GET,
|
469
|
+
path,
|
470
|
+
endpoint,
|
471
|
+
:header_params => header_params,
|
472
|
+
:query_params => query_params,
|
473
|
+
:body => post_body,
|
474
|
+
:return_type => 'OCI::Core::Models::VolumeBackupPolicy')
|
475
|
+
end
|
476
|
+
|
477
|
+
# Gets the volume backup policy assignment for the specified asset. Note that the
|
478
|
+
# assetId query parameter is required, and that the returned list will contain at most
|
479
|
+
# one item (since any given asset can only have one policy assigned to it).
|
480
|
+
#
|
481
|
+
# @param [String] asset_id The OCID of an asset (e.g. a volume).
|
482
|
+
# @param [Hash] opts the optional parameters
|
483
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
484
|
+
#
|
485
|
+
# Example: `500`
|
486
|
+
#
|
487
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
488
|
+
#
|
489
|
+
# @return [Response] A Response object with data of type Array<OCI::Core::Models::VolumeBackupPolicyAssignment>
|
490
|
+
def get_volume_backup_policy_asset_assignment(asset_id, opts = {})
|
491
|
+
logger.debug "Calling operation BlockstorageClient#get_volume_backup_policy_asset_assignment." if logger
|
492
|
+
|
493
|
+
fail "Missing the required parameter 'asset_id' when calling get_volume_backup_policy_asset_assignment." if asset_id.nil?
|
494
|
+
|
495
|
+
path = "/volumeBackupPolicyAssignments"
|
496
|
+
|
497
|
+
# Query Params
|
498
|
+
query_params = {}
|
499
|
+
query_params[:'assetId'] = asset_id
|
500
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
501
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
502
|
+
|
503
|
+
# Header Params
|
504
|
+
header_params = {}
|
505
|
+
header_params['accept'] = 'application/json'
|
506
|
+
header_params['content-type'] = 'application/json'
|
507
|
+
|
508
|
+
post_body = nil
|
509
|
+
|
510
|
+
return @api_client.call_api(
|
511
|
+
:GET,
|
512
|
+
path,
|
513
|
+
endpoint,
|
514
|
+
:header_params => header_params,
|
515
|
+
:query_params => query_params,
|
516
|
+
:body => post_body,
|
517
|
+
:return_type => 'Array<OCI::Core::Models::VolumeBackupPolicyAssignment>')
|
518
|
+
end
|
519
|
+
|
520
|
+
# Gets information for the specified volume backup policy assignment.
|
521
|
+
# @param [String] policy_assignment_id The OCID of the volume backup policy assignment.
|
522
|
+
# @param [Hash] opts the optional parameters
|
523
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackupPolicyAssignment
|
524
|
+
def get_volume_backup_policy_assignment(policy_assignment_id, opts = {})
|
525
|
+
logger.debug "Calling operation BlockstorageClient#get_volume_backup_policy_assignment." if logger
|
526
|
+
|
527
|
+
fail "Missing the required parameter 'policy_assignment_id' when calling get_volume_backup_policy_assignment." if policy_assignment_id.nil?
|
528
|
+
|
529
|
+
path = "/volumeBackupPolicyAssignments/{policyAssignmentId}".sub('{policyAssignmentId}', policy_assignment_id.to_s)
|
530
|
+
|
531
|
+
# Query Params
|
532
|
+
query_params = {}
|
533
|
+
|
534
|
+
# Header Params
|
535
|
+
header_params = {}
|
536
|
+
header_params['accept'] = 'application/json'
|
537
|
+
header_params['content-type'] = 'application/json'
|
538
|
+
|
539
|
+
post_body = nil
|
540
|
+
|
541
|
+
return @api_client.call_api(
|
542
|
+
:GET,
|
543
|
+
path,
|
544
|
+
endpoint,
|
545
|
+
:header_params => header_params,
|
546
|
+
:query_params => query_params,
|
547
|
+
:body => post_body,
|
548
|
+
:return_type => 'OCI::Core::Models::VolumeBackupPolicyAssignment')
|
549
|
+
end
|
550
|
+
|
377
551
|
# Lists the boot volumes in the specified compartment and Availability Domain.
|
378
552
|
#
|
379
553
|
# @param [String] availability_domain The name of the Availability Domain.
|
@@ -421,6 +595,43 @@ module OCI
|
|
421
595
|
:return_type => 'Array<OCI::Core::Models::BootVolume>')
|
422
596
|
end
|
423
597
|
|
598
|
+
# Lists all volume backup policies available to the caller.
|
599
|
+
# @param [Hash] opts the optional parameters
|
600
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
601
|
+
#
|
602
|
+
# Example: `500`
|
603
|
+
#
|
604
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
605
|
+
#
|
606
|
+
# @return [Response] A Response object with data of type Array<OCI::Core::Models::VolumeBackupPolicy>
|
607
|
+
def list_volume_backup_policies(opts = {})
|
608
|
+
logger.debug "Calling operation BlockstorageClient#list_volume_backup_policies." if logger
|
609
|
+
|
610
|
+
|
611
|
+
path = "/volumeBackupPolicies"
|
612
|
+
|
613
|
+
# Query Params
|
614
|
+
query_params = {}
|
615
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
616
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
617
|
+
|
618
|
+
# Header Params
|
619
|
+
header_params = {}
|
620
|
+
header_params['accept'] = 'application/json'
|
621
|
+
header_params['content-type'] = 'application/json'
|
622
|
+
|
623
|
+
post_body = nil
|
624
|
+
|
625
|
+
return @api_client.call_api(
|
626
|
+
:GET,
|
627
|
+
path,
|
628
|
+
endpoint,
|
629
|
+
:header_params => header_params,
|
630
|
+
:query_params => query_params,
|
631
|
+
:body => post_body,
|
632
|
+
:return_type => 'Array<OCI::Core::Models::VolumeBackupPolicy>')
|
633
|
+
end
|
634
|
+
|
424
635
|
# Lists the volume backups in the specified compartment. You can filter the results by volume.
|
425
636
|
#
|
426
637
|
# @param [String] compartment_id The OCID of the compartment.
|
@@ -284,7 +284,7 @@ module OCI
|
|
284
284
|
|
285
285
|
fail "Missing the required parameter 'create_image_details' when calling create_image." if create_image_details.nil?
|
286
286
|
|
287
|
-
path = "/images
|
287
|
+
path = "/images"
|
288
288
|
|
289
289
|
# Query Params
|
290
290
|
query_params = {}
|
@@ -1209,6 +1209,7 @@ module OCI
|
|
1209
1209
|
#
|
1210
1210
|
# Example: `7.2`
|
1211
1211
|
#
|
1212
|
+
# @option opts [String] :shape Shape name.
|
1212
1213
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1213
1214
|
#
|
1214
1215
|
# Example: `500`
|
@@ -1249,7 +1250,7 @@ module OCI
|
|
1249
1250
|
fail 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Image::LIFECYCLE_STATE_ENUM.'
|
1250
1251
|
end
|
1251
1252
|
|
1252
|
-
path = "/images
|
1253
|
+
path = "/images"
|
1253
1254
|
|
1254
1255
|
# Query Params
|
1255
1256
|
query_params = {}
|
@@ -1257,6 +1258,7 @@ module OCI
|
|
1257
1258
|
query_params[:'displayName'] = opts[:'display_name'] if opts[:'display_name']
|
1258
1259
|
query_params[:'operatingSystem'] = opts[:'operating_system'] if opts[:'operating_system']
|
1259
1260
|
query_params[:'operatingSystemVersion'] = opts[:'operating_system_version'] if opts[:'operating_system_version']
|
1261
|
+
query_params[:'shape'] = opts[:'shape'] if opts[:'shape']
|
1260
1262
|
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1261
1263
|
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1262
1264
|
query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
|