Google Cloud Sql Admin V1 Client - Class Settings (1.2.1)

Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class Settings.

Database instance settings.

Generated from protobuf message google.cloud.sql.v1.Settings

Namespace

Google \ Cloud \ Sql \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ settings_version Google\Protobuf\Int64Value

The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.

↳ authorized_gae_applications array

The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.

↳ tier string

The tier (or machine type) for this instance, for example db-custom-1-3840. WARNING: Changing this restarts the instance.

↳ kind string

This is always sql#settings.

↳ user_labels array|Google\Protobuf\Internal\MapField

User-provided labels, represented as a dictionary where each label is a single key value pair.

↳ availability_type int

Availability type. Potential values: * * ZONAL: The instance serves data from only one zone. Outages in that zone affect data accessibility. * * REGIONAL: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see Overview of the High Availability Configuration.

↳ pricing_plan int

The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.

↳ replication_type int

The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. (Deprecated) This property was only applicable to First Generation instances.

↳ storage_auto_resize_limit Google\Protobuf\Int64Value

The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.

↳ activation_policy int

The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: * * ALWAYS: The instance is on, and remains so even in the absence of connection requests. * * NEVER: The instance is off; it is not activated, even if a connection request arrives.

↳ ip_configuration IpConfiguration

The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.

↳ storage_auto_resize Google\Protobuf\BoolValue

Configuration to increase storage size automatically. The default value is true.

↳ location_preference LocationPreference

The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.

↳ database_flags array<DatabaseFlags>

The database flags passed to the instance at startup.

↳ data_disk_type int

The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.

↳ maintenance_window MaintenanceWindow

The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.

↳ backup_configuration BackupConfiguration

The daily backup configuration for the instance.

↳ database_replication_enabled Google\Protobuf\BoolValue

Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.

↳ crash_safe_replication_enabled Google\Protobuf\BoolValue

Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.

↳ data_disk_size_gb Google\Protobuf\Int64Value

The size of data disk, in GB. The data disk size minimum is 10GB.

↳ active_directory_config SqlActiveDirectoryConfig

Active Directory configuration, relevant only for Cloud SQL for SQL Server.

↳ collation string

The name of server Instance collation.

↳ deny_maintenance_periods array<DenyMaintenancePeriod>

Deny maintenance periods

↳ insights_config InsightsConfig

Insights configuration, for now relevant only for Postgres.

↳ password_validation_policy PasswordValidationPolicy

The local user password validation policy of the instance.

↳ sql_server_audit_config SqlServerAuditConfig

SQL Server specific audit configuration.

↳ edition int

Optional. The edition of the instance.

↳ connector_enforcement int

Specifies if connections must use Cloud SQL connectors. Option values include the following: NOT_REQUIRED (Cloud SQL instances can be connected without Cloud SQL Connectors) and REQUIRED (Only allow connections that use Cloud SQL Connectors). Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.

↳ deletion_protection_enabled Google\Protobuf\BoolValue

Configuration to protect against accidental instance deletion.

↳ time_zone string

Server timezone, relevant only for Cloud SQL for SQL Server.

↳ advanced_machine_features AdvancedMachineFeatures

Specifies advanced machine configuration for the instances relevant only for SQL Server.

↳ data_cache_config DataCacheConfig

Configuration for data cache.

↳ enable_google_ml_integration Google\Protobuf\BoolValue

Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.

↳ enable_dataplex_integration Google\Protobuf\BoolValue

Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.

getSettingsVersion

The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.

Returns
Type Description
Google\Protobuf\Int64Value|null

hasSettingsVersion

clearSettingsVersion

getSettingsVersionUnwrapped

Returns the unboxed value from getSettingsVersion()

The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.

Returns
Type Description
int|string|null

setSettingsVersion

The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.

Parameter
Name Description
var Google\Protobuf\Int64Value
Returns
Type Description
$this

setSettingsVersionUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.

The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.

Parameter
Name Description
var int|string|null
Returns
Type Description
$this

getAuthorizedGaeApplications

The App Engine app IDs that can access this instance.

(Deprecated) Applied to First Generation instances only.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAuthorizedGaeApplications

The App Engine app IDs that can access this instance.

(Deprecated) Applied to First Generation instances only.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getTier

