oraclebmc 1.2.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/{README.md → README_BMCS.md} +21 -26
  3. data/lib/oraclebmc.rb +1 -19
  4. metadata +16 -259
  5. data/lib/oraclebmc/api_client.rb +0 -306
  6. data/lib/oraclebmc/config.rb +0 -80
  7. data/lib/oraclebmc/config_file_loader.rb +0 -85
  8. data/lib/oraclebmc/core/blockstorage_client.rb +0 -460
  9. data/lib/oraclebmc/core/compute_client.rb +0 -1267
  10. data/lib/oraclebmc/core/core.rb +0 -112
  11. data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +0 -137
  12. data/lib/oraclebmc/core/models/attach_vnic_details.rb +0 -144
  13. data/lib/oraclebmc/core/models/attach_volume_details.rb +0 -165
  14. data/lib/oraclebmc/core/models/capture_console_history_details.rb +0 -120
  15. data/lib/oraclebmc/core/models/console_history.rb +0 -213
  16. data/lib/oraclebmc/core/models/cpe.rb +0 -169
  17. data/lib/oraclebmc/core/models/create_cpe_details.rb +0 -145
  18. data/lib/oraclebmc/core/models/create_cross_connect_details.rb +0 -204
  19. data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +0 -133
  20. data/lib/oraclebmc/core/models/create_dhcp_details.rb +0 -153
  21. data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +0 -142
  22. data/lib/oraclebmc/core/models/create_drg_details.rb +0 -131
  23. data/lib/oraclebmc/core/models/create_image_details.rb +0 -159
  24. data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +0 -153
  25. data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +0 -168
  26. data/lib/oraclebmc/core/models/create_private_ip_details.rb +0 -173
  27. data/lib/oraclebmc/core/models/create_route_table_details.rb +0 -153
  28. data/lib/oraclebmc/core/models/create_security_list_details.rb +0 -164
  29. data/lib/oraclebmc/core/models/create_subnet_details.rb +0 -257
  30. data/lib/oraclebmc/core/models/create_vcn_details.rb +0 -171
  31. data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +0 -260
  32. data/lib/oraclebmc/core/models/create_vnic_details.rb +0 -214
  33. data/lib/oraclebmc/core/models/create_volume_backup_details.rb +0 -133
  34. data/lib/oraclebmc/core/models/create_volume_details.rb +0 -170
  35. data/lib/oraclebmc/core/models/cross_connect.rb +0 -235
  36. data/lib/oraclebmc/core/models/cross_connect_group.rb +0 -187
  37. data/lib/oraclebmc/core/models/cross_connect_location.rb +0 -134
  38. data/lib/oraclebmc/core/models/cross_connect_mapping.rb +0 -190
  39. data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +0 -137
  40. data/lib/oraclebmc/core/models/cross_connect_status.rb +0 -200
  41. data/lib/oraclebmc/core/models/dhcp_dns_option.rb +0 -171
  42. data/lib/oraclebmc/core/models/dhcp_option.rb +0 -135
  43. data/lib/oraclebmc/core/models/dhcp_options.rb +0 -208
  44. data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +0 -141
  45. data/lib/oraclebmc/core/models/drg.rb +0 -186
  46. data/lib/oraclebmc/core/models/drg_attachment.rb +0 -208
  47. data/lib/oraclebmc/core/models/egress_security_rule.rb +0 -198
  48. data/lib/oraclebmc/core/models/export_image_details.rb +0 -134
  49. data/lib/oraclebmc/core/models/export_image_via_object_storage_tuple_details.rb +0 -150
  50. data/lib/oraclebmc/core/models/export_image_via_object_storage_uri_details.rb +0 -130
  51. data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +0 -145
  52. data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +0 -212
  53. data/lib/oraclebmc/core/models/icmp_options.rb +0 -131
  54. data/lib/oraclebmc/core/models/image.rb +0 -245
  55. data/lib/oraclebmc/core/models/image_source_details.rb +0 -134
  56. data/lib/oraclebmc/core/models/image_source_via_object_storage_tuple_details.rb +0 -150
  57. data/lib/oraclebmc/core/models/image_source_via_object_storage_uri_details.rb +0 -128
  58. data/lib/oraclebmc/core/models/ingress_security_rule.rb +0 -198
  59. data/lib/oraclebmc/core/models/instance.rb +0 -307
  60. data/lib/oraclebmc/core/models/instance_credentials.rb +0 -131
  61. data/lib/oraclebmc/core/models/internet_gateway.rb +0 -210
  62. data/lib/oraclebmc/core/models/ip_sec_connection.rb +0 -223
  63. data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +0 -153
  64. data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +0 -156
  65. data/lib/oraclebmc/core/models/launch_instance_details.rb +0 -336
  66. data/lib/oraclebmc/core/models/letter_of_authority.rb +0 -194
  67. data/lib/oraclebmc/core/models/port_range.rb +0 -133
  68. data/lib/oraclebmc/core/models/private_ip.rb +0 -248
  69. data/lib/oraclebmc/core/models/route_rule.rb +0 -135
  70. data/lib/oraclebmc/core/models/route_table.rb +0 -208
  71. data/lib/oraclebmc/core/models/security_list.rb +0 -219
  72. data/lib/oraclebmc/core/models/shape.rb +0 -122
  73. data/lib/oraclebmc/core/models/subnet.rb +0 -351
  74. data/lib/oraclebmc/core/models/tcp_options.rb +0 -135
  75. data/lib/oraclebmc/core/models/tunnel_config.rb +0 -151
  76. data/lib/oraclebmc/core/models/tunnel_status.rb +0 -178
  77. data/lib/oraclebmc/core/models/udp_options.rb +0 -135
  78. data/lib/oraclebmc/core/models/update_cpe_details.rb +0 -122
  79. data/lib/oraclebmc/core/models/update_cross_connect_details.rb +0 -138
  80. data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +0 -122
  81. data/lib/oraclebmc/core/models/update_dhcp_details.rb +0 -132
  82. data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +0 -122
  83. data/lib/oraclebmc/core/models/update_drg_details.rb +0 -122
  84. data/lib/oraclebmc/core/models/update_image_details.rb +0 -124
  85. data/lib/oraclebmc/core/models/update_instance_details.rb +0 -124
  86. data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +0 -133
  87. data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +0 -122
  88. data/lib/oraclebmc/core/models/update_private_ip_details.rb +0 -157
  89. data/lib/oraclebmc/core/models/update_route_table_details.rb +0 -133
  90. data/lib/oraclebmc/core/models/update_security_list_details.rb +0 -144
  91. data/lib/oraclebmc/core/models/update_subnet_details.rb +0 -122
  92. data/lib/oraclebmc/core/models/update_vcn_details.rb +0 -122
  93. data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +0 -240
  94. data/lib/oraclebmc/core/models/update_vnic_details.rb +0 -144
  95. data/lib/oraclebmc/core/models/update_volume_backup_details.rb +0 -122
  96. data/lib/oraclebmc/core/models/update_volume_details.rb +0 -122
  97. data/lib/oraclebmc/core/models/vcn.rb +0 -276
  98. data/lib/oraclebmc/core/models/virtual_circuit.rb +0 -395
  99. data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +0 -137
  100. data/lib/oraclebmc/core/models/vnic.rb +0 -287
  101. data/lib/oraclebmc/core/models/vnic_attachment.rb +0 -250
  102. data/lib/oraclebmc/core/models/volume.rb +0 -210
  103. data/lib/oraclebmc/core/models/volume_attachment.rb +0 -246
  104. data/lib/oraclebmc/core/models/volume_backup.rb +0 -235
  105. data/lib/oraclebmc/core/util.rb +0 -1
  106. data/lib/oraclebmc/core/virtual_network_client.rb +0 -3419
  107. data/lib/oraclebmc/errors.rb +0 -80
  108. data/lib/oraclebmc/global_context.rb +0 -21
  109. data/lib/oraclebmc/identity/identity.rb +0 -51
  110. data/lib/oraclebmc/identity/identity_client.rb +0 -1983
  111. data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +0 -131
  112. data/lib/oraclebmc/identity/models/api_key.rb +0 -211
  113. data/lib/oraclebmc/identity/models/availability_domain.rb +0 -131
  114. data/lib/oraclebmc/identity/models/compartment.rb +0 -211
  115. data/lib/oraclebmc/identity/models/create_api_key_details.rb +0 -120
  116. data/lib/oraclebmc/identity/models/create_compartment_details.rb +0 -145
  117. data/lib/oraclebmc/identity/models/create_group_details.rb +0 -144
  118. data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +0 -212
  119. data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +0 -133
  120. data/lib/oraclebmc/identity/models/create_policy_details.rb +0 -173
  121. data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +0 -127
  122. data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +0 -154
  123. data/lib/oraclebmc/identity/models/create_swift_password_details.rb +0 -121
  124. data/lib/oraclebmc/identity/models/create_user_details.rb +0 -144
  125. data/lib/oraclebmc/identity/models/group.rb +0 -211
  126. data/lib/oraclebmc/identity/models/identity_provider.rb +0 -256
  127. data/lib/oraclebmc/identity/models/idp_group_mapping.rb +0 -220
  128. data/lib/oraclebmc/identity/models/policy.rb +0 -237
  129. data/lib/oraclebmc/identity/models/region.rb +0 -141
  130. data/lib/oraclebmc/identity/models/region_subscription.rb +0 -178
  131. data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +0 -180
  132. data/lib/oraclebmc/identity/models/swift_password.rb +0 -226
  133. data/lib/oraclebmc/identity/models/tenancy.rb +0 -158
  134. data/lib/oraclebmc/identity/models/ui_password.rb +0 -187
  135. data/lib/oraclebmc/identity/models/update_compartment_details.rb +0 -120
  136. data/lib/oraclebmc/identity/models/update_group_details.rb +0 -120
  137. data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +0 -160
  138. data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +0 -131
  139. data/lib/oraclebmc/identity/models/update_policy_details.rb +0 -148
  140. data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +0 -145
  141. data/lib/oraclebmc/identity/models/update_state_details.rb +0 -121
  142. data/lib/oraclebmc/identity/models/update_swift_password_details.rb +0 -120
  143. data/lib/oraclebmc/identity/models/update_user_details.rb +0 -120
  144. data/lib/oraclebmc/identity/models/user.rb +0 -217
  145. data/lib/oraclebmc/identity/models/user_group_membership.rb +0 -209
  146. data/lib/oraclebmc/identity/util.rb +0 -1
  147. data/lib/oraclebmc/internal/internal.rb +0 -11
  148. data/lib/oraclebmc/internal/util.rb +0 -69
  149. data/lib/oraclebmc/load_balancer/load_balancer.rb +0 -46
  150. data/lib/oraclebmc/load_balancer/load_balancer_client.rb +0 -1281
  151. data/lib/oraclebmc/load_balancer/models/backend.rb +0 -220
  152. data/lib/oraclebmc/load_balancer/models/backend_details.rb +0 -206
  153. data/lib/oraclebmc/load_balancer/models/backend_set.rb +0 -179
  154. data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +0 -165
  155. data/lib/oraclebmc/load_balancer/models/certificate.rb +0 -167
  156. data/lib/oraclebmc/load_balancer/models/certificate_details.rb +0 -203
  157. data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +0 -206
  158. data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +0 -178
  159. data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +0 -203
  160. data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +0 -174
  161. data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +0 -219
  162. data/lib/oraclebmc/load_balancer/models/health_checker.rb +0 -223
  163. data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +0 -222
  164. data/lib/oraclebmc/load_balancer/models/ip_address.rb +0 -139
  165. data/lib/oraclebmc/load_balancer/models/listener.rb +0 -174
  166. data/lib/oraclebmc/load_balancer/models/listener_details.rb +0 -160
  167. data/lib/oraclebmc/load_balancer/models/load_balancer.rb +0 -280
  168. data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +0 -120
  169. data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +0 -120
  170. data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +0 -120
  171. data/lib/oraclebmc/load_balancer/models/session_persistence_configuration_details.rb +0 -141
  172. data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +0 -153
  173. data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +0 -153
  174. data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +0 -178
  175. data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +0 -165
  176. data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +0 -221
  177. data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +0 -160
  178. data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +0 -123
  179. data/lib/oraclebmc/load_balancer/models/work_request.rb +0 -229
  180. data/lib/oraclebmc/load_balancer/models/work_request_error.rb +0 -145
  181. data/lib/oraclebmc/load_balancer/util.rb +0 -55
  182. data/lib/oraclebmc/regions.rb +0 -41
  183. data/lib/oraclebmc/response.rb +0 -86
  184. data/lib/oraclebmc/signer.rb +0 -119
  185. data/lib/oraclebmc/version.rb +0 -5
  186. data/lib/oraclebmc/waiter.rb +0 -111
