# Method: projects.locations.instances.import

- [HTTP request](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#body.aspect)
- [InputConfig](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#InputConfig)
  - [JSON representation](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#InputConfig.SCHEMA_REPRESENTATION)
- [GcsSource](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#GcsSource)
  - [JSON representation](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#GcsSource.SCHEMA_REPRESENTATION)
- [Examples](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#examples)
- [Try it!](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#try-it)

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file.

The returned operation is automatically deleted after a few hours, so there is no need to call operations.delete.

### HTTP request

`POST https://redis.googleapis.com/v1beta1/{name=projects/*/locations/*/instances/*}:import`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. Redis instance resource name using the form: `projects/{projectId}/locations/{locationId}/instances/{instanceId}` where `locationId` refers to a GCP region. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "inputConfig": { object (`https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#InputConfig`) } } ``` |

| Fields ||
|---|---|
| `inputConfig` | ``object (`https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#InputConfig`)`` Required. Specify data to be imported. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires the following OAuth scope:

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

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

## InputConfig

The input content

| JSON representation |
|---|
| ``` { // Union field `source` can be only one of the following: "gcsSource": { object (`https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#GcsSource`) } // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| Union field `source`. Required. Specify source location of input data `source` can be only one of the following: ||
| `gcsSource` | ``object (`https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1beta1/projects.locations.instances/import#GcsSource`)`` Google Cloud Storage location where input content is located. |

## GcsSource

The Cloud Storage location for the input content

| JSON representation |
|---|
| ``` { "uri": string } ``` |

| Fields ||
|---|---|
| `uri` | `string` Required. Source data URI. (e.g. 'gs://my_bucket/my_object'). |