- [HTTP request](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#body.request_body)
- [Response body](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#body.aspect)
- [SslCertsCreateEphemeralRequest](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#SslCertsCreateEphemeralRequest)
  - [JSON representation](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#SslCertsCreateEphemeralRequest.SCHEMA_REPRESENTATION)
- [Examples](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#examples)
- [Try it!](https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#try-it)

Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.

### HTTP request

`POST https://sqladmin.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `project` | `string` Project ID of the Cloud SQL project. |
| `instance` | `string` Cloud SQL instance ID. This does not include the project ID. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts/createEphemeral#SslCertsCreateEphemeralRequest`.

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/sslCerts#SslCert`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloudsql`
- `
  https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/sqlservice.admin`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## SslCertsCreateEphemeralRequest

SslCerts create ephemeral certificate request.

| JSON representation |
|---|
| ``` { "public_key": string, "access_token": string } ``` |

| Fields ||
|---|---|
| `public_key` | `string` PEM encoded public key to include in the signed certificate. |
| `access_token` | `string` Access token to include in the signed certificate. |