Class: Google::Apis::NetworkconnectivityV1::InternalRange

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkconnectivity_v1/classes.rb,
lib/google/apis/networkconnectivity_v1/representations.rb,
lib/google/apis/networkconnectivity_v1/representations.rb

Overview

The internal range resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (its usage and peering behavior). Networking resources can link to this range if they are created as belonging to it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InternalRange

Returns a new instance of InternalRange.



1137
1138
1139
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1137

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#create_timeString

Time when the internal range was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1047
1048
1049
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1047

def create_time
  @create_time
end

#descriptionString

A description of this resource. Corresponds to the JSON property description

Returns:

  • (String)


1052
1053
1054
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1052

def description
  @description
end

#ip_cidr_rangeString

The IP range that this internal range defines. NOTE: IPv6 ranges are limited to usage=EXTERNAL_TO_VPC and peering=FOR_SELF. NOTE: For IPv6 Ranges this field is compulsory, i.e. the address range must be specified explicitly. Corresponds to the JSON property ipCidrRange

Returns:

  • (String)


1059
1060
1061
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1059

def ip_cidr_range
  @ip_cidr_range
end

#labelsHash<String,String>

User-defined labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1064
1065
1066
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1064

def labels
  @labels
end

#migrationGoogle::Apis::NetworkconnectivityV1::Migration

Specification for migration with source and target resource names. Corresponds to the JSON property migration



1069
1070
1071
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1069

def migration
  @migration
end

#nameString

Immutable. The name of an internal range. Format: projects/project/locations/ location/internalRanges/internal_range See: https://google.aip.dev/122# fields-representing-resource-names Corresponds to the JSON property name

Returns:

  • (String)


1076
1077
1078
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1076

def name
  @name
end

#networkString

The URL or resource ID of the network in which to reserve the internal range. The network cannot be deleted if there are any reserved internal ranges referring to it. Legacy networks are not supported. For example: https://www. googleapis.com/compute/v1/projects/project/locations/global/networks/ network projects/project/locations/global/networks/network network Corresponds to the JSON property network

Returns:

  • (String)


1085
1086
1087
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1085

def network
  @network
end

#overlapsArray<String>

Optional. Types of resources that are allowed to overlap with the current internal range. Corresponds to the JSON property overlaps

Returns:

  • (Array<String>)


1091
1092
1093
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1091

def overlaps
  @overlaps
end

#peeringString

The type of peering set for this internal range. Corresponds to the JSON property peering

Returns:

  • (String)


1096
1097
1098
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1096

def peering
  @peering
end

#prefix_lengthFixnum

An alternate to ip_cidr_range. Can be set when trying to create an IPv4 reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size. NOTE: For IPv6 this field only works if ip_cidr_range is set as well, and both fields must match. In other words, with IPv6 this field only works as a redundant parameter. Corresponds to the JSON property prefixLength

Returns:

  • (Fixnum)


1107
1108
1109
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1107

def prefix_length
  @prefix_length
end

#target_cidr_rangeArray<String>

Optional. Can be set to narrow down or pick a different address space while searching for a free range. If not set, defaults to the "10.0.0.0/8" address space. This can be used to search in other rfc-1918 address spaces like "172. 16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC. Corresponds to the JSON property targetCidrRange

Returns:

  • (Array<String>)


1115
1116
1117
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1115

def target_cidr_range
  @target_cidr_range
end

#update_timeString

Time when the internal range was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


1120
1121
1122
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1120

def update_time
  @update_time
end

#usageString

The type of usage set for this InternalRange. Corresponds to the JSON property usage

Returns:

  • (String)


1125
1126
1127
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1125

def usage
  @usage
end

#usersArray<String>

Output only. The list of resources that refer to this internal range. Resources that use the internal range for their range allocation are referred to as users of the range. Other resources mark themselves as users while doing so by creating a reference to this internal range. Having a user, based on this reference, prevents deletion of the internal range referred to. Can be empty. Corresponds to the JSON property users

Returns:

  • (Array<String>)


1135
1136
1137
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1135

def users
  @users
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1142

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @ip_cidr_range = args[:ip_cidr_range] if args.key?(:ip_cidr_range)
  @labels = args[:labels] if args.key?(:labels)
  @migration = args[:migration] if args.key?(:migration)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @overlaps = args[:overlaps] if args.key?(:overlaps)
  @peering = args[:peering] if args.key?(:peering)
  @prefix_length = args[:prefix_length] if args.key?(:prefix_length)
  @target_cidr_range = args[:target_cidr_range] if args.key?(:target_cidr_range)
  @update_time = args[:update_time] if args.key?(:update_time)
  @usage = args[:usage] if args.key?(:usage)
  @users = args[:users] if args.key?(:users)
end