< Back

Update-GcSqlInstance

Mon Jan 13, 2020 11:56 pm

NAME Update-GcSqlInstance



SYNOPSIS

Updates settings of a Cloud SQL instance, or patches them.





SYNTAX

Update-GcSqlInstance [-Project <string>] [-Instance] <string> [-SettingsVersion] <long> [-Update

<SwitchParameter>] [-Tier <string>] [-DatabaseReplicationEnabled <bool>] [-Policy {ALWAYS | NONE}]

[-BackupBinaryLogEnabled <bool>] [-BackupEnabled <bool>] [-BackupStartTime <string>] [-DataDiskSizeGb <long>]

[-DatabaseFlag <DatabaseFlags[]>] [-IpConfigAuthorizedNetwork <AclEntry[]>] [-IpConfigIpv4Enabled <bool>]

[-IpConfigRequireSsl <bool>] [-LocationPreferenceFollowGae <string>] [-LocationPreferenceZone <string>]

[-MaintenanceWindowDay <int>] [-MaintenanceWindowHour <int>] [-StorageAutoResize <bool>] [-DiskType {PD_SSD |

PD_HDD}] [<CommonParameters>]



Update-GcSqlInstance [-SettingsVersion] <long> -InstanceObject <DatabaseInstance> [-Update <SwitchParameter>]

[-Tier <string>] [-DatabaseReplicationEnabled <bool>] [-Policy {ALWAYS | NONE}] [-BackupBinaryLogEnabled <bool>]

[-BackupEnabled <bool>] [-BackupStartTime <string>] [-DataDiskSizeGb <long>] [-DatabaseFlag <DatabaseFlags[]>]

[-IpConfigAuthorizedNetwork <AclEntry[]>] [-IpConfigIpv4Enabled <bool>] [-IpConfigRequireSsl <bool>]

[-LocationPreferenceFollowGae <string>] [-LocationPreferenceZone <string>] [-MaintenanceWindowDay <int>]

[-MaintenanceWindowHour <int>] [-StorageAutoResize <bool>] [-DiskType {PD_SSD | PD_HDD}] [<CommonParameters>]





DESCRIPTION

Updates settings of the specified Cloud SQL instance, or patches them. If ???????Update??????? is true, it will update them.

Otherwise it patches.





PARAMETERS

-Project <string>

Name of the project. Defaults to the Cloud SDK configuration for properties if not specified.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Instance <string>

The name of the instance to be updated/patched.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SettingsVersion <long>

The version of instance settings. Required field to make sure concurrent updates are handled properly. During

update, use the most recent settingsVersion value for the instance and do not try to update this value.



Required? true

Position? 1

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-InstanceObject <DatabaseInstance>

The DatabaseInstance that describes the instance we want to update/patch.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Update <SwitchParameter>

If true, updates the instance with only the specified parameters. All other parameters revert back to the

default. If false, follows patch semantics and patches the instance. Unspecified parameters will stay the same.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Tier <string>

The tier of service for this instance, for example "db-n1-standard-1". Pricing information is available at

https://cloud.google.com/sql/pricing. Get-GcSqlTiers will also tell you what tiers are available for your

project. If not specified, this will be acquired from the instance.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DatabaseReplicationEnabled <bool>

Configuration specific to read replica instances. Indicates whether replication is enabled or not.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Policy <ActivationPolicy>

The activation policy specifies when the instance is activated; it is applicable only when the instance state

is RUNNABLE. Can be ALWAYS, or NEVER.



Possible values: ALWAYS, NONE



Required? false

Position? named

Default value ALWAYS

Accept pipeline input? false

Accept wildcard characters? false



-BackupBinaryLogEnabled <bool>

Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-BackupEnabled <bool>

Whether the backup configuration is enabled or not.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-BackupStartTime <string>

Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DataDiskSizeGb <long>

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



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-DatabaseFlag <DatabaseFlags[]>

The database flags passed to the instance at startup.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IpConfigAuthorizedNetwork <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 (e.g. "192.168.100.0/24").



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IpConfigIpv4Enabled <bool>

Whether the instance should be assigned an IP address or not.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-IpConfigRequireSsl <bool>

Whether the mysqld should default to ???????REQUIRE X509??????? for users connecting over IP.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LocationPreferenceFollowGae <string>

The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LocationPreferenceZone <string>

The preferred Compute Engine Zone (e.g. us-central1-a, us-central1-b, etc.).



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MaintenanceWindowDay <int>

Day of the week (1-7) starting monday that the instance may be restarted for maintenance purposes. Applies

only to Second Generation instances.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-MaintenanceWindowHour <int>

Hour of day (0-23) that the instance may be restarted for maintenance purposes. Applies only to Second

Generation instances.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-StorageAutoResize <bool>

Configuration to increase storage size automatically. Applies only to Second Generation instances.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DiskType <DataDiskType>

The type of data disk: PD_SSD (default) or PD_HDD. Applies only to Second Generation instances.



Possible values: PD_SSD, PD_HDD



Required? false

Position? named

Default value PD_SSD

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance

The DatabaseInstance that describes the instance we want to update/patch.





OUTPUTS

Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance





---------- EXAMPLE 1 ----------



PS C:\\> Update-GcSqlInstance "myInstance" `

15 -MaintenanceWindowDay 1 -MaintenanceWindowHour "22:00" -Project "testing"



Patches the SQL Instance "myInstance" (with setting version of 15) so that it can have maintenance on Monday at

22:00.

---------- EXAMPLE 2 ----------



PS C:\\> Update-GcSqlInstance "myInstance" 18 -Update



Updates the SQL Instance "myInstance" (with and setting version of 18) so that its settings default.



RELATED LINKS