class Google::Apis::ServicenetworkingV1::AddSubnetworkRequest

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

Attributes

consumer[RW]

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` @return [String]

consumer_network[RW]

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“, where `project` is a project number, such as `12345`. `network` is the name of a VPC network in the project. Corresponds to the JSON property `consumerNetwork` @return [String]

description[RW]

Optional. Description of the subnet. Corresponds to the JSON property `description` @return [String]

ip_prefix_length[RW]

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` @return [Fixnum]

private_ipv6_google_access[RW]

Optional. The private IPv6 google access type for the VMs in this subnet. For information about the access types that can be set using this field, see [ subnetwork](cloud.google.com/compute/docs/reference/rest/v1/ subnetworks) in the Compute API documentation. Corresponds to the JSON property `privateIpv6GoogleAccess` @return [String]

region[RW]

Required. The name of a [region](/compute/docs/regions-zones) for the subnet, such `europe-west1`. Corresponds to the JSON property `region` @return [String]

requested_address[RW]

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` @return [String]

requested_ranges[RW]

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` @return [Array<String>]

secondary_ip_range_specs[RW]

Optional. A list of secondary IP ranges to be created within the new subnetwork. Corresponds to the JSON property `secondaryIpRangeSpecs` @return [Array<Google::Apis::ServicenetworkingV1::SecondaryIpRangeSpec>]

subnetwork[RW]

Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation. Corresponds to the JSON property `subnetwork` @return [String]

subnetwork_users[RW]

A list of members that are granted the `compute.networkUser` role on the subnet. Corresponds to the JSON property `subnetworkUsers` @return [Array<String>]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/servicenetworking_v1/classes.rb, line 300
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/servicenetworking_v1/classes.rb, line 305
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)
  @private_ipv6_google_access = args[:private_ipv6_google_access] if args.key?(:private_ipv6_google_access)
  @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