The tier (or machine type) for this instance, for example db-custom-1-3840. WARNING: Changing this restarts the instance.

Returns
Type Description
string

setTier

The tier (or machine type) for this instance, for example db-custom-1-3840. WARNING: Changing this restarts the instance.

Parameter
Name Description
var string
Returns
Type Description
$this

getKind

This is always sql#settings.

Returns
Type Description
string

setKind

This is always sql#settings.

Parameter
Name Description
var string
Returns
Type Description
$this

getUserLabels

User-provided labels, represented as a dictionary where each label is a single key value pair.

Returns
Type Description
Google\Protobuf\Internal\MapField

setUserLabels

User-provided labels, represented as a dictionary where each label is a single key value pair.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getAvailabilityType

Availability type. Potential values:

  • ZONAL: The instance serves data from only one zone. Outages in that zone affect data accessibility.

  • REGIONAL: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see Overview of the High Availability Configuration.

Returns
Type Description
int

setAvailabilityType

Availability type. Potential values:

  • ZONAL: The instance serves data from only one zone. Outages in that zone affect data accessibility.

  • REGIONAL: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see Overview of the High Availability Configuration.

Parameter
Name Description
var int
Returns
Type Description
$this

getPricingPlan

The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.

Returns
Type Description
int

setPricingPlan

The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.

Parameter
Name Description
var int
Returns
Type Description
$this

getReplicationType

The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. (Deprecated) This property was only applicable to First Generation instances.

Returns
Type Description
int

setReplicationType

The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. (Deprecated) This property was only applicable to First Generation instances.

Parameter
Name Description
var int
Returns
Type Description
$this

getStorageAutoResizeLimit

The maximum size to which storage capacity can be automatically increased.

The default value is 0, which specifies that there is no limit.

Returns
Type Description
Google\Protobuf\Int64Value|null

hasStorageAutoResizeLimit

clearStorageAutoResizeLimit

getStorageAutoResizeLimitUnwrapped

Returns the unboxed value from getStorageAutoResizeLimit()

The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.

Returns
Type Description
int|string|null

setStorageAutoResizeLimit

The maximum size to which storage capacity can be automatically increased.

The default value is 0, which specifies that there is no limit.

Parameter
Name Description
var Google\Protobuf\Int64Value
Returns
Type Description
$this

setStorageAutoResizeLimitUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.

The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.

Parameter
Name Description
var int|string|null
Returns
Type Description
$this

getActivationPolicy

The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values:

  • ALWAYS: The instance is on, and remains so even in the absence of connection requests.

  • NEVER: The instance is off; it is not activated, even if a connection request arrives.

Returns
Type Description
int

setActivationPolicy

The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values:

  • ALWAYS: The instance is on, and remains so even in the absence of connection requests.

  • NEVER: The instance is off; it is not activated, even if a connection request arrives.

Parameter
Name Description
var int
Returns
Type Description
$this

getIpConfiguration

The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.

The IPv4 address cannot be disabled for Second Generation instances.

Returns
Type Description
IpConfiguration|null

hasIpConfiguration

clearIpConfiguration

setIpConfiguration

The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.

The IPv4 address cannot be disabled for Second Generation instances.

Parameter
Name Description
var IpConfiguration
Returns
Type Description
$this

getStorageAutoResize

Configuration to increase storage size automatically. The default value is true.

Returns
Type Description
Google\Protobuf\BoolValue|null

hasStorageAutoResize

clearStorageAutoResize

getStorageAutoResizeUnwrapped

Returns the unboxed value from getStorageAutoResize()

Configuration to increase storage size automatically. The default value is true.

Returns
Type Description
bool|null

setStorageAutoResize

Configuration to increase storage size automatically. The default value is true.

Parameter
Name Description
var Google\Protobuf\BoolValue
Returns
Type Description
$this

setStorageAutoResizeUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

Configuration to increase storage size automatically. The default value is true.

Parameter
Name Description
var bool|null
Returns
Type Description
$this

getLocationPreference

The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.

Returns
Type Description
LocationPreference|null

hasLocationPreference

clearLocationPreference

setLocationPreference

The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.

Parameter
Name Description
var LocationPreference
Returns
Type Description
$this

getDatabaseFlags

The database flags passed to the instance at startup.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setDatabaseFlags

