artifacts
Creates, updates, deletes, gets or lists a artifacts
resource.
Overview
Name | artifacts |
Type | Resource |
Id | google.apigeeregistry.artifacts |
Fields
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. |
contents | string | Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents. |
createTime | string | Output only. Creation timestamp. |
hash | string | Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact. |
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 "registry.googleapis.com/" and cannot be changed. |
mimeType | string | A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip"). |
sizeBytes | integer | Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact. |
updateTime | string | Output only. Last update timestamp. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_apis_artifacts_get | SELECT | apisId, artifactsId, locationsId, projectsId | Returns a specified artifact. |
projects_locations_apis_artifacts_list | SELECT | apisId, locationsId, projectsId | Returns matching artifacts. |
projects_locations_apis_deployments_artifacts_get | SELECT | apisId, artifactsId, deploymentsId, locationsId, projectsId | Returns a specified artifact. |
projects_locations_apis_deployments_artifacts_list | SELECT | apisId, deploymentsId, locationsId, projectsId | Returns matching artifacts. |
projects_locations_apis_versions_artifacts_get | SELECT | apisId, artifactsId, locationsId, projectsId, versionsId | Returns a specified artifact. |
projects_locations_apis_versions_artifacts_list | SELECT | apisId, locationsId, projectsId, versionsId | Returns matching artifacts. |
projects_locations_apis_versions_specs_artifacts_get | SELECT | apisId, artifactsId, locationsId, projectsId, specsId, versionsId | Returns a specified artifact. |
projects_locations_apis_versions_specs_artifacts_list | SELECT | apisId, locationsId, projectsId, specsId, versionsId | Returns matching artifacts. |
projects_locations_artifacts_get | SELECT | artifactsId, locationsId, projectsId | Returns a specified artifact. |
projects_locations_artifacts_list | SELECT | locationsId, projectsId | Returns matching artifacts. |
projects_locations_apis_artifacts_create | INSERT | apisId, locationsId, projectsId | Creates a specified artifact. |
projects_locations_apis_deployments_artifacts_create | INSERT | apisId, deploymentsId, locationsId, projectsId | Creates a specified artifact. |
projects_locations_apis_versions_artifacts_create | INSERT | apisId, locationsId, projectsId, versionsId | Creates a specified artifact. |
projects_locations_apis_versions_specs_artifacts_create | INSERT | apisId, locationsId, projectsId, specsId, versionsId | Creates a specified artifact. |
projects_locations_artifacts_create | INSERT | locationsId, projectsId | Creates a specified artifact. |
projects_locations_apis_artifacts_delete | DELETE | apisId, artifactsId, locationsId, projectsId | Removes a specified artifact. |
projects_locations_apis_deployments_artifacts_delete | DELETE | apisId, artifactsId, deploymentsId, locationsId, projectsId | Removes a specified artifact. |
projects_locations_apis_versions_artifacts_delete | DELETE | apisId, artifactsId, locationsId, projectsId, versionsId | Removes a specified artifact. |
projects_locations_apis_versions_specs_artifacts_delete | DELETE | apisId, artifactsId, locationsId, projectsId, specsId, versionsId | Removes a specified artifact. |
projects_locations_artifacts_delete | DELETE | artifactsId, locationsId, projectsId | Removes a specified artifact. |
projects_locations_apis_artifacts_replace_artifact | REPLACE | apisId, artifactsId, locationsId, projectsId | Used to replace a specified artifact. |
projects_locations_apis_deployments_artifacts_replace_artifact | REPLACE | apisId, artifactsId, deploymentsId, locationsId, projectsId | Used to replace a specified artifact. |
projects_locations_apis_versions_artifacts_replace_artifact | REPLACE | apisId, artifactsId, locationsId, projectsId, versionsId | Used to replace a specified artifact. |
projects_locations_apis_versions_specs_artifacts_replace_artifact | REPLACE | apisId, artifactsId, locationsId, projectsId, specsId, versionsId | Used to replace a specified artifact. |
projects_locations_artifacts_replace_artifact | REPLACE | artifactsId, locationsId, projectsId | Used to replace a specified artifact. |
SELECT
examples
Returns matching artifacts.
SELECT
name,
annotations,
contents,
createTime,
hash,
labels,
mimeType,
sizeBytes,
updateTime
FROM google.apigeeregistry.artifacts
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new artifacts
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.apigeeregistry.artifacts (
locationsId,
projectsId,
name,
mimeType,
contents,
labels,
annotations
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ mimeType }}',
'{{ contents }}',
'{{ labels }}',
'{{ annotations }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: mimeType
value: string
- name: sizeBytes
value: integer
- name: hash
value: string
- name: contents
value: string
- name: labels
value: object
- name: annotations
value: object
REPLACE
example
Replaces all fields in the specified artifacts
resource.
/*+ update */
REPLACE google.apigeeregistry.artifacts
SET
name = '{{ name }}',
mimeType = '{{ mimeType }}',
contents = '{{ contents }}',
labels = '{{ labels }}',
annotations = '{{ annotations }}'
WHERE
artifactsId = '{{ artifactsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified artifacts
resource.
/*+ delete */
DELETE FROM google.apigeeregistry.artifacts
WHERE artifactsId = '{{ artifactsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';