Class IpConfiguration.Builder (0.1.0)

public static final class IpConfiguration.Builder extends GeneratedMessage.Builder<IpConfiguration.Builder> implements IpConfigurationOrBuilder

IP Management configuration.

Protobuf type google.cloud.sql.v1beta4.IpConfiguration

Static Methods

getDescriptor()

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

Methods

addAllAuthorizedNetworks(Iterable<? extends AclEntry> values)

public IpConfiguration.Builder addAllAuthorizedNetworks(Iterable<? extends AclEntry> values)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
values Iterable<? extends com.google.cloud.sql.v1beta4.AclEntry>
Returns
Type Description
IpConfiguration.Builder

addAllCustomSubjectAlternativeNames(Iterable<String> values)

public IpConfiguration.Builder addAllCustomSubjectAlternativeNames(Iterable<String> values)

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The customSubjectAlternativeNames to add.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

addAuthorizedNetworks(AclEntry value)

public IpConfiguration.Builder addAuthorizedNetworks(AclEntry value)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
value AclEntry
Returns
Type Description
IpConfiguration.Builder

addAuthorizedNetworks(AclEntry.Builder builderForValue)

public IpConfiguration.Builder addAuthorizedNetworks(AclEntry.Builder builderForValue)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
builderForValue AclEntry.Builder
Returns
Type Description
IpConfiguration.Builder

addAuthorizedNetworks(int index, AclEntry value)

public IpConfiguration.Builder addAuthorizedNetworks(int index, AclEntry value)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameters
Name Description
index int
value AclEntry
Returns
Type Description
IpConfiguration.Builder

addAuthorizedNetworks(int index, AclEntry.Builder builderForValue)

public IpConfiguration.Builder addAuthorizedNetworks(int index, AclEntry.Builder builderForValue)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameters
Name Description
index int
builderForValue AclEntry.Builder
Returns
Type Description
IpConfiguration.Builder

addAuthorizedNetworksBuilder()

public AclEntry.Builder addAuthorizedNetworksBuilder()

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Returns
Type Description
AclEntry.Builder

addAuthorizedNetworksBuilder(int index)

public AclEntry.Builder addAuthorizedNetworksBuilder(int index)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
index int
Returns
Type Description
AclEntry.Builder

addCustomSubjectAlternativeNames(String value)

public IpConfiguration.Builder addCustomSubjectAlternativeNames(String value)

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The customSubjectAlternativeNames to add.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

addCustomSubjectAlternativeNamesBytes(ByteString value)

public IpConfiguration.Builder addCustomSubjectAlternativeNamesBytes(ByteString value)

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the customSubjectAlternativeNames to add.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

build()

public IpConfiguration build()
Returns
Type Description
IpConfiguration

buildPartial()

public IpConfiguration buildPartial()
Returns
Type Description
IpConfiguration

clear()

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

clearAllocatedIpRange()

public IpConfiguration.Builder clearAllocatedIpRange()

The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.

string allocated_ip_range = 6;

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

clearAuthorizedNetworks()

public IpConfiguration.Builder clearAuthorizedNetworks()

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Returns
Type Description
IpConfiguration.Builder

clearCustomSubjectAlternativeNames()

public IpConfiguration.Builder clearCustomSubjectAlternativeNames()

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

clearEnablePrivatePathForGoogleCloudServices()

public IpConfiguration.Builder clearEnablePrivatePathForGoogleCloudServices()

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Returns
Type Description
IpConfiguration.Builder

clearIpv4Enabled()

public IpConfiguration.Builder clearIpv4Enabled()

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Returns
Type Description
IpConfiguration.Builder

clearPrivateNetwork()

public IpConfiguration.Builder clearPrivateNetwork()

The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, /projects/myProject/global/networks/default. This setting can be updated, but it cannot be removed after it is set.

string private_network = 2;

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

clearPscConfig()

public IpConfiguration.Builder clearPscConfig()

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Returns
Type Description
IpConfiguration.Builder

clearRequireSsl()

public IpConfiguration.Builder clearRequireSsl()

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Returns
Type Description
IpConfiguration.Builder

