- [Resource: Federation](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#Federation)
  - [JSON representation](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#Federation.SCHEMA_REPRESENTATION)
- [BackendMetastore](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#BackendMetastore)
  - [JSON representation](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#BackendMetastore.SCHEMA_REPRESENTATION)
- [MetastoreType](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#MetastoreType)
- [State](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#State)
- [Methods](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#METHODS_SUMMARY)

## Resource: Federation

Represents a federation of multiple backend metastores.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "version": string, "backendMetastores": { integer: { object (`https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#BackendMetastore`) }, ... }, "endpointUri": string, "state": enum (`https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#State`), "stateMessage": string, "uid": string, "tags": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. The relative resource name of the federation, of the form: projects/{projectNumber}/locations/{locationId}/federations/{federationId}\`. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the metastore federation was created. Uses RFC 3339, where generated output will always be Z-normalized and use 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"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the metastore federation was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 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"`. |
| `labels` | `map (key: string, value: string)` User-defined labels for the metastore federation. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `version` | `string` Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version. |
| `backendMetastores` | ``map (key: integer, value: object (`https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#BackendMetastore`))`` A map from `BackendMetastore` rank to `BackendMetastore`s from which the federation service serves metadata at query time. The map key represents the order in which `BackendMetastore`s should be evaluated to resolve database names at query time and should be greater than or equal to zero. A `BackendMetastore` with a lower number will be evaluated before a `BackendMetastore` with a higher number. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `endpointUri` | `string` Output only. The federation endpoint. |
| `state` | ``enum (`https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#State`)`` Output only. The current state of the federation. |
| `stateMessage` | `string` Output only. Additional information about the current state of the metastore federation, if available. |
| `uid` | `string` Output only. The globally unique resource identifier of the metastore federation. |
| `tags` | `map (key: string, value: string)` Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## BackendMetastore

Represents a backend metastore for the federation.

| JSON representation |
|---|
| ``` { "name": string, "metastoreType": enum (`https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#MetastoreType`) } ``` |

| Fields ||
|---|---|
| `name` | `string` The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: - BigQuery - `projects/{projectId}` - Dataproc Metastore - `projects/{projectId}/locations/{location}/services/{serviceId}` |
| `metastoreType` | ``enum (`https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations#MetastoreType`)`` The type of the backend metastore. |

## MetastoreType

The type of the backend metastore.

| Enums ||
|---|---|
| `METASTORE_TYPE_UNSPECIFIED` | The metastore type is not set. |
| `BIGQUERY` | The backend metastore is BigQuery. |
| `DATAPROC_METASTORE` | The backend metastore is Dataproc Metastore. |

## State

The current state of the federation.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The state of the metastore federation is unknown. |
| `CREATING` | The metastore federation is in the process of being created. |
| `ACTIVE` | The metastore federation is running and ready to serve queries. |
| `UPDATING` | The metastore federation is being updated. It remains usable but cannot accept additional update requests or be deleted at this time. |
| `DELETING` | The metastore federation is undergoing deletion. It cannot be used. |
| `ERROR` | The metastore federation has encountered an error and cannot be used. The metastore federation should be deleted. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/create` | Creates a metastore federation in a project and location. |
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/delete` | Deletes a single federation. |
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/get` | Gets the details of a single federation. |
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/getIamPolicy` | Gets the access control policy for a resource. |
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/list` | Lists federations in a project and location. |
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/patch` | Updates the fields of a federation. |
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/setIamPolicy` | Sets the access control policy on the specified resource. |
| ### `https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.federations/testIamPermissions` | Returns permissions that a caller has on the specified resource. |