Subnetwork class final
Represents a Subnetwork resource.
A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network.
Constructors
-
Subnetwork({bool? allowSubnetCidrRoutesOverlap, String? creationTimestamp, String? description, bool? enableFlowLogs, String? externalIpv6Prefix, String? fingerprint, String? gatewayAddress, BigInt? id, String? internalIpv6Prefix, String? ipCidrRange, String? ipCollection, String? ipv6AccessType, String? ipv6CidrRange, String? ipv6GceEndpoint, String? kind, SubnetworkLogConfig? logConfig, String? name, String? network, SubnetworkParams? params, bool? privateIpGoogleAccess, String? privateIpv6GoogleAccess, String? purpose, String? region, String? reservedInternalRange, String? resolveSubnetMask, String? role, List<
SubnetworkSecondaryRange> secondaryIpRanges = const [], String? selfLink, String? stackType, String? state, List<String> systemReservedExternalIpv6Ranges = const [], List<String> systemReservedInternalIpv6Ranges = const [], SubnetworkUtilizationDetails? utilizationDetails}) - Subnetwork.fromJson(Object? j)
-
factory
Properties
- allowSubnetCidrRoutesOverlap → bool?
-
Whether this subnetwork's ranges can conflict with existing custom routes.
Setting this to true allows this subnetwork's primary and secondary ranges
to overlap with (and contain) custom routes that have already been
configured on the corresponding network.
final
- creationTimestamp → String?
-
Output only.
Output OnlyCreation timestamp inRFC3339 text format.final - description → String?
-
An optional description of this resource. Provide this property when you
create the resource. This field can be set only at resource creation time.
final
- enableFlowLogs → bool?
-
Whether to enable flow logging for this subnetwork. If this field is not
explicitly set, it will not appear in get listings. If not set
the default behavior is determined by the org policy, if there is no org
policy specified, then it will default to disabled. This field isn't
supported if the subnet purpose field is set toREGIONAL_MANAGED_PROXY. It is recommended to uselogConfig.enable field instead.
final
- externalIpv6Prefix → String?
-
The external IPv6 address range that is owned by this
subnetwork.
final
- fingerprint → String?
-
Fingerprint of this resource. A hash of the contents stored in this object.
This field is used in optimistic locking. This field will be ignored when
inserting a Subnetwork. An up-to-date fingerprint must be
provided in order to update the Subnetwork, otherwise the
request will fail with error 412 conditionNotMet.
final
- gatewayAddress → String?
-
Output only.
Output OnlyThe gateway address for default routes to reach destination addresses outside this subnetwork.final - hashCode → int
-
The hash code for this object.
no setterinherited
- id → BigInt?
-
Output only.
Output OnlyThe unique identifier for the resource. This identifier is defined by the server.final - internalIpv6Prefix → String?
-
The internal IPv6 address range that is owned by this
subnetwork.
final
- ipCidrRange → String?
-
The range of internal addresses that are owned by this subnetwork.
Provide this property when you create the subnetwork. For example,10.0.0.0/8 or 100.64.0.0/10. Ranges must
be unique and non-overlapping within a network. Only IPv4 is supported.
This field is set at resource creation time. The range can be any range
listed in theValid
ranges list. The range can be expanded after creation usingexpandIpCidrRange.
final
- ipCollection → String?
-
Reference to the source of IP, like a PublicDelegatedPrefix
(PDP) for BYOIP. The PDP must be a sub-PDP in
EXTERNAL_IPV6_SUBNETWORK_CREATION or INTERNAL_IPV6_SUBNETWORK_CREATION
mode.
final
- ipv6AccessType → String?
-
The access type of IPv6 address this subnet holds. It's immutable and can
only be specified during creation or the first time the subnet is updated
into IPV4_IPV6 dual stack.
Check the Ipv6AccessType enum for the list of possible values.
final
- ipv6CidrRange → String?
-
Output only.
Output OnlyThis field is for internal use.final - ipv6GceEndpoint → String?
-
Output only.
Output OnlyPossible endpoints of this subnetwork. It can be one of the following:final - kind → String?
-
Output only.
Output OnlyType of the resource. Always compute#subnetwork for Subnetwork resources.final - logConfig → SubnetworkLogConfig?
-
This field denotes the VPC flow logging options for this subnetwork.
If logging is enabled, logs are exported to Cloud Logging.
final
- name → String?
-
The name of the resource, provided by the client when initially creating
the resource. The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression
[a-z]([-a-z0-9]*[a-z0-9])?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.final - network → String?
-
The URL of the network to which this subnetwork belongs, provided by the
client when initially creating the subnetwork. This field can be set only
at resource creation time.
final
- params → SubnetworkParams?
-
Input only.
Input OnlyAdditional params passed with the request, but not persisted as part of resource payload.final - privateIpGoogleAccess → bool?
-
Whether the VMs in this subnet can access Google services without assigned
external IP addresses. This field can be both set at resource creation
time and updated using setPrivateIpGoogleAccess.
final
- privateIpv6GoogleAccess → String?
-
This field is for internal use.
final
- purpose → String?
-
Check the Purpose enum for the list of possible values.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - region → String?
-
URL of the region where the Subnetwork resides. This
field can be set only at resource creation time.
final
- reservedInternalRange → String?
-
The URL of the reserved internal range.
final
- resolveSubnetMask → String?
-
Configures subnet mask resolution for this subnetwork.
Check the ResolveSubnetMask enum for the list of possible values.
final
- role → String?
-
The role of subnetwork. Currently, this field is only used when
purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE
subnetwork is one that is currently being used for Envoy-based load
balancers in a region. A BACKUP subnetwork is one that is
ready to be promoted to ACTIVE or is currently draining.
This field can be updated with a patch request.
Check the Role enum for the list of possible values.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secondaryIpRanges
→ List<
SubnetworkSecondaryRange> -
An array of configurations for secondary IP ranges for VM instances
contained in this subnetwork. The primary IP of such VM must belong to the
primary ipCidrRange of the subnetwork. The alias IPs may belong to either
primary or secondary ranges. This field can be updated with apatch request. Supports both IPv4 and IPv6 ranges.
final
- selfLink → String?
-
Output OnlyServer-defined URL for the resource.final - stackType → String?
-
The stack type for the subnet. If set to IPV4_ONLY, new VMs
in the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and
IPv6 addresses. If not specified, IPV4_ONLY is used.
final
- state → String?
-
Output only.
Output OnlyThe state of the subnetwork, which can be one of the following values:READY: Subnetwork is created and ready to useDRAINING: only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status ofREADY Check the State enum for the list of possible values.final -
systemReservedExternalIpv6Ranges
→ List<
String> -
Output only.
Output OnlyThe array of external IPv6 network ranges reserved from the subnetwork's external IPv6 range for system use.final -
systemReservedInternalIpv6Ranges
→ List<
String> -
Output only.
Output OnlyThe array of internal IPv6 network ranges reserved from the subnetwork's internal IPv6 range for system use.final - utilizationDetails → SubnetworkUtilizationDetails?
-
Output only.
Output OnlyThe current IP utilization of all subnetwork ranges. Contains the total number of allocated and free IPs in each range.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String