gcloud database-migration private-connections create

NAME
gcloud database-migration private-connections create - create a Database Migration private connection
SYNOPSIS
gcloud database-migration private-connections create(PRIVATE_CONNECTION :--region=REGION)--display-name=DISPLAY_NAME(--network-attachment=NETWORK_ATTACHMENT    |--subnet=SUBNET--vpc=VPC)[--no-async][--labels=[KEY=VALUE,…]][--skip-validation][--validate-only][GCLOUD_WIDE_FLAG]
DESCRIPTION
Create a Database Migration private connection
EXAMPLES
To create a private connection with VPC Peering called 'my-private-connection',run:
gclouddatabase-migrationprivate-connectionscreatemy-private-connection--region=us-central1--display-name=my-private-connection--vpc=vpc-example--subnet=10.0.0.0/29
TocreateaprivateconnectionwithPSCInterfacecalled'my-privateConnection',run:
gclouddatabase-migrationprivate-connectionscreatemy-private-connection--location=us-central1--display-name=my-private-connection--network-attachment=network-attachment-example
Touseaprivateconnection,allmigrationsandconnectionprofilesthatusethisconfigurationmustbeinthesameregion.
POSITIONAL ARGUMENTS
Private connection resource - The private connection to create. The arguments inthis group can be used to specify the attributes of this resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentprivate_connection on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

PRIVATE_CONNECTION
ID of the private_connection or fully qualified identifier for theprivate_connection.

To set theprivate_connection attribute:

  • provide the argumentprivate_connection on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--region=REGION
The Cloud region for the private_connection.

To set theregion attribute:

  • provide the argumentprivate_connection on the command line with afully specified name;
  • provide the argument--region on the command line.
REQUIRED FLAGS
--display-name=DISPLAY_NAME
A user-friendly name for the private connection. The display name can includeletters, numbers, spaces, and hyphens, and must start with a letter. The maximumlength allowed is 60 characters.
Exactly one of these must be specified:
Arguments for Private Service Connect Interface configuration.
--network-attachment=NETWORK_ATTACHMENT
Full URI of the network attachment that datastream will connect to.For example,this would be of theform:network-attachment=projects/test-project/regions/us-central1/networkAttachments/my-na
Arguments for VPC Peering configuration.
--subnet=SUBNET
A free subnet for peering. (CIDR of /29).

This flag argument must be specified if any of the other arguments in this groupare specified.

Vpc resource - Resource ID of the VPC network to peer with. This represents aCloud resource. (NOTE) Some attributes are not given arguments in this group butcan be set in other ways.

To set theproject attribute:

  • provide the argument--vpc on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

--vpc=VPC
ID of the vpc or fully qualified identifier for the vpc.

To set thevpc attribute:

  • provide the argument--vpc on the command line.
OPTIONAL FLAGS
--no-async
Waits for the operation in progress to complete before returning.
--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, andnumbers. Values must contain only hyphens (-), underscores(_), lowercase characters, and numbers.

--skip-validation
Creates the private connection without running prior verifications.
--validate-only
If set, the request will retrieve the project id to allow in the networkattachment Datastream will connect to.
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-21 UTC.