clearServerCaMode()

public IpConfiguration.Builder clearServerCaMode()

Specify what type of CA is used for the server certificate.

optional .google.cloud.sql.v1beta4.IpConfiguration.CaMode server_ca_mode = 10;

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

clearServerCaPool()

public IpConfiguration.Builder clearServerCaPool()

Optional. The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CA as the server_ca_mode. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}

optional string server_ca_pool = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

clearServerCertificateRotationMode()

public IpConfiguration.Builder clearServerCertificateRotationMode()

Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.

optional .google.cloud.sql.v1beta4.IpConfiguration.ServerCertificateRotationMode server_certificate_rotation_mode = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

clearSslMode()

public IpConfiguration.Builder clearSslMode()

Specify how SSL/TLS is enforced in database connections. If you must use the require_ssl flag for backward compatibility, then only the following value pairs are valid:

For PostgreSQL and MySQL:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false
  • ssl_mode=ENCRYPTED_ONLY and require_ssl=false
  • ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED and require_ssl=true

    For SQL Server:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false

  • ssl_mode=ENCRYPTED_ONLY and require_ssl=true

    The value of ssl_mode has priority over the value of require_ssl.

    For example, for the pair ssl_mode=ENCRYPTED_ONLY and require_ssl=false, ssl_mode=ENCRYPTED_ONLY means accept only SSL connections, while require_ssl=false means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect ssl_mode and accepts only SSL connections.

.google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

getAllocatedIpRange()

public String getAllocatedIpRange()

The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.

string allocated_ip_range = 6;

Returns
Type Description
String

The allocatedIpRange.

getAllocatedIpRangeBytes()

public ByteString getAllocatedIpRangeBytes()

The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.

string allocated_ip_range = 6;

Returns
Type Description
ByteString

The bytes for allocatedIpRange.

getAuthorizedNetworks(int index)

public AclEntry getAuthorizedNetworks(int index)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
index int
Returns
Type Description
AclEntry

getAuthorizedNetworksBuilder(int index)

public AclEntry.Builder getAuthorizedNetworksBuilder(int index)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
index int
Returns
Type Description
AclEntry.Builder

getAuthorizedNetworksBuilderList()

public List<AclEntry.Builder> getAuthorizedNetworksBuilderList()

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Returns
Type Description
List<Builder>

getAuthorizedNetworksCount()

public int getAuthorizedNetworksCount()

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Returns
Type Description
int

getAuthorizedNetworksList()

public List<AclEntry> getAuthorizedNetworksList()

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Returns
Type Description
List<AclEntry>

getAuthorizedNetworksOrBuilder(int index)

public AclEntryOrBuilder getAuthorizedNetworksOrBuilder(int index)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
index int
Returns
Type Description
AclEntryOrBuilder

getAuthorizedNetworksOrBuilderList()

public List<? extends AclEntryOrBuilder> getAuthorizedNetworksOrBuilderList()

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Returns
Type Description
List<? extends com.google.cloud.sql.v1beta4.AclEntryOrBuilder>

getCustomSubjectAlternativeNames(int index)

public String getCustomSubjectAlternativeNames(int index)

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The customSubjectAlternativeNames at the given index.

getCustomSubjectAlternativeNamesBytes(int index)

public ByteString getCustomSubjectAlternativeNamesBytes(int index)

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the customSubjectAlternativeNames at the given index.

getCustomSubjectAlternativeNamesCount()

public int getCustomSubjectAlternativeNamesCount()

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of customSubjectAlternativeNames.

getCustomSubjectAlternativeNamesList()

public ProtocolStringList getCustomSubjectAlternativeNamesList()

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the customSubjectAlternativeNames.

getDefaultInstanceForType()

public IpConfiguration getDefaultInstanceForType()
Returns
Type Description
IpConfiguration

getDescriptorForType()

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

getEnablePrivatePathForGoogleCloudServices()

public BoolValue getEnablePrivatePathForGoogleCloudServices()

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Returns
Type Description
BoolValue

