Compute V1 Client - Class UsableSubnetwork (1.23.0)

Reference documentation and code samples for the Compute V1 Client class UsableSubnetwork.

Subnetwork which the current user has compute.subnetworks.use permission on.

Generated from protobuf message google.cloud.compute.v1.UsableSubnetwork

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ external_ipv6_prefixstring

[Output Only] The external IPv6 address range that is assigned to this subnetwork.

↳ internal_ipv6_prefixstring

[Output Only] The internal IPv6 address range that is assigned to this subnetwork.

↳ ip_cidr_rangestring

The range of internal addresses that are owned by this subnetwork.

↳ ipv6_access_typestring

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.

↳ networkstring

Network URL.

↳ purposestring

The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. Check the Purpose enum for the list of possible values.

↳ rolestring

The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE 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 request. Check the Role enum for the list of possible values.

↳ secondary_ip_rangesarray<UsableSubnetworkSecondaryRange>

Secondary IP ranges.

↳ stack_typestring

The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using . Check the StackType enum for the list of possible values.

↳ subnetworkstring

Subnetwork URL.

getExternalIpv6Prefix

[Output Only] The external IPv6 address range that is assigned to this subnetwork.

Returns
TypeDescription
string

hasExternalIpv6Prefix

clearExternalIpv6Prefix

setExternalIpv6Prefix

[Output Only] The external IPv6 address range that is assigned to this subnetwork.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getInternalIpv6Prefix

[Output Only] The internal IPv6 address range that is assigned to this subnetwork.

Returns
TypeDescription
string

hasInternalIpv6Prefix

clearInternalIpv6Prefix

setInternalIpv6Prefix

[Output Only] The internal IPv6 address range that is assigned to this subnetwork.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getIpCidrRange

The range of internal addresses that are owned by this subnetwork.

Returns
TypeDescription
string

hasIpCidrRange

clearIpCidrRange

setIpCidrRange

The range of internal addresses that are owned by this subnetwork.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getIpv6AccessType

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.

Returns
TypeDescription
string

hasIpv6AccessType

clearIpv6AccessType

setIpv6AccessType

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.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getNetwork

Network URL.

Returns
TypeDescription
string

hasNetwork

clearNetwork

setNetwork

Network URL.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getPurpose

The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.

Check the Purpose enum for the list of possible values.

Returns
TypeDescription
string

hasPurpose

clearPurpose

setPurpose

The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.

Check the Purpose enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getRole

The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE 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 request.

Check the Role enum for the list of possible values.

Returns
TypeDescription
string

hasRole

clearRole

setRole

The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE 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 request.

Check the Role enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getSecondaryIpRanges

Secondary IP ranges.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setSecondaryIpRanges

Secondary IP ranges.

Parameter
NameDescription
vararray<UsableSubnetworkSecondaryRange>
Returns
TypeDescription
$this

getStackType

The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using .

Check the StackType enum for the list of possible values.

Returns
TypeDescription
string

hasStackType

clearStackType

setStackType

The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using .

Check the StackType enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getSubnetwork

Subnetwork URL.

Returns
TypeDescription
string

hasSubnetwork

clearSubnetwork

setSubnetwork

Subnetwork URL.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this