versions
Creates, updates, deletes, gets or lists a versions resource.
Overview
| Name | versions |
| Type | Resource |
| Id | google.apigeeregistry.versions |
Fields
The following fields are returned by SELECT queries:
- projects_locations_apis_versions_get
- projects_locations_apis_versions_list
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name. |
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. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
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. |
primarySpec | string | The primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec} |
state | string | A user-definable description of the lifecycle phase of this API version. Format: free-form, but we expect single words that describe API maturity, e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", "DEPRECATED", "RETIRED". |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name. |
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. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
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. |
primarySpec | string | The primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec} |
state | string | A user-definable description of the lifecycle phase of this API version. Format: free-form, but we expect single words that describe API maturity, e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", "DEPRECATED", "RETIRED". |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_locations_apis_versions_get | select | projectsId, locationsId, apisId, versionsId | Returns a specified version. | |
projects_locations_apis_versions_list | select | projectsId, locationsId, apisId | pageToken, filter, orderBy, pageSize | Returns matching versions. |
projects_locations_apis_versions_create | insert | projectsId, locationsId, apisId | apiVersionId | Creates a specified version. |
projects_locations_apis_versions_patch | update | projectsId, locationsId, apisId, versionsId | updateMask, allowMissing | Used to modify a specified version. |
projects_locations_apis_versions_delete | delete | projectsId, locationsId, apisId, versionsId | force | Removes a specified version and all of the resources that it owns. |
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 | |
locationsId | string | |
projectsId | string | |
versionsId | string | |
allowMissing | boolean | |
apiVersionId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- projects_locations_apis_versions_get
- projects_locations_apis_versions_list
Returns a specified version.
SELECT
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime
FROM google.apigeeregistry.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
;
Returns matching versions.
SELECT
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime
FROM google.apigeeregistry.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- projects_locations_apis_versions_create
- Manifest
Creates a specified version.
INSERT INTO google.apigeeregistry.versions (
data__displayName,
data__name,
data__labels,
data__state,
data__annotations,
data__primarySpec,
data__description,
projectsId,
locationsId,
apisId,
apiVersionId
)
SELECT
'{{ displayName }}',
'{{ name }}',
'{{ labels }}',
'{{ state }}',
'{{ annotations }}',
'{{ primarySpec }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apisId }}',
'{{ apiVersionId }}'
RETURNING
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime
;
# Description fields are for documentation purposes
- name: versions
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the versions resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the versions resource.
- name: apisId
value: "{{ apisId }}"
description: Required parameter for the versions resource.
- name: displayName
value: "{{ displayName }}"
description: |
Human-meaningful name.
- name: name
value: "{{ name }}"
description: |
Resource name.
- name: labels
value: "{{ labels }}"
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: state
value: "{{ state }}"
description: |
A user-definable description of the lifecycle phase of this API version. Format: free-form, but we expect single words that describe API maturity, e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", "DEPRECATED", "RETIRED".
- name: annotations
value: "{{ annotations }}"
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: primarySpec
value: "{{ primarySpec }}"
description: |
The primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
- name: description
value: "{{ description }}"
description: |
A detailed description.
- name: apiVersionId
value: "{{ apiVersionId }}"
UPDATE examples
- projects_locations_apis_versions_patch
Used to modify a specified version.
UPDATE google.apigeeregistry.versions
SET
data__displayName = '{{ displayName }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__state = '{{ state }}',
data__annotations = '{{ annotations }}',
data__primarySpec = '{{ primarySpec }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
RETURNING
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime;
DELETE examples
- projects_locations_apis_versions_delete
Removes a specified version and all of the resources that it owns.
DELETE FROM google.apigeeregistry.versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND force = '{{ force }}'
;