The database flags passed to the instance at startup.

Parameter
Name Description
var array<DatabaseFlags>
Returns
Type Description
$this

getDataDiskType

The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.

Returns
Type Description
int

setDataDiskType

The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.

Parameter
Name Description
var int
Returns
Type Description
$this

getMaintenanceWindow

The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.

Returns
Type Description
MaintenanceWindow|null

hasMaintenanceWindow

clearMaintenanceWindow

setMaintenanceWindow

The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.

Parameter
Name Description
var MaintenanceWindow
Returns
Type Description
$this

getBackupConfiguration

The daily backup configuration for the instance.

Returns
Type Description
BackupConfiguration|null

hasBackupConfiguration

clearBackupConfiguration

setBackupConfiguration

The daily backup configuration for the instance.

Parameter
Name Description
var BackupConfiguration
Returns
Type Description
$this

getDatabaseReplicationEnabled

Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.

Returns
Type Description
Google\Protobuf\BoolValue|null

hasDatabaseReplicationEnabled

clearDatabaseReplicationEnabled

getDatabaseReplicationEnabledUnwrapped

Returns the unboxed value from getDatabaseReplicationEnabled()

Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.

Returns
Type Description
bool|null

setDatabaseReplicationEnabled

Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.

Parameter
Name Description
var Google\Protobuf\BoolValue
Returns
Type Description
$this

setDatabaseReplicationEnabledUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.

Parameter
Name Description
var bool|null
Returns
Type Description
$this

getCrashSafeReplicationEnabled

Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.

Returns
Type Description
Google\Protobuf\BoolValue|null

hasCrashSafeReplicationEnabled

clearCrashSafeReplicationEnabled

getCrashSafeReplicationEnabledUnwrapped

Returns the unboxed value from getCrashSafeReplicationEnabled()

Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.

Returns
Type Description
bool|null

setCrashSafeReplicationEnabled

Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.

Parameter
Name Description
var Google\Protobuf\BoolValue
Returns
Type Description
$this

setCrashSafeReplicationEnabledUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.

Parameter
Name Description
var bool|null
Returns
Type Description
$this

getDataDiskSizeGb

The size of data disk, in GB. The data disk size minimum is 10GB.

Returns
Type Description
Google\Protobuf\Int64Value|null

hasDataDiskSizeGb

clearDataDiskSizeGb

getDataDiskSizeGbUnwrapped

Returns the unboxed value from getDataDiskSizeGb()

The size of data disk, in GB. The data disk size minimum is 10GB.

Returns
Type Description
int|string|null

setDataDiskSizeGb

The size of data disk, in GB. The data disk size minimum is 10GB.

Parameter
Name Description
var Google\Protobuf\Int64Value
Returns
Type Description
$this

setDataDiskSizeGbUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.

The size of data disk, in GB. The data disk size minimum is 10GB.

Parameter
Name Description
var int|string|null
Returns
Type Description
$this

getActiveDirectoryConfig

Active Directory configuration, relevant only for Cloud SQL for SQL Server.

Returns
Type Description
SqlActiveDirectoryConfig|null

hasActiveDirectoryConfig

clearActiveDirectoryConfig

setActiveDirectoryConfig

Active Directory configuration, relevant only for Cloud SQL for SQL Server.

Parameter
Name Description
var SqlActiveDirectoryConfig
Returns
Type Description
$this

getCollation

The name of server Instance collation.

Returns
Type Description
string

setCollation

The name of server Instance collation.

Parameter
Name Description
var string
Returns
Type Description
$this

getDenyMaintenancePeriods

Deny maintenance periods

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setDenyMaintenancePeriods

Deny maintenance periods

Parameter
Name Description
var array<DenyMaintenancePeriod>
Returns
Type Description
$this

getInsightsConfig

Insights configuration, for now relevant only for Postgres.

Returns
Type Description
InsightsConfig|null

hasInsightsConfig

clearInsightsConfig

setInsightsConfig

Insights configuration, for now relevant only for Postgres.

Parameter
Name Description
var InsightsConfig
Returns
Type Description
$this

getPasswordValidationPolicy

The local user password validation policy of the instance.

Returns
Type Description
PasswordValidationPolicy|null

hasPasswordValidationPolicy

clearPasswordValidationPolicy

