Skip to main content

npm_packages

Creates, updates, deletes, gets or lists a npm_packages resource.

Overview

Namenpm_packages
TypeResource
Idgoogle.artifactregistry.npm_packages

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. registry_location, project_id, repository_name and npm_package forms a unique package For example, "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ npm_test:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and npm_test:1.0.0" is the npm package.
createTimestring (google-datetime)Output only. Time the package was created.
packageNamestringPackage for the artifact.
tagsarrayTags attached to this package.
updateTimestring (google-datetime)Output only. Time the package was updated.
versionstringVersion of this package.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, repositoriesId, npmPackagesIdGets a npm package.
listselectprojectsId, locationsId, repositoriesIdpageSize, pageTokenLists npm packages.

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.

NameDatatypeDescription
locationsIdstring
npmPackagesIdstring
projectsIdstring
repositoriesIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a npm package.

SELECT
name,
createTime,
packageName,
tags,
updateTime,
version
FROM google.artifactregistry.npm_packages
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND npmPackagesId = '{{ npmPackagesId }}' -- required;