# REST Resource: projects.locations.cdnKeys

- [Resource: CdnKey](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#CdnKey)
  - [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#CdnKey.SCHEMA_REPRESENTATION)
- [GoogleCdnKey](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#GoogleCdnKey)
  - [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#GoogleCdnKey.SCHEMA_REPRESENTATION)
- [AkamaiCdnKey](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#AkamaiCdnKey)
  - [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#AkamaiCdnKey.SCHEMA_REPRESENTATION)
- [MediaCdnKey](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#MediaCdnKey)
  - [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#MediaCdnKey.SCHEMA_REPRESENTATION)
- [TokenConfig](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#TokenConfig)
  - [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#TokenConfig.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#METHODS_SUMMARY)

## Resource: CdnKey

Configuration for a CDN key. Used by the Video Stitcher to sign URIs for fetching video manifests and signing media segments for playback.

| JSON representation |
|---|
| ``` { "name": string, "hostname": string, // Union field `cdn_key_config` can be only one of the following: "googleCdnKey": { object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#GoogleCdnKey`) }, "akamaiCdnKey": { object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#AkamaiCdnKey`) }, "mediaCdnKey": { object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#MediaCdnKey`) } // End of list of possible types for union field `cdn_key_config`. } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name of the CDN key, in the form of `projects/{project}/locations/{location}/cdnKeys/{id}`. The name is ignored when creating a CDN key. |
| `hostname` | `string` The hostname this key applies to. |
| Union field `cdn_key_config`. Configuration associated with the CDN key. `cdn_key_config` can be only one of the following: ||
| `googleCdnKey` | ``object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#GoogleCdnKey`)`` The configuration for a Google Cloud CDN key. |
| `akamaiCdnKey` | ``object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#AkamaiCdnKey`)`` The configuration for an Akamai CDN key. |
| `mediaCdnKey` | ``object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#MediaCdnKey`)`` The configuration for a Media CDN key. |

## GoogleCdnKey

Configuration for a Google Cloud CDN key.

| JSON representation |
|---|
| ``` { "privateKey": string, "keyName": string } ``` |

| Fields ||
|---|---|
| `privateKey` | `string (https://developers.google.com/discovery/v1/type-format format)` Input only. Secret for this Google Cloud CDN key. A base64-encoded string. |
| `keyName` | `string` The public name of the Google Cloud CDN key. |

## AkamaiCdnKey

Configuration for an Akamai CDN key.

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

| Fields ||
|---|---|
| `tokenKey` | `string (https://developers.google.com/discovery/v1/type-format format)` Input only. Token key for the Akamai CDN edge configuration. A base64-encoded string. |

## MediaCdnKey

Configuration for a Media CDN key.

| JSON representation |
|---|
| ``` { "privateKey": string, "keyName": string, "tokenConfig": { object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#TokenConfig`) } } ``` |

| Fields ||
|---|---|
| `privateKey` | `string (https://developers.google.com/discovery/v1/type-format format)` Input only. 64-byte ed25519 private key for this Media CDN key. A base64-encoded string. |
| `keyName` | `string` The keyset name of the Media CDN key. |
| `tokenConfig` | ``object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys#TokenConfig`)`` Optional. If set, the URL will be signed using the Media CDN token. Otherwise, the URL would be signed using the standard Media CDN signature. |

## TokenConfig

Configuration for a Media CDN token.

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

| Fields ||
|---|---|
| `queryParameter` | `string` Optional. The query parameter in which to find the token. The name must be 1-64 characters long and match the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Defaults to `edge-cache-token`. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys/create` | Creates a new CDN key. |
| ### `https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys/delete` | Deletes the specified CDN key. |
| ### `https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys/get` | Returns the specified CDN key. |
| ### `https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys/list` | Lists all CDN keys in the specified project and location. |
| ### `https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/projects.locations.cdnKeys/patch` | Updates the specified CDN key. |