Class: Google::Apis::ServicenetworkingV1::AddSubnetworkRequest

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

Overview

Request to create a subnetwork in a previously peered service network.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AddSubnetworkRequest

Returns a new instance of AddSubnetworkRequest.



292
293
294
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 292

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

Instance Attribute Details

#consumerString

Required. A resource that represents the service consumer, such as projects/ 123456. The project number can be different from the value in the consumer network parameter. For example, the network might be part of a Shared VPC network. In those cases, Service Networking validates that this resource belongs to that Shared VPC. Corresponds to the JSON property consumer

Returns:

  • (String)


225
226
227
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 225

def consumer
  @consumer
end

#consumer_networkString

Required. The name of the service consumer's VPC network. The network must have an existing private connection that was provisioned through the connections.create method. The name must be in the following format: projects/ project/global/networks/network`, whereprojectis a project number, such as12345.networkis the name of a VPC network in the project. Corresponds to the JSON propertyconsumerNetwork`

Returns:

  • (String)


234
235
236
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 234

def consumer_network
  @consumer_network
end

#descriptionString

Optional. Description of the subnet. Corresponds to the JSON property description

Returns:

  • (String)


239
240
241
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 239

def description
  @description
end

#ip_prefix_lengthFixnum

Required. The prefix length of the subnet's IP address range. Use CIDR range notation, such as 30 to provision a subnet with an x.x.x.x/30 CIDR range. The IP address range is drawn from a pool of available ranges in the service consumer's allocated range. Corresponds to the JSON property ipPrefixLength

Returns:

  • (Fixnum)


247
248
249
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 247

def ip_prefix_length
  @ip_prefix_length
end

#regionString

Required. The name of a region for the subnet, such europe-west1. Corresponds to the JSON property region

Returns:

  • (String)


253
254
255
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 253

def region
  @region
end

#requested_addressString

Optional. The starting address of a range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix range is the CIDR range for the subnet. The range must be within the allocated range that is assigned to the private connection. If the CIDR range isn't available, the call fails. Corresponds to the JSON property requestedAddress

Returns:

  • (String)


262
263
264
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 262

def requested_address
  @requested_address
end

#requested_rangesArray<String>

Optional. The name of one or more allocated IP address ranges associated with this private service access connection. If no range names are provided all ranges associated with this connection will be considered. If a CIDR range with the specified IP prefix length is not available within these ranges, the call fails. Corresponds to the JSON property requestedRanges

Returns:

  • (Array<String>)


271
272
273
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 271

def requested_ranges
  @requested_ranges
end

#secondary_ip_range_specsArray<Google::Apis::ServicenetworkingV1::SecondaryIpRangeSpec>

Optional. A list of secondary IP ranges to be created within the new subnetwork. Corresponds to the JSON property secondaryIpRangeSpecs



277
278
279
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 277

def secondary_ip_range_specs
  @secondary_ip_range_specs
end

#subnetworkString

Required. A name for the new subnet. For information about the naming requirements, see subnetwork in the Compute API documentation. Corresponds to the JSON property subnetwork

Returns:

  • (String)


284
285
286
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 284

def subnetwork
  @subnetwork
end

#subnetwork_usersArray<String>

A list of members that are granted the compute.networkUser role on the subnet. Corresponds to the JSON property subnetworkUsers

Returns:

  • (Array<String>)


290
291
292
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 290

def subnetwork_users
  @subnetwork_users
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



297
298
299
300
301
302
303
304
305
306
307
308
# File 'generated/google/apis/servicenetworking_v1/classes.rb', line 297

def update!(**args)
  @consumer = args[:consumer] if args.key?(:consumer)
  @consumer_network = args[:consumer_network] if args.key?(:consumer_network)
  @description = args[:description] if args.key?(:description)
  @ip_prefix_length = args[:ip_prefix_length] if args.key?(:ip_prefix_length)
  @region = args[:region] if args.key?(:region)
  @requested_address = args[:requested_address] if args.key?(:requested_address)
  @requested_ranges = args[:requested_ranges] if args.key?(:requested_ranges)
  @secondary_ip_range_specs = args[:secondary_ip_range_specs] if args.key?(:secondary_ip_range_specs)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
  @subnetwork_users = args[:subnetwork_users] if args.key?(:subnetwork_users)
end