The enablePrivatePathForGoogleCloudServices.

getEnablePrivatePathForGoogleCloudServicesBuilder()

public BoolValue.Builder getEnablePrivatePathForGoogleCloudServicesBuilder()

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Returns
Type Description
Builder

getEnablePrivatePathForGoogleCloudServicesOrBuilder()

public BoolValueOrBuilder getEnablePrivatePathForGoogleCloudServicesOrBuilder()

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Returns
Type Description
BoolValueOrBuilder

getIpv4Enabled()

public BoolValue getIpv4Enabled()

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Returns
Type Description
BoolValue

The ipv4Enabled.

getIpv4EnabledBuilder()

public BoolValue.Builder getIpv4EnabledBuilder()

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Returns
Type Description
Builder

getIpv4EnabledOrBuilder()

public BoolValueOrBuilder getIpv4EnabledOrBuilder()

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Returns
Type Description
BoolValueOrBuilder

getPrivateNetwork()

public String getPrivateNetwork()

The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, /projects/myProject/global/networks/default. This setting can be updated, but it cannot be removed after it is set.

string private_network = 2;

Returns
Type Description
String

The privateNetwork.

getPrivateNetworkBytes()

public ByteString getPrivateNetworkBytes()

The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, /projects/myProject/global/networks/default. This setting can be updated, but it cannot be removed after it is set.

string private_network = 2;

Returns
Type Description
ByteString

The bytes for privateNetwork.

getPscConfig()

public PscConfig getPscConfig()

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Returns
Type Description
PscConfig

The pscConfig.

getPscConfigBuilder()

public PscConfig.Builder getPscConfigBuilder()

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Returns
Type Description
PscConfig.Builder

getPscConfigOrBuilder()

public PscConfigOrBuilder getPscConfigOrBuilder()

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Returns
Type Description
PscConfigOrBuilder

getRequireSsl()

public BoolValue getRequireSsl()

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Returns
Type Description
BoolValue

The requireSsl.

getRequireSslBuilder()

public BoolValue.Builder getRequireSslBuilder()

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Returns
Type Description
Builder

getRequireSslOrBuilder()

public BoolValueOrBuilder getRequireSslOrBuilder()

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Returns
Type Description
BoolValueOrBuilder

getServerCaMode()

public IpConfiguration.CaMode getServerCaMode()

Specify what type of CA is used for the server certificate.

optional .google.cloud.sql.v1beta4.IpConfiguration.CaMode server_ca_mode = 10;

Returns
Type Description
IpConfiguration.CaMode

The serverCaMode.

getServerCaModeValue()

public int getServerCaModeValue()

Specify what type of CA is used for the server certificate.

optional .google.cloud.sql.v1beta4.IpConfiguration.CaMode server_ca_mode = 10;

Returns
Type Description
int

The enum numeric value on the wire for serverCaMode.

getServerCaPool()

public String getServerCaPool()

Optional. The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CA as the server_ca_mode. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}

optional string server_ca_pool = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The serverCaPool.

getServerCaPoolBytes()

public ByteString getServerCaPoolBytes()

Optional. The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CA as the server_ca_mode. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}

optional string server_ca_pool = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for serverCaPool.

getServerCertificateRotationMode()

public IpConfiguration.ServerCertificateRotationMode getServerCertificateRotationMode()

Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.

optional .google.cloud.sql.v1beta4.IpConfiguration.ServerCertificateRotationMode server_certificate_rotation_mode = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
IpConfiguration.ServerCertificateRotationMode

The serverCertificateRotationMode.

getServerCertificateRotationModeValue()

public int getServerCertificateRotationModeValue()

Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.

optional .google.cloud.sql.v1beta4.IpConfiguration.ServerCertificateRotationMode server_certificate_rotation_mode = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for serverCertificateRotationMode.

getSslMode()

public IpConfiguration.SslMode getSslMode()

Specify how SSL/TLS is enforced in database connections. If you must use the require_ssl flag for backward compatibility, then only the following value pairs are valid:

