files
Creates, updates, deletes, gets or lists a files
resource.
Overview
Name | files |
Type | Resource |
Id | google.artifactregistry.files |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the file, for example: projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt . If the file ID part contains slashes, they are escaped. |
createTime | string | Output only. The time when the File was created. |
fetchTime | string | Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote. |
hashes | array | The hashes of the file content. |
owner | string | The name of the Package or Version that owns this file, if any. |
sizeBytes | string | The size of the File in bytes. |
updateTime | string | Output only. The time when the File was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | filesId, locationsId, projectsId, repositoriesId | Gets a file. |
list | SELECT | locationsId, projectsId, repositoriesId | Lists files. |
delete | DELETE | filesId, locationsId, projectsId, repositoriesId | Deletes a file and all of its content. It is only allowed on generic repositories. The returned operation will complete once the file has been deleted. |
download | EXEC | filesId, locationsId, projectsId, repositoriesId | Download a file. |
SELECT
examples
Lists files.
SELECT
name,
createTime,
fetchTime,
hashes,
owner,
sizeBytes,
updateTime
FROM google.artifactregistry.files
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';
DELETE
example
Deletes the specified files
resource.
/*+ delete */
DELETE FROM google.artifactregistry.files
WHERE filesId = '{{ filesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';