- [Resource: Deployment](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments#Deployment)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments#Deployment.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments#METHODS_SUMMARY)

## Resource: Deployment

Details of the deployment where APIs are hosted. A deployment could represent an Apigee proxy, API gateway, other Google Cloud services or non-Google Cloud services as well. A deployment entity is a root level entity in the API hub and exists independent of any API.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "documentation": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/Documentation`) }, "deploymentType": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "resourceUri": string, "endpoints": [ string ], "apiVersions": [ string ], "createTime": string, "updateTime": string, "slo": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "environment": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "attributes": { string: { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, ... }, "sourceMetadata": [ { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/SourceMetadata`) } ], "managementUrl": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "sourceUri": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "sourceProject": string, "sourceEnvironment": string, "specs": [ string ], "apiOperations": [ string ], "sourceRevision": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}` |
| `displayName` | `string` Required. The display name of the deployment. |
| `description` | `string` Optional. The description of the deployment. |
| `documentation` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/Documentation`)`` Optional. The documentation of the deployment. |
| `deploymentType` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Required. The type of deployment. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-deployment-type` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute. |
| `resourceUri` | `string` Required. The resource URI identifies the deployment within its gateway. For Apigee gateways, its recommended to use the format: organizations/{org}/environments/{env}/apis/{api}. For ex: if a proxy with name `orders` is deployed in `staging` environment of `cymbal` organization, the resource URI would be: `organizations/cymbal/environments/staging/apis/orders`. |
| `endpoints[]` | `string` Required. The endpoints at which this deployment resource is listening for API requests. This could be a list of complete URIs, hostnames or an IP addresses. |
| `apiVersions[]` | `string` Output only. The API versions linked to this deployment. Note: A particular deployment could be linked to multiple different API versions (of same or different APIs). |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the deployment 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 at which the deployment 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"`. |
| `slo` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Optional. The SLO for this deployment. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-slo` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute. |
| `environment` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Optional. The environment mapping to this deployment. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-environment` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute. |
| `attributes` | ``map (key: string, value: object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`))`` Optional. The list of user defined attributes associated with the deployment resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `sourceMetadata[]` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/SourceMetadata`)`` Output only. The list of sources and metadata from the sources of the deployment. |
| `managementUrl` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Optional. The uri where users can navigate to for the management of the deployment. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-management-url` The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. The value of the attribute should be a valid URL. |
| `sourceUri` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Optional. The uri where additional source specific information for this deployment can be found. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-source-uri` The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. The value of the attribute should be a valid URI, and in case of Cloud Storage URI, it should point to a Cloud Storage object, not a directory. |
| `sourceProject` | `string` Optional. The project to which the deployment belongs. For Google Cloud gateways, this will refer to the project identifier. For others like Edge/OPDK, this will refer to the org identifier. |
| `sourceEnvironment` | `string` Optional. The environment at source for the deployment. For example: prod, dev, staging, etc. |
| `specs[]` | `string` Output only. The specs linked directly to this deployment. Note: a deployment could serve multiple specs (e.g., across different revisions of the same underlying gateway configuration). |
| `apiOperations[]` | `string` Output only. The API operations linked directly to this deployment. |
| `sourceRevision` | `string` Optional. A revision identifier for the underlying gateway configuration that this deployment serves. For Apigee gateway variants, this is typically the proxy revision number populated automatically when the deployment is discovered. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments/create` | Create a deployment resource in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments/delete` | Deletes a deployment resource in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments/get` | Get details about a deployment and the API versions linked to it. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments/list` | List deployment resources in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.deployments/patch` | Update a deployment resource in the API hub. |