oci 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +23 -1
- data/lib/oci.rb +4 -7
- data/lib/oci/api_client.rb +51 -6
- data/lib/oci/auth/auth.rb +5 -2
- data/lib/oci/auth/federation_client.rb +2 -2
- data/lib/oci/auth/internal/auth_token_request_signer.rb +2 -2
- data/lib/oci/auth/security_token_container.rb +2 -2
- data/lib/oci/auth/session_key_supplier.rb +3 -4
- data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +30 -17
- data/lib/oci/auth/signers/security_token_signer.rb +13 -6
- data/lib/oci/auth/signers/x509_federation_client_based_security_token_signer.rb +8 -4
- data/lib/oci/auth/url_based_certificate_retriever.rb +3 -4
- data/lib/oci/auth/util.rb +6 -4
- data/lib/oci/base_signer.rb +54 -50
- data/lib/oci/config_file_loader.rb +3 -11
- data/lib/oci/core/blockstorage_client.rb +211 -0
- data/lib/oci/core/compute_client.rb +4 -2
- data/lib/oci/core/core.rb +9 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +5 -1
- data/lib/oci/core/models/attach_volume_details.rb +13 -1
- data/lib/oci/core/models/create_public_ip_details.rb +186 -0
- data/lib/oci/core/models/create_vnic_details.rb +8 -2
- data/lib/oci/core/models/create_volume_backup_details.rb +27 -1
- data/lib/oci/core/models/create_volume_backup_policy_assignment_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +15 -1
- data/lib/oci/core/models/get_public_ip_by_ip_address_details.rb +125 -0
- data/lib/oci/core/models/get_public_ip_by_private_ip_id_details.rb +124 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +5 -1
- data/lib/oci/core/models/public_ip.rb +328 -0
- data/lib/oci/core/models/update_public_ip_details.rb +140 -0
- data/lib/oci/core/models/volume_attachment.rb +13 -1
- data/lib/oci/core/models/volume_backup.rb +72 -1
- data/lib/oci/core/models/volume_backup_policy.rb +161 -0
- data/lib/oci/core/models/volume_backup_policy_assignment.rb +159 -0
- data/lib/oci/core/models/volume_backup_schedule.rb +191 -0
- data/lib/oci/core/virtual_network_client.rb +374 -4
- data/lib/oci/database/database_client.rb +3 -1
- data/lib/oci/dns/dns.rb +34 -0
- data/lib/oci/dns/dns_client.rb +985 -0
- data/lib/oci/dns/models/create_zone_details.rb +174 -0
- data/lib/oci/dns/models/external_master.rb +145 -0
- data/lib/oci/dns/models/patch_domain_records_details.rb +120 -0
- data/lib/oci/dns/models/patch_rr_set_details.rb +120 -0
- data/lib/oci/dns/models/patch_zone_records_details.rb +120 -0
- data/lib/oci/dns/models/record.rb +204 -0
- data/lib/oci/dns/models/record_collection.rb +121 -0
- data/lib/oci/dns/models/record_details.rb +204 -0
- data/lib/oci/dns/models/record_operation.rb +253 -0
- data/lib/oci/dns/models/rr_set.rb +123 -0
- data/lib/oci/dns/models/sort_order.rb +12 -0
- data/lib/oci/dns/models/tsig.rb +149 -0
- data/lib/oci/dns/models/update_domain_records_details.rb +120 -0
- data/lib/oci/dns/models/update_rr_set_details.rb +120 -0
- data/lib/oci/dns/models/update_zone_details.rb +122 -0
- data/lib/oci/dns/models/update_zone_records_details.rb +120 -0
- data/lib/oci/dns/models/zone.rb +272 -0
- data/lib/oci/dns/models/zone_summary.rb +230 -0
- data/lib/oci/dns/util.rb +2 -0
- data/lib/oci/errors.rb +20 -0
- data/lib/oci/identity/identity_client.rb +1 -0
- data/lib/oci/identity/models/create_dynamic_group_details.rb +4 -2
- data/lib/oci/identity/models/dynamic_group.rb +9 -6
- data/lib/oci/identity/models/update_dynamic_group_details.rb +4 -2
- data/lib/oci/load_balancer/load_balancer.rb +6 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +219 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +12 -1
- data/lib/oci/load_balancer/models/create_path_route_set_details.rb +138 -0
- data/lib/oci/load_balancer/models/listener.rb +17 -1
- data/lib/oci/load_balancer/models/listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +12 -1
- data/lib/oci/load_balancer/models/path_match_type.rb +153 -0
- data/lib/oci/load_balancer/models/path_route.rb +161 -0
- data/lib/oci/load_balancer/models/path_route_set.rb +139 -0
- data/lib/oci/load_balancer/models/path_route_set_details.rb +122 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +17 -1
- data/lib/oci/load_balancer/models/update_path_route_set_details.rb +122 -0
- data/lib/oci/load_balancer/util.rb +1 -3
- data/lib/oci/object_storage/transfer/multipart/internal/file_part_io_wrapper.rb +111 -0
- data/lib/oci/object_storage/transfer/multipart/internal/multipart_upload_parts_collection.rb +41 -0
- data/lib/oci/object_storage/transfer/multipart/internal/seekable_non_file_part_io_wrapper.rb +48 -0
- data/lib/oci/object_storage/transfer/multipart/internal/stdin_part_io_wrapper.rb +54 -0
- data/lib/oci/object_storage/transfer/multipart/multipart_object_assembler.rb +545 -0
- data/lib/oci/object_storage/transfer/transfer.rb +31 -0
- data/lib/oci/object_storage/transfer/upload_manager.rb +212 -0
- data/lib/oci/object_storage/transfer/upload_manager_config.rb +60 -0
- data/lib/oci/regions.rb +3 -1
- data/lib/oci/response.rb +1 -3
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waiter.rb +16 -11
- data/lib/oraclebmc.rb +1 -1
- metadata +46 -2
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
# Specifies that a particular volume backup policy is assigned to an asset such as a volume.
|
|
7
|
+
class Core::Models::VolumeBackupPolicyAssignment
|
|
8
|
+
# **[Required]** The OCID of the asset (e.g. a volume) to which the policy has been assigned.
|
|
9
|
+
# @return [String]
|
|
10
|
+
attr_accessor :asset_id
|
|
11
|
+
|
|
12
|
+
# **[Required]** The OCID of the volume backup policy assignment.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# **[Required]** The OCID of the volume backup policy that has been assigned to an asset.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :policy_id
|
|
19
|
+
|
|
20
|
+
# **[Required]** The date and time the volume backup policy assignment was created. Format defined by RFC3339.
|
|
21
|
+
#
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :time_created
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# Initializes the object
|
|
27
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
28
|
+
# @option attributes [String] :assetId The value to assign to the {#asset_id} property
|
|
29
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
|
30
|
+
# @option attributes [String] :policyId The value to assign to the {#policy_id} property
|
|
31
|
+
# @option attributes [DateTime] :timeCreated The value to assign to the {#time_created} property
|
|
32
|
+
def initialize(attributes = {})
|
|
33
|
+
return unless attributes.is_a?(Hash)
|
|
34
|
+
|
|
35
|
+
# convert string to symbol for hash key
|
|
36
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
37
|
+
|
|
38
|
+
if attributes[:'assetId']
|
|
39
|
+
self.asset_id = attributes[:'assetId']
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
if attributes[:'id']
|
|
43
|
+
self.id = attributes[:'id']
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if attributes[:'policyId']
|
|
47
|
+
self.policy_id = attributes[:'policyId']
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
if attributes[:'timeCreated']
|
|
51
|
+
self.time_created = attributes[:'timeCreated']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Checks equality by comparing each attribute.
|
|
57
|
+
# @param [Object] other_object to be compared
|
|
58
|
+
def ==(other_object)
|
|
59
|
+
return true if self.equal?(other_object)
|
|
60
|
+
self.class == other_object.class &&
|
|
61
|
+
asset_id == other_object.asset_id &&
|
|
62
|
+
id == other_object.id &&
|
|
63
|
+
policy_id == other_object.policy_id &&
|
|
64
|
+
time_created == other_object.time_created
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @see the `==` method
|
|
68
|
+
# @param [Object] other_object to be compared
|
|
69
|
+
def eql?(other_object)
|
|
70
|
+
self == other_object
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Calculates hash code according to all attributes.
|
|
74
|
+
# @return [Fixnum] Hash code
|
|
75
|
+
def hash
|
|
76
|
+
[asset_id, id, policy_id, time_created].hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Builds the object from hash
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
# @return [Object] Returns the model itself
|
|
82
|
+
def build_from_hash(attributes)
|
|
83
|
+
return nil unless attributes.is_a?(Hash)
|
|
84
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
85
|
+
if type =~ /^Array<(.*)>/i
|
|
86
|
+
# check to ensure the input is an array given that the the attribute
|
|
87
|
+
# is documented as an array but the input is not
|
|
88
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
89
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
90
|
+
end
|
|
91
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
92
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
93
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
self
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Returns the string representation of the object
|
|
100
|
+
# @return [String] String presentation of the object
|
|
101
|
+
def to_s
|
|
102
|
+
to_hash.to_s
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Returns the object in the form of hash
|
|
106
|
+
# @return [Hash] Returns the object in the form of hash
|
|
107
|
+
def to_hash
|
|
108
|
+
hash = {}
|
|
109
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
110
|
+
value = public_method(attr).call
|
|
111
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
112
|
+
hash[param] = _to_hash(value)
|
|
113
|
+
end
|
|
114
|
+
hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
private
|
|
118
|
+
|
|
119
|
+
# Outputs non-array value in the form of hash
|
|
120
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
121
|
+
# @param [Object] value Any valid value
|
|
122
|
+
# @return [Hash] Returns the value in the form of hash
|
|
123
|
+
def _to_hash(value)
|
|
124
|
+
if value.is_a?(Array)
|
|
125
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
126
|
+
elsif value.is_a?(Hash)
|
|
127
|
+
{}.tap do |hash|
|
|
128
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
129
|
+
end
|
|
130
|
+
elsif value.respond_to? :to_hash
|
|
131
|
+
value.to_hash
|
|
132
|
+
else
|
|
133
|
+
value
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
140
|
+
def self.attribute_map
|
|
141
|
+
{
|
|
142
|
+
:'asset_id' => :'assetId',
|
|
143
|
+
:'id' => :'id',
|
|
144
|
+
:'policy_id' => :'policyId',
|
|
145
|
+
:'time_created' => :'timeCreated'
|
|
146
|
+
}
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Attribute type mapping.
|
|
150
|
+
def self.swagger_types
|
|
151
|
+
{
|
|
152
|
+
:'asset_id' => :'String',
|
|
153
|
+
:'id' => :'String',
|
|
154
|
+
:'policy_id' => :'String',
|
|
155
|
+
:'time_created' => :'DateTime'
|
|
156
|
+
}
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module OCI
|
|
6
|
+
# Defines a chronological recurrence pattern for creating scheduled backups at a particular periodicity.
|
|
7
|
+
class Core::Models::VolumeBackupSchedule
|
|
8
|
+
|
|
9
|
+
BACKUP_TYPE_ENUM = [BACKUP_TYPE_FULL = 'FULL',
|
|
10
|
+
BACKUP_TYPE_INCREMENTAL = 'INCREMENTAL',
|
|
11
|
+
BACKUP_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
PERIOD_ENUM = [PERIOD_ONE_HOUR = 'ONE_HOUR',
|
|
15
|
+
PERIOD_ONE_DAY = 'ONE_DAY',
|
|
16
|
+
PERIOD_ONE_WEEK = 'ONE_WEEK',
|
|
17
|
+
PERIOD_ONE_MONTH = 'ONE_MONTH',
|
|
18
|
+
PERIOD_ONE_YEAR = 'ONE_YEAR',
|
|
19
|
+
PERIOD_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
|
20
|
+
|
|
21
|
+
# **[Required]** The type of backup to create.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :backup_type
|
|
24
|
+
|
|
25
|
+
# **[Required]** The number of seconds (positive or negative) that the backup time should be shifted from the default interval boundaries specified by the period.
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :offset_seconds
|
|
28
|
+
|
|
29
|
+
# **[Required]** How often the backup should occur.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :period
|
|
32
|
+
|
|
33
|
+
# **[Required]** How long, in seconds, backups created by this schedule should be kept until being automatically deleted.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :retention_seconds
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Initializes the object
|
|
39
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
40
|
+
# @option attributes [String] :backupType The value to assign to the {#backup_type} property
|
|
41
|
+
# @option attributes [Integer] :offsetSeconds The value to assign to the {#offset_seconds} property
|
|
42
|
+
# @option attributes [String] :period The value to assign to the {#period} property
|
|
43
|
+
# @option attributes [Integer] :retentionSeconds The value to assign to the {#retention_seconds} property
|
|
44
|
+
def initialize(attributes = {})
|
|
45
|
+
return unless attributes.is_a?(Hash)
|
|
46
|
+
|
|
47
|
+
# convert string to symbol for hash key
|
|
48
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
49
|
+
|
|
50
|
+
if attributes[:'backupType']
|
|
51
|
+
self.backup_type = attributes[:'backupType']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if attributes[:'offsetSeconds']
|
|
55
|
+
self.offset_seconds = attributes[:'offsetSeconds']
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
if attributes[:'period']
|
|
59
|
+
self.period = attributes[:'period']
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if attributes[:'retentionSeconds']
|
|
63
|
+
self.retention_seconds = attributes[:'retentionSeconds']
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
69
|
+
# @param [Object] backup_type Object to be assigned
|
|
70
|
+
def backup_type=(backup_type)
|
|
71
|
+
if backup_type && !BACKUP_TYPE_ENUM.include?(backup_type)
|
|
72
|
+
@backup_type = BACKUP_TYPE_UNKNOWN_ENUM_VALUE
|
|
73
|
+
else
|
|
74
|
+
@backup_type = backup_type
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
79
|
+
# @param [Object] period Object to be assigned
|
|
80
|
+
def period=(period)
|
|
81
|
+
if period && !PERIOD_ENUM.include?(period)
|
|
82
|
+
@period = PERIOD_UNKNOWN_ENUM_VALUE
|
|
83
|
+
else
|
|
84
|
+
@period = period
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] other_object to be compared
|
|
90
|
+
def ==(other_object)
|
|
91
|
+
return true if self.equal?(other_object)
|
|
92
|
+
self.class == other_object.class &&
|
|
93
|
+
backup_type == other_object.backup_type &&
|
|
94
|
+
offset_seconds == other_object.offset_seconds &&
|
|
95
|
+
period == other_object.period &&
|
|
96
|
+
retention_seconds == other_object.retention_seconds
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @see the `==` method
|
|
100
|
+
# @param [Object] other_object to be compared
|
|
101
|
+
def eql?(other_object)
|
|
102
|
+
self == other_object
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Calculates hash code according to all attributes.
|
|
106
|
+
# @return [Fixnum] Hash code
|
|
107
|
+
def hash
|
|
108
|
+
[backup_type, offset_seconds, period, retention_seconds].hash
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Builds the object from hash
|
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
+
# @return [Object] Returns the model itself
|
|
114
|
+
def build_from_hash(attributes)
|
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
|
116
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
117
|
+
if type =~ /^Array<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
121
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
124
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
self
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Returns the string representation of the object
|
|
132
|
+
# @return [String] String presentation of the object
|
|
133
|
+
def to_s
|
|
134
|
+
to_hash.to_s
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Returns the object in the form of hash
|
|
138
|
+
# @return [Hash] Returns the object in the form of hash
|
|
139
|
+
def to_hash
|
|
140
|
+
hash = {}
|
|
141
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
142
|
+
value = public_method(attr).call
|
|
143
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
144
|
+
hash[param] = _to_hash(value)
|
|
145
|
+
end
|
|
146
|
+
hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
private
|
|
150
|
+
|
|
151
|
+
# Outputs non-array value in the form of hash
|
|
152
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
153
|
+
# @param [Object] value Any valid value
|
|
154
|
+
# @return [Hash] Returns the value in the form of hash
|
|
155
|
+
def _to_hash(value)
|
|
156
|
+
if value.is_a?(Array)
|
|
157
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
158
|
+
elsif value.is_a?(Hash)
|
|
159
|
+
{}.tap do |hash|
|
|
160
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
161
|
+
end
|
|
162
|
+
elsif value.respond_to? :to_hash
|
|
163
|
+
value.to_hash
|
|
164
|
+
else
|
|
165
|
+
value
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
172
|
+
def self.attribute_map
|
|
173
|
+
{
|
|
174
|
+
:'backup_type' => :'backupType',
|
|
175
|
+
:'offset_seconds' => :'offsetSeconds',
|
|
176
|
+
:'period' => :'period',
|
|
177
|
+
:'retention_seconds' => :'retentionSeconds'
|
|
178
|
+
}
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Attribute type mapping.
|
|
182
|
+
def self.swagger_types
|
|
183
|
+
{
|
|
184
|
+
:'backup_type' => :'String',
|
|
185
|
+
:'offset_seconds' => :'Integer',
|
|
186
|
+
:'period' => :'String',
|
|
187
|
+
:'retention_seconds' => :'Integer'
|
|
188
|
+
}
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
@@ -699,6 +699,64 @@ module OCI
|
|
|
699
699
|
:return_type => 'OCI::Core::Models::PrivateIp')
|
|
700
700
|
end
|
|
701
701
|
|
|
702
|
+
# Creates a public IP. Use the `lifetime` property to specify whether it's an ephemeral or
|
|
703
|
+
# reserved public IP. For information about limits on how many you can create, see
|
|
704
|
+
# [Public IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm).
|
|
705
|
+
#
|
|
706
|
+
# * **For an ephemeral public IP:** You must also specify a `privateIpId` with the OCID of
|
|
707
|
+
# the primary private IP you want to assign the public IP to. The public IP is created in
|
|
708
|
+
# the same Availability Domain as the private IP. An ephemeral public IP must always be
|
|
709
|
+
# assigned to a private IP, and only to the *primary* private IP on a VNIC, not a secondary
|
|
710
|
+
# private IP.
|
|
711
|
+
#
|
|
712
|
+
# * **For a reserved public IP:** You may also optionally assign the public IP to a private
|
|
713
|
+
# IP by specifying `privateIpId`. Or you can later assign the public IP with
|
|
714
|
+
# {#update_public_ip update_public_ip}.
|
|
715
|
+
#
|
|
716
|
+
# **Note:** When assigning a public IP to a private IP, the private IP must not already have
|
|
717
|
+
# a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it does, an error is returned.
|
|
718
|
+
#
|
|
719
|
+
# Also, for reserved public IPs, the optional assignment part of this operation is
|
|
720
|
+
# asynchronous. Poll the public IP's `lifecycleState` to determine if the assignment
|
|
721
|
+
# succeeded.
|
|
722
|
+
#
|
|
723
|
+
# @param [CreatePublicIpDetails] create_public_ip_details Create public IP details.
|
|
724
|
+
# @param [Hash] opts the optional parameters
|
|
725
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
|
726
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
|
727
|
+
# hours, but can be invalidated before then due to conflicting operations (for example, if a resource
|
|
728
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
|
729
|
+
# may be rejected).
|
|
730
|
+
#
|
|
731
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::PublicIp
|
|
732
|
+
def create_public_ip(create_public_ip_details, opts = {})
|
|
733
|
+
logger.debug "Calling operation VirtualNetworkClient#create_public_ip." if logger
|
|
734
|
+
|
|
735
|
+
fail "Missing the required parameter 'create_public_ip_details' when calling create_public_ip." if create_public_ip_details.nil?
|
|
736
|
+
|
|
737
|
+
path = "/publicIps"
|
|
738
|
+
|
|
739
|
+
# Query Params
|
|
740
|
+
query_params = {}
|
|
741
|
+
|
|
742
|
+
# Header Params
|
|
743
|
+
header_params = {}
|
|
744
|
+
header_params['accept'] = 'application/json'
|
|
745
|
+
header_params['content-type'] = 'application/json'
|
|
746
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
|
747
|
+
|
|
748
|
+
post_body = @api_client.object_to_http_body(create_public_ip_details)
|
|
749
|
+
|
|
750
|
+
return @api_client.call_api(
|
|
751
|
+
:POST,
|
|
752
|
+
path,
|
|
753
|
+
endpoint,
|
|
754
|
+
:header_params => header_params,
|
|
755
|
+
:query_params => query_params,
|
|
756
|
+
:body => post_body,
|
|
757
|
+
:return_type => 'OCI::Core::Models::PublicIp')
|
|
758
|
+
end
|
|
759
|
+
|
|
702
760
|
# Creates a new route table for the specified VCN. In the request you must also include at least one route
|
|
703
761
|
# rule for the new route table. For information on the number of rules you can have in a route table, see
|
|
704
762
|
# [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). For general information about route
|
|
@@ -1363,7 +1421,7 @@ module OCI
|
|
|
1363
1421
|
# unassigning it from the VNIC causes that route rule to blackhole and the traffic
|
|
1364
1422
|
# will be dropped.
|
|
1365
1423
|
#
|
|
1366
|
-
# @param [String] private_ip_id The private IP
|
|
1424
|
+
# @param [String] private_ip_id The OCID of the private IP.
|
|
1367
1425
|
# @param [Hash] opts the optional parameters
|
|
1368
1426
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
|
1369
1427
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
|
@@ -1397,6 +1455,52 @@ module OCI
|
|
|
1397
1455
|
:body => post_body)
|
|
1398
1456
|
end
|
|
1399
1457
|
|
|
1458
|
+
# Unassigns and deletes the specified public IP (either ephemeral or reserved).
|
|
1459
|
+
# You must specify the object's OCID. The public IP address is returned to the
|
|
1460
|
+
# Oracle Cloud Infrastructure public IP pool.
|
|
1461
|
+
#
|
|
1462
|
+
# For an assigned reserved public IP, the initial unassignment portion of this operation
|
|
1463
|
+
# is asynchronous. Poll the public IP's `lifecycleState` to determine
|
|
1464
|
+
# if the operation succeeded.
|
|
1465
|
+
#
|
|
1466
|
+
# If you want to simply unassign a reserved public IP and return it to your pool
|
|
1467
|
+
# of reserved public IPs, instead use
|
|
1468
|
+
# {#update_public_ip update_public_ip}.
|
|
1469
|
+
#
|
|
1470
|
+
# @param [String] public_ip_id The OCID of the public IP.
|
|
1471
|
+
# @param [Hash] opts the optional parameters
|
|
1472
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
|
1473
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
|
1474
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
|
1475
|
+
#
|
|
1476
|
+
# @return [Response] A Response object with data of type nil
|
|
1477
|
+
def delete_public_ip(public_ip_id, opts = {})
|
|
1478
|
+
logger.debug "Calling operation VirtualNetworkClient#delete_public_ip." if logger
|
|
1479
|
+
|
|
1480
|
+
fail "Missing the required parameter 'public_ip_id' when calling delete_public_ip." if public_ip_id.nil?
|
|
1481
|
+
|
|
1482
|
+
path = "/publicIps/{publicIpId}".sub('{publicIpId}', public_ip_id.to_s)
|
|
1483
|
+
|
|
1484
|
+
# Query Params
|
|
1485
|
+
query_params = {}
|
|
1486
|
+
|
|
1487
|
+
# Header Params
|
|
1488
|
+
header_params = {}
|
|
1489
|
+
header_params['accept'] = 'application/json'
|
|
1490
|
+
header_params['content-type'] = 'application/json'
|
|
1491
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
|
1492
|
+
|
|
1493
|
+
post_body = nil
|
|
1494
|
+
|
|
1495
|
+
return @api_client.call_api(
|
|
1496
|
+
:DELETE,
|
|
1497
|
+
path,
|
|
1498
|
+
endpoint,
|
|
1499
|
+
:header_params => header_params,
|
|
1500
|
+
:query_params => query_params,
|
|
1501
|
+
:body => post_body)
|
|
1502
|
+
end
|
|
1503
|
+
|
|
1400
1504
|
# Deletes the specified route table, but only if it's not associated with a subnet. You can't delete a
|
|
1401
1505
|
# VCN's default route table.
|
|
1402
1506
|
#
|
|
@@ -2041,7 +2145,7 @@ module OCI
|
|
|
2041
2145
|
# {#list_private_ips list_private_ips}
|
|
2042
2146
|
# with the private IP address (for example, 10.0.3.3) and subnet OCID.
|
|
2043
2147
|
#
|
|
2044
|
-
# @param [String] private_ip_id The private IP
|
|
2148
|
+
# @param [String] private_ip_id The OCID of the private IP.
|
|
2045
2149
|
# @param [Hash] opts the optional parameters
|
|
2046
2150
|
# @return [Response] A Response object with data of type OCI::Core::Models::PrivateIp
|
|
2047
2151
|
def get_private_ip(private_ip_id, opts = {})
|
|
@@ -2071,6 +2175,126 @@ module OCI
|
|
|
2071
2175
|
:return_type => 'OCI::Core::Models::PrivateIp')
|
|
2072
2176
|
end
|
|
2073
2177
|
|
|
2178
|
+
# Gets the specified public IP. You must specify the object's OCID.
|
|
2179
|
+
#
|
|
2180
|
+
# Alternatively, you can get the object by using {#get_public_ip_by_ip_address get_public_ip_by_ip_address}
|
|
2181
|
+
# with the public IP address (for example, 129.146.2.1).
|
|
2182
|
+
#
|
|
2183
|
+
# Or you can use {#get_public_ip_by_private_ip_id get_public_ip_by_private_ip_id}
|
|
2184
|
+
# with the OCID of the private IP that the public IP is assigned to.
|
|
2185
|
+
#
|
|
2186
|
+
# **Note:** If you're fetching a reserved public IP that is in the process of being
|
|
2187
|
+
# moved to a different private IP, the service returns the public IP object with
|
|
2188
|
+
# `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP.
|
|
2189
|
+
#
|
|
2190
|
+
# @param [String] public_ip_id The OCID of the public IP.
|
|
2191
|
+
# @param [Hash] opts the optional parameters
|
|
2192
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::PublicIp
|
|
2193
|
+
def get_public_ip(public_ip_id, opts = {})
|
|
2194
|
+
logger.debug "Calling operation VirtualNetworkClient#get_public_ip." if logger
|
|
2195
|
+
|
|
2196
|
+
fail "Missing the required parameter 'public_ip_id' when calling get_public_ip." if public_ip_id.nil?
|
|
2197
|
+
|
|
2198
|
+
path = "/publicIps/{publicIpId}".sub('{publicIpId}', public_ip_id.to_s)
|
|
2199
|
+
|
|
2200
|
+
# Query Params
|
|
2201
|
+
query_params = {}
|
|
2202
|
+
|
|
2203
|
+
# Header Params
|
|
2204
|
+
header_params = {}
|
|
2205
|
+
header_params['accept'] = 'application/json'
|
|
2206
|
+
header_params['content-type'] = 'application/json'
|
|
2207
|
+
|
|
2208
|
+
post_body = nil
|
|
2209
|
+
|
|
2210
|
+
return @api_client.call_api(
|
|
2211
|
+
:GET,
|
|
2212
|
+
path,
|
|
2213
|
+
endpoint,
|
|
2214
|
+
:header_params => header_params,
|
|
2215
|
+
:query_params => query_params,
|
|
2216
|
+
:body => post_body,
|
|
2217
|
+
:return_type => 'OCI::Core::Models::PublicIp')
|
|
2218
|
+
end
|
|
2219
|
+
|
|
2220
|
+
# Gets the public IP based on the public IP address (for example, 129.146.2.1).
|
|
2221
|
+
#
|
|
2222
|
+
# **Note:** If you're fetching a reserved public IP that is in the process of being
|
|
2223
|
+
# moved to a different private IP, the service returns the public IP object with
|
|
2224
|
+
# `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP.
|
|
2225
|
+
#
|
|
2226
|
+
# @param [GetPublicIpByIpAddressDetails] get_public_ip_by_ip_address_details IP address details for fetching the public IP.
|
|
2227
|
+
# @param [Hash] opts the optional parameters
|
|
2228
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::PublicIp
|
|
2229
|
+
def get_public_ip_by_ip_address(get_public_ip_by_ip_address_details, opts = {})
|
|
2230
|
+
logger.debug "Calling operation VirtualNetworkClient#get_public_ip_by_ip_address." if logger
|
|
2231
|
+
|
|
2232
|
+
fail "Missing the required parameter 'get_public_ip_by_ip_address_details' when calling get_public_ip_by_ip_address." if get_public_ip_by_ip_address_details.nil?
|
|
2233
|
+
|
|
2234
|
+
path = "/publicIps/actions/getByIpAddress"
|
|
2235
|
+
|
|
2236
|
+
# Query Params
|
|
2237
|
+
query_params = {}
|
|
2238
|
+
|
|
2239
|
+
# Header Params
|
|
2240
|
+
header_params = {}
|
|
2241
|
+
header_params['accept'] = 'application/json'
|
|
2242
|
+
header_params['content-type'] = 'application/json'
|
|
2243
|
+
|
|
2244
|
+
post_body = @api_client.object_to_http_body(get_public_ip_by_ip_address_details)
|
|
2245
|
+
|
|
2246
|
+
return @api_client.call_api(
|
|
2247
|
+
:POST,
|
|
2248
|
+
path,
|
|
2249
|
+
endpoint,
|
|
2250
|
+
:header_params => header_params,
|
|
2251
|
+
:query_params => query_params,
|
|
2252
|
+
:body => post_body,
|
|
2253
|
+
:return_type => 'OCI::Core::Models::PublicIp')
|
|
2254
|
+
end
|
|
2255
|
+
|
|
2256
|
+
# Gets the public IP assigned to the specified private IP. You must specify the OCID
|
|
2257
|
+
# of the private IP. If no public IP is assigned, a 404 is returned.
|
|
2258
|
+
#
|
|
2259
|
+
# **Note:** If you're fetching a reserved public IP that is in the process of being
|
|
2260
|
+
# moved to a different private IP, and you provide the OCID of the original private
|
|
2261
|
+
# IP, this operation returns a 404. If you instead provide the OCID of the target
|
|
2262
|
+
# private IP, or if you instead call
|
|
2263
|
+
# {#get_public_ip get_public_ip} or
|
|
2264
|
+
# {#get_public_ip_by_ip_address get_public_ip_by_ip_address}, the
|
|
2265
|
+
# service returns the public IP object with `lifecycleState` = ASSIGNING and `privateIpId` = OCID
|
|
2266
|
+
# of the target private IP.
|
|
2267
|
+
#
|
|
2268
|
+
# @param [GetPublicIpByPrivateIpIdDetails] get_public_ip_by_private_ip_id_details Private IP details for fetching the public IP.
|
|
2269
|
+
# @param [Hash] opts the optional parameters
|
|
2270
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::PublicIp
|
|
2271
|
+
def get_public_ip_by_private_ip_id(get_public_ip_by_private_ip_id_details, opts = {})
|
|
2272
|
+
logger.debug "Calling operation VirtualNetworkClient#get_public_ip_by_private_ip_id." if logger
|
|
2273
|
+
|
|
2274
|
+
fail "Missing the required parameter 'get_public_ip_by_private_ip_id_details' when calling get_public_ip_by_private_ip_id." if get_public_ip_by_private_ip_id_details.nil?
|
|
2275
|
+
|
|
2276
|
+
path = "/publicIps/actions/getByPrivateIpId"
|
|
2277
|
+
|
|
2278
|
+
# Query Params
|
|
2279
|
+
query_params = {}
|
|
2280
|
+
|
|
2281
|
+
# Header Params
|
|
2282
|
+
header_params = {}
|
|
2283
|
+
header_params['accept'] = 'application/json'
|
|
2284
|
+
header_params['content-type'] = 'application/json'
|
|
2285
|
+
|
|
2286
|
+
post_body = @api_client.object_to_http_body(get_public_ip_by_private_ip_id_details)
|
|
2287
|
+
|
|
2288
|
+
return @api_client.call_api(
|
|
2289
|
+
:POST,
|
|
2290
|
+
path,
|
|
2291
|
+
endpoint,
|
|
2292
|
+
:header_params => header_params,
|
|
2293
|
+
:query_params => query_params,
|
|
2294
|
+
:body => post_body,
|
|
2295
|
+
:return_type => 'OCI::Core::Models::PublicIp')
|
|
2296
|
+
end
|
|
2297
|
+
|
|
2074
2298
|
# Gets the specified route table's information.
|
|
2075
2299
|
# @param [String] rt_id The OCID of the route table.
|
|
2076
2300
|
# @param [Hash] opts the optional parameters
|
|
@@ -2987,7 +3211,7 @@ module OCI
|
|
|
2987
3211
|
#
|
|
2988
3212
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
|
2989
3213
|
#
|
|
2990
|
-
# @option opts [String] :ip_address
|
|
3214
|
+
# @option opts [String] :ip_address An IP address.
|
|
2991
3215
|
#
|
|
2992
3216
|
# Example: `10.0.3.3`
|
|
2993
3217
|
#
|
|
@@ -3025,6 +3249,75 @@ module OCI
|
|
|
3025
3249
|
:return_type => 'Array<OCI::Core::Models::PrivateIp>')
|
|
3026
3250
|
end
|
|
3027
3251
|
|
|
3252
|
+
# Lists either the ephemeral or reserved {PublicIp} objects
|
|
3253
|
+
# in the specified compartment.
|
|
3254
|
+
#
|
|
3255
|
+
# To list your reserved public IPs, set `scope` = `REGION`, and leave the
|
|
3256
|
+
# `availabilityDomain` parameter empty.
|
|
3257
|
+
#
|
|
3258
|
+
# To list your ephemeral public IPs, set `scope` = `AVAILABILITY_DOMAIN`, and set the
|
|
3259
|
+
# `availabilityDomain` parameter to the desired Availability Domain. An ephemeral public IP
|
|
3260
|
+
# is always in the same Availability Domain and compartment as the private IP it's assigned to.
|
|
3261
|
+
#
|
|
3262
|
+
# @param [String] scope Whether the public IP is regional or specific to a particular Availability Domain.
|
|
3263
|
+
#
|
|
3264
|
+
# * `REGION`: The public IP exists within a region and can be assigned to a private IP
|
|
3265
|
+
# in any Availability Domain in the region. Reserved public IPs have `scope` = `REGION`.
|
|
3266
|
+
#
|
|
3267
|
+
# * `AVAILABILITY_DOMAIN`: The public IP exists within the Availability Domain of the private IP
|
|
3268
|
+
# it's assigned to, which is specified by the `availabilityDomain` property of the public IP object.
|
|
3269
|
+
# Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`.
|
|
3270
|
+
#
|
|
3271
|
+
# Allowed values are: REGION, AVAILABILITY_DOMAIN
|
|
3272
|
+
# @param [String] compartment_id The OCID of the compartment.
|
|
3273
|
+
# @param [Hash] opts the optional parameters
|
|
3274
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
|
3275
|
+
#
|
|
3276
|
+
# Example: `500`
|
|
3277
|
+
#
|
|
3278
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
|
3279
|
+
#
|
|
3280
|
+
# @option opts [String] :availability_domain The name of the Availability Domain.
|
|
3281
|
+
#
|
|
3282
|
+
# Example: `Uocm:PHX-AD-1`
|
|
3283
|
+
#
|
|
3284
|
+
# @return [Response] A Response object with data of type Array<OCI::Core::Models::PublicIp>
|
|
3285
|
+
def list_public_ips(scope, compartment_id, opts = {})
|
|
3286
|
+
logger.debug "Calling operation VirtualNetworkClient#list_public_ips." if logger
|
|
3287
|
+
|
|
3288
|
+
fail "Missing the required parameter 'scope' when calling list_public_ips." if scope.nil?
|
|
3289
|
+
unless ['REGION', 'AVAILABILITY_DOMAIN'].include?(scope)
|
|
3290
|
+
fail "Invalid value for 'scope', must be one of REGION, AVAILABILITY_DOMAIN."
|
|
3291
|
+
end
|
|
3292
|
+
fail "Missing the required parameter 'compartment_id' when calling list_public_ips." if compartment_id.nil?
|
|
3293
|
+
|
|
3294
|
+
path = "/publicIps"
|
|
3295
|
+
|
|
3296
|
+
# Query Params
|
|
3297
|
+
query_params = {}
|
|
3298
|
+
query_params[:'scope'] = scope
|
|
3299
|
+
query_params[:'compartmentId'] = compartment_id
|
|
3300
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
|
3301
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
|
3302
|
+
query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
|
|
3303
|
+
|
|
3304
|
+
# Header Params
|
|
3305
|
+
header_params = {}
|
|
3306
|
+
header_params['accept'] = 'application/json'
|
|
3307
|
+
header_params['content-type'] = 'application/json'
|
|
3308
|
+
|
|
3309
|
+
post_body = nil
|
|
3310
|
+
|
|
3311
|
+
return @api_client.call_api(
|
|
3312
|
+
:GET,
|
|
3313
|
+
path,
|
|
3314
|
+
endpoint,
|
|
3315
|
+
:header_params => header_params,
|
|
3316
|
+
:query_params => query_params,
|
|
3317
|
+
:body => post_body,
|
|
3318
|
+
:return_type => 'Array<OCI::Core::Models::PublicIp>')
|
|
3319
|
+
end
|
|
3320
|
+
|
|
3028
3321
|
# Lists the route tables in the specified VCN and specified compartment. The response
|
|
3029
3322
|
# includes the default route table that automatically comes with each VCN, plus any route tables
|
|
3030
3323
|
# you've created.
|
|
@@ -3865,7 +4158,7 @@ module OCI
|
|
|
3865
4158
|
# To update the hostname for the primary IP on a VNIC, use
|
|
3866
4159
|
# {#update_vnic update_vnic}.
|
|
3867
4160
|
#
|
|
3868
|
-
# @param [String] private_ip_id The private IP
|
|
4161
|
+
# @param [String] private_ip_id The OCID of the private IP.
|
|
3869
4162
|
# @param [UpdatePrivateIpDetails] update_private_ip_details Private IP details.
|
|
3870
4163
|
# @param [Hash] opts the optional parameters
|
|
3871
4164
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
|
@@ -3902,6 +4195,83 @@ module OCI
|
|
|
3902
4195
|
:return_type => 'OCI::Core::Models::PrivateIp')
|
|
3903
4196
|
end
|
|
3904
4197
|
|
|
4198
|
+
# Updates the specified public IP. You must specify the object's OCID. Use this operation if you want to:
|
|
4199
|
+
#
|
|
4200
|
+
# * Assign a reserved public IP in your pool to a private IP.
|
|
4201
|
+
# * Move a reserved public IP to a different private IP.
|
|
4202
|
+
# * Unassign a reserved public IP from a private IP (which returns it to your pool
|
|
4203
|
+
# of reserved public IPs).
|
|
4204
|
+
# * Change the display name for a public IP (either ephemeral or reserved).
|
|
4205
|
+
#
|
|
4206
|
+
# Assigning, moving, and unassigning a reserved public IP are asynchronous
|
|
4207
|
+
# operations. Poll the public IP's `lifecycleState` to determine if the operation
|
|
4208
|
+
# succeeded.
|
|
4209
|
+
#
|
|
4210
|
+
# **Note:** When moving a reserved public IP, the target private IP
|
|
4211
|
+
# must not already have a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it
|
|
4212
|
+
# does, an error is returned. Also, the initial unassignment from the original
|
|
4213
|
+
# private IP always succeeds, but the assignment to the target private IP is asynchronous and
|
|
4214
|
+
# could fail silently (for example, if the target private IP is deleted or has a different public IP
|
|
4215
|
+
# assigned to it in the interim). If that occurs, the public IP remains unassigned and its
|
|
4216
|
+
# `lifecycleState` switches to AVAILABLE (it is not reassigned to its original private IP).
|
|
4217
|
+
# You must poll the public IP's `lifecycleState` to determine if the move succeeded.
|
|
4218
|
+
#
|
|
4219
|
+
# Regarding ephemeral public IPs:
|
|
4220
|
+
#
|
|
4221
|
+
# * If you want to assign an ephemeral public IP to a primary private IP, use
|
|
4222
|
+
# {#create_public_ip create_public_ip}.
|
|
4223
|
+
# * You can't move an ephemeral public IP to a different private IP.
|
|
4224
|
+
# * If you want to unassign an ephemeral public IP from its private IP, use
|
|
4225
|
+
# {#delete_public_ip delete_public_ip}, which
|
|
4226
|
+
# unassigns and deletes the ephemeral public IP.
|
|
4227
|
+
#
|
|
4228
|
+
# **Note:** If a public IP (either ephemeral or reserved) is assigned to a secondary private
|
|
4229
|
+
# IP (see {PrivateIp}), and you move that secondary
|
|
4230
|
+
# private IP to another VNIC, the public IP moves with it.
|
|
4231
|
+
#
|
|
4232
|
+
# **Note:** There's a limit to the number of {PublicIp}
|
|
4233
|
+
# a VNIC or instance can have. If you try to move a reserved public IP
|
|
4234
|
+
# to a VNIC or instance that has already reached its public IP limit, an error is
|
|
4235
|
+
# returned. For information about the public IP limits, see
|
|
4236
|
+
# [Public IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm).
|
|
4237
|
+
#
|
|
4238
|
+
# @param [String] public_ip_id The OCID of the public IP.
|
|
4239
|
+
# @param [UpdatePublicIpDetails] update_public_ip_details Public IP details.
|
|
4240
|
+
# @param [Hash] opts the optional parameters
|
|
4241
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
|
4242
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
|
4243
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
|
4244
|
+
#
|
|
4245
|
+
# @return [Response] A Response object with data of type OCI::Core::Models::PublicIp
|
|
4246
|
+
def update_public_ip(public_ip_id, update_public_ip_details, opts = {})
|
|
4247
|
+
logger.debug "Calling operation VirtualNetworkClient#update_public_ip." if logger
|
|
4248
|
+
|
|
4249
|
+
fail "Missing the required parameter 'public_ip_id' when calling update_public_ip." if public_ip_id.nil?
|
|
4250
|
+
fail "Missing the required parameter 'update_public_ip_details' when calling update_public_ip." if update_public_ip_details.nil?
|
|
4251
|
+
|
|
4252
|
+
path = "/publicIps/{publicIpId}".sub('{publicIpId}', public_ip_id.to_s)
|
|
4253
|
+
|
|
4254
|
+
# Query Params
|
|
4255
|
+
query_params = {}
|
|
4256
|
+
|
|
4257
|
+
# Header Params
|
|
4258
|
+
header_params = {}
|
|
4259
|
+
header_params['accept'] = 'application/json'
|
|
4260
|
+
header_params['content-type'] = 'application/json'
|
|
4261
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
|
4262
|
+
|
|
4263
|
+
post_body = @api_client.object_to_http_body(update_public_ip_details)
|
|
4264
|
+
|
|
4265
|
+
return @api_client.call_api(
|
|
4266
|
+
:PUT,
|
|
4267
|
+
path,
|
|
4268
|
+
endpoint,
|
|
4269
|
+
:header_params => header_params,
|
|
4270
|
+
:query_params => query_params,
|
|
4271
|
+
:body => post_body,
|
|
4272
|
+
:return_type => 'OCI::Core::Models::PublicIp')
|
|
4273
|
+
end
|
|
4274
|
+
|
|
3905
4275
|
# Updates the specified route table's display name or route rules.
|
|
3906
4276
|
# Avoid entering confidential information.
|
|
3907
4277
|
#
|