# REST Resource: projects.locations.relations

- [Resource: Relation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations#Relation)
  - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations#Relation.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations#Type)
- [Methods](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations#METHODS_SUMMARY)

## Resource: Relation

Message representing a relation between 2 resource.

| JSON representation |
|---|
| ``` { "name": string, "srcAsset": string, "dstAsset": string, "type": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations#Type`), "createTime": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Identifier. The identifier of the relation. |
| `srcAsset` | `string` Output only. The source asset name in the relation. |
| `dstAsset` | `string` Output only. The destination asset name in the relation. |
| `type` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations#Type`)`` Optional. The type of the relation. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The timestamp when the relation was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## Type

Enumerates possible types of a relation.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Default value. |
| `LOGICAL_DATABASE` | DBDeployment -\> Database |
| `DATABASE_DEPLOYMENT_HOSTING_SERVER` | A relation between a machine/VM and the database deployment it hosts. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations/get` | Gets the details of an relation. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.relations/list` | Lists all the relations in a given project and location. |