Class: OCI::ObjectStorage::Models::CreatePrivateEndpointDetails
- Inherits:
-
Object
- Object
- OCI::ObjectStorage::Models::CreatePrivateEndpointDetails
- Defined in:
- lib/oci/object_storage/models/create_private_endpoint_details.rb
Overview
Details to create a private endpoint
Instance Attribute Summary collapse
-
#access_targets ⇒ Array<OCI::ObjectStorage::Models::AccessTargetDetails>
[Required] A list of targets that can be accessed by the private endpoint.
-
#additional_prefixes ⇒ Array<String>
A list of additional prefix that you can provide along with any other prefix.
-
#compartment_id ⇒ String
[Required] The ID of the compartment in which to create the Private Endpoint.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#name ⇒ String
[Required] This name associated with the endpoint.
-
#nsg_ids ⇒ Array<String>
A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to.
-
#prefix ⇒ String
[Required] A prefix to use for the private endpoint.
-
#private_endpoint_ip ⇒ String
The private IP address to assign to this private endpoint.
-
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Security attributes for Private Endpoint resource.
-
#subnet_id ⇒ String
[Required] The OCID of the customer's subnet where the private endpoint VNIC will reside.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreatePrivateEndpointDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ CreatePrivateEndpointDetails
Initializes the object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 139 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.name = attributes[:'name'] if attributes[:'name'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId'] raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id') self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id'] self.prefix = attributes[:'prefix'] if attributes[:'prefix'] self.additional_prefixes = attributes[:'additionalPrefixes'] if attributes[:'additionalPrefixes'] raise 'You cannot provide both :additionalPrefixes and :additional_prefixes' if attributes.key?(:'additionalPrefixes') && attributes.key?(:'additional_prefixes') self.additional_prefixes = attributes[:'additional_prefixes'] if attributes[:'additional_prefixes'] self.private_endpoint_ip = attributes[:'privateEndpointIp'] if attributes[:'privateEndpointIp'] raise 'You cannot provide both :privateEndpointIp and :private_endpoint_ip' if attributes.key?(:'privateEndpointIp') && attributes.key?(:'private_endpoint_ip') self.private_endpoint_ip = attributes[:'private_endpoint_ip'] if attributes[:'private_endpoint_ip'] self.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds'] raise 'You cannot provide both :nsgIds and :nsg_ids' if attributes.key?(:'nsgIds') && attributes.key?(:'nsg_ids') self.nsg_ids = attributes[:'nsg_ids'] if attributes[:'nsg_ids'] self.access_targets = attributes[:'accessTargets'] if attributes[:'accessTargets'] raise 'You cannot provide both :accessTargets and :access_targets' if attributes.key?(:'accessTargets') && attributes.key?(:'access_targets') self.access_targets = attributes[:'access_targets'] if attributes[:'access_targets'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.security_attributes = attributes[:'securityAttributes'] if attributes[:'securityAttributes'] raise 'You cannot provide both :securityAttributes and :security_attributes' if attributes.key?(:'securityAttributes') && attributes.key?(:'security_attributes') self.security_attributes = attributes[:'security_attributes'] if attributes[:'security_attributes'] end |
Instance Attribute Details
#access_targets ⇒ Array<OCI::ObjectStorage::Models::AccessTargetDetails>
[Required] A list of targets that can be accessed by the private endpoint.
60 61 62 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 60 def access_targets @access_targets end |
#additional_prefixes ⇒ Array<String>
A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the customer VCN's DNS record.
39 40 41 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 39 def additional_prefixes @additional_prefixes end |
#compartment_id ⇒ String
[Required] The ID of the compartment in which to create the Private Endpoint.
21 22 23 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 21 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}
74 75 76 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 74 def @defined_tags end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}
67 68 69 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 67 def @freeform_tags end |
#name ⇒ String
[Required] This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Example: my-new-private-endpoint1
17 18 19 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 17 def name @name end |
#nsg_ids ⇒ Array<String>
A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. For more information about NSGs, see NetworkSecurityGroup.
55 56 57 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 55 def nsg_ids @nsg_ids end |
#prefix ⇒ String
[Required] A prefix to use for the private endpoint. The customer VCN's DNS records are updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage.<region>.oraclecloud.com'
33 34 35 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 33 def prefix @prefix end |
#private_endpoint_ip ⇒ String
The private IP address to assign to this private endpoint. If you provide a value, it must be an available IP address in the customer's subnet. If it's not available, an error is returned.
If you do not provide a value, an available IP address in the subnet is automatically chosen.
48 49 50 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 48 def private_endpoint_ip @private_endpoint_ip end |
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Security attributes for Private Endpoint resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\": \"42\", \"mode\": \"enforce\"}}}
82 83 84 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 82 def security_attributes @security_attributes end |
#subnet_id ⇒ String
[Required] The OCID of the customer's subnet where the private endpoint VNIC will reside.
26 27 28 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 26 def subnet_id @subnet_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 85 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'compartment_id': :'compartmentId', 'subnet_id': :'subnetId', 'prefix': :'prefix', 'additional_prefixes': :'additionalPrefixes', 'private_endpoint_ip': :'privateEndpointIp', 'nsg_ids': :'nsgIds', 'access_targets': :'accessTargets', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'security_attributes': :'securityAttributes' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 104 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'compartment_id': :'String', 'subnet_id': :'String', 'prefix': :'String', 'additional_prefixes': :'Array<String>', 'private_endpoint_ip': :'String', 'nsg_ids': :'Array<String>', 'access_targets': :'Array<OCI::ObjectStorage::Models::AccessTargetDetails>', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'security_attributes': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 211 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && compartment_id == other.compartment_id && subnet_id == other.subnet_id && prefix == other.prefix && additional_prefixes == other.additional_prefixes && private_endpoint_ip == other.private_endpoint_ip && nsg_ids == other.nsg_ids && access_targets == other.access_targets && == other. && == other. && security_attributes == other.security_attributes end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 251 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
231 232 233 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 231 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
240 241 242 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 240 def hash [name, compartment_id, subnet_id, prefix, additional_prefixes, private_endpoint_ip, nsg_ids, access_targets, , , security_attributes].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 284 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
278 279 280 |
# File 'lib/oci/object_storage/models/create_private_endpoint_details.rb', line 278 def to_s to_hash.to_s end |