@@ -1,460 +0,0 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
-
3
- require "uri"
4
- require "logger"
5
-
6
- module OracleBMC
7
-
8
- class Core::BlockstorageClient
9
-
10
- # Client used to make HTTP requests.
11
- # @return [OracleBMC::ApiClient]
12
- attr_reader :api_client
13
-
14
- # Fully qualified endpoint URL
15
- # @return [String]
16
- attr_reader :endpoint
17
-
18
- # The region, which will usually correspond to a value in {OracleBMC::Regions::REGION_ENUM}.
19
- # @return [String]
20
- attr_accessor :region
21
-
22
- # Creates a new BlockstorageClient.
23
- # If a config is not specified, then the global OracleBMC.config will be used.
24
- #
25
- # A region must be specified in either the config or the region parameter. If specified
26
- # in both, then the region parameter will be used.
27
- #
28
- # @param [Config] config A Config object.
29
- # @param [String] region A region used to determine the service endpoint. This will usually
30
- # correspond to a value in {OracleBMC::Regions::REGION_ENUM}, but may be an arbitrary string.
31
- #
32
- def initialize(config:nil, region:nil)
33
- config ||= OracleBMC.config
34
- signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase)
35
- @api_client = ApiClient.new(config, signer)
36
-
37
- region ||= config.region
38
- self.region = region
39
- end
40
-
41
- # Set the region that will be used to determine the service endpoint.
42
- # This will usually correspond to a value in {OracleBMC::Regions::REGION_ENUM},
43
- # but may be an arbitrary string.
44
- def region=(r)
45
- @region = r
46
-
47
- fail 'A region must be specified.' unless @region
48
-
49
- @endpoint = OracleBMC::Regions.get_service_endpoint(@region, :BlockstorageClient) + '/20160918'
50
- logger.info "BlockstorageClient endpoint set to '#{endpoint}'." if logger
51
- end
52
-
53
- # @return [Logger] The logger for this client. May be nil.
54
- def logger
55
- @api_client.config.logger
56
- end
57
-
58
-
59
- # Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from
60
- # 50 GB (51200 MB) to 2 TB (2097152 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB).
61
- # For general information about block volumes, see
62
- # [Overview of Block Volume Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm).
63
- #
64
- # A volume and instance can be in separate compartments but must be in the same Availability Domain.
65
- # For information about access control and compartments, see
66
- # [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about
67
- # Availability Domains, see [Regions and Availability Domains](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm).
68
- # To get a list of Availability Domains, use the `ListAvailabilityDomains` operation
69
- # in the Identity and Access Management Service API.
70
- #
71
- # You may optionally specify a *display name* for the volume, which is simply a friendly name or
72
- # description. It does not have to be unique, and you can change it. Avoid entering confidential information.
73
- #
74
- # @param [CreateVolumeDetails] create_volume_details Request to create a new volume.
75
- # @param [Hash] opts the optional parameters
76
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
77
- # server error without risk of executing that same action again. Retry tokens expire after 24
78
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
79
- # has been deleted and purged from the system, then a retry of the original creation request
80
- # may be rejected).
81
- #
82
- # @return [Response] A Response object with data of type OracleBMC::Core::Models::Volume
83
- def create_volume(create_volume_details, opts = {})
84
- logger.debug "Calling operation BlockstorageClient#create_volume." if logger
85
-
86
- fail "Missing the required parameter 'create_volume_details' when calling create_volume." if create_volume_details.nil?
87
-
88
- path = "/volumes"
89
-
90
- # Query Params
91
- query_params = {}
92
-
93
- # Header Params
94
- header_params = {}
95
- header_params['accept'] = 'application/json'
96
- header_params['content-type'] = 'application/json'
97
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
98
-
99
- post_body = @api_client.object_to_http_body(create_volume_details)
100
-
101
- return @api_client.call_api(
102
- :POST,
103
- path,
104
- endpoint,
105
- :header_params => header_params,
106
- :query_params => query_params,
107
- :body => post_body,
108
- :return_type => 'OracleBMC::Core::Models::Volume')
109
- end
110
-
111
- # Creates a new backup of the specified volume. For general information about volume backups,
112
- # see [Overview of Block Volume Service Backups](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/blockvolumebackups.htm)
113
- #
114
- # When the request is received, the backup object is in a REQUEST_RECEIVED state.
115
- # When the data is imaged, it goes into a CREATING state.
116
- # After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.
117
- #
118
- # @param [CreateVolumeBackupDetails] create_volume_backup_details Request to create a new backup of given volume.
119
- # @param [Hash] opts the optional parameters
120
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
121
- # server error without risk of executing that same action again. Retry tokens expire after 24
122
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
123
- # has been deleted and purged from the system, then a retry of the original creation request
124
- # may be rejected).
125
- #
126
- # @return [Response] A Response object with data of type OracleBMC::Core::Models::VolumeBackup
127
- def create_volume_backup(create_volume_backup_details, opts = {})
128
- logger.debug "Calling operation BlockstorageClient#create_volume_backup." if logger
129
-
130
- fail "Missing the required parameter 'create_volume_backup_details' when calling create_volume_backup." if create_volume_backup_details.nil?
131
-
132
- path = "/volumeBackups"
133
-
134
- # Query Params
135
- query_params = {}
136
-
137
- # Header Params
138
- header_params = {}
139
- header_params['accept'] = 'application/json'
140
- header_params['content-type'] = 'application/json'
141
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
142
-
143
- post_body = @api_client.object_to_http_body(create_volume_backup_details)
144
-
145
- return @api_client.call_api(
146
- :POST,
147
- path,
148
- endpoint,
149
- :header_params => header_params,
150
- :query_params => query_params,
151
- :body => post_body,
152
- :return_type => 'OracleBMC::Core::Models::VolumeBackup')
153
- end
154
-
155
- # Deletes the specified volume. The volume cannot have an active connection to an instance.
156
- # To disconnect the volume from a connected instance, see
157
- # [Disconnecting From a Volume](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/disconnectingfromavolume.htm).
158
- # **Warning:** All data on the volume will be permanently lost when the volume is deleted.
159
- #
160
- # @param [String] volume_id The OCID of the volume.
161
- # @param [Hash] opts the optional parameters
162
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
163
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
164
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
165
- #
166
- # @return [Response] A Response object with data of type nil
167
- def delete_volume(volume_id, opts = {})
168
- logger.debug "Calling operation BlockstorageClient#delete_volume." if logger
169
-
170
- fail "Missing the required parameter 'volume_id' when calling delete_volume." if volume_id.nil?
171
-
172
- path = "/volumes/{volumeId}".sub('{volumeId}', volume_id.to_s)
173
-
174
- # Query Params
175
- query_params = {}
176
-
177
- # Header Params
178
- header_params = {}
179
- header_params['accept'] = 'application/json'
180
- header_params['content-type'] = 'application/json'
181
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
182
-
183
- post_body = nil
184
-
185
- return @api_client.call_api(
186
- :DELETE,
187
- path,
188
- endpoint,
189
- :header_params => header_params,
190
- :query_params => query_params,
191
- :body => post_body)
192
- end
193
-
194
- # Deletes a volume backup.
195
- # @param [String] volume_backup_id The OCID of the volume backup.
196
- # @param [Hash] opts the optional parameters
197
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
198
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
199
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
200
- #
201
- # @return [Response] A Response object with data of type nil
202
- def delete_volume_backup(volume_backup_id, opts = {})
203
- logger.debug "Calling operation BlockstorageClient#delete_volume_backup." if logger
204
-
205
- fail "Missing the required parameter 'volume_backup_id' when calling delete_volume_backup." if volume_backup_id.nil?
206
-
207
- path = "/volumeBackups/{volumeBackupId}".sub('{volumeBackupId}', volume_backup_id.to_s)
208
-
209
- # Query Params
210
- query_params = {}
211
-
212
- # Header Params
213
- header_params = {}
214
- header_params['accept'] = 'application/json'
215
- header_params['content-type'] = 'application/json'
216
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
217
-
218
- post_body = nil
219
-
220
- return @api_client.call_api(
221
- :DELETE,
222
- path,
223
- endpoint,
224
- :header_params => header_params,
225
- :query_params => query_params,
226
- :body => post_body)
227
- end
228
-
229
- # Gets information for the specified volume.
230
- # @param [String] volume_id The OCID of the volume.
231
- # @param [Hash] opts the optional parameters
232
- # @return [Response] A Response object with data of type OracleBMC::Core::Models::Volume
233
- def get_volume(volume_id, opts = {})
234
- logger.debug "Calling operation BlockstorageClient#get_volume." if logger
235
-
236
- fail "Missing the required parameter 'volume_id' when calling get_volume." if volume_id.nil?
237
-
238
- path = "/volumes/{volumeId}".sub('{volumeId}', volume_id.to_s)
239
-
240
- # Query Params
241
- query_params = {}
242
-
243
- # Header Params
244
- header_params = {}
245
- header_params['accept'] = 'application/json'
246
- header_params['content-type'] = 'application/json'
247
-
248
- post_body = nil
249
-
250
- return @api_client.call_api(
251
- :GET,
252
- path,
253
- endpoint,
254
- :header_params => header_params,
255
- :query_params => query_params,
256
- :body => post_body,
257
- :return_type => 'OracleBMC::Core::Models::Volume')
258
- end
259
-
260
- # Gets information for the specified volume backup.
261
- # @param [String] volume_backup_id The OCID of the volume backup.
262
- # @param [Hash] opts the optional parameters
263
- # @return [Response] A Response object with data of type OracleBMC::Core::Models::VolumeBackup
264
- def get_volume_backup(volume_backup_id, opts = {})
265
- logger.debug "Calling operation BlockstorageClient#get_volume_backup." if logger
266
-
267
- fail "Missing the required parameter 'volume_backup_id' when calling get_volume_backup." if volume_backup_id.nil?
268
-
269
- path = "/volumeBackups/{volumeBackupId}".sub('{volumeBackupId}', volume_backup_id.to_s)
270
-
271
- # Query Params
272
- query_params = {}
273
-
274
- # Header Params
275
- header_params = {}
276
- header_params['accept'] = 'application/json'
277
- header_params['content-type'] = 'application/json'
278
-
279
- post_body = nil
280
-
281
- return @api_client.call_api(
282
- :GET,
283
- path,
284
- endpoint,
285
- :header_params => header_params,
286
- :query_params => query_params,
287
- :body => post_body,
288
- :return_type => 'OracleBMC::Core::Models::VolumeBackup')
289
- end
290
-
291
- # Lists the volume backups in the specified compartment. You can filter the results by volume.
292
- #
293
- # @param [String] compartment_id The OCID of the compartment.
294
- # @param [Hash] opts the optional parameters
295
- # @option opts [String] :volume_id The OCID of the volume.
296
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
297
- #
298
- # Example: `500`
299
- #
300
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
301
- #
302
- # @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::VolumeBackup>
303
- def list_volume_backups(compartment_id, opts = {})
304
- logger.debug "Calling operation BlockstorageClient#list_volume_backups." if logger
305
-
306
- fail "Missing the required parameter 'compartment_id' when calling list_volume_backups." if compartment_id.nil?
307
-
308
- path = "/volumeBackups"
309
-
310
- # Query Params
311
- query_params = {}
312
- query_params[:'compartmentId'] = compartment_id
313
- query_params[:'volumeId'] = opts[:'volume_id'] if opts[:'volume_id']
314
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
315
- query_params[:'page'] = opts[:'page'] if opts[:'page']
316
-
317
- # Header Params
318
- header_params = {}
319
- header_params['accept'] = 'application/json'
320
- header_params['content-type'] = 'application/json'
321
-
322
- post_body = nil
323
-
324
- return @api_client.call_api(
325
- :GET,
326
- path,
327
- endpoint,
328
- :header_params => header_params,
329
- :query_params => query_params,
330
- :body => post_body,
331
- :return_type => 'Array<OracleBMC::Core::Models::VolumeBackup>')
332
- end
333
-
334
- # Lists the volumes in the specified compartment and Availability Domain.
335
- #
336
- # @param [String] compartment_id The OCID of the compartment.
337
- # @param [Hash] opts the optional parameters
338
- # @option opts [String] :availability_domain The name of the Availability Domain.
339
- #
340
- # Example: `Uocm:PHX-AD-1`
341
- #
342
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
343
- #
344
- # Example: `500`
345
- #
346
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
347
- #
348
- # @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::Volume>
349
- def list_volumes(compartment_id, opts = {})
350
- logger.debug "Calling operation BlockstorageClient#list_volumes." if logger
351
-
352
- fail "Missing the required parameter 'compartment_id' when calling list_volumes." if compartment_id.nil?
353
-
354
- path = "/volumes"
355
-
356
- # Query Params
357
- query_params = {}
358
- query_params[:'compartmentId'] = compartment_id
359
- query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
360
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
361
- query_params[:'page'] = opts[:'page'] if opts[:'page']
362
-
363
- # Header Params
364
- header_params = {}
365
- header_params['accept'] = 'application/json'
366
- header_params['content-type'] = 'application/json'
367
-
368
- post_body = nil
369
-
370
- return @api_client.call_api(
371
- :GET,
372
- path,
373
- endpoint,
374
- :header_params => header_params,
375
- :query_params => query_params,
376
- :body => post_body,
377
- :return_type => 'Array<OracleBMC::Core::Models::Volume>')
378
- end
379
-
380
- # Updates the specified volume's display name.
381
- # Avoid entering confidential information.
382
- #
383
- # @param [String] volume_id The OCID of the volume.
384
- # @param [UpdateVolumeDetails] update_volume_details Update volume's display name. Avoid entering confidential information.
385
- # @param [Hash] opts the optional parameters
386
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
387
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
388
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
389
- #
390
- # @return [Response] A Response object with data of type OracleBMC::Core::Models::Volume
391
- def update_volume(volume_id, update_volume_details, opts = {})
392
- logger.debug "Calling operation BlockstorageClient#update_volume." if logger
393
-
394
- fail "Missing the required parameter 'volume_id' when calling update_volume." if volume_id.nil?
395
- fail "Missing the required parameter 'update_volume_details' when calling update_volume." if update_volume_details.nil?
396
-
397
- path = "/volumes/{volumeId}".sub('{volumeId}', volume_id.to_s)
398
-
399
- # Query Params
400
- query_params = {}
401
-
402
- # Header Params
403
- header_params = {}
404
- header_params['accept'] = 'application/json'
405
- header_params['content-type'] = 'application/json'
406
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
407
-
408
- post_body = @api_client.object_to_http_body(update_volume_details)
409
-
410
- return @api_client.call_api(
411
- :PUT,
412
- path,
413
- endpoint,
414
- :header_params => header_params,
415
- :query_params => query_params,
416
- :body => post_body,
417
- :return_type => 'OracleBMC::Core::Models::Volume')
418
- end
419
-
420
- # Updates the display name for the specified volume backup.
421
- # Avoid entering confidential information.
422
- #
423
- # @param [String] volume_backup_id The OCID of the volume backup.
424
- # @param [UpdateVolumeBackupDetails] update_volume_backup_details Update volume backup fields
425
- # @param [Hash] opts the optional parameters
426
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
427
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
428
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
429
- #
430
- # @return [Response] A Response object with data of type OracleBMC::Core::Models::VolumeBackup
431
- def update_volume_backup(volume_backup_id, update_volume_backup_details, opts = {})
432
- logger.debug "Calling operation BlockstorageClient#update_volume_backup." if logger
433
-
434
- fail "Missing the required parameter 'volume_backup_id' when calling update_volume_backup." if volume_backup_id.nil?
435
- fail "Missing the required parameter 'update_volume_backup_details' when calling update_volume_backup." if update_volume_backup_details.nil?
436
-
437
- path = "/volumeBackups/{volumeBackupId}".sub('{volumeBackupId}', volume_backup_id.to_s)
438
-
439
- # Query Params
440
- query_params = {}
441
-
442
- # Header Params
443
- header_params = {}
444
- header_params['accept'] = 'application/json'
445
- header_params['content-type'] = 'application/json'
446
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
447
-
448
- post_body = @api_client.object_to_http_body(update_volume_backup_details)
449
-
450
- return @api_client.call_api(
451
- :PUT,
452
- path,
453
- endpoint,
454
- :header_params => header_params,
455
- :query_params => query_params,
456
- :body => post_body,
457
- :return_type => 'OracleBMC::Core::Models::VolumeBackup')
458
- end
459
- end
460
- end