versions
Creates, updates, deletes, gets or lists a versions
resource.
Overview
Name | versions |
Type | Resource |
Id | google.apigeeregistry.versions |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Resource name. |
description | string | A detailed description. |
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 | Output only. Creation timestamp. |
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 | Output only. Last update timestamp. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_apis_versions_get | SELECT | apisId, locationsId, projectsId, versionsId | Returns a specified version. |
projects_locations_apis_versions_list | SELECT | apisId, locationsId, projectsId | Returns matching versions. |
projects_locations_apis_versions_create | INSERT | apisId, locationsId, projectsId | Creates a specified version. |
projects_locations_apis_versions_delete | DELETE | apisId, locationsId, projectsId, versionsId | Removes a specified version and all of the resources that it owns. |
projects_locations_apis_versions_patch | UPDATE | apisId, locationsId, projectsId, versionsId | Used to modify a specified version. |
SELECT
examples
Returns matching versions.
SELECT
name,
description,
annotations,
createTime,
displayName,
labels,
primarySpec,
state,
updateTime
FROM google.apigeeregistry.versions
WHERE apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new versions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.apigeeregistry.versions (
apisId,
locationsId,
projectsId,
name,
displayName,
description,
state,
labels,
annotations,
primarySpec
)
SELECT
'{{ apisId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ state }}',
'{{ labels }}',
'{{ annotations }}',
'{{ primarySpec }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: state
value: string
- name: labels
value: object
- name: annotations
value: object
- name: primarySpec
value: string
UPDATE
example
Updates a versions
resource.
/*+ update */
UPDATE google.apigeeregistry.versions
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
state = '{{ state }}',
labels = '{{ labels }}',
annotations = '{{ annotations }}',
primarySpec = '{{ primarySpec }}'
WHERE
apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND versionsId = '{{ versionsId }}';
DELETE
example
Deletes the specified versions
resource.
/*+ delete */
DELETE FROM google.apigeeregistry.versions
WHERE apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND versionsId = '{{ versionsId }}';