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

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
NameDescription
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 Google\Cloud\Sql\V1\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 Google\Cloud\Sql\V1\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<Google\Cloud\Sql\V1\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 Google\Cloud\Sql\V1\MaintenanceWindow

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

↳ backup_configuration Google\Cloud\Sql\V1\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 Google\Cloud\Sql\V1\SqlActiveDirectoryConfig

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

↳ collation string

The name of server Instance collation.

↳ deny_maintenance_periods array<Google\Cloud\Sql\V1\DenyMaintenancePeriod>

Deny maintenance periods

↳ insights_config Google\Cloud\Sql\V1\InsightsConfig

Insights configuration, for now relevant only for Postgres.

↳ password_validation_policy Google\Cloud\Sql\V1\PasswordValidationPolicy

The local user password validation policy of the instance.

↳ sql_server_audit_config Google\Cloud\Sql\V1\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 Google\Cloud\Sql\V1\AdvancedMachineFeatures

Specifies advance machine configuration for the instance relevant only for SQL Server.

↳ data_cache_config Google\Cloud\Sql\V1\DataCacheConfig

Configuration for data cache.

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
TypeDescription
Google\Protobuf\Int64Value|null

hasSettingsVersion

clearSettingsVersion

getSettingsVersionValue

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
TypeDescription
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
NameDescription
var Google\Protobuf\Int64Value
Returns
TypeDescription
$this

setSettingsVersionValue

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
NameDescription
var int|string|null
Returns
TypeDescription
$this

getAuthorizedGaeApplications

The App Engine app IDs that can access this instance.

(Deprecated) Applied to First Generation instances only.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAuthorizedGaeApplications

The App Engine app IDs that can access this instance.

(Deprecated) Applied to First Generation instances only.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getTier

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

Returns
TypeDescription
string

setTier

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getKind

This is always sql#settings.

Returns
TypeDescription
string

setKind

This is always sql#settings.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUserLabels

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

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setUserLabels

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

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$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
TypeDescription
Google\Protobuf\Int64Value|null

hasStorageAutoResizeLimit

clearStorageAutoResizeLimit

getStorageAutoResizeLimitValue

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
TypeDescription
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
NameDescription
var Google\Protobuf\Int64Value
Returns
TypeDescription
$this

setStorageAutoResizeLimitValue

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
NameDescription
var int|string|null
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$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
TypeDescription
Google\Cloud\Sql\V1\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
NameDescription
var Google\Cloud\Sql\V1\IpConfiguration
Returns
TypeDescription
$this

getStorageAutoResize

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

Returns
TypeDescription
Google\Protobuf\BoolValue|null

hasStorageAutoResize

clearStorageAutoResize

getStorageAutoResizeValue

Returns the unboxed value from getStorageAutoResize()

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

Returns
TypeDescription
bool|null

setStorageAutoResize

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

Parameter
NameDescription
var Google\Protobuf\BoolValue
Returns
TypeDescription
$this

setStorageAutoResizeValue

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
NameDescription
var bool|null
Returns
TypeDescription
$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
TypeDescription
Google\Cloud\Sql\V1\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
NameDescription
var Google\Cloud\Sql\V1\LocationPreference
Returns
TypeDescription
$this

getDatabaseFlags

The database flags passed to the instance at startup.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDatabaseFlags

The database flags passed to the instance at startup.

Parameter
NameDescription
var array<Google\Cloud\Sql\V1\DatabaseFlags>
Returns
TypeDescription
$this

getDataDiskType

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

Returns
TypeDescription
int

setDataDiskType

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getMaintenanceWindow

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

Returns
TypeDescription
Google\Cloud\Sql\V1\MaintenanceWindow|null

hasMaintenanceWindow

clearMaintenanceWindow

setMaintenanceWindow

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

Parameter
NameDescription
var Google\Cloud\Sql\V1\MaintenanceWindow
Returns
TypeDescription
$this

getBackupConfiguration

The daily backup configuration for the instance.

Returns
TypeDescription
Google\Cloud\Sql\V1\BackupConfiguration|null

hasBackupConfiguration

clearBackupConfiguration

setBackupConfiguration

The daily backup configuration for the instance.

Parameter
NameDescription
var Google\Cloud\Sql\V1\BackupConfiguration
Returns
TypeDescription
$this

getDatabaseReplicationEnabled

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

Returns
TypeDescription
Google\Protobuf\BoolValue|null

hasDatabaseReplicationEnabled

clearDatabaseReplicationEnabled

getDatabaseReplicationEnabledValue

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
TypeDescription
bool|null

setDatabaseReplicationEnabled

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

Parameter
NameDescription
var Google\Protobuf\BoolValue
Returns
TypeDescription
$this

setDatabaseReplicationEnabledValue

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
NameDescription
var bool|null
Returns
TypeDescription
$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
TypeDescription
Google\Protobuf\BoolValue|null