For PostgreSQL and MySQL:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false
  • ssl_mode=ENCRYPTED_ONLY and require_ssl=false
  • ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED and require_ssl=true

    For SQL Server:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false

  • ssl_mode=ENCRYPTED_ONLY and require_ssl=true

    The value of ssl_mode has priority over the value of require_ssl.

    For example, for the pair ssl_mode=ENCRYPTED_ONLY and require_ssl=false, ssl_mode=ENCRYPTED_ONLY means accept only SSL connections, while require_ssl=false means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect ssl_mode and accepts only SSL connections.

.google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;

Returns
Type Description
IpConfiguration.SslMode

The sslMode.

getSslModeValue()

public int getSslModeValue()

Specify how SSL/TLS is enforced in database connections. If you must use the require_ssl flag for backward compatibility, then only the following value pairs are valid:

For PostgreSQL and MySQL:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false
  • ssl_mode=ENCRYPTED_ONLY and require_ssl=false
  • ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED and require_ssl=true

    For SQL Server:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false

  • ssl_mode=ENCRYPTED_ONLY and require_ssl=true

    The value of ssl_mode has priority over the value of require_ssl.

    For example, for the pair ssl_mode=ENCRYPTED_ONLY and require_ssl=false, ssl_mode=ENCRYPTED_ONLY means accept only SSL connections, while require_ssl=false means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect ssl_mode and accepts only SSL connections.

.google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;

Returns
Type Description
int

The enum numeric value on the wire for sslMode.

hasEnablePrivatePathForGoogleCloudServices()

public boolean hasEnablePrivatePathForGoogleCloudServices()

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Returns
Type Description
boolean

Whether the enablePrivatePathForGoogleCloudServices field is set.

hasIpv4Enabled()

public boolean hasIpv4Enabled()

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Returns
Type Description
boolean

Whether the ipv4Enabled field is set.

hasPscConfig()

public boolean hasPscConfig()

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Returns
Type Description
boolean

Whether the pscConfig field is set.

hasRequireSsl()

public boolean hasRequireSsl()

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Returns
Type Description
boolean

Whether the requireSsl field is set.

hasServerCaMode()

public boolean hasServerCaMode()

Specify what type of CA is used for the server certificate.

optional .google.cloud.sql.v1beta4.IpConfiguration.CaMode server_ca_mode = 10;

Returns
Type Description
boolean

Whether the serverCaMode field is set.

hasServerCaPool()

public boolean hasServerCaPool()

Optional. The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CA as the server_ca_mode. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}

optional string server_ca_pool = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the serverCaPool field is set.

hasServerCertificateRotationMode()

public boolean hasServerCertificateRotationMode()

Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.

optional .google.cloud.sql.v1beta4.IpConfiguration.ServerCertificateRotationMode server_certificate_rotation_mode = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the serverCertificateRotationMode field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEnablePrivatePathForGoogleCloudServices(BoolValue value)

public IpConfiguration.Builder mergeEnablePrivatePathForGoogleCloudServices(BoolValue value)

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Parameter
Name Description
value BoolValue
Returns
Type Description
IpConfiguration.Builder

mergeFrom(IpConfiguration other)

public IpConfiguration.Builder mergeFrom(IpConfiguration other)
Parameter
Name Description
other IpConfiguration
Returns
Type Description
IpConfiguration.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public IpConfiguration.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpConfiguration.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public IpConfiguration.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
IpConfiguration.Builder
Overrides

mergeIpv4Enabled(BoolValue value)

public IpConfiguration.Builder mergeIpv4Enabled(BoolValue value)

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Parameter
Name Description
value BoolValue
Returns
Type Description
IpConfiguration.Builder

mergePscConfig(PscConfig value)

public IpConfiguration.Builder mergePscConfig(PscConfig value)

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Parameter
Name Description
value PscConfig
Returns
Type Description
IpConfiguration.Builder

mergeRequireSsl(BoolValue value)

public IpConfiguration.Builder mergeRequireSsl(BoolValue value)

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Parameter
Name Description
value BoolValue
Returns
Type Description
IpConfiguration.Builder

