oraclebmc 1.2.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{README.md → README_BMCS.md} +21 -26
- data/lib/oraclebmc.rb +1 -19
- metadata +16 -259
- data/lib/oraclebmc/api_client.rb +0 -306
- data/lib/oraclebmc/config.rb +0 -80
- data/lib/oraclebmc/config_file_loader.rb +0 -85
- data/lib/oraclebmc/core/blockstorage_client.rb +0 -460
- data/lib/oraclebmc/core/compute_client.rb +0 -1267
- data/lib/oraclebmc/core/core.rb +0 -112
- data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +0 -137
- data/lib/oraclebmc/core/models/attach_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/attach_volume_details.rb +0 -165
- data/lib/oraclebmc/core/models/capture_console_history_details.rb +0 -120
- data/lib/oraclebmc/core/models/console_history.rb +0 -213
- data/lib/oraclebmc/core/models/cpe.rb +0 -169
- data/lib/oraclebmc/core/models/create_cpe_details.rb +0 -145
- data/lib/oraclebmc/core/models/create_cross_connect_details.rb +0 -204
- data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_dhcp_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +0 -142
- data/lib/oraclebmc/core/models/create_drg_details.rb +0 -131
- data/lib/oraclebmc/core/models/create_image_details.rb +0 -159
- data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +0 -168
- data/lib/oraclebmc/core/models/create_private_ip_details.rb +0 -173
- data/lib/oraclebmc/core/models/create_route_table_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_security_list_details.rb +0 -164
- data/lib/oraclebmc/core/models/create_subnet_details.rb +0 -257
- data/lib/oraclebmc/core/models/create_vcn_details.rb +0 -171
- data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +0 -260
- data/lib/oraclebmc/core/models/create_vnic_details.rb +0 -214
- data/lib/oraclebmc/core/models/create_volume_backup_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_volume_details.rb +0 -170
- data/lib/oraclebmc/core/models/cross_connect.rb +0 -235
- data/lib/oraclebmc/core/models/cross_connect_group.rb +0 -187
- data/lib/oraclebmc/core/models/cross_connect_location.rb +0 -134
- data/lib/oraclebmc/core/models/cross_connect_mapping.rb +0 -190
- data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +0 -137
- data/lib/oraclebmc/core/models/cross_connect_status.rb +0 -200
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +0 -171
- data/lib/oraclebmc/core/models/dhcp_option.rb +0 -135
- data/lib/oraclebmc/core/models/dhcp_options.rb +0 -208
- data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +0 -141
- data/lib/oraclebmc/core/models/drg.rb +0 -186
- data/lib/oraclebmc/core/models/drg_attachment.rb +0 -208
- data/lib/oraclebmc/core/models/egress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/export_image_details.rb +0 -134
- data/lib/oraclebmc/core/models/export_image_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/export_image_via_object_storage_uri_details.rb +0 -130
- data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +0 -145
- data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +0 -212
- data/lib/oraclebmc/core/models/icmp_options.rb +0 -131
- data/lib/oraclebmc/core/models/image.rb +0 -245
- data/lib/oraclebmc/core/models/image_source_details.rb +0 -134
- data/lib/oraclebmc/core/models/image_source_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/image_source_via_object_storage_uri_details.rb +0 -128
- data/lib/oraclebmc/core/models/ingress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/instance.rb +0 -307
- data/lib/oraclebmc/core/models/instance_credentials.rb +0 -131
- data/lib/oraclebmc/core/models/internet_gateway.rb +0 -210
- data/lib/oraclebmc/core/models/ip_sec_connection.rb +0 -223
- data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +0 -153
- data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +0 -156
- data/lib/oraclebmc/core/models/launch_instance_details.rb +0 -336
- data/lib/oraclebmc/core/models/letter_of_authority.rb +0 -194
- data/lib/oraclebmc/core/models/port_range.rb +0 -133
- data/lib/oraclebmc/core/models/private_ip.rb +0 -248
- data/lib/oraclebmc/core/models/route_rule.rb +0 -135
- data/lib/oraclebmc/core/models/route_table.rb +0 -208
- data/lib/oraclebmc/core/models/security_list.rb +0 -219
- data/lib/oraclebmc/core/models/shape.rb +0 -122
- data/lib/oraclebmc/core/models/subnet.rb +0 -351
- data/lib/oraclebmc/core/models/tcp_options.rb +0 -135
- data/lib/oraclebmc/core/models/tunnel_config.rb +0 -151
- data/lib/oraclebmc/core/models/tunnel_status.rb +0 -178
- data/lib/oraclebmc/core/models/udp_options.rb +0 -135
- data/lib/oraclebmc/core/models/update_cpe_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_cross_connect_details.rb +0 -138
- data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_dhcp_details.rb +0 -132
- data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_drg_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_image_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_instance_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_private_ip_details.rb +0 -157
- data/lib/oraclebmc/core/models/update_route_table_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_security_list_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_subnet_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_vcn_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +0 -240
- data/lib/oraclebmc/core/models/update_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_volume_backup_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_volume_details.rb +0 -122
- data/lib/oraclebmc/core/models/vcn.rb +0 -276
- data/lib/oraclebmc/core/models/virtual_circuit.rb +0 -395
- data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +0 -137
- data/lib/oraclebmc/core/models/vnic.rb +0 -287
- data/lib/oraclebmc/core/models/vnic_attachment.rb +0 -250
- data/lib/oraclebmc/core/models/volume.rb +0 -210
- data/lib/oraclebmc/core/models/volume_attachment.rb +0 -246
- data/lib/oraclebmc/core/models/volume_backup.rb +0 -235
- data/lib/oraclebmc/core/util.rb +0 -1
- data/lib/oraclebmc/core/virtual_network_client.rb +0 -3419
- data/lib/oraclebmc/errors.rb +0 -80
- data/lib/oraclebmc/global_context.rb +0 -21
- data/lib/oraclebmc/identity/identity.rb +0 -51
- data/lib/oraclebmc/identity/identity_client.rb +0 -1983
- data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +0 -131
- data/lib/oraclebmc/identity/models/api_key.rb +0 -211
- data/lib/oraclebmc/identity/models/availability_domain.rb +0 -131
- data/lib/oraclebmc/identity/models/compartment.rb +0 -211
- data/lib/oraclebmc/identity/models/create_api_key_details.rb +0 -120
- data/lib/oraclebmc/identity/models/create_compartment_details.rb +0 -145
- data/lib/oraclebmc/identity/models/create_group_details.rb +0 -144
- data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +0 -212
- data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +0 -133
- data/lib/oraclebmc/identity/models/create_policy_details.rb +0 -173
- data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +0 -127
- data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +0 -154
- data/lib/oraclebmc/identity/models/create_swift_password_details.rb +0 -121
- data/lib/oraclebmc/identity/models/create_user_details.rb +0 -144
- data/lib/oraclebmc/identity/models/group.rb +0 -211
- data/lib/oraclebmc/identity/models/identity_provider.rb +0 -256
- data/lib/oraclebmc/identity/models/idp_group_mapping.rb +0 -220
- data/lib/oraclebmc/identity/models/policy.rb +0 -237
- data/lib/oraclebmc/identity/models/region.rb +0 -141
- data/lib/oraclebmc/identity/models/region_subscription.rb +0 -178
- data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +0 -180
- data/lib/oraclebmc/identity/models/swift_password.rb +0 -226
- data/lib/oraclebmc/identity/models/tenancy.rb +0 -158
- data/lib/oraclebmc/identity/models/ui_password.rb +0 -187
- data/lib/oraclebmc/identity/models/update_compartment_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_group_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +0 -160
- data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +0 -131
- data/lib/oraclebmc/identity/models/update_policy_details.rb +0 -148
- data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +0 -145
- data/lib/oraclebmc/identity/models/update_state_details.rb +0 -121
- data/lib/oraclebmc/identity/models/update_swift_password_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_user_details.rb +0 -120
- data/lib/oraclebmc/identity/models/user.rb +0 -217
- data/lib/oraclebmc/identity/models/user_group_membership.rb +0 -209
- data/lib/oraclebmc/identity/util.rb +0 -1
- data/lib/oraclebmc/internal/internal.rb +0 -11
- data/lib/oraclebmc/internal/util.rb +0 -69
- data/lib/oraclebmc/load_balancer/load_balancer.rb +0 -46
- data/lib/oraclebmc/load_balancer/load_balancer_client.rb +0 -1281
- data/lib/oraclebmc/load_balancer/models/backend.rb +0 -220
- data/lib/oraclebmc/load_balancer/models/backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/backend_set.rb +0 -179
- data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/certificate.rb +0 -167
- data/lib/oraclebmc/load_balancer/models/certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +0 -219
- data/lib/oraclebmc/load_balancer/models/health_checker.rb +0 -223
- data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +0 -222
- data/lib/oraclebmc/load_balancer/models/ip_address.rb +0 -139
- data/lib/oraclebmc/load_balancer/models/listener.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/load_balancer.rb +0 -280
- data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/session_persistence_configuration_details.rb +0 -141
- data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +0 -221
- data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +0 -123
- data/lib/oraclebmc/load_balancer/models/work_request.rb +0 -229
- data/lib/oraclebmc/load_balancer/models/work_request_error.rb +0 -145
- data/lib/oraclebmc/load_balancer/util.rb +0 -55
- data/lib/oraclebmc/regions.rb +0 -41
- data/lib/oraclebmc/response.rb +0 -86
- data/lib/oraclebmc/signer.rb +0 -119
- data/lib/oraclebmc/version.rb +0 -5
- data/lib/oraclebmc/waiter.rb +0 -111
@@ -1,1267 +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::ComputeClient
|
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 ComputeClient.
|
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, :ComputeClient) + '/20160918'
|
50
|
-
logger.info "ComputeClient 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 secondary VNIC and attaches it to the specified instance.
|
60
|
-
# For more information about secondary VNICs, see
|
61
|
-
# [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm).
|
62
|
-
#
|
63
|
-
# @param [AttachVnicDetails] attach_vnic_details Attach VNIC details.
|
64
|
-
# @param [Hash] opts the optional parameters
|
65
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
66
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
67
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
68
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
69
|
-
# may be rejected).
|
70
|
-
#
|
71
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::VnicAttachment
|
72
|
-
def attach_vnic(attach_vnic_details, opts = {})
|
73
|
-
logger.debug "Calling operation ComputeClient#attach_vnic." if logger
|
74
|
-
|
75
|
-
fail "Missing the required parameter 'attach_vnic_details' when calling attach_vnic." if attach_vnic_details.nil?
|
76
|
-
|
77
|
-
path = "/vnicAttachments/"
|
78
|
-
|
79
|
-
# Query Params
|
80
|
-
query_params = {}
|
81
|
-
|
82
|
-
# Header Params
|
83
|
-
header_params = {}
|
84
|
-
header_params['accept'] = 'application/json'
|
85
|
-
header_params['content-type'] = 'application/json'
|
86
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
87
|
-
|
88
|
-
post_body = @api_client.object_to_http_body(attach_vnic_details)
|
89
|
-
|
90
|
-
return @api_client.call_api(
|
91
|
-
:POST,
|
92
|
-
path,
|
93
|
-
endpoint,
|
94
|
-
:header_params => header_params,
|
95
|
-
:query_params => query_params,
|
96
|
-
:body => post_body,
|
97
|
-
:return_type => 'OracleBMC::Core::Models::VnicAttachment')
|
98
|
-
end
|
99
|
-
|
100
|
-
# Attaches the specified storage volume to the specified instance.
|
101
|
-
#
|
102
|
-
# @param [AttachVolumeDetails] attach_volume_details Attach volume request
|
103
|
-
# @param [Hash] opts the optional parameters
|
104
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
105
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
106
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
107
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
108
|
-
# may be rejected).
|
109
|
-
#
|
110
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::VolumeAttachment
|
111
|
-
def attach_volume(attach_volume_details, opts = {})
|
112
|
-
logger.debug "Calling operation ComputeClient#attach_volume." if logger
|
113
|
-
|
114
|
-
fail "Missing the required parameter 'attach_volume_details' when calling attach_volume." if attach_volume_details.nil?
|
115
|
-
|
116
|
-
path = "/volumeAttachments/"
|
117
|
-
|
118
|
-
# Query Params
|
119
|
-
query_params = {}
|
120
|
-
|
121
|
-
# Header Params
|
122
|
-
header_params = {}
|
123
|
-
header_params['accept'] = 'application/json'
|
124
|
-
header_params['content-type'] = 'application/json'
|
125
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
126
|
-
|
127
|
-
post_body = @api_client.object_to_http_body(attach_volume_details)
|
128
|
-
|
129
|
-
return @api_client.call_api(
|
130
|
-
:POST,
|
131
|
-
path,
|
132
|
-
endpoint,
|
133
|
-
:header_params => header_params,
|
134
|
-
:query_params => query_params,
|
135
|
-
:body => post_body,
|
136
|
-
:return_type => 'OracleBMC::Core::Models::VolumeAttachment')
|
137
|
-
end
|
138
|
-
|
139
|
-
# Captures the most recent serial console data (up to a megabyte) for the
|
140
|
-
# specified instance.
|
141
|
-
#
|
142
|
-
# The `CaptureConsoleHistory` operation works with the other console history operations
|
143
|
-
# as described below.
|
144
|
-
#
|
145
|
-
# 1. Use `CaptureConsoleHistory` to request the capture of up to a megabyte of the
|
146
|
-
# most recent console history. This call returns a `ConsoleHistory`
|
147
|
-
# object. The object will have a state of REQUESTED.
|
148
|
-
# 2. Wait for the capture operation to succeed by polling `GetConsoleHistory` with
|
149
|
-
# the identifier of the console history metadata. The state of the
|
150
|
-
# `ConsoleHistory` object will go from REQUESTED to GETTING-HISTORY and
|
151
|
-
# then SUCCEEDED (or FAILED).
|
152
|
-
# 3. Use `GetConsoleHistoryContent` to get the actual console history data (not the
|
153
|
-
# metadata).
|
154
|
-
# 4. Optionally, use `DeleteConsoleHistory` to delete the console history metadata
|
155
|
-
# and the console history data.
|
156
|
-
#
|
157
|
-
# @param [CaptureConsoleHistoryDetails] capture_console_history_details Console history details
|
158
|
-
# @param [Hash] opts the optional parameters
|
159
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
160
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
161
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
162
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
163
|
-
# may be rejected).
|
164
|
-
#
|
165
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::ConsoleHistory
|
166
|
-
def capture_console_history(capture_console_history_details, opts = {})
|
167
|
-
logger.debug "Calling operation ComputeClient#capture_console_history." if logger
|
168
|
-
|
169
|
-
fail "Missing the required parameter 'capture_console_history_details' when calling capture_console_history." if capture_console_history_details.nil?
|
170
|
-
|
171
|
-
path = "/instanceConsoleHistories/"
|
172
|
-
|
173
|
-
# Query Params
|
174
|
-
query_params = {}
|
175
|
-
|
176
|
-
# Header Params
|
177
|
-
header_params = {}
|
178
|
-
header_params['accept'] = 'application/json'
|
179
|
-
header_params['content-type'] = 'application/json'
|
180
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
181
|
-
|
182
|
-
post_body = @api_client.object_to_http_body(capture_console_history_details)
|
183
|
-
|
184
|
-
return @api_client.call_api(
|
185
|
-
:POST,
|
186
|
-
path,
|
187
|
-
endpoint,
|
188
|
-
:header_params => header_params,
|
189
|
-
:query_params => query_params,
|
190
|
-
:body => post_body,
|
191
|
-
:return_type => 'OracleBMC::Core::Models::ConsoleHistory')
|
192
|
-
end
|
193
|
-
|
194
|
-
# Creates a boot disk image for the specified instance or imports an exported image from the Oracle Bare Metal Cloud Object Storage Service.
|
195
|
-
#
|
196
|
-
# When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and
|
197
|
-
# the OCID of the compartment containing that instance. For more information about images,
|
198
|
-
# see [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm).
|
199
|
-
#
|
200
|
-
# When importing an exported image from the Object Storage Service, you specify the source information
|
201
|
-
# in {#image_source_details image_source_details}.
|
202
|
-
#
|
203
|
-
# When importing an image based on the namespace, bucket name, and object name,
|
204
|
-
# use {#image_source_via_object_storage_tuple_details image_source_via_object_storage_tuple_details}.
|
205
|
-
#
|
206
|
-
# When importing an image based on the Object Storage Service URL, use
|
207
|
-
# {#image_source_via_object_storage_uri_details image_source_via_object_storage_uri_details}.
|
208
|
-
# See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth)
|
209
|
-
# for constructing URLs for image import/export.
|
210
|
-
#
|
211
|
-
# For more information about importing exported images, see
|
212
|
-
# [Image Import/Export](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm).
|
213
|
-
#
|
214
|
-
# You may optionally specify a *display name* for the image, which is simply a friendly name or description.
|
215
|
-
# It does not have to be unique, and you can change it. See {#update_image update_image}.
|
216
|
-
# Avoid entering confidential information.
|
217
|
-
#
|
218
|
-
# @param [CreateImageDetails] create_image_details Image creation details
|
219
|
-
# @param [Hash] opts the optional parameters
|
220
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
221
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
222
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
223
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
224
|
-
# may be rejected).
|
225
|
-
#
|
226
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Image
|
227
|
-
def create_image(create_image_details, opts = {})
|
228
|
-
logger.debug "Calling operation ComputeClient#create_image." if logger
|
229
|
-
|
230
|
-
fail "Missing the required parameter 'create_image_details' when calling create_image." if create_image_details.nil?
|
231
|
-
|
232
|
-
path = "/images/"
|
233
|
-
|
234
|
-
# Query Params
|
235
|
-
query_params = {}
|
236
|
-
|
237
|
-
# Header Params
|
238
|
-
header_params = {}
|
239
|
-
header_params['accept'] = 'application/json'
|
240
|
-
header_params['content-type'] = 'application/json'
|
241
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
242
|
-
|
243
|
-
post_body = @api_client.object_to_http_body(create_image_details)
|
244
|
-
|
245
|
-
return @api_client.call_api(
|
246
|
-
:POST,
|
247
|
-
path,
|
248
|
-
endpoint,
|
249
|
-
:header_params => header_params,
|
250
|
-
:query_params => query_params,
|
251
|
-
:body => post_body,
|
252
|
-
:return_type => 'OracleBMC::Core::Models::Image')
|
253
|
-
end
|
254
|
-
|
255
|
-
# Deletes the specified console history metadata and the console history data.
|
256
|
-
# @param [String] instance_console_history_id The OCID of the console history.
|
257
|
-
# @param [Hash] opts the optional parameters
|
258
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
259
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
260
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
261
|
-
#
|
262
|
-
# @return [Response] A Response object with data of type nil
|
263
|
-
def delete_console_history(instance_console_history_id, opts = {})
|
264
|
-
logger.debug "Calling operation ComputeClient#delete_console_history." if logger
|
265
|
-
|
266
|
-
fail "Missing the required parameter 'instance_console_history_id' when calling delete_console_history." if instance_console_history_id.nil?
|
267
|
-
|
268
|
-
path = "/instanceConsoleHistories/{instanceConsoleHistoryId}".sub('{instanceConsoleHistoryId}', instance_console_history_id.to_s)
|
269
|
-
|
270
|
-
# Query Params
|
271
|
-
query_params = {}
|
272
|
-
|
273
|
-
# Header Params
|
274
|
-
header_params = {}
|
275
|
-
header_params['accept'] = 'application/json'
|
276
|
-
header_params['content-type'] = 'application/json'
|
277
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
278
|
-
|
279
|
-
post_body = nil
|
280
|
-
|
281
|
-
return @api_client.call_api(
|
282
|
-
:DELETE,
|
283
|
-
path,
|
284
|
-
endpoint,
|
285
|
-
:header_params => header_params,
|
286
|
-
:query_params => query_params,
|
287
|
-
:body => post_body)
|
288
|
-
end
|
289
|
-
|
290
|
-
# Deletes an image.
|
291
|
-
# @param [String] image_id The OCID of the image.
|
292
|
-
# @param [Hash] opts the optional parameters
|
293
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
294
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
295
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
296
|
-
#
|
297
|
-
# @return [Response] A Response object with data of type nil
|
298
|
-
def delete_image(image_id, opts = {})
|
299
|
-
logger.debug "Calling operation ComputeClient#delete_image." if logger
|
300
|
-
|
301
|
-
fail "Missing the required parameter 'image_id' when calling delete_image." if image_id.nil?
|
302
|
-
|
303
|
-
path = "/images/{imageId}".sub('{imageId}', image_id.to_s)
|
304
|
-
|
305
|
-
# Query Params
|
306
|
-
query_params = {}
|
307
|
-
|
308
|
-
# Header Params
|
309
|
-
header_params = {}
|
310
|
-
header_params['accept'] = 'application/json'
|
311
|
-
header_params['content-type'] = 'application/json'
|
312
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
313
|
-
|
314
|
-
post_body = nil
|
315
|
-
|
316
|
-
return @api_client.call_api(
|
317
|
-
:DELETE,
|
318
|
-
path,
|
319
|
-
endpoint,
|
320
|
-
:header_params => header_params,
|
321
|
-
:query_params => query_params,
|
322
|
-
:body => post_body)
|
323
|
-
end
|
324
|
-
|
325
|
-
# Detaches and deletes the specified secondary VNIC.
|
326
|
-
# This operation cannot be used on the instance's primary VNIC.
|
327
|
-
# When you terminate an instance, all attached VNICs (primary
|
328
|
-
# and secondary) are automatically detached and deleted.
|
329
|
-
#
|
330
|
-
# @param [String] vnic_attachment_id The OCID of the VNIC attachment.
|
331
|
-
# @param [Hash] opts the optional parameters
|
332
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
333
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
334
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
335
|
-
#
|
336
|
-
# @return [Response] A Response object with data of type nil
|
337
|
-
def detach_vnic(vnic_attachment_id, opts = {})
|
338
|
-
logger.debug "Calling operation ComputeClient#detach_vnic." if logger
|
339
|
-
|
340
|
-
fail "Missing the required parameter 'vnic_attachment_id' when calling detach_vnic." if vnic_attachment_id.nil?
|
341
|
-
|
342
|
-
path = "/vnicAttachments/{vnicAttachmentId}".sub('{vnicAttachmentId}', vnic_attachment_id.to_s)
|
343
|
-
|
344
|
-
# Query Params
|
345
|
-
query_params = {}
|
346
|
-
|
347
|
-
# Header Params
|
348
|
-
header_params = {}
|
349
|
-
header_params['accept'] = 'application/json'
|
350
|
-
header_params['content-type'] = 'application/json'
|
351
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
352
|
-
|
353
|
-
post_body = nil
|
354
|
-
|
355
|
-
return @api_client.call_api(
|
356
|
-
:DELETE,
|
357
|
-
path,
|
358
|
-
endpoint,
|
359
|
-
:header_params => header_params,
|
360
|
-
:query_params => query_params,
|
361
|
-
:body => post_body)
|
362
|
-
end
|
363
|
-
|
364
|
-
# Detaches a storage volume from an instance. You must specify the OCID of the volume attachment.
|
365
|
-
#
|
366
|
-
# This is an asynchronous operation; the attachment's `lifecycleState` will change to DETACHING temporarily
|
367
|
-
# until the attachment is completely removed.
|
368
|
-
#
|
369
|
-
# @param [String] volume_attachment_id The OCID of the volume attachment.
|
370
|
-
# @param [Hash] opts the optional parameters
|
371
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
372
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
373
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
374
|
-
#
|
375
|
-
# @return [Response] A Response object with data of type nil
|
376
|
-
def detach_volume(volume_attachment_id, opts = {})
|
377
|
-
logger.debug "Calling operation ComputeClient#detach_volume." if logger
|
378
|
-
|
379
|
-
fail "Missing the required parameter 'volume_attachment_id' when calling detach_volume." if volume_attachment_id.nil?
|
380
|
-
|
381
|
-
path = "/volumeAttachments/{volumeAttachmentId}".sub('{volumeAttachmentId}', volume_attachment_id.to_s)
|
382
|
-
|
383
|
-
# Query Params
|
384
|
-
query_params = {}
|
385
|
-
|
386
|
-
# Header Params
|
387
|
-
header_params = {}
|
388
|
-
header_params['accept'] = 'application/json'
|
389
|
-
header_params['content-type'] = 'application/json'
|
390
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
391
|
-
|
392
|
-
post_body = nil
|
393
|
-
|
394
|
-
return @api_client.call_api(
|
395
|
-
:DELETE,
|
396
|
-
path,
|
397
|
-
endpoint,
|
398
|
-
:header_params => header_params,
|
399
|
-
:query_params => query_params,
|
400
|
-
:body => post_body)
|
401
|
-
end
|
402
|
-
|
403
|
-
# Exports the specified image to the Oracle Bare Metal Cloud Object Storage Service. You can use the Object Storage Service URL,
|
404
|
-
# or the namespace, bucket name, and object name when specifying the location to export to.
|
405
|
-
#
|
406
|
-
# For more information about exporting images, see [Image Import/Export](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm).
|
407
|
-
#
|
408
|
-
# To perform an image export, you need write access to the Object Storage Service bucket for the image,
|
409
|
-
# see [Let Users Write Objects to Object Storage Buckets](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm#Let4).
|
410
|
-
#
|
411
|
-
# See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth)
|
412
|
-
# for constructing URLs for image import/export.
|
413
|
-
#
|
414
|
-
# @param [String] image_id The OCID of the image.
|
415
|
-
# @param [ExportImageDetails] export_image_details Details for the image export.
|
416
|
-
# @param [Hash] opts the optional parameters
|
417
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
418
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
419
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
420
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
421
|
-
# may be rejected).
|
422
|
-
#
|
423
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
424
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
425
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
426
|
-
#
|
427
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Image
|
428
|
-
def export_image(image_id, export_image_details, opts = {})
|
429
|
-
logger.debug "Calling operation ComputeClient#export_image." if logger
|
430
|
-
|
431
|
-
fail "Missing the required parameter 'image_id' when calling export_image." if image_id.nil?
|
432
|
-
fail "Missing the required parameter 'export_image_details' when calling export_image." if export_image_details.nil?
|
433
|
-
|
434
|
-
path = "/images/{imageId}/actions/export".sub('{imageId}', image_id.to_s)
|
435
|
-
|
436
|
-
# Query Params
|
437
|
-
query_params = {}
|
438
|
-
|
439
|
-
# Header Params
|
440
|
-
header_params = {}
|
441
|
-
header_params['accept'] = 'application/json'
|
442
|
-
header_params['content-type'] = 'application/json'
|
443
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
444
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
445
|
-
|
446
|
-
post_body = @api_client.object_to_http_body(export_image_details)
|
447
|
-
|
448
|
-
return @api_client.call_api(
|
449
|
-
:POST,
|
450
|
-
path,
|
451
|
-
endpoint,
|
452
|
-
:header_params => header_params,
|
453
|
-
:query_params => query_params,
|
454
|
-
:body => post_body,
|
455
|
-
:return_type => 'OracleBMC::Core::Models::Image')
|
456
|
-
end
|
457
|
-
|
458
|
-
# Shows the metadata for the specified console history.
|
459
|
-
# See {#capture_console_history capture_console_history}
|
460
|
-
# for details about using the console history operations.
|
461
|
-
#
|
462
|
-
# @param [String] instance_console_history_id The OCID of the console history.
|
463
|
-
# @param [Hash] opts the optional parameters
|
464
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::ConsoleHistory
|
465
|
-
def get_console_history(instance_console_history_id, opts = {})
|
466
|
-
logger.debug "Calling operation ComputeClient#get_console_history." if logger
|
467
|
-
|
468
|
-
fail "Missing the required parameter 'instance_console_history_id' when calling get_console_history." if instance_console_history_id.nil?
|
469
|
-
|
470
|
-
path = "/instanceConsoleHistories/{instanceConsoleHistoryId}".sub('{instanceConsoleHistoryId}', instance_console_history_id.to_s)
|
471
|
-
|
472
|
-
# Query Params
|
473
|
-
query_params = {}
|
474
|
-
|
475
|
-
# Header Params
|
476
|
-
header_params = {}
|
477
|
-
header_params['accept'] = 'application/json'
|
478
|
-
header_params['content-type'] = 'application/json'
|
479
|
-
|
480
|
-
post_body = nil
|
481
|
-
|
482
|
-
return @api_client.call_api(
|
483
|
-
:GET,
|
484
|
-
path,
|
485
|
-
endpoint,
|
486
|
-
:header_params => header_params,
|
487
|
-
:query_params => query_params,
|
488
|
-
:body => post_body,
|
489
|
-
:return_type => 'OracleBMC::Core::Models::ConsoleHistory')
|
490
|
-
end
|
491
|
-
|
492
|
-
# Gets the actual console history data (not the metadata).
|
493
|
-
# See {#capture_console_history capture_console_history}
|
494
|
-
# for details about using the console history operations.
|
495
|
-
#
|
496
|
-
# @param [String] instance_console_history_id The OCID of the console history.
|
497
|
-
# @param [Hash] opts the optional parameters
|
498
|
-
# @option opts [Integer] :offset Offset of the snapshot data to retrieve.
|
499
|
-
# @option opts [Integer] :length Length of the snapshot data to retrieve.
|
500
|
-
# @return [Response] A Response object with data of type String
|
501
|
-
def get_console_history_content(instance_console_history_id, opts = {})
|
502
|
-
logger.debug "Calling operation ComputeClient#get_console_history_content." if logger
|
503
|
-
|
504
|
-
fail "Missing the required parameter 'instance_console_history_id' when calling get_console_history_content." if instance_console_history_id.nil?
|
505
|
-
|
506
|
-
path = "/instanceConsoleHistories/{instanceConsoleHistoryId}/data".sub('{instanceConsoleHistoryId}', instance_console_history_id.to_s)
|
507
|
-
|
508
|
-
# Query Params
|
509
|
-
query_params = {}
|
510
|
-
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
511
|
-
query_params[:'length'] = opts[:'length'] if opts[:'length']
|
512
|
-
|
513
|
-
# Header Params
|
514
|
-
header_params = {}
|
515
|
-
header_params['accept'] = 'application/json'
|
516
|
-
header_params['content-type'] = 'application/json'
|
517
|
-
|
518
|
-
post_body = nil
|
519
|
-
|
520
|
-
return @api_client.call_api(
|
521
|
-
:GET,
|
522
|
-
path,
|
523
|
-
endpoint,
|
524
|
-
:header_params => header_params,
|
525
|
-
:query_params => query_params,
|
526
|
-
:body => post_body,
|
527
|
-
:return_type => 'String')
|
528
|
-
end
|
529
|
-
|
530
|
-
# Gets the specified image.
|
531
|
-
# @param [String] image_id The OCID of the image.
|
532
|
-
# @param [Hash] opts the optional parameters
|
533
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Image
|
534
|
-
def get_image(image_id, opts = {})
|
535
|
-
logger.debug "Calling operation ComputeClient#get_image." if logger
|
536
|
-
|
537
|
-
fail "Missing the required parameter 'image_id' when calling get_image." if image_id.nil?
|
538
|
-
|
539
|
-
path = "/images/{imageId}".sub('{imageId}', image_id.to_s)
|
540
|
-
|
541
|
-
# Query Params
|
542
|
-
query_params = {}
|
543
|
-
|
544
|
-
# Header Params
|
545
|
-
header_params = {}
|
546
|
-
header_params['accept'] = 'application/json'
|
547
|
-
header_params['content-type'] = 'application/json'
|
548
|
-
|
549
|
-
post_body = nil
|
550
|
-
|
551
|
-
return @api_client.call_api(
|
552
|
-
:GET,
|
553
|
-
path,
|
554
|
-
endpoint,
|
555
|
-
:header_params => header_params,
|
556
|
-
:query_params => query_params,
|
557
|
-
:body => post_body,
|
558
|
-
:return_type => 'OracleBMC::Core::Models::Image')
|
559
|
-
end
|
560
|
-
|
561
|
-
# Gets information about the specified instance.
|
562
|
-
# @param [String] instance_id The OCID of the instance.
|
563
|
-
# @param [Hash] opts the optional parameters
|
564
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Instance
|
565
|
-
def get_instance(instance_id, opts = {})
|
566
|
-
logger.debug "Calling operation ComputeClient#get_instance." if logger
|
567
|
-
|
568
|
-
fail "Missing the required parameter 'instance_id' when calling get_instance." if instance_id.nil?
|
569
|
-
|
570
|
-
path = "/instances/{instanceId}".sub('{instanceId}', instance_id.to_s)
|
571
|
-
|
572
|
-
# Query Params
|
573
|
-
query_params = {}
|
574
|
-
|
575
|
-
# Header Params
|
576
|
-
header_params = {}
|
577
|
-
header_params['accept'] = 'application/json'
|
578
|
-
header_params['content-type'] = 'application/json'
|
579
|
-
|
580
|
-
post_body = nil
|
581
|
-
|
582
|
-
return @api_client.call_api(
|
583
|
-
:GET,
|
584
|
-
path,
|
585
|
-
endpoint,
|
586
|
-
:header_params => header_params,
|
587
|
-
:query_params => query_params,
|
588
|
-
:body => post_body,
|
589
|
-
:return_type => 'OracleBMC::Core::Models::Instance')
|
590
|
-
end
|
591
|
-
|
592
|
-
# Gets the information for the specified VNIC attachment.
|
593
|
-
#
|
594
|
-
# @param [String] vnic_attachment_id The OCID of the VNIC attachment.
|
595
|
-
# @param [Hash] opts the optional parameters
|
596
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::VnicAttachment
|
597
|
-
def get_vnic_attachment(vnic_attachment_id, opts = {})
|
598
|
-
logger.debug "Calling operation ComputeClient#get_vnic_attachment." if logger
|
599
|
-
|
600
|
-
fail "Missing the required parameter 'vnic_attachment_id' when calling get_vnic_attachment." if vnic_attachment_id.nil?
|
601
|
-
|
602
|
-
path = "/vnicAttachments/{vnicAttachmentId}".sub('{vnicAttachmentId}', vnic_attachment_id.to_s)
|
603
|
-
|
604
|
-
# Query Params
|
605
|
-
query_params = {}
|
606
|
-
|
607
|
-
# Header Params
|
608
|
-
header_params = {}
|
609
|
-
header_params['accept'] = 'application/json'
|
610
|
-
header_params['content-type'] = 'application/json'
|
611
|
-
|
612
|
-
post_body = nil
|
613
|
-
|
614
|
-
return @api_client.call_api(
|
615
|
-
:GET,
|
616
|
-
path,
|
617
|
-
endpoint,
|
618
|
-
:header_params => header_params,
|
619
|
-
:query_params => query_params,
|
620
|
-
:body => post_body,
|
621
|
-
:return_type => 'OracleBMC::Core::Models::VnicAttachment')
|
622
|
-
end
|
623
|
-
|
624
|
-
# Gets information about the specified volume attachment.
|
625
|
-
# @param [String] volume_attachment_id The OCID of the volume attachment.
|
626
|
-
# @param [Hash] opts the optional parameters
|
627
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::VolumeAttachment
|
628
|
-
def get_volume_attachment(volume_attachment_id, opts = {})
|
629
|
-
logger.debug "Calling operation ComputeClient#get_volume_attachment." if logger
|
630
|
-
|
631
|
-
fail "Missing the required parameter 'volume_attachment_id' when calling get_volume_attachment." if volume_attachment_id.nil?
|
632
|
-
|
633
|
-
path = "/volumeAttachments/{volumeAttachmentId}".sub('{volumeAttachmentId}', volume_attachment_id.to_s)
|
634
|
-
|
635
|
-
# Query Params
|
636
|
-
query_params = {}
|
637
|
-
|
638
|
-
# Header Params
|
639
|
-
header_params = {}
|
640
|
-
header_params['accept'] = 'application/json'
|
641
|
-
header_params['content-type'] = 'application/json'
|
642
|
-
|
643
|
-
post_body = nil
|
644
|
-
|
645
|
-
return @api_client.call_api(
|
646
|
-
:GET,
|
647
|
-
path,
|
648
|
-
endpoint,
|
649
|
-
:header_params => header_params,
|
650
|
-
:query_params => query_params,
|
651
|
-
:body => post_body,
|
652
|
-
:return_type => 'OracleBMC::Core::Models::VolumeAttachment')
|
653
|
-
end
|
654
|
-
|
655
|
-
# Gets the generated credentials for the instance. Only works for Windows instances. The returned credentials
|
656
|
-
# are only valid for the initial login.
|
657
|
-
#
|
658
|
-
# @param [String] instance_id The OCID of the instance.
|
659
|
-
# @param [Hash] opts the optional parameters
|
660
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::InstanceCredentials
|
661
|
-
def get_windows_instance_initial_credentials(instance_id, opts = {})
|
662
|
-
logger.debug "Calling operation ComputeClient#get_windows_instance_initial_credentials." if logger
|
663
|
-
|
664
|
-
fail "Missing the required parameter 'instance_id' when calling get_windows_instance_initial_credentials." if instance_id.nil?
|
665
|
-
|
666
|
-
path = "/instances/{instanceId}/initialCredentials".sub('{instanceId}', instance_id.to_s)
|
667
|
-
|
668
|
-
# Query Params
|
669
|
-
query_params = {}
|
670
|
-
|
671
|
-
# Header Params
|
672
|
-
header_params = {}
|
673
|
-
header_params['accept'] = 'application/json'
|
674
|
-
header_params['content-type'] = 'application/json'
|
675
|
-
|
676
|
-
post_body = nil
|
677
|
-
|
678
|
-
return @api_client.call_api(
|
679
|
-
:GET,
|
680
|
-
path,
|
681
|
-
endpoint,
|
682
|
-
:header_params => header_params,
|
683
|
-
:query_params => query_params,
|
684
|
-
:body => post_body,
|
685
|
-
:return_type => 'OracleBMC::Core::Models::InstanceCredentials')
|
686
|
-
end
|
687
|
-
|
688
|
-
# Performs one of the power actions (start, stop, softreset, or reset)
|
689
|
-
# on the specified instance.
|
690
|
-
#
|
691
|
-
# **start** - power on
|
692
|
-
#
|
693
|
-
# **stop** - power off
|
694
|
-
#
|
695
|
-
# **softreset** - ACPI shutdown and power on
|
696
|
-
#
|
697
|
-
# **reset** - power off and power on
|
698
|
-
#
|
699
|
-
# Note that the **stop** state has no effect on the resources you consume.
|
700
|
-
# Billing continues for instances that you stop, and related resources continue
|
701
|
-
# to apply against any relevant quotas. You must terminate an instance
|
702
|
-
# ({#terminate_instance terminate_instance})
|
703
|
-
# to remove its resources from billing and quotas.
|
704
|
-
#
|
705
|
-
# @param [String] instance_id The OCID of the instance.
|
706
|
-
# @param [String] action The action to perform on the instance.
|
707
|
-
# @param [Hash] opts the optional parameters
|
708
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
709
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
710
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
711
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
712
|
-
# may be rejected).
|
713
|
-
#
|
714
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
715
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
716
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
717
|
-
#
|
718
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Instance
|
719
|
-
def instance_action(instance_id, action, opts = {})
|
720
|
-
logger.debug "Calling operation ComputeClient#instance_action." if logger
|
721
|
-
|
722
|
-
fail "Missing the required parameter 'instance_id' when calling instance_action." if instance_id.nil?
|
723
|
-
fail "Missing the required parameter 'action' when calling instance_action." if action.nil?
|
724
|
-
unless ['STOP', 'START', 'SOFTRESET', 'RESET'].include?(action)
|
725
|
-
fail "Invalid value for 'action', must be one of STOP, START, SOFTRESET, RESET."
|
726
|
-
end
|
727
|
-
|
728
|
-
path = "/instances/{instanceId}".sub('{instanceId}', instance_id.to_s)
|
729
|
-
|
730
|
-
# Query Params
|
731
|
-
query_params = {}
|
732
|
-
query_params[:'action'] = action
|
733
|
-
|
734
|
-
# Header Params
|
735
|
-
header_params = {}
|
736
|
-
header_params['accept'] = 'application/json'
|
737
|
-
header_params['content-type'] = 'application/json'
|
738
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
739
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
740
|
-
|
741
|
-
post_body = nil
|
742
|
-
|
743
|
-
return @api_client.call_api(
|
744
|
-
:POST,
|
745
|
-
path,
|
746
|
-
endpoint,
|
747
|
-
:header_params => header_params,
|
748
|
-
:query_params => query_params,
|
749
|
-
:body => post_body,
|
750
|
-
:return_type => 'OracleBMC::Core::Models::Instance')
|
751
|
-
end
|
752
|
-
|
753
|
-
# Creates a new instance in the specified compartment and the specified Availability Domain.
|
754
|
-
# For general information about instances, see
|
755
|
-
# [Overview of the Compute Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Concepts/computeoverview.htm).
|
756
|
-
#
|
757
|
-
# For information about access control and compartments, see
|
758
|
-
# [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
|
759
|
-
#
|
760
|
-
# For information about Availability Domains, see
|
761
|
-
# [Regions and Availability Domains](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm).
|
762
|
-
# To get a list of Availability Domains, use the `ListAvailabilityDomains` operation
|
763
|
-
# in the Identity and Access Management Service API.
|
764
|
-
#
|
765
|
-
# All Oracle Bare Metal Cloud Services resources, including instances, get an Oracle-assigned,
|
766
|
-
# unique ID called an Oracle Cloud Identifier (OCID).
|
767
|
-
# When you create a resource, you can find its OCID in the response. You can
|
768
|
-
# also retrieve a resource's OCID by using a List API operation
|
769
|
-
# on that resource type, or by viewing the resource in the Console.
|
770
|
-
#
|
771
|
-
# When you launch an instance, it is automatically attached to a virtual
|
772
|
-
# network interface card (VNIC), called the *primary VNIC*. The VNIC
|
773
|
-
# has a private IP address from the subnet's CIDR. You can either assign a
|
774
|
-
# private IP address of your choice or let Oracle automatically assign one.
|
775
|
-
# You can choose whether the instance has a public IP address. To retrieve the
|
776
|
-
# addresses, use the {#list_vnic_attachments list_vnic_attachments}
|
777
|
-
# operation to get the VNIC ID for the instance, and then call
|
778
|
-
# {#get_vnic get_vnic} with the VNIC ID.
|
779
|
-
#
|
780
|
-
# You can later add secondary VNICs to an instance. For more information, see
|
781
|
-
# [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm).
|
782
|
-
#
|
783
|
-
# @param [LaunchInstanceDetails] launch_instance_details Instance details
|
784
|
-
# @param [Hash] opts the optional parameters
|
785
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
786
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
787
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
788
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
789
|
-
# may be rejected).
|
790
|
-
#
|
791
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Instance
|
792
|
-
def launch_instance(launch_instance_details, opts = {})
|
793
|
-
logger.debug "Calling operation ComputeClient#launch_instance." if logger
|
794
|
-
|
795
|
-
fail "Missing the required parameter 'launch_instance_details' when calling launch_instance." if launch_instance_details.nil?
|
796
|
-
|
797
|
-
path = "/instances/"
|
798
|
-
|
799
|
-
# Query Params
|
800
|
-
query_params = {}
|
801
|
-
|
802
|
-
# Header Params
|
803
|
-
header_params = {}
|
804
|
-
header_params['accept'] = 'application/json'
|
805
|
-
header_params['content-type'] = 'application/json'
|
806
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
807
|
-
|
808
|
-
post_body = @api_client.object_to_http_body(launch_instance_details)
|
809
|
-
|
810
|
-
return @api_client.call_api(
|
811
|
-
:POST,
|
812
|
-
path,
|
813
|
-
endpoint,
|
814
|
-
:header_params => header_params,
|
815
|
-
:query_params => query_params,
|
816
|
-
:body => post_body,
|
817
|
-
:return_type => 'OracleBMC::Core::Models::Instance')
|
818
|
-
end
|
819
|
-
|
820
|
-
# Lists the console history metadata for the specified compartment or instance.
|
821
|
-
#
|
822
|
-
# @param [String] compartment_id The OCID of the compartment.
|
823
|
-
# @param [Hash] opts the optional parameters
|
824
|
-
# @option opts [String] :availability_domain The name of the Availability Domain.
|
825
|
-
#
|
826
|
-
# Example: `Uocm:PHX-AD-1`
|
827
|
-
#
|
828
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
829
|
-
#
|
830
|
-
# Example: `500`
|
831
|
-
#
|
832
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
833
|
-
#
|
834
|
-
# @option opts [String] :instance_id The OCID of the instance.
|
835
|
-
# @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::ConsoleHistory>
|
836
|
-
def list_console_histories(compartment_id, opts = {})
|
837
|
-
logger.debug "Calling operation ComputeClient#list_console_histories." if logger
|
838
|
-
|
839
|
-
fail "Missing the required parameter 'compartment_id' when calling list_console_histories." if compartment_id.nil?
|
840
|
-
|
841
|
-
path = "/instanceConsoleHistories/"
|
842
|
-
|
843
|
-
# Query Params
|
844
|
-
query_params = {}
|
845
|
-
query_params[:'compartmentId'] = compartment_id
|
846
|
-
query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
|
847
|
-
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
848
|
-
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
849
|
-
query_params[:'instanceId'] = opts[:'instance_id'] if opts[:'instance_id']
|
850
|
-
|
851
|
-
# Header Params
|
852
|
-
header_params = {}
|
853
|
-
header_params['accept'] = 'application/json'
|
854
|
-
header_params['content-type'] = 'application/json'
|
855
|
-
|
856
|
-
post_body = nil
|
857
|
-
|
858
|
-
return @api_client.call_api(
|
859
|
-
:GET,
|
860
|
-
path,
|
861
|
-
endpoint,
|
862
|
-
:header_params => header_params,
|
863
|
-
:query_params => query_params,
|
864
|
-
:body => post_body,
|
865
|
-
:return_type => 'Array<OracleBMC::Core::Models::ConsoleHistory>')
|
866
|
-
end
|
867
|
-
|
868
|
-
# Lists the available images in the specified compartment. For more
|
869
|
-
# information about images, see
|
870
|
-
# [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm).
|
871
|
-
#
|
872
|
-
# @param [String] compartment_id The OCID of the compartment.
|
873
|
-
# @param [Hash] opts the optional parameters
|
874
|
-
# @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.
|
875
|
-
# Avoid entering confidential information.
|
876
|
-
#
|
877
|
-
# Example: `My new resource`
|
878
|
-
#
|
879
|
-
# @option opts [String] :operating_system The image's operating system.
|
880
|
-
#
|
881
|
-
# Example: `Oracle Linux`
|
882
|
-
#
|
883
|
-
# @option opts [String] :operating_system_version The image's operating system version.
|
884
|
-
#
|
885
|
-
# Example: `7.2`
|
886
|
-
#
|
887
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
888
|
-
#
|
889
|
-
# Example: `500`
|
890
|
-
#
|
891
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
892
|
-
#
|
893
|
-
# @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::Image>
|
894
|
-
def list_images(compartment_id, opts = {})
|
895
|
-
logger.debug "Calling operation ComputeClient#list_images." if logger
|
896
|
-
|
897
|
-
fail "Missing the required parameter 'compartment_id' when calling list_images." if compartment_id.nil?
|
898
|
-
|
899
|
-
path = "/images/"
|
900
|
-
|
901
|
-
# Query Params
|
902
|
-
query_params = {}
|
903
|
-
query_params[:'compartmentId'] = compartment_id
|
904
|
-
query_params[:'displayName'] = opts[:'display_name'] if opts[:'display_name']
|
905
|
-
query_params[:'operatingSystem'] = opts[:'operating_system'] if opts[:'operating_system']
|
906
|
-
query_params[:'operatingSystemVersion'] = opts[:'operating_system_version'] if opts[:'operating_system_version']
|
907
|
-
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
908
|
-
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
909
|
-
|
910
|
-
# Header Params
|
911
|
-
header_params = {}
|
912
|
-
header_params['accept'] = 'application/json'
|
913
|
-
header_params['content-type'] = 'application/json'
|
914
|
-
|
915
|
-
post_body = nil
|
916
|
-
|
917
|
-
return @api_client.call_api(
|
918
|
-
:GET,
|
919
|
-
path,
|
920
|
-
endpoint,
|
921
|
-
:header_params => header_params,
|
922
|
-
:query_params => query_params,
|
923
|
-
:body => post_body,
|
924
|
-
:return_type => 'Array<OracleBMC::Core::Models::Image>')
|
925
|
-
end
|
926
|
-
|
927
|
-
# Lists the instances in the specified compartment and the specified Availability Domain.
|
928
|
-
# You can filter the results by specifying an instance name (the list will include all the identically-named
|
929
|
-
# instances in the compartment).
|
930
|
-
#
|
931
|
-
# @param [String] compartment_id The OCID of the compartment.
|
932
|
-
# @param [Hash] opts the optional parameters
|
933
|
-
# @option opts [String] :availability_domain The name of the Availability Domain.
|
934
|
-
#
|
935
|
-
# Example: `Uocm:PHX-AD-1`
|
936
|
-
#
|
937
|
-
# @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.
|
938
|
-
# Avoid entering confidential information.
|
939
|
-
#
|
940
|
-
# Example: `My new resource`
|
941
|
-
#
|
942
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
943
|
-
#
|
944
|
-
# Example: `500`
|
945
|
-
#
|
946
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
947
|
-
#
|
948
|
-
# @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::Instance>
|
949
|
-
def list_instances(compartment_id, opts = {})
|
950
|
-
logger.debug "Calling operation ComputeClient#list_instances." if logger
|
951
|
-
|
952
|
-
fail "Missing the required parameter 'compartment_id' when calling list_instances." if compartment_id.nil?
|
953
|
-
|
954
|
-
path = "/instances/"
|
955
|
-
|
956
|
-
# Query Params
|
957
|
-
query_params = {}
|
958
|
-
query_params[:'compartmentId'] = compartment_id
|
959
|
-
query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
|
960
|
-
query_params[:'displayName'] = opts[:'display_name'] if opts[:'display_name']
|
961
|
-
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
962
|
-
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
963
|
-
|
964
|
-
# Header Params
|
965
|
-
header_params = {}
|
966
|
-
header_params['accept'] = 'application/json'
|
967
|
-
header_params['content-type'] = 'application/json'
|
968
|
-
|
969
|
-
post_body = nil
|
970
|
-
|
971
|
-
return @api_client.call_api(
|
972
|
-
:GET,
|
973
|
-
path,
|
974
|
-
endpoint,
|
975
|
-
:header_params => header_params,
|
976
|
-
:query_params => query_params,
|
977
|
-
:body => post_body,
|
978
|
-
:return_type => 'Array<OracleBMC::Core::Models::Instance>')
|
979
|
-
end
|
980
|
-
|
981
|
-
# Lists the shapes that can be used to launch an instance within the specified compartment. You can
|
982
|
-
# filter the list by compatibility with a specific image.
|
983
|
-
#
|
984
|
-
# @param [String] compartment_id The OCID of the compartment.
|
985
|
-
# @param [Hash] opts the optional parameters
|
986
|
-
# @option opts [String] :availability_domain The name of the Availability Domain.
|
987
|
-
#
|
988
|
-
# Example: `Uocm:PHX-AD-1`
|
989
|
-
#
|
990
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
991
|
-
#
|
992
|
-
# Example: `500`
|
993
|
-
#
|
994
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
995
|
-
#
|
996
|
-
# @option opts [String] :image_id The OCID of an image.
|
997
|
-
# @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::Shape>
|
998
|
-
def list_shapes(compartment_id, opts = {})
|
999
|
-
logger.debug "Calling operation ComputeClient#list_shapes." if logger
|
1000
|
-
|
1001
|
-
fail "Missing the required parameter 'compartment_id' when calling list_shapes." if compartment_id.nil?
|
1002
|
-
|
1003
|
-
path = "/shapes"
|
1004
|
-
|
1005
|
-
# Query Params
|
1006
|
-
query_params = {}
|
1007
|
-
query_params[:'compartmentId'] = compartment_id
|
1008
|
-
query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
|
1009
|
-
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1010
|
-
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1011
|
-
query_params[:'imageId'] = opts[:'image_id'] if opts[:'image_id']
|
1012
|
-
|
1013
|
-
# Header Params
|
1014
|
-
header_params = {}
|
1015
|
-
header_params['accept'] = 'application/json'
|
1016
|
-
header_params['content-type'] = 'application/json'
|
1017
|
-
|
1018
|
-
post_body = nil
|
1019
|
-
|
1020
|
-
return @api_client.call_api(
|
1021
|
-
:GET,
|
1022
|
-
path,
|
1023
|
-
endpoint,
|
1024
|
-
:header_params => header_params,
|
1025
|
-
:query_params => query_params,
|
1026
|
-
:body => post_body,
|
1027
|
-
:return_type => 'Array<OracleBMC::Core::Models::Shape>')
|
1028
|
-
end
|
1029
|
-
|
1030
|
-
# Lists the VNIC attachments in the specified compartment. A VNIC attachment
|
1031
|
-
# resides in the same compartment as the attached instance. The list can be
|
1032
|
-
# filtered by instance, VNIC, or Availability Domain.
|
1033
|
-
#
|
1034
|
-
# @param [String] compartment_id The OCID of the compartment.
|
1035
|
-
# @param [Hash] opts the optional parameters
|
1036
|
-
# @option opts [String] :availability_domain The name of the Availability Domain.
|
1037
|
-
#
|
1038
|
-
# Example: `Uocm:PHX-AD-1`
|
1039
|
-
#
|
1040
|
-
# @option opts [String] :instance_id The OCID of the instance.
|
1041
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1042
|
-
#
|
1043
|
-
# Example: `500`
|
1044
|
-
#
|
1045
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1046
|
-
#
|
1047
|
-
# @option opts [String] :vnic_id The OCID of the VNIC.
|
1048
|
-
# @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::VnicAttachment>
|
1049
|
-
def list_vnic_attachments(compartment_id, opts = {})
|
1050
|
-
logger.debug "Calling operation ComputeClient#list_vnic_attachments." if logger
|
1051
|
-
|
1052
|
-
fail "Missing the required parameter 'compartment_id' when calling list_vnic_attachments." if compartment_id.nil?
|
1053
|
-
|
1054
|
-
path = "/vnicAttachments/"
|
1055
|
-
|
1056
|
-
# Query Params
|
1057
|
-
query_params = {}
|
1058
|
-
query_params[:'compartmentId'] = compartment_id
|
1059
|
-
query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
|
1060
|
-
query_params[:'instanceId'] = opts[:'instance_id'] if opts[:'instance_id']
|
1061
|
-
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1062
|
-
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1063
|
-
query_params[:'vnicId'] = opts[:'vnic_id'] if opts[:'vnic_id']
|
1064
|
-
|
1065
|
-
# Header Params
|
1066
|
-
header_params = {}
|
1067
|
-
header_params['accept'] = 'application/json'
|
1068
|
-
header_params['content-type'] = 'application/json'
|
1069
|
-
|
1070
|
-
post_body = nil
|
1071
|
-
|
1072
|
-
return @api_client.call_api(
|
1073
|
-
:GET,
|
1074
|
-
path,
|
1075
|
-
endpoint,
|
1076
|
-
:header_params => header_params,
|
1077
|
-
:query_params => query_params,
|
1078
|
-
:body => post_body,
|
1079
|
-
:return_type => 'Array<OracleBMC::Core::Models::VnicAttachment>')
|
1080
|
-
end
|
1081
|
-
|
1082
|
-
# Lists the volume attachments in the specified compartment. You can filter the
|
1083
|
-
# list by specifying an instance OCID, volume OCID, or both.
|
1084
|
-
#
|
1085
|
-
# Currently, the only supported volume attachment type is {IScsiVolumeAttachment}.
|
1086
|
-
#
|
1087
|
-
# @param [String] compartment_id The OCID of the compartment.
|
1088
|
-
# @param [Hash] opts the optional parameters
|
1089
|
-
# @option opts [String] :availability_domain The name of the Availability Domain.
|
1090
|
-
#
|
1091
|
-
# Example: `Uocm:PHX-AD-1`
|
1092
|
-
#
|
1093
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1094
|
-
#
|
1095
|
-
# Example: `500`
|
1096
|
-
#
|
1097
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1098
|
-
#
|
1099
|
-
# @option opts [String] :instance_id The OCID of the instance.
|
1100
|
-
# @option opts [String] :volume_id The OCID of the volume.
|
1101
|
-
# @return [Response] A Response object with data of type Array<OracleBMC::Core::Models::VolumeAttachment>
|
1102
|
-
def list_volume_attachments(compartment_id, opts = {})
|
1103
|
-
logger.debug "Calling operation ComputeClient#list_volume_attachments." if logger
|
1104
|
-
|
1105
|
-
fail "Missing the required parameter 'compartment_id' when calling list_volume_attachments." if compartment_id.nil?
|
1106
|
-
|
1107
|
-
path = "/volumeAttachments/"
|
1108
|
-
|
1109
|
-
# Query Params
|
1110
|
-
query_params = {}
|
1111
|
-
query_params[:'compartmentId'] = compartment_id
|
1112
|
-
query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
|
1113
|
-
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1114
|
-
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1115
|
-
query_params[:'instanceId'] = opts[:'instance_id'] if opts[:'instance_id']
|
1116
|
-
query_params[:'volumeId'] = opts[:'volume_id'] if opts[:'volume_id']
|
1117
|
-
|
1118
|
-
# Header Params
|
1119
|
-
header_params = {}
|
1120
|
-
header_params['accept'] = 'application/json'
|
1121
|
-
header_params['content-type'] = 'application/json'
|
1122
|
-
|
1123
|
-
post_body = nil
|
1124
|
-
|
1125
|
-
return @api_client.call_api(
|
1126
|
-
:GET,
|
1127
|
-
path,
|
1128
|
-
endpoint,
|
1129
|
-
:header_params => header_params,
|
1130
|
-
:query_params => query_params,
|
1131
|
-
:body => post_body,
|
1132
|
-
:return_type => 'Array<OracleBMC::Core::Models::VolumeAttachment>')
|
1133
|
-
end
|
1134
|
-
|
1135
|
-
# Terminates the specified instance. Any attached VNICs and volumes are automatically detached
|
1136
|
-
# when the instance terminates.
|
1137
|
-
#
|
1138
|
-
# This is an asynchronous operation; the instance's `lifecycleState` will change to TERMINATING temporarily
|
1139
|
-
# until the instance is completely removed.
|
1140
|
-
#
|
1141
|
-
# @param [String] instance_id The OCID of the instance.
|
1142
|
-
# @param [Hash] opts the optional parameters
|
1143
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1144
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1145
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1146
|
-
#
|
1147
|
-
# @return [Response] A Response object with data of type nil
|
1148
|
-
def terminate_instance(instance_id, opts = {})
|
1149
|
-
logger.debug "Calling operation ComputeClient#terminate_instance." if logger
|
1150
|
-
|
1151
|
-
fail "Missing the required parameter 'instance_id' when calling terminate_instance." if instance_id.nil?
|
1152
|
-
|
1153
|
-
path = "/instances/{instanceId}".sub('{instanceId}', instance_id.to_s)
|
1154
|
-
|
1155
|
-
# Query Params
|
1156
|
-
query_params = {}
|
1157
|
-
|
1158
|
-
# Header Params
|
1159
|
-
header_params = {}
|
1160
|
-
header_params['accept'] = 'application/json'
|
1161
|
-
header_params['content-type'] = 'application/json'
|
1162
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1163
|
-
|
1164
|
-
post_body = nil
|
1165
|
-
|
1166
|
-
return @api_client.call_api(
|
1167
|
-
:DELETE,
|
1168
|
-
path,
|
1169
|
-
endpoint,
|
1170
|
-
:header_params => header_params,
|
1171
|
-
:query_params => query_params,
|
1172
|
-
:body => post_body)
|
1173
|
-
end
|
1174
|
-
|
1175
|
-
# Updates the display name of the image. Avoid entering confidential information.
|
1176
|
-
# @param [String] image_id The OCID of the image.
|
1177
|
-
# @param [UpdateImageDetails] update_image_details Updates the image display name field. Avoid entering confidential information.
|
1178
|
-
# @param [Hash] opts the optional parameters
|
1179
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1180
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1181
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1182
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
1183
|
-
# may be rejected).
|
1184
|
-
#
|
1185
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1186
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1187
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1188
|
-
#
|
1189
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Image
|
1190
|
-
def update_image(image_id, update_image_details, opts = {})
|
1191
|
-
logger.debug "Calling operation ComputeClient#update_image." if logger
|
1192
|
-
|
1193
|
-
fail "Missing the required parameter 'image_id' when calling update_image." if image_id.nil?
|
1194
|
-
fail "Missing the required parameter 'update_image_details' when calling update_image." if update_image_details.nil?
|
1195
|
-
|
1196
|
-
path = "/images/{imageId}".sub('{imageId}', image_id.to_s)
|
1197
|
-
|
1198
|
-
# Query Params
|
1199
|
-
query_params = {}
|
1200
|
-
|
1201
|
-
# Header Params
|
1202
|
-
header_params = {}
|
1203
|
-
header_params['accept'] = 'application/json'
|
1204
|
-
header_params['content-type'] = 'application/json'
|
1205
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1206
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1207
|
-
|
1208
|
-
post_body = @api_client.object_to_http_body(update_image_details)
|
1209
|
-
|
1210
|
-
return @api_client.call_api(
|
1211
|
-
:PUT,
|
1212
|
-
path,
|
1213
|
-
endpoint,
|
1214
|
-
:header_params => header_params,
|
1215
|
-
:query_params => query_params,
|
1216
|
-
:body => post_body,
|
1217
|
-
:return_type => 'OracleBMC::Core::Models::Image')
|
1218
|
-
end
|
1219
|
-
|
1220
|
-
# Updates the display name of the specified instance. Avoid entering confidential information.
|
1221
|
-
# The OCID of the instance remains the same.
|
1222
|
-
#
|
1223
|
-
# @param [String] instance_id The OCID of the instance.
|
1224
|
-
# @param [UpdateInstanceDetails] update_instance_details Update instance fields
|
1225
|
-
# @param [Hash] opts the optional parameters
|
1226
|
-
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1227
|
-
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1228
|
-
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1229
|
-
# has been deleted and purged from the system, then a retry of the original creation request
|
1230
|
-
# may be rejected).
|
1231
|
-
#
|
1232
|
-
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1233
|
-
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1234
|
-
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1235
|
-
#
|
1236
|
-
# @return [Response] A Response object with data of type OracleBMC::Core::Models::Instance
|
1237
|
-
def update_instance(instance_id, update_instance_details, opts = {})
|
1238
|
-
logger.debug "Calling operation ComputeClient#update_instance." if logger
|
1239
|
-
|
1240
|
-
fail "Missing the required parameter 'instance_id' when calling update_instance." if instance_id.nil?
|
1241
|
-
fail "Missing the required parameter 'update_instance_details' when calling update_instance." if update_instance_details.nil?
|
1242
|
-
|
1243
|
-
path = "/instances/{instanceId}".sub('{instanceId}', instance_id.to_s)
|
1244
|
-
|
1245
|
-
# Query Params
|
1246
|
-
query_params = {}
|
1247
|
-
|
1248
|
-
# Header Params
|
1249
|
-
header_params = {}
|
1250
|
-
header_params['accept'] = 'application/json'
|
1251
|
-
header_params['content-type'] = 'application/json'
|
1252
|
-
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1253
|
-
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1254
|
-
|
1255
|
-
post_body = @api_client.object_to_http_body(update_instance_details)
|
1256
|
-
|
1257
|
-
return @api_client.call_api(
|
1258
|
-
:PUT,
|
1259
|
-
path,
|
1260
|
-
endpoint,
|
1261
|
-
:header_params => header_params,
|
1262
|
-
:query_params => query_params,
|
1263
|
-
:body => post_body,
|
1264
|
-
:return_type => 'OracleBMC::Core::Models::Instance')
|
1265
|
-
end
|
1266
|
-
end
|
1267
|
-
end
|