hasCrashSafeReplicationEnabled

clearCrashSafeReplicationEnabled

getCrashSafeReplicationEnabledValue

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
TypeDescription
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
NameDescription
var Google\Protobuf\BoolValue
Returns
TypeDescription
$this

setCrashSafeReplicationEnabledValue

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
NameDescription
var bool|null
Returns
TypeDescription
$this

getDataDiskSizeGb

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

Returns
TypeDescription
Google\Protobuf\Int64Value|null

hasDataDiskSizeGb

clearDataDiskSizeGb

getDataDiskSizeGbValue

Returns the unboxed value from getDataDiskSizeGb()

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

Returns
TypeDescription
int|string|null

setDataDiskSizeGb

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

Parameter
NameDescription
var Google\Protobuf\Int64Value
Returns
TypeDescription
$this

setDataDiskSizeGbValue

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
NameDescription
var int|string|null
Returns
TypeDescription
$this

getActiveDirectoryConfig

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

Returns
TypeDescription
Google\Cloud\Sql\V1\SqlActiveDirectoryConfig|null

hasActiveDirectoryConfig

clearActiveDirectoryConfig

setActiveDirectoryConfig

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

Parameter
NameDescription
var Google\Cloud\Sql\V1\SqlActiveDirectoryConfig
Returns
TypeDescription
$this

getCollation

The name of server Instance collation.

Returns
TypeDescription
string

setCollation

The name of server Instance collation.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDenyMaintenancePeriods

Deny maintenance periods

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDenyMaintenancePeriods

Deny maintenance periods

Parameter
NameDescription
var array<Google\Cloud\Sql\V1\DenyMaintenancePeriod>
Returns
TypeDescription
$this

getInsightsConfig

Insights configuration, for now relevant only for Postgres.

Returns
TypeDescription
Google\Cloud\Sql\V1\InsightsConfig|null

hasInsightsConfig

clearInsightsConfig

setInsightsConfig

Insights configuration, for now relevant only for Postgres.

Parameter
NameDescription
var Google\Cloud\Sql\V1\InsightsConfig
Returns
TypeDescription
$this

getPasswordValidationPolicy

The local user password validation policy of the instance.

Returns
TypeDescription
Google\Cloud\Sql\V1\PasswordValidationPolicy|null

hasPasswordValidationPolicy

clearPasswordValidationPolicy

setPasswordValidationPolicy

The local user password validation policy of the instance.

Parameter
NameDescription
var Google\Cloud\Sql\V1\PasswordValidationPolicy
Returns
TypeDescription
$this

getSqlServerAuditConfig

SQL Server specific audit configuration.

Returns
TypeDescription
Google\Cloud\Sql\V1\SqlServerAuditConfig|null

hasSqlServerAuditConfig

clearSqlServerAuditConfig

setSqlServerAuditConfig

SQL Server specific audit configuration.

Parameter
NameDescription
var Google\Cloud\Sql\V1\SqlServerAuditConfig
Returns
TypeDescription
$this

getEdition

Optional. The edition of the instance.

Returns
TypeDescription
int

setEdition

Optional. The edition of the instance.

Parameter
NameDescription
var int
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this

getDeletionProtectionEnabled

Configuration to protect against accidental instance deletion.

Returns
TypeDescription
Google\Protobuf\BoolValue|null

hasDeletionProtectionEnabled

clearDeletionProtectionEnabled

getDeletionProtectionEnabledValue

Returns the unboxed value from getDeletionProtectionEnabled()

Configuration to protect against accidental instance deletion.

Returns
TypeDescription
bool|null

setDeletionProtectionEnabled

Configuration to protect against accidental instance deletion.

Parameter
NameDescription
var Google\Protobuf\BoolValue
Returns
TypeDescription
$this

setDeletionProtectionEnabledValue

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

Configuration to protect against accidental instance deletion.

Parameter
NameDescription
var bool|null
Returns
TypeDescription
$this

getTimeZone

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

Returns
TypeDescription
string

setTimeZone

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAdvancedMachineFeatures

Specifies advance machine configuration for the instance relevant only for SQL Server.

Returns
TypeDescription
Google\Cloud\Sql\V1\AdvancedMachineFeatures|null

hasAdvancedMachineFeatures

clearAdvancedMachineFeatures

setAdvancedMachineFeatures

Specifies advance machine configuration for the instance relevant only for SQL Server.

Parameter
NameDescription
var Google\Cloud\Sql\V1\AdvancedMachineFeatures
Returns
TypeDescription
$this

getDataCacheConfig

Configuration for data cache.

Returns
TypeDescription
Google\Cloud\Sql\V1\DataCacheConfig|null

hasDataCacheConfig

clearDataCacheConfig

setDataCacheConfig

Configuration for data cache.

Parameter
NameDescription
var Google\Cloud\Sql\V1\DataCacheConfig
Returns
TypeDescription
$this