Class AccessConfig.Builder (1.88.0)

public static final class AccessConfig.Builder extends GeneratedMessageV3.Builder<AccessConfig.Builder> implements AccessConfigOrBuilder

An access configuration attached to an instance's network interface. Only one access config per instance is supported.

Protobuf type google.cloud.compute.v1.AccessConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AccessConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AccessConfig.Builder
Overrides

build()

public AccessConfig build()
Returns
Type Description
AccessConfig

buildPartial()

public AccessConfig buildPartial()
Returns
Type Description
AccessConfig

clear()

public AccessConfig.Builder clear()
Returns
Type Description
AccessConfig.Builder
Overrides

clearExternalIpv6()

public AccessConfig.Builder clearExternalIpv6()

Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork.

optional string external_ipv6 = 532703707;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearExternalIpv6PrefixLength()

public AccessConfig.Builder clearExternalIpv6PrefixLength()

Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range.

optional int32 external_ipv6_prefix_length = 425672143;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AccessConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AccessConfig.Builder
Overrides

clearKind()

public AccessConfig.Builder clearKind()

[Output Only] Type of the resource. Always compute#accessConfig for access configs.

optional string kind = 3292052;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearName()

public AccessConfig.Builder clearName()

The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6.

optional string name = 3373707;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearNatIP()

public AccessConfig.Builder clearNatIP()

Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.

optional string nat_i_p = 117634556;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearNetworkTier()

public AccessConfig.Builder clearNetworkTier()

This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Check the NetworkTier enum for the list of possible values.

optional string network_tier = 517397843;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AccessConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AccessConfig.Builder
Overrides

clearPublicPtrDomainName()

public AccessConfig.Builder clearPublicPtrDomainName()

The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range.

optional string public_ptr_domain_name = 316599167;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearSecurityPolicy()

public AccessConfig.Builder clearSecurityPolicy()

The resource URL for the security policy associated with this access config.

optional string security_policy = 171082513;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearSetPublicPtr()

public AccessConfig.Builder clearSetPublicPtr()

Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated.

optional bool set_public_ptr = 523870229;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clearType()

public AccessConfig.Builder clearType()

The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
Type Description
AccessConfig.Builder

This builder for chaining.

clone()

public AccessConfig.Builder clone()
Returns
Type Description
AccessConfig.Builder
Overrides

getDefaultInstanceForType()

public AccessConfig getDefaultInstanceForType()
Returns
Type Description
AccessConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExternalIpv6()

public String getExternalIpv6()

Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork.

optional string external_ipv6 = 532703707;

Returns
Type Description
String

The externalIpv6.

getExternalIpv6Bytes()

public ByteString getExternalIpv6Bytes()

Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork.

optional string external_ipv6 = 532703707;

Returns
Type Description
ByteString

The bytes for externalIpv6.

getExternalIpv6PrefixLength()

public int getExternalIpv6PrefixLength()

Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range.

optional int32 external_ipv6_prefix_length = 425672143;

Returns
Type Description
int

The externalIpv6PrefixLength.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#accessConfig for access configs.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#accessConfig for access configs.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

getName()

public String getName()

The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6.

optional string name = 3373707;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6.

optional string name = 3373707;

Returns
Type Description
ByteString

The bytes for name.

getNatIP()

public String getNatIP()

Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.

optional string nat_i_p = 117634556;

Returns
Type Description
String

The natIP.

getNatIPBytes()

public ByteString getNatIPBytes()

Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.

optional string nat_i_p = 117634556;

Returns
Type Description
ByteString

The bytes for natIP.

getNetworkTier()

public String getNetworkTier()

This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Check the NetworkTier enum for the list of possible values.

optional string network_tier = 517397843;

Returns
Type Description
String

The networkTier.

getNetworkTierBytes()

public ByteString getNetworkTierBytes()

This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Check the NetworkTier enum for the list of possible values.

optional string network_tier = 517397843;

Returns
Type Description
ByteString

The bytes for networkTier.

getPublicPtrDomainName()

public String getPublicPtrDomainName()

The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range.

optional string public_ptr_domain_name = 316599167;

Returns
Type Description
String

The publicPtrDomainName.

getPublicPtrDomainNameBytes()

public ByteString getPublicPtrDomainNameBytes()

The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range.

optional string public_ptr_domain_name = 316599167;

Returns
Type Description
ByteString

The bytes for publicPtrDomainName.

getSecurityPolicy()

public String getSecurityPolicy()

The resource URL for the security policy associated with this access config.

optional string security_policy = 171082513;

Returns
Type Description
String

The securityPolicy.