This page describes how to perform view, update, and delete operations
for connection profiles.

## View a connection profile

You can view the following information about your connection profiles:

- All configuration details provided during profile creation. For more
  information, see
  [Connection profiles overview](https://docs.cloud.google.com/database-migration/docs/mysql/about-connection-profiles.md.txt).

- Connection profile creation and last modification time.

- A list of migration jobs that use this connection profile.

To view connection profile details, perform the following steps:

### Console

1. In the Google Cloud console, go to the **Connection profiles** page.

   [Go to Connection profiles](https://console.cloud.google.com/dbmigration/connection-profiles)
2. Click the display name of the connection profile that you want to view. A connection profile overview page appears.

### gcloud


Before using any of the command data below,
make the following replacements:

- <var class="edit" scope="REGION" translate="no">REGION</var> with the identifier of the region where your connection profile is saved.
- <var class="edit" scope="CONNECTION_PROFILE_ID" translate="no">CONNECTION_PROFILE_ID</var> with your connection profile identifier.

  If you don't know the identifier, you can use the
  [`gcloud database-migration connection-profiles list`](https://docs.cloud.google.com/sdk/gcloud/reference/database-migration/connection-profiles/list.md.txt)
  command to list all profiles in a given region and view their identifiers.

For more information on these values, see [Connection profiles overview](https://docs.cloud.google.com/database-migration/docs/mysql/about-connection-profiles.md.txt).


Execute the

following

command:

#### Linux, macOS, or Cloud Shell

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles \
describe CONNECTION_PROFILE_ID \
  --region=REGION
```

#### Windows (PowerShell)

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles `
describe CONNECTION_PROFILE_ID `
  --region=REGION
```

#### Windows (cmd.exe)

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles ^
describe CONNECTION_PROFILE_ID ^
  --region=REGION
```

## Update a connection profile

You can modify the following connection profile details:

- Display name
- (Source profile only) Cloud Storage bucket name
- (Destination profile only) destination Cloud SQL for MySQL instance identifier, database username and password

To update a connection profile, perform the following steps:

### Console

1. In the Google Cloud console, go to the **Connection profiles** page.

   [Go to Connection profiles](https://console.cloud.google.com/dbmigration/connection-profiles)
2. Click the display name of the connection profile that you want to modify. An overview page appears for the connection profile.

3. Click **Edit** and update your connection profile.
4. Click **Save**.

### gcloud

This sample uses the optional `--no-async` flag so that all operations
are performed synchronously. This means that some commands might take
a while to complete. You can skip the `--no-async` flag to run commands asynchronously.
If you do, you need to use the
[`gcloud database-migration operations describe`](https://docs.cloud.google.com/sdk/gcloud/reference/database-migration/operations/describe.md.txt) command to verify if your operation
is successful.


Before using any of the command data below,
make the following replacements:

- <var class="edit" scope="CONNECTION_PROFILE_ID" translate="no">CONNECTION_PROFILE_ID</var> with your connection profile identifier.

  If you don't know the identifier, you can use the
  [`gcloud database-migration connection-profiles list`](https://docs.cloud.google.com/sdk/gcloud/reference/database-migration/connection-profiles/list.md.txt)
  command to list all profiles in a given region and view their identifiers.
- <var class="edit" scope="REGION" translate="no">REGION</var> with the identifier of the region where your connection profile is saved.
- Optional: <var class="edit" scope="CONNECTION_PROFILE_NAME" translate="no">CONNECTION_PROFILE_NAME</var> with a human-readable name for your connection profile. This value is displayed in the Google Cloud console.
- **For destination connection profiles only** : <var class="edit" scope="CLOUDSQL_INSTANCE_ID" translate="no">CLOUDSQL_INSTANCE_ID</var> with the instance identifier of your destination Cloud SQL instance. For information on how to view Cloud SQL instance details, see [View instance information](https://docs.cloud.google.com/sql/docs/mysql/instance-info.md.txt) in the Cloud SQL documentation.

For more information on these values, see [Connection profiles overview](https://docs.cloud.google.com/database-migration/docs/mysql/about-connection-profiles.md.txt).


Execute the

following

command:

#### Linux, macOS, or Cloud Shell

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles \
create sqlserver CONNECTION_PROFILE_ID \
  --no-async
  --region=REGION \
  --display-name=CONNECTION_PROFILE_NAME \
  --cloudsql-instance=CLOUDSQL_INSTANCE_ID \
  --username=CLOUD_SQL_DB_USERNAME \
  --password=CLOUD_SQL_DB_USER_PASSWORD
```

#### Windows (PowerShell)

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles `
create sqlserver CONNECTION_PROFILE_ID `
  --no-async
  --region=REGION `
  --display-name=CONNECTION_PROFILE_NAME `
  --cloudsql-instance=CLOUDSQL_INSTANCE_ID `
  --username=CLOUD_SQL_DB_USERNAME `
  --password=CLOUD_SQL_DB_USER_PASSWORD
```

#### Windows (cmd.exe)

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles ^
create sqlserver CONNECTION_PROFILE_ID ^
  --no-async
  --region=REGION ^
  --display-name=CONNECTION_PROFILE_NAME ^
  --cloudsql-instance=CLOUDSQL_INSTANCE_ID ^
  --username=CLOUD_SQL_DB_USERNAME ^
  --password=CLOUD_SQL_DB_USER_PASSWORD
```

You should receive a response similar to the following:

```
Waiting for connection profile [CONNECTION_PROFILE_ID]
to be updated with [OPERATION_ID]

Waiting for operation [OPERATION_ID] to complete...done.

Created connection profile CONNECTION_PROFILE_ID [OPERATION_ID]
```

## Delete a connection profile

You can delete a connection profile only if there are no migration jobs that
use that profile. If you want to delete a connection profile that
is in use by a migration job, first
[delete all migration jobs](https://docs.cloud.google.com/database-migration/docs/mysql/migration-job-actions.md.txt#delete) that are linked to the connection profile.

To delete a connection profile, perform the following steps:

### Console

1. In the Google Cloud console, go to the **Connection profiles** page.

   [Go to Connection profiles](https://console.cloud.google.com/dbmigration/connection-profiles)
2. Click the display name of the connection profile that you want to delete. A connection profile overview page appears.

3. Click **Delete**.
4. In the dialog, click **Delete**.

### gcloud

This command returns an interactive confirmation prompt that requires your input to complete.
You can skip the confirmation prompt by using the
[optional `--quiet` flag](https://docs.cloud.google.com/sdk/gcloud/reference.md.txt#--quiet).


Before using any of the command data below,
make the following replacements:

- <var class="edit" scope="REGION" translate="no">REGION</var> with the identifier of the region where your connection profile is saved.
- <var class="edit" scope="CONNECTION_PROFILE_ID" translate="no">CONNECTION_PROFILE_ID</var> with your connection profile identifier.

  If you don't know the identifier, you can use the
  [`gcloud database-migration connection-profiles list`](https://docs.cloud.google.com/sdk/gcloud/reference/database-migration/connection-profiles/list.md.txt)
  command to list all profiles in a given region and view their identifiers.

For more information on these values, see [Connection profiles overview](https://docs.cloud.google.com/database-migration/docs/mysql/about-connection-profiles.md.txt).


Execute the

following

command:

#### Linux, macOS, or Cloud Shell

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles \
delete CONNECTION_PROFILE_ID \
  --region=REGION
```

#### Windows (PowerShell)

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles `
delete CONNECTION_PROFILE_ID `
  --region=REGION
```

#### Windows (cmd.exe)

> [!NOTE]
> **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](https://docs.cloud.google.com/sdk/gcloud/reference/init); or [gcloud auth login](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) and [gcloud config set project](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt).

```bash
gcloud database-migration connection-profiles ^
delete CONNECTION_PROFILE_ID ^
  --region=REGION
```
**Result**


The `delete` returns an interactive prompt where you confirm
the action. Enter `Y` to remove the connection profile:

```
You are about to delete connection_profile [CONNECTION_PROFILE_ID]

Do you want to continue (Y/n)?
```
You can skip Google Cloud CLI interactive confirmation prompts by using the [optional `--quiet` flag](https://docs.cloud.google.com/sdk/gcloud/reference.md.txt#--quiet).