deployments
Creates, updates, deletes, gets or lists a deployments
resource.
Overview
Name | deployments |
Type | Resource |
Id | google.apigeeregistry.deployments |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_apis_deployments_get
- projects_locations_apis_deployments_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Resource name. |
accessGuidance | string | Text briefly describing how to access the endpoint. Changes to this value will not affect the revision. |
annotations | object | Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts. |
apiSpecRevision | string | The full resource name (including revision ID) of the spec of the API being served by the deployment. Changes to this value will update the revision. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec@revision} |
createTime | string (google-datetime) | Output only. Creation timestamp; when the deployment resource was created. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
endpointUri | string | The address where the deployment is serving. Changes to this value will update the revision. |
externalChannelUri | string | The address of the external channel of the API (e.g., the Developer Portal). Changes to this value will not affect the revision. |
intendedAudience | string | Text briefly identifying the intended audience of the API. Changes to this value will not affect the revision. |
labels | object | Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed. |
revisionCreateTime | string (google-datetime) | Output only. Revision creation timestamp; when the represented revision was created. |
revisionId | string | Output only. Immutable. The revision ID of the deployment. A new revision is committed whenever the deployment contents are changed. The format is an 8-character hexadecimal string. |
revisionUpdateTime | string (google-datetime) | Output only. Last update timestamp: when the represented revision was last modified. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Resource name. |
accessGuidance | string | Text briefly describing how to access the endpoint. Changes to this value will not affect the revision. |
annotations | object | Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts. |
apiSpecRevision | string | The full resource name (including revision ID) of the spec of the API being served by the deployment. Changes to this value will update the revision. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec@revision} |
createTime | string (google-datetime) | Output only. Creation timestamp; when the deployment resource was created. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
endpointUri | string | The address where the deployment is serving. Changes to this value will update the revision. |
externalChannelUri | string | The address of the external channel of the API (e.g., the Developer Portal). Changes to this value will not affect the revision. |
intendedAudience | string | Text briefly identifying the intended audience of the API. Changes to this value will not affect the revision. |
labels | object | Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed. |
revisionCreateTime | string (google-datetime) | Output only. Revision creation timestamp; when the represented revision was created. |
revisionId | string | Output only. Immutable. The revision ID of the deployment. A new revision is committed whenever the deployment contents are changed. The format is an 8-character hexadecimal string. |
revisionUpdateTime | string (google-datetime) | Output only. Last update timestamp: when the represented revision was last modified. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
apisId | string | |
deploymentsId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
apiDeploymentId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_apis_deployments_get
- projects_locations_apis_deployments_list
Returns a specified deployment.
SELECT
name,
accessGuidance,
annotations,
apiSpecRevision,
createTime,
description,
displayName,
endpointUri,
externalChannelUri,
intendedAudience,
labels,
revisionCreateTime,
revisionId,
revisionUpdateTime
FROM google.apigeeregistry.deployments
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND deploymentsId = '{{ deploymentsId }}' -- required;
Returns matching deployments.
SELECT
name,
accessGuidance,
annotations,
apiSpecRevision,
createTime,
description,
displayName,
endpointUri,
externalChannelUri,
intendedAudience,
labels,
revisionCreateTime,
revisionId,
revisionUpdateTime
FROM google.apigeeregistry.deployments
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- projects_locations_apis_deployments_create
- Manifest
Creates a specified deployment.
INSERT INTO google.apigeeregistry.deployments (
data__name,
data__displayName,
data__description,
data__apiSpecRevision,
data__endpointUri,
data__externalChannelUri,
data__intendedAudience,
data__accessGuidance,
data__labels,
data__annotations,
projectsId,
locationsId,
apisId,
apiDeploymentId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ apiSpecRevision }}',
'{{ endpointUri }}',
'{{ externalChannelUri }}',
'{{ intendedAudience }}',
'{{ accessGuidance }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apisId }}',
'{{ apiDeploymentId }}'
RETURNING
name,
accessGuidance,
annotations,
apiSpecRevision,
createTime,
description,
displayName,
endpointUri,
externalChannelUri,
intendedAudience,
labels,
revisionCreateTime,
revisionId,
revisionUpdateTime
;
# Description fields are for documentation purposes
- name: deployments
props:
- name: projectsId
value: string
description: Required parameter for the deployments resource.
- name: locationsId
value: string
description: Required parameter for the deployments resource.
- name: apisId
value: string
description: Required parameter for the deployments resource.
- name: name
value: string
description: >
Resource name.
- name: displayName
value: string
description: >
Human-meaningful name.
- name: description
value: string
description: >
A detailed description.
- name: apiSpecRevision
value: string
description: >
The full resource name (including revision ID) of the spec of the API being served by the deployment. Changes to this value will update the revision. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec@revision}`
- name: endpointUri
value: string
description: >
The address where the deployment is serving. Changes to this value will update the revision.
- name: externalChannelUri
value: string
description: >
The address of the external channel of the API (e.g., the Developer Portal). Changes to this value will not affect the revision.
- name: intendedAudience
value: string
description: >
Text briefly identifying the intended audience of the API. Changes to this value will not affect the revision.
- name: accessGuidance
value: string
description: >
Text briefly describing how to access the endpoint. Changes to this value will not affect the revision.
- name: labels
value: object
description: >
Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with `apigeeregistry.googleapis.com/` and cannot be changed.
- name: annotations
value: object
description: >
Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.
- name: apiDeploymentId
value: string
UPDATE
examples
- projects_locations_apis_deployments_patch
Used to modify a specified deployment.
UPDATE google.apigeeregistry.deployments
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__apiSpecRevision = '{{ apiSpecRevision }}',
data__endpointUri = '{{ endpointUri }}',
data__externalChannelUri = '{{ externalChannelUri }}',
data__intendedAudience = '{{ intendedAudience }}',
data__accessGuidance = '{{ accessGuidance }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND deploymentsId = '{{ deploymentsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
RETURNING
name,
accessGuidance,
annotations,
apiSpecRevision,
createTime,
description,
displayName,
endpointUri,
externalChannelUri,
intendedAudience,
labels,
revisionCreateTime,
revisionId,
revisionUpdateTime;
DELETE
examples
- projects_locations_apis_deployments_delete
Removes a specified deployment, all revisions, and all child resources (e.g., artifacts).
DELETE FROM google.apigeeregistry.deployments
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND deploymentsId = '{{ deploymentsId }}' --required
AND force = '{{ force }}';
Lifecycle Methods
- projects_locations_apis_deployments_tag_revision
- projects_locations_apis_deployments_rollback
Adds a tag to a specified revision of a deployment.
EXEC google.apigeeregistry.deployments.projects_locations_apis_deployments_tag_revision
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@apisId='{{ apisId }}' --required,
@deploymentsId='{{ deploymentsId }}' --required
@@json=
'{
"tag": "{{ tag }}"
}';
Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.
EXEC google.apigeeregistry.deployments.projects_locations_apis_deployments_rollback
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@apisId='{{ apisId }}' --required,
@deploymentsId='{{ deploymentsId }}' --required
@@json=
'{
"revisionId": "{{ revisionId }}"
}';