< Back

Add-GcSqlInstance

Mon Jan 13, 2020 11:04 pm

NAME Add-GcSqlInstance



SYNOPSIS

Creates a new Cloud SQL instance.





SYNTAX

Add-GcSqlInstance [-Project <string>] [-InstanceConfig] <DatabaseInstance> [<CommonParameters>]



Add-GcSqlInstance [-Project <string>] [-Name] <string> [<CommonParameters>]





DESCRIPTION

Creates the Cloud SQL instance resource in the specified project.





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



-InstanceConfig <DatabaseInstance>

The instance resource, which can be created with New-GcSqlInstanceConfig.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Name <string>

The instance resource, which can be created with New-GcSqlInstanceConfig.



Required? true

Position? 0

Default value

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 instance resource, which can be created with New-GcSqlInstanceConfig.





OUTPUTS

Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance





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



PS C:\\> Add-GcSqlInstance $myInstance



Adds the instance represented by $myInstance to our project set in gcloud config.



If successful, the command returns a resource for the added instance.

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



PS C:\\> Add-GcSqlInstance "gootoso" -Project "myproject"



Adds a default instance named "gootoso" to the project "myproject"



RELATED LINKS

[Setting up Instances] (https://cloud.google.com/tools/powershe ... /sql/setup)