Class: Google::Apis::ServicenetworkingV1beta::AddSubnetworkRequest
- Inherits:
-
Object
- Object
- Google::Apis::ServicenetworkingV1beta::AddSubnetworkRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/servicenetworking_v1beta/classes.rb,
generated/google/apis/servicenetworking_v1beta/representations.rb,
generated/google/apis/servicenetworking_v1beta/representations.rb
Overview
Request to create a subnetwork in a previously peered service network.
Instance Attribute Summary collapse
-
#consumer ⇒ String
Required.
-
#consumer_network ⇒ String
Required.
-
#description ⇒ String
An optional description of the subnet.
-
#ip_prefix_length ⇒ Fixnum
Required.
-
#region ⇒ String
Required.
-
#requested_address ⇒ String
Optional.
-
#subnetwork ⇒ String
Required.
-
#subnetwork_users ⇒ Array<String>
A list of members that are granted the
compute.networkUser
role on the subnet.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AddSubnetworkRequest
constructor
A new instance of AddSubnetworkRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AddSubnetworkRequest
Returns a new instance of AddSubnetworkRequest.
176 177 178 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 176 def initialize(**args) update!(**args) end |
Instance Attribute Details
#consumer ⇒ String
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
124 125 126 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 124 def consumer @consumer end |
#consumer_network ⇒ String
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
projectis a project number,
such as
12345.
networkis the name of a VPC network in the project.
Corresponds to the JSON property
consumerNetwork`
133 134 135 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 133 def consumer_network @consumer_network end |
#description ⇒ String
An optional description of the subnet.
Corresponds to the JSON property description
138 139 140 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 138 def description @description end |
#ip_prefix_length ⇒ Fixnum
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
146 147 148 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 146 def ip_prefix_length @ip_prefix_length end |
#region ⇒ String
Required. The name of a region for the subnet,
such europe-west1
.
Corresponds to the JSON property region
152 153 154 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 152 def region @region end |
#requested_address ⇒ String
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
161 162 163 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 161 def requested_address @requested_address end |
#subnetwork ⇒ String
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
168 169 170 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 168 def subnetwork @subnetwork end |
#subnetwork_users ⇒ Array<String>
A list of members that are granted the compute.networkUser
role on the
subnet.
Corresponds to the JSON property subnetworkUsers
174 175 176 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 174 def subnetwork_users @subnetwork_users end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
181 182 183 184 185 186 187 188 189 190 |
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 181 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) @subnetwork = args[:subnetwork] if args.key?(:subnetwork) @subnetwork_users = args[:subnetwork_users] if args.key?(:subnetwork_users) end |