removeAuthorizedNetworks(int index)

public IpConfiguration.Builder removeAuthorizedNetworks(int index)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameter
Name Description
index int
Returns
Type Description
IpConfiguration.Builder

setAllocatedIpRange(String value)

public IpConfiguration.Builder setAllocatedIpRange(String value)

The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.

string allocated_ip_range = 6;

Parameter
Name Description
value String

The allocatedIpRange to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setAllocatedIpRangeBytes(ByteString value)

public IpConfiguration.Builder setAllocatedIpRangeBytes(ByteString value)

The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.

string allocated_ip_range = 6;

Parameter
Name Description
value ByteString

The bytes for allocatedIpRange to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setAuthorizedNetworks(int index, AclEntry value)

public IpConfiguration.Builder setAuthorizedNetworks(int index, AclEntry value)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameters
Name Description
index int
value AclEntry
Returns
Type Description
IpConfiguration.Builder

setAuthorizedNetworks(int index, AclEntry.Builder builderForValue)

public IpConfiguration.Builder setAuthorizedNetworks(int index, AclEntry.Builder builderForValue)

The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: 157.197.200.0/24).

repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4;

Parameters
Name Description
index int
builderForValue AclEntry.Builder
Returns
Type Description
IpConfiguration.Builder

setCustomSubjectAlternativeNames(int index, String value)

public IpConfiguration.Builder setCustomSubjectAlternativeNames(int index, String value)

Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.

repeated string custom_subject_alternative_names = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The customSubjectAlternativeNames to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setEnablePrivatePathForGoogleCloudServices(BoolValue value)

public IpConfiguration.Builder setEnablePrivatePathForGoogleCloudServices(BoolValue value)

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Parameter
Name Description
value BoolValue
Returns
Type Description
IpConfiguration.Builder

setEnablePrivatePathForGoogleCloudServices(BoolValue.Builder builderForValue)

public IpConfiguration.Builder setEnablePrivatePathForGoogleCloudServices(BoolValue.Builder builderForValue)

Controls connectivity to private IP instances from Google services, such as BigQuery.

.google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
IpConfiguration.Builder

setIpv4Enabled(BoolValue value)

public IpConfiguration.Builder setIpv4Enabled(BoolValue value)

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Parameter
Name Description
value BoolValue
Returns
Type Description
IpConfiguration.Builder

setIpv4Enabled(BoolValue.Builder builderForValue)

public IpConfiguration.Builder setIpv4Enabled(BoolValue.Builder builderForValue)

Whether the instance is assigned a public IP address or not.

.google.protobuf.BoolValue ipv4_enabled = 1;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
IpConfiguration.Builder

setPrivateNetwork(String value)

public IpConfiguration.Builder setPrivateNetwork(String value)

The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, /projects/myProject/global/networks/default. This setting can be updated, but it cannot be removed after it is set.

string private_network = 2;

Parameter
Name Description
value String

The privateNetwork to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setPrivateNetworkBytes(ByteString value)

public IpConfiguration.Builder setPrivateNetworkBytes(ByteString value)

The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, /projects/myProject/global/networks/default. This setting can be updated, but it cannot be removed after it is set.

string private_network = 2;

Parameter
Name Description
value ByteString

The bytes for privateNetwork to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setPscConfig(PscConfig value)

public IpConfiguration.Builder setPscConfig(PscConfig value)

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Parameter
Name Description
value PscConfig
Returns
Type Description
IpConfiguration.Builder

setPscConfig(PscConfig.Builder builderForValue)

public IpConfiguration.Builder setPscConfig(PscConfig.Builder builderForValue)

PSC settings for this instance.

optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9;

Parameter
Name Description
builderForValue PscConfig.Builder
Returns
Type Description
IpConfiguration.Builder

setRequireSsl(BoolValue value)

public IpConfiguration.Builder setRequireSsl(BoolValue value)

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Parameter
Name Description
value BoolValue
Returns
Type Description
IpConfiguration.Builder

setRequireSsl(BoolValue.Builder builderForValue)

public IpConfiguration.Builder setRequireSsl(BoolValue.Builder builderForValue)

Use ssl_mode instead.

Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the ssl_mode flag instead of the legacy require_ssl flag.

.google.protobuf.BoolValue require_ssl = 3;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
IpConfiguration.Builder

setServerCaMode(IpConfiguration.CaMode value)

public IpConfiguration.Builder setServerCaMode(IpConfiguration.CaMode value)

Specify what type of CA is used for the server certificate.

optional .google.cloud.sql.v1beta4.IpConfiguration.CaMode server_ca_mode = 10;

Parameter
Name Description
value IpConfiguration.CaMode

The serverCaMode to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setServerCaModeValue(int value)

public IpConfiguration.Builder setServerCaModeValue(int value)

Specify what type of CA is used for the server certificate.

optional .google.cloud.sql.v1beta4.IpConfiguration.CaMode server_ca_mode = 10;

Parameter
Name Description
value int

The enum numeric value on the wire for serverCaMode to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setServerCaPool(String value)

public IpConfiguration.Builder setServerCaPool(String value)

Optional. The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CA as the server_ca_mode. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}

optional string server_ca_pool = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The serverCaPool to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setServerCaPoolBytes(ByteString value)

public IpConfiguration.Builder setServerCaPoolBytes(ByteString value)

Optional. The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CA as the server_ca_mode. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}

optional string server_ca_pool = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for serverCaPool to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setServerCertificateRotationMode(IpConfiguration.ServerCertificateRotationMode value)

public IpConfiguration.Builder setServerCertificateRotationMode(IpConfiguration.ServerCertificateRotationMode value)

Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.

optional .google.cloud.sql.v1beta4.IpConfiguration.ServerCertificateRotationMode server_certificate_rotation_mode = 16 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value IpConfiguration.ServerCertificateRotationMode

The serverCertificateRotationMode to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setServerCertificateRotationModeValue(int value)

public IpConfiguration.Builder setServerCertificateRotationModeValue(int value)

Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.

optional .google.cloud.sql.v1beta4.IpConfiguration.ServerCertificateRotationMode server_certificate_rotation_mode = 16 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for serverCertificateRotationMode to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setSslMode(IpConfiguration.SslMode value)

public IpConfiguration.Builder setSslMode(IpConfiguration.SslMode value)

Specify how SSL/TLS is enforced in database connections. If you must use the require_ssl flag for backward compatibility, then only the following value pairs are valid:

For PostgreSQL and MySQL:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false
  • ssl_mode=ENCRYPTED_ONLY and require_ssl=false
  • ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED and require_ssl=true

    For SQL Server:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false

  • ssl_mode=ENCRYPTED_ONLY and require_ssl=true

    The value of ssl_mode has priority over the value of require_ssl.

    For example, for the pair ssl_mode=ENCRYPTED_ONLY and require_ssl=false, ssl_mode=ENCRYPTED_ONLY means accept only SSL connections, while require_ssl=false means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect ssl_mode and accepts only SSL connections.

.google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;

Parameter
Name Description
value IpConfiguration.SslMode

The sslMode to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.

setSslModeValue(int value)

public IpConfiguration.Builder setSslModeValue(int value)

Specify how SSL/TLS is enforced in database connections. If you must use the require_ssl flag for backward compatibility, then only the following value pairs are valid:

For PostgreSQL and MySQL:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false
  • ssl_mode=ENCRYPTED_ONLY and require_ssl=false
  • ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED and require_ssl=true

    For SQL Server:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false

  • ssl_mode=ENCRYPTED_ONLY and require_ssl=true

    The value of ssl_mode has priority over the value of require_ssl.

    For example, for the pair ssl_mode=ENCRYPTED_ONLY and require_ssl=false, ssl_mode=ENCRYPTED_ONLY means accept only SSL connections, while require_ssl=false means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect ssl_mode and accepts only SSL connections.

.google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;

Parameter
Name Description
value int

The enum numeric value on the wire for sslMode to set.

Returns
Type Description
IpConfiguration.Builder

This builder for chaining.