Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class IpConfiguration.
IP Management configuration.
Generated from protobuf message google.cloud.sql.v1.IpConfiguration
Namespace
Google \ Cloud \ Sql \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ ipv4_enabled |
Google\Protobuf\BoolValue
Whether the instance is assigned a public IP address or not. |
↳ private_network |
string
The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, |
↳ require_ssl |
Google\Protobuf\BoolValue
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 |
↳ authorized_networks |
array<Google\Cloud\Sql\V1\AclEntry>
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: |
↳ allocated_ip_range |
string
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 |
↳ enable_private_path_for_google_cloud_services |
Google\Protobuf\BoolValue
Controls connectivity to private IP instances from Google services, such as BigQuery. |
↳ ssl_mode |
int
Specify how SSL/TLS is enforced in database connections. This flag is supported only for PostgreSQL. Use the legacy |
↳ psc_config |
Google\Cloud\Sql\V1\PscConfig
PSC settings for this instance. |
getIpv4Enabled
Whether the instance is assigned a public IP address or not.
Returns | |
---|---|
Type | Description |
Google\Protobuf\BoolValue|null |
hasIpv4Enabled
clearIpv4Enabled
getIpv4EnabledValue
Returns the unboxed value from getIpv4Enabled()
Whether the instance is assigned a public IP address or not.
Returns | |
---|---|
Type | Description |
bool|null |
setIpv4Enabled
Whether the instance is assigned a public IP address or not.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\BoolValue
|
Returns | |
---|---|
Type | Description |
$this |
setIpv4EnabledValue
Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
Whether the instance is assigned a public IP address or not.
Parameter | |
---|---|
Name | Description |
var |
bool|null
|
Returns | |
---|---|
Type | Description |
$this |
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.
Returns | |
---|---|
Type | Description |
string |
setPrivateNetwork
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.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getRequireSsl
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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\BoolValue|null |
hasRequireSsl
clearRequireSsl
getRequireSslValue
Returns the unboxed value from getRequireSsl()
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.
Returns | |
---|---|
Type | Description |
bool|null |
setRequireSsl
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.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\BoolValue
|
Returns | |
---|---|
Type | Description |
$this |
setRequireSslValue
Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
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.
Parameter | |
---|---|
Name | Description |
var |
bool|null
|
Returns | |
---|---|
Type | Description |
$this |
getAuthorizedNetworks
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
).
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setAuthorizedNetworks
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
).
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Sql\V1\AclEntry>
|
Returns | |
---|---|
Type | Description |
$this |
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]([-a-z0-9]*[a-z0-9])?.
Returns | |
---|---|
Type | Description |
string |
setAllocatedIpRange
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]([-a-z0-9]*[a-z0-9])?.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getEnablePrivatePathForGoogleCloudServices
Controls connectivity to private IP instances from Google services, such as BigQuery.
Returns | |
---|---|
Type | Description |
Google\Protobuf\BoolValue|null |
hasEnablePrivatePathForGoogleCloudServices
clearEnablePrivatePathForGoogleCloudServices
getEnablePrivatePathForGoogleCloudServicesValue
Returns the unboxed value from getEnablePrivatePathForGoogleCloudServices()
Controls connectivity to private IP instances from Google services, such as BigQuery.
Returns | |
---|---|
Type | Description |
bool|null |
setEnablePrivatePathForGoogleCloudServices
Controls connectivity to private IP instances from Google services, such as BigQuery.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\BoolValue
|
Returns | |
---|---|
Type | Description |
$this |
setEnablePrivatePathForGoogleCloudServicesValue
Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
Controls connectivity to private IP instances from Google services, such as BigQuery.
Parameter | |
---|---|
Name | Description |
var |
bool|null
|
Returns | |
---|---|
Type | Description |
$this |
getSslMode
Specify how SSL/TLS is enforced in database connections. This flag is
supported only for PostgreSQL. Use the legacy require_ssl
flag for
enforcing SSL/TLS in MySQL and SQL Server. But, for PostgreSQL, use the
ssl_mode
flag instead of the legacy require_ssl
flag. To avoid the
conflict between those flags in PostgreSQL, only the following value pairs
are valid:
ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED
andrequire_ssl=false
ssl_mode=ENCRYPTED_ONLY
andrequire_ssl=false
ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED
andrequire_ssl=true
Note that the value ofssl_mode
gets priority over the value of the legacyrequire_ssl
. For example, for the pairssl_mode=ENCRYPTED_ONLY, require_ssl=false
, thessl_mode=ENCRYPTED_ONLY
means "only accepts SSL connection", while therequire_ssl=false
means "both non-SSL and SSL connections are allowed". The database respectsssl_mode
in this case and only accepts SSL connections.
Returns | |
---|---|
Type | Description |
int |
setSslMode
Specify how SSL/TLS is enforced in database connections. This flag is
supported only for PostgreSQL. Use the legacy require_ssl
flag for
enforcing SSL/TLS in MySQL and SQL Server. But, for PostgreSQL, use the
ssl_mode
flag instead of the legacy require_ssl
flag. To avoid the
conflict between those flags in PostgreSQL, only the following value pairs
are valid:
ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED
andrequire_ssl=false
ssl_mode=ENCRYPTED_ONLY
andrequire_ssl=false
ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED
andrequire_ssl=true
Note that the value ofssl_mode
gets priority over the value of the legacyrequire_ssl
. For example, for the pairssl_mode=ENCRYPTED_ONLY, require_ssl=false
, thessl_mode=ENCRYPTED_ONLY
means "only accepts SSL connection", while therequire_ssl=false
means "both non-SSL and SSL connections are allowed". The database respectsssl_mode
in this case and only accepts SSL connections.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getPscConfig
PSC settings for this instance.
Returns | |
---|---|
Type | Description |
Google\Cloud\Sql\V1\PscConfig|null |
hasPscConfig
clearPscConfig
setPscConfig
PSC settings for this instance.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Sql\V1\PscConfig
|
Returns | |
---|---|
Type | Description |
$this |