gcloud_beta_sql_instances_create (1)
NAME
- gcloud beta sql instances create - creates a new Cloud SQL instance
SYNOPSIS
-
gcloud beta sql instances create INSTANCE [--activation-policy=ACTIVATION_POLICY] [--assign-ip] [--async] [--authorized-gae-apps=APP,[APP,...]] [--authorized-networks=NETWORK,[NETWORK,...]] [--availability-type=AVAILABILITY_TYPE] [--no-backup] [--backup-start-time=BACKUP_START_TIME] [--cpu=CPU] [--database-flags=FLAG=VALUE,[FLAG=VALUE,...]] [--database-version=DATABASE_VERSION] [--enable-bin-log] [--failover-replica-name=FAILOVER_REPLICA_NAME] [--follow-gae-app=FOLLOW_GAE_APP] [--labels=[KEY=VALUE,...]] [--maintenance-release-channel=MAINTENANCE_RELEASE_CHANNEL] [--maintenance-window-day=MAINTENANCE_WINDOW_DAY] [--maintenance-window-hour=MAINTENANCE_WINDOW_HOUR] [--master-instance-name=MASTER_INSTANCE_NAME] [--memory=MEMORY] [--network=NETWORK] [--pricing-plan=PRICING_PLAN, -p PRICING_PLAN; default="PER_USE"] [--replica-type=REPLICA_TYPE] [--replication=REPLICATION] [--require-ssl] [--storage-auto-increase] [--storage-auto-increase-limit=STORAGE_AUTO_INCREASE_LIMIT] [--storage-size=STORAGE_SIZE] [--storage-type=STORAGE_TYPE] [--tier=TIER, -t TIER] [--master-dump-file-path=MASTER_DUMP_FILE_PATH --master-username=MASTER_USERNAME : [--master-ca-certificate-path=MASTER_CA_CERTIFICATE_PATH : --client-certificate-path=CLIENT_CERTIFICATE_PATH --client-key-path=CLIENT_KEY_PATH] --master-password=MASTER_PASSWORD | --prompt-for-master-password] [--region=REGION; default="us-central" | --gce-zone=GCE_ZONE | --zone=ZONE] [--source-ip-address=SOURCE_IP_ADDRESS : --source-port=SOURCE_PORT; default=3306] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) Creates a new Cloud SQL instance.
POSITIONAL ARGUMENTS
-
- INSTANCE
-
- Cloud SQL instance ID.
- Cloud SQL instance ID.
FLAGS
-
- --activation-policy=ACTIVATION_POLICY
-
Activation policy for this instance. This specifies when the instance should be
activated and is applicable only when the instance state is RUNNABLE. The
default is on-demand. More information on activation policies can be
found here: cloud.google.com/sql/faq#activation_policy
ACTIVATION_POLICY must be one of: always, never,
on-demand.
- --assign-ip
-
If provided, instance must be assigned an IP address.
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --authorized-gae-apps=APP,[APP,...]
-
First Generation instances only. List of project IDs for App Engine applications
running in the Standard environment that can access this instance.
- --authorized-networks=NETWORK,[NETWORK,...]
-
The list of external networks that are allowed to connect to the instance.
Specified in CIDR notation, also known as 'slash' notation (e.g.
192.168.100.0/24).
- --availability-type=AVAILABILITY_TYPE
-
Specifies level of availability. Only applies to PostgreSQL instances.
AVAILABILITY_TYPE must be one of:
-
- regional
- Provides high availability and is recommended for production instances; instance automatically fails over to another zone within your selected region.
- zonal
- Provides no failover capability. This is the default.
-
- --backup
-
Enables daily backup. Enabled by default, use --no-backup to disable.
- --backup-start-time=BACKUP_START_TIME
-
Start time of daily backups, specified in the 24 hour format - HH:MM, in the
UTC timezone.
- --cpu=CPU
-
Whole number value indicating how many cores are desired in the machine. Both
--cpu and --memory must be specified if a custom machine type is desired,
and the --tier flag must be omitted.
- --database-flags=FLAG=VALUE,[FLAG=VALUE,...]
-
Comma-separated list of database flags to set on the instance. Use an equals
sign to separate flag name and value. Flags without values, like
skip_grant_tables, can be written out without a value after, e.g.,
skip_grant_tables=. Use on/off for booleans. View the Instance Resource
API for allowed flags. (e.g., --database-flags
max_allowed_packet=55555,skip_grant_tables=,log_output=1)
- --database-version=DATABASE_VERSION
-
The database engine type and version. If left unspecified, the API defaults will
be used. DATABASE_VERSION must be one of: MYSQL_5_5,
MYSQL_5_6, MYSQL_5_7, POSTGRES_9_6.
- --enable-bin-log
-
Specified if binary log should be enabled. If backup configuration is disabled,
binary log must be disabled as well.
- --failover-replica-name=FAILOVER_REPLICA_NAME
-
Also create a failover replica with the specified name.
- --follow-gae-app=FOLLOW_GAE_APP
-
First Generation instances only. The App Engine app this instance should follow.
It must be in the same region as the instance.
- --labels=[KEY=VALUE,...]
-
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (-), underscores (_), lowercase characters, and numbers. Values must contain only hyphens (-), underscores (_), lowercase characters, and numbers.
- --maintenance-release-channel=MAINTENANCE_RELEASE_CHANNEL
-
Which channel's updates to apply during the maintenance window. If not
specified, Cloud SQL chooses the timing of updates to your instance.
MAINTENANCE_RELEASE_CHANNEL must be one of:
-
- preview
- Preview updates release prior to production updates. You may wish to use the preview channel for dev/test applications so that you can preview their compatibility with your application prior to the production release.
- production
- Production updates are stable and recommended for applications in production.
-
- --maintenance-window-day=MAINTENANCE_WINDOW_DAY
-
Day of week for maintenance window, in UTC time zone.
MAINTENANCE_WINDOW_DAY must be one of: SUN, MON, TUE,
WED, THU, FRI, SAT.
- --maintenance-window-hour=MAINTENANCE_WINDOW_HOUR
-
Hour of day for maintenance window, in UTC time zone.
- --master-instance-name=MASTER_INSTANCE_NAME
-
Name of the instance which will act as master in the replication setup. The
newly created instance will be a read replica of the specified master instance.
- --memory=MEMORY
-
Whole number value indicating how much memory is desired in the machine. A size
unit should be provided (eg. 3072MiB or 9GiB) - if no units are specified, GiB
is assumed. Both --cpu and --memory must be specified if a custom machine
type is desired, and the --tier flag must be omitted.
- --network=NETWORK
-
Network in the current project that the instance will be part of. To specify
using a network with a shared VPC, use the full URL of the network. For an
example host project, 'testproject', and shared network, 'testsharednetwork',
this would be of the
form:--network=projects/testproject/global/networks/testsharednetwork
- --pricing-plan=PRICING_PLAN, -p PRICING_PLAN; default="PER_USE"
-
First Generation instances only. The pricing plan for this instance.
PRICING_PLAN must be one of: PER_USE, PACKAGE.
- --replica-type=REPLICA_TYPE
-
The type of replica to create. REPLICA_TYPE must be one of: READ,
FAILOVER.
- --replication=REPLICATION
-
Type of replication this instance uses. The default is synchronous.
REPLICATION must be one of: synchronous, asynchronous.
- --require-ssl
-
Specified if users connecting over IP must use SSL.
- --storage-auto-increase
-
Storage size can be increased, but it cannot be decreased; storage increases are
permanent for the life of the instance. With this setting enabled, a spike in
storage requirements can result in permanently increased storage costs for your
instance. However, if an instance runs out of available space, it can result in
the instance going offline, dropping existing connections. This setting is
enabled by default.
- --storage-auto-increase-limit=STORAGE_AUTO_INCREASE_LIMIT
-
Allows you to set a maximum storage capacity, in GB. Automatic increases to your
capacity will stop once this limit has been reached. Default capacity is
unlimited.
- --storage-size=STORAGE_SIZE
-
Amount of storage allocated to the instance. Must be an integer number of GB
between 10GB and 10230GB inclusive. The default is 10GB.
- --storage-type=STORAGE_TYPE
-
The storage type for the instance. The default is SSD. STORAGE_TYPE must
be one of: SSD, HDD.
- --tier=TIER, -t TIER
-
The tier for this instance. For Second Generation instances, TIER is the
instance's machine type (e.g., db-n1-standard-1). For PostgreSQL instances,
only shared-core machine types (e.g., db-f1-micro) apply. A complete list of
tiers is available here: cloud.google.com/sql/pricing
IMPORTANT: First Generation instances are deprecated. If you're considering any First Generation tiers, we recommend using Second Generation instead.
-
Options for creating an internal replica of an external data source.
-
- --master-dump-file-path=MASTER_DUMP_FILE_PATH
-
Path to the MySQL dump file in Google Cloud Storage from which the seed import
is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files
(.gz) are also supported. This flag must be specified if any of the other
arguments in this group are specified.
- --master-username=MASTER_USERNAME
-
Name of the replication user on the external data source. This flag must be
specified if any of the other arguments in this group are specified.
-
Client and server credentials.
-
- --master-ca-certificate-path=MASTER_CA_CERTIFICATE_PATH
-
Path to a file containing the X.509v3 (RFC5280) PEM encoded certificate of the
CA that signed the external data source's certificate. This flag must be
specified if any of the other arguments in this group are specified.
-
Client credentials.
-
- --client-certificate-path=CLIENT_CERTIFICATE_PATH
-
Path to a file containing the X.509v3 (RFC5280) PEM encoded certificate that
will be used by the replica to authenticate against the external data source.
This flag must be specified if any of the other arguments in this group are
specified.
- --client-key-path=CLIENT_KEY_PATH
-
Path to a file containing the unencrypted PKCS#1 or PKCS#8 PEM encoded private
key associated with the clientCertificate. This flag must be specified if any of
the other arguments in this group are specified.
-
-
-
Password group. At most one of these may be specified:
-
- --master-password=MASTER_PASSWORD
-
Password of the replication user on the external data source.
- --prompt-for-master-password
-
Prompt for the password of the replication user on the external data source. The
password is all typed characters up to but not including the RETURN or ENTER
key.
-
-
-
At most one of these may be specified:
-
- --region=REGION; default="us-central"
-
Regional location (e.g. asia-east1, us-east1). See the full list of regions at
cloud.google.com/sql/docs/instance-locations
-
At most one of these may be specified:
-
- --gce-zone=GCE_ZONE
-
(DEPRECATED) Preferred Compute Engine zone (e.g. us-central1-a,
us-central1-b, etc.).
Flag --gce-zone is deprecated and will be removed by release 255.0.0. Use --zone instead.
- --zone=ZONE
-
Preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, etc.).
-
-
-
Options for creating a wrapper for an external data source.
-
- --source-ip-address=SOURCE_IP_ADDRESS
-
Public IP address used to connect to and replicate from the external data
source. This flag must be specified if any of the other arguments in this group
are specified.
- --source-port=SOURCE_PORT; default=3306
-
Port number used to connect to and replicate from the external data source.
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in BETA and may change without notice. These variants are also available:
- $ gcloud sql instances create $ gcloud alpha sql instances create