# REST Resource: projects.locations.observationSources

- [Resource: ObservationSource](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#ObservationSource)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#ObservationSource.SCHEMA_REPRESENTATION)
- [GclbObservationSource](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#GclbObservationSource)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#GclbObservationSource.SCHEMA_REPRESENTATION)
- [PscNetworkConfig](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#PscNetworkConfig)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#PscNetworkConfig.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#State)
- [Methods](https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#METHODS_SUMMARY)

## Resource: ObservationSource

Observation source configuration types

| JSON representation |
|---|
| ``` { "name": string, "state": enum (`https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#State`), "createTime": string, "updateTime": string, // Union field `source` can be only one of the following: "gclbObservationSource": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#GclbObservationSource`) } // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. name of resource For MVP, each region can only have 1 source. |
| `state` | ``enum (`https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#State`)`` Output only. The observation source state |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. \[Output only\] Create time stamp A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. \[Output only\] Update time stamp A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| Union field `source`. Type of the source `source` can be only one of the following: ||
| `gclbObservationSource` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#GclbObservationSource`)`` The GCLB observation source |

## GclbObservationSource

The GCLB observation source.

| JSON representation |
|---|
| ``` { "pscNetworkConfigs": [ { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#PscNetworkConfig`) } ] } ``` |

| Fields ||
|---|---|
| `pscNetworkConfigs[]` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources#PscNetworkConfig`)`` Required. The VPC networks where traffic will be observed. All load balancers within this network will be observed. Currently, this is limited to only one network. |

## PscNetworkConfig

Network information for setting up a PSC connection.

| JSON representation |
|---|
| ``` { "network": string, "subnetwork": string } ``` |

| Fields ||
|---|---|
| `network` | `string` Required. The VPC network. Format: `projects/{projectId}/global/networks/{network}` |
| `subnetwork` | `string` Required. The subnetwork in the source region that will be used to connect to the Cloud Load Balancers via PSC NEGs. Must belong to `network`. Format: projects/{projectId}/regions/{region}/subnetworks/{subnet} |

## State

Observation source state

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state |
| `CREATING` | Source is in the creating state |
| `CREATED` | Source has been created and is ready to use |
| `DELETING` | Source is being deleted |
| `ERROR` | Source is in an error state |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources/create` | CreateObservationSource creates a new ObservationSource but does not affect any deployed infrastructure. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources/delete` | DeleteObservationSource deletes an observation source. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources/get` | GetObservationSource retrieves a single ObservationSource by name. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apim/rest/v1alpha/projects.locations.observationSources/list` | ListObservationSources gets all ObservationSources for a given project and location. |