setPasswordValidationPolicy

The local user password validation policy of the instance.

Parameter
Name Description
var PasswordValidationPolicy
Returns
Type Description
$this

getSqlServerAuditConfig

SQL Server specific audit configuration.

Returns
Type Description
SqlServerAuditConfig|null

hasSqlServerAuditConfig

clearSqlServerAuditConfig

setSqlServerAuditConfig

SQL Server specific audit configuration.

Parameter
Name Description
var SqlServerAuditConfig
Returns
Type Description
$this

getEdition

Optional. The edition of the instance.

Returns
Type Description
int

setEdition

Optional. The edition of the instance.

Parameter
Name Description
var int
Returns
Type Description
$this

getConnectorEnforcement

Specifies if connections must use Cloud SQL connectors.

Option values include the following: NOT_REQUIRED (Cloud SQL instances can be connected without Cloud SQL Connectors) and REQUIRED (Only allow connections that use Cloud SQL Connectors). Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.

Returns
Type Description
int

setConnectorEnforcement

Specifies if connections must use Cloud SQL connectors.

Option values include the following: NOT_REQUIRED (Cloud SQL instances can be connected without Cloud SQL Connectors) and REQUIRED (Only allow connections that use Cloud SQL Connectors). Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.

Parameter
Name Description
var int
Returns
Type Description
$this

getDeletionProtectionEnabled

Configuration to protect against accidental instance deletion.

Returns
Type Description
Google\Protobuf\BoolValue|null

hasDeletionProtectionEnabled

clearDeletionProtectionEnabled

getDeletionProtectionEnabledUnwrapped

Returns the unboxed value from getDeletionProtectionEnabled()

Configuration to protect against accidental instance deletion.

Returns
Type Description
bool|null

setDeletionProtectionEnabled

Configuration to protect against accidental instance deletion.

Parameter
Name Description
var Google\Protobuf\BoolValue
Returns
Type Description
$this

setDeletionProtectionEnabledUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

Configuration to protect against accidental instance deletion.

Parameter
Name Description
var bool|null
Returns
Type Description
$this

getTimeZone

Server timezone, relevant only for Cloud SQL for SQL Server.

Returns
Type Description
string

setTimeZone

Server timezone, relevant only for Cloud SQL for SQL Server.

Parameter
Name Description
var string
Returns
Type Description
$this

getAdvancedMachineFeatures

Specifies advanced machine configuration for the instances relevant only for SQL Server.

Returns
Type Description
AdvancedMachineFeatures|null

hasAdvancedMachineFeatures

clearAdvancedMachineFeatures

setAdvancedMachineFeatures

Specifies advanced machine configuration for the instances relevant only for SQL Server.

Parameter
Name Description
var AdvancedMachineFeatures
Returns
Type Description
$this

getDataCacheConfig

Configuration for data cache.

Returns
Type Description
DataCacheConfig|null

hasDataCacheConfig

clearDataCacheConfig

setDataCacheConfig

Configuration for data cache.

Parameter
Name Description
var DataCacheConfig
Returns
Type Description
$this

getEnableGoogleMlIntegration

Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.

Returns
Type Description
Google\Protobuf\BoolValue|null

hasEnableGoogleMlIntegration

clearEnableGoogleMlIntegration

getEnableGoogleMlIntegrationUnwrapped

Returns the unboxed value from getEnableGoogleMlIntegration()

Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.

Returns
Type Description
bool|null

setEnableGoogleMlIntegration

Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.

Parameter
Name Description
var Google\Protobuf\BoolValue
Returns
Type Description
$this

setEnableGoogleMlIntegrationUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.

Parameter
Name Description
var bool|null
Returns
Type Description
$this

getEnableDataplexIntegration

Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.

Returns
Type Description
Google\Protobuf\BoolValue|null

hasEnableDataplexIntegration

clearEnableDataplexIntegration

getEnableDataplexIntegrationUnwrapped

Returns the unboxed value from getEnableDataplexIntegration()

Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.

Returns
Type Description
bool|null

setEnableDataplexIntegration

Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.

Parameter
Name Description
var Google\Protobuf\BoolValue
Returns
Type Description
$this

setEnableDataplexIntegrationUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.

Parameter
Name Description
var bool|null
Returns
Type Description
$this