Class v1beta2.ArtifactRegistryClient

The Artifact Registry API service.

Artifact Registry is an artifact management system for storing artifacts from different package management systems.

The resources managed by this API are:

* Repositories, which group packages and their data. * Packages, which group versions and their tags. * Versions, which are specific forms of a package. * Tags, which represent alternative names for versions. * Files, which contain content and are optionally associated with a Package or Version. v1beta2

Package

@google-cloud/artifact-registry

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of ArtifactRegistryClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

artifactRegistryStub

artifactRegistryStub?: Promise<{
        [name: string]: Function;
    }>;

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

aptArtifactPath(project, location, repository, aptArtifact)

aptArtifactPath(project: string, location: string, repository: string, aptArtifact: string): string;

Return a fully-qualified aptArtifact resource name string.

Parameters
NameDescription
project string
location string
repository string
aptArtifact string
Returns
TypeDescription
string

{string} Resource name string.

checkCreateRepositoryProgress(name)

checkCreateRepositoryProgress(name: string): Promise<LROperation<protos.google.devtools.artifactregistry.v1beta2.Repository, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>;

Check the status of the long running operation returned by createRepository().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.devtools.artifactregistry.v1beta2.Repository, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource where the repository will be created.
   */
  // const parent = 'abc123'
  /**
   *  The repository id to use for this repository.
   */
  // const repositoryId = 'abc123'
  /**
   *  The repository to be created.
   */
  // const repository = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callCreateRepository() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const [operation] = await artifactregistryClient.createRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateRepository();

checkDeletePackageProgress(name)

checkDeletePackageProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>;

Check the status of the long running operation returned by deletePackage().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the package to delete.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callDeletePackage() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.deletePackage(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePackage();

checkDeleteRepositoryProgress(name)

checkDeleteRepositoryProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>;

Check the status of the long running operation returned by deleteRepository().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the repository to delete.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callDeleteRepository() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await artifactregistryClient.deleteRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteRepository();

checkDeleteVersionProgress(name)

checkDeleteVersionProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>;

Check the status of the long running operation returned by deleteVersion().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.artifactregistry.v1beta2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the version to delete.
   */
  // const name = 'abc123'
  /**
   *  By default, a version that is tagged may not be deleted. If force=true, the
   *  version and any tags pointing to the version are deleted.
   */
  // const force = true

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callDeleteVersion() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.deleteVersion(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteVersion();

checkImportAptArtifactsProgress(name)

checkImportAptArtifactsProgress(name: string): Promise<LROperation<protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata>>;

Check the status of the long running operation returned by importAptArtifacts().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Google Cloud Storage location where input content is located.
   */
  // const gcsSource = {}
  /**
   *  The name of the parent resource where the artifacts will be imported.
   */
  // const parent = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callImportAptArtifacts() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.importAptArtifacts(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callImportAptArtifacts();

checkImportYumArtifactsProgress(name)

checkImportYumArtifactsProgress(name: string): Promise<LROperation<protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata>>;

Check the status of the long running operation returned by importYumArtifacts().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Google Cloud Storage location where input content is located.
   */
  // const gcsSource = {}
  /**
   *  The name of the parent resource where the artifacts will be imported.
   */
  // const parent = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callImportYumArtifacts() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.importYumArtifacts(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callImportYumArtifacts();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createRepository(request, options)

createRepository(request?: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource where the repository will be created.
   */
  // const parent = 'abc123'
  /**
   *  The repository id to use for this repository.
   */
  // const repositoryId = 'abc123'
  /**
   *  The repository to be created.
   */
  // const repository = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callCreateRepository() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const [operation] = await artifactregistryClient.createRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateRepository();

createRepository(request, options, callback)

createRepository(request: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest
options CallOptions
callback Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createRepository(request, callback)

createRepository(request: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, callback: Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest
callback Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createTag(request, options)

createTag(request?: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.ITag,
        (protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest | undefined),
        {} | undefined
    ]>;

Creates a tag.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.ITag, (protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Tag]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the parent resource where the tag will be created.
   */
  // const parent = 'abc123'
  /**
   *  The tag id to use for this repository.
   */
  // const tagId = 'abc123'
  /**
   *  The tag to be created.
   */
  // const tag = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callCreateTag() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.createTag(request);
    console.log(response);
  }

  callCreateTag();

createTag(request, options, callback)

createTag(request: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createTag(request, callback)

createTag(request: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePackage(request, options)

deletePackage(request?: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the package to delete.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callDeletePackage() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.deletePackage(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePackage();

deletePackage(request, options, callback)

deletePackage(request: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePackage(request, callback)

deletePackage(request: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteRepository(request, options)

deleteRepository(request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the repository to delete.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callDeleteRepository() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await artifactregistryClient.deleteRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteRepository();

deleteRepository(request, options, callback)

deleteRepository(request: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteRepository(request, callback)

deleteRepository(request: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteTag(request, options)

deleteTag(request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest | undefined),
        {} | undefined
    ]>;

Deletes a tag.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the tag to delete.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callDeleteTag() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.deleteTag(request);
    console.log(response);
  }

  callDeleteTag();

deleteTag(request, options, callback)

deleteTag(request: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteTag(request, callback)

deleteTag(request: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteVersion(request, options)

deleteVersion(request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a version and all of its content. The returned operation will complete once the version has been deleted.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the version to delete.
   */
  // const name = 'abc123'
  /**
   *  By default, a version that is tagged may not be deleted. If force=true, the
   *  version and any tags pointing to the version are deleted.
   */
  // const force = true

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callDeleteVersion() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.deleteVersion(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteVersion();

deleteVersion(request, options, callback)

deleteVersion(request: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteVersion(request, callback)

deleteVersion(request: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.artifactregistry.v1beta2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

filePath(project, location, repository, file)

filePath(project: string, location: string, repository: string, file: string): string;

Return a fully-qualified file resource name string.

Parameters
NameDescription
project string
location string
repository string
file string
Returns
TypeDescription
string

{string} Resource name string.

getFile(request, options)

getFile(request?: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IFile,
        (protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest | undefined),
        {} | undefined
    ]>;

Gets a file.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IFile, (protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [File]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the file to retrieve.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callGetFile() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.getFile(request);
    console.log(response);
  }

  callGetFile();

getFile(request, options, callback)

getFile(request: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IFile, protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IFile, protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getFile(request, callback)

getFile(request: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IFile, protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IFile, protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options)

getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.IGetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Gets the IAM policy for a given resource.

Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  OPTIONAL: A `GetPolicyOptions` object for specifying options to
   *  `GetIamPolicy`. This field is only used by Cloud IAM.
   */
  // const options = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callGetIamPolicy() {
    // Construct request
    const request = {
      resource,
    };

    // Run request
    const response = await artifactregistryClient.getIamPolicy(request);
    console.log(response);
  }

  callGetIamPolicy();

getIamPolicy(request, options, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPackage(request, options)

getPackage(request?: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IPackage,
        (protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest | undefined),
        {} | undefined
    ]>;

Gets a package.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IPackage, (protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Package]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the package to retrieve.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callGetPackage() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.getPackage(request);
    console.log(response);
  }

  callGetPackage();

getPackage(request, options, callback)

getPackage(request: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IPackage, protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IPackage, protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPackage(request, callback)

getPackage(request: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IPackage, protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IPackage, protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getProjectSettings(request, options)

getProjectSettings(request?: protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IProjectSettings,
        (protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest | undefined),
        {} | undefined
    ]>;

Retrieves the Settings for the Project.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, (protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ProjectSettings]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the projectSettings resource.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callGetProjectSettings() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await artifactregistryClient.getProjectSettings(request);
    console.log(response);
  }

  callGetProjectSettings();

getProjectSettings(request, options, callback)

getProjectSettings(request: protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectSettings(request, callback)

getProjectSettings(request: protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getRepository(request, options)

getRepository(request?: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IRepository,
        (protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest | undefined),
        {} | undefined
    ]>;

Gets a repository.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IRepository, (protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Repository]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the repository to retrieve.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callGetRepository() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await artifactregistryClient.getRepository(request);
    console.log(response);
  }

  callGetRepository();

getRepository(request, options, callback)

getRepository(request: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getRepository(request, callback)

getRepository(request: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTag(request, options)

getTag(request?: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.ITag,
        (protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest | undefined),
        {} | undefined
    ]>;

Gets a tag.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.ITag, (protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Tag]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the tag to retrieve.
   */
  // const name = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callGetTag() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.getTag(request);
    console.log(response);
  }

  callGetTag();

getTag(request, options, callback)

getTag(request: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTag(request, callback)

getTag(request: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getVersion(request, options)

getVersion(request?: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IVersion,
        (protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest | undefined),
        {} | undefined
    ]>;

Gets a version

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IVersion, (protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Version]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the version to retrieve.
   */
  // const name = 'abc123'
  /**
   *  The view that should be returned in the response.
   */
  // const view = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callGetVersion() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.getVersion(request);
    console.log(response);
  }

  callGetVersion();

getVersion(request, options, callback)

getVersion(request: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IVersion, protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IVersion, protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getVersion(request, callback)

getVersion(request: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IVersion, protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IVersion, protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importAptArtifacts(request, options)

importAptArtifacts(request?: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Imports Apt artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Google Cloud Storage location where input content is located.
   */
  // const gcsSource = {}
  /**
   *  The name of the parent resource where the artifacts will be imported.
   */
  // const parent = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callImportAptArtifacts() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.importAptArtifacts(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callImportAptArtifacts();

importAptArtifacts(request, options, callback)

importAptArtifacts(request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest
options CallOptions
callback Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importAptArtifacts(request, callback)

importAptArtifacts(request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, callback: Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest
callback Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importYumArtifacts(request, options)

importYumArtifacts(request?: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Google Cloud Storage location where input content is located.
   */
  // const gcsSource = {}
  /**
   *  The name of the parent resource where the artifacts will be imported.
   */
  // const parent = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callImportYumArtifacts() {
    // Construct request
    const request = {
    };

    // Run request
    const [operation] = await artifactregistryClient.importYumArtifacts(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callImportYumArtifacts();

importYumArtifacts(request, options, callback)

importYumArtifacts(request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest
options CallOptions
callback Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importYumArtifacts(request, callback)

importYumArtifacts(request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, callback: Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest
callback Callback<LROperation<protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listFiles(request, options)

listFiles(request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IFile[],
        protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest | null,
        protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse
    ]>;

Lists files.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IFile[], protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest | null, protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [File]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listFilesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listFiles(request, options, callback)

listFiles(request: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IFile>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest
options CallOptions
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IFile>
Returns
TypeDescription
void

listFiles(request, callback)

listFiles(request: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IFile>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IFile>
Returns
TypeDescription
void

listFilesAsync(request, options)

listFilesAsync(request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IFile>;

Equivalent to listFiles, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IFile>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [File]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the repository whose files will be listed. For example:
   *  "projects/p1/locations/us-central1/repositories/repo1
   */
  // const parent = 'abc123'
  /**
   *  An expression for filtering the results of the request. Filter rules are
   *  case insensitive. The fields eligible for filtering are:
   *    * `name`
   *    * `owner`
   *   An example of using a filter:
   *    * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an
   *    ID starting with "a/b/".
   *    * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` -->
   *    Files owned by the version `1.0` in package `pkg1`.
   */
  // const filter = 'abc123'
  /**
   *  The maximum number of files to return.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous list request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callListFiles() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = await artifactregistryClient.listFilesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListFiles();

listFilesStream(request, options)

listFilesStream(request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [File] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listFilesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPackages(request, options)

listPackages(request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IPackage[],
        protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest | null,
        protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse
    ]>;

Lists packages.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IPackage[], protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest | null, protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Package]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPackagesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPackages(request, options, callback)

listPackages(request: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IPackage>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest
options CallOptions
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IPackage>
Returns
TypeDescription
void

listPackages(request, callback)

listPackages(request: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IPackage>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IPackage>
Returns
TypeDescription
void

listPackagesAsync(request, options)

listPackagesAsync(request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IPackage>;

Equivalent to listPackages, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IPackage>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Package]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the parent resource whose packages will be listed.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of packages to return.
   *  Maximum page size is 10,000.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous list request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callListPackages() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = await artifactregistryClient.listPackagesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPackages();

listPackagesStream(request, options)

listPackagesStream(request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Package] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPackagesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listRepositories(request, options)

listRepositories(request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IRepository[],
        protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest | null,
        protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse
    ]>;

Lists repositories.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IRepository[], protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest | null, protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Repository]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRepositoriesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listRepositories(request, options, callback)

listRepositories(request: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IRepository>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest
options CallOptions
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IRepository>
Returns
TypeDescription
void

listRepositories(request, callback)

listRepositories(request: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IRepository>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IRepository>
Returns
TypeDescription
void

listRepositoriesAsync(request, options)

listRepositoriesAsync(request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IRepository>;

Equivalent to listRepositories, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IRepository>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Repository]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource whose repositories will be listed.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of repositories to return. Maximum page size is 1,000.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous list request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callListRepositories() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await artifactregistryClient.listRepositoriesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListRepositories();

listRepositoriesStream(request, options)

listRepositoriesStream(request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Repository] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRepositoriesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listTags(request, options)

listTags(request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.ITag[],
        protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest | null,
        protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse
    ]>;

Lists tags.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.ITag[], protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest | null, protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Tag]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listTagsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listTags(request, options, callback)

listTags(request: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.ITag>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest
options CallOptions
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.ITag>
Returns
TypeDescription
void

listTags(request, callback)

listTags(request: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.ITag>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.ITag>
Returns
TypeDescription
void

listTagsAsync(request, options)

listTagsAsync(request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.ITag>;

Equivalent to listTags, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.ITag>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Tag]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the parent resource whose tags will be listed.
   */
  // const parent = 'abc123'
  /**
   *  An expression for filtering the results of the request. Filter rules are
   *  case insensitive. The fields eligible for filtering are:
   *    * `version`
   *   An example of using a filter:
   *    * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
   *    --> Tags that are applied to the version `1.0` in package `pkg1`.
   */
  // const filter = 'abc123'
  /**
   *  The maximum number of tags to return. Maximum page size is 10,000.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous list request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callListTags() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = await artifactregistryClient.listTagsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListTags();

listTagsStream(request, options)

listTagsStream(request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Tag] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listTagsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listVersions(request, options)

listVersions(request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IVersion[],
        protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest | null,
        protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse
    ]>;

Lists versions.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IVersion[], protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest | null, protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Version]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listVersionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listVersions(request, options, callback)

listVersions(request: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IVersion>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest
options CallOptions
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IVersion>
Returns
TypeDescription
void

listVersions(request, callback)

listVersions(request: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, callback: PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IVersion>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest
callback PaginationCallback<protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse | null | undefined, protos.google.devtools.artifactregistry.v1beta2.IVersion>
Returns
TypeDescription
void

listVersionsAsync(request, options)

listVersionsAsync(request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IVersion>;

Equivalent to listVersions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.devtools.artifactregistry.v1beta2.IVersion>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Version]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the parent resource whose versions will be listed.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of versions to return. Maximum page size is 1,000.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous list request, if any.
   */
  // const pageToken = 'abc123'
  /**
   *  The view that should be returned in the response.
   */
  // const view = {}
  /**
   *  Optional. The field to order the results by.
   */
  // const orderBy = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callListVersions() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = await artifactregistryClient.listVersionsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListVersions();

listVersionsStream(request, options)

listVersionsStream(request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Version] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listVersionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchAptArtifactFromAptArtifactName(aptArtifactName)

matchAptArtifactFromAptArtifactName(aptArtifactName: string): string | number;

Parse the apt_artifact from AptArtifact resource.

Parameter
NameDescription
aptArtifactName string

A fully-qualified path representing AptArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the apt_artifact.

matchFileFromFileName(fileName)

matchFileFromFileName(fileName: string): string | number;

Parse the file from File resource.

Parameter
NameDescription
fileName string

A fully-qualified path representing File resource.

Returns
TypeDescription
string | number

{string} A string representing the file.

matchLocationFromAptArtifactName(aptArtifactName)

matchLocationFromAptArtifactName(aptArtifactName: string): string | number;

Parse the location from AptArtifact resource.

Parameter
NameDescription
aptArtifactName string

A fully-qualified path representing AptArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromFileName(fileName)

matchLocationFromFileName(fileName: string): string | number;

Parse the location from File resource.

Parameter
NameDescription
fileName string

A fully-qualified path representing File resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromRepositoryName(repositoryName)

matchLocationFromRepositoryName(repositoryName: string): string | number;

Parse the location from Repository resource.

Parameter
NameDescription
repositoryName string

A fully-qualified path representing Repository resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTagName(tagName)

matchLocationFromTagName(tagName: string): string | number;

Parse the location from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromVersionName(versionName)

matchLocationFromVersionName(versionName: string): string | number;

Parse the location from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromYumArtifactName(yumArtifactName)

matchLocationFromYumArtifactName(yumArtifactName: string): string | number;

Parse the location from YumArtifact resource.

Parameter
NameDescription
yumArtifactName string

A fully-qualified path representing YumArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchPackageFromTagName(tagName)

matchPackageFromTagName(tagName: string): string | number;

Parse the package from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the package.

matchPackageFromVersionName(versionName)

matchPackageFromVersionName(versionName: string): string | number;

Parse the package from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the package.

matchProjectFromAptArtifactName(aptArtifactName)

matchProjectFromAptArtifactName(aptArtifactName: string): string | number;

Parse the project from AptArtifact resource.

Parameter
NameDescription
aptArtifactName string

A fully-qualified path representing AptArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromFileName(fileName)

matchProjectFromFileName(fileName: string): string | number;

Parse the project from File resource.

Parameter
NameDescription
fileName string

A fully-qualified path representing File resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectSettingsName(projectSettingsName)

matchProjectFromProjectSettingsName(projectSettingsName: string): string | number;

Parse the project from ProjectSettings resource.

Parameter
NameDescription
projectSettingsName string

A fully-qualified path representing ProjectSettings resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromRepositoryName(repositoryName)

matchProjectFromRepositoryName(repositoryName: string): string | number;

Parse the project from Repository resource.

Parameter
NameDescription
repositoryName string

A fully-qualified path representing Repository resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTagName(tagName)

matchProjectFromTagName(tagName: string): string | number;

Parse the project from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromVersionName(versionName)

matchProjectFromVersionName(versionName: string): string | number;

Parse the project from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromYumArtifactName(yumArtifactName)

matchProjectFromYumArtifactName(yumArtifactName: string): string | number;

Parse the project from YumArtifact resource.

Parameter
NameDescription
yumArtifactName string

A fully-qualified path representing YumArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchRepositoryFromAptArtifactName(aptArtifactName)

matchRepositoryFromAptArtifactName(aptArtifactName: string): string | number;

Parse the repository from AptArtifact resource.

Parameter
NameDescription
aptArtifactName string

A fully-qualified path representing AptArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the repository.

matchRepositoryFromFileName(fileName)

matchRepositoryFromFileName(fileName: string): string | number;

Parse the repository from File resource.

Parameter
NameDescription
fileName string

A fully-qualified path representing File resource.

Returns
TypeDescription
string | number

{string} A string representing the repository.

matchRepositoryFromRepositoryName(repositoryName)

matchRepositoryFromRepositoryName(repositoryName: string): string | number;

Parse the repository from Repository resource.

Parameter
NameDescription
repositoryName string

A fully-qualified path representing Repository resource.

Returns
TypeDescription
string | number

{string} A string representing the repository.

matchRepositoryFromTagName(tagName)

matchRepositoryFromTagName(tagName: string): string | number;

Parse the repository from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the repository.

matchRepositoryFromVersionName(versionName)

matchRepositoryFromVersionName(versionName: string): string | number;

Parse the repository from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the repository.

matchRepositoryFromYumArtifactName(yumArtifactName)

matchRepositoryFromYumArtifactName(yumArtifactName: string): string | number;

Parse the repository from YumArtifact resource.

Parameter
NameDescription
yumArtifactName string

A fully-qualified path representing YumArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the repository.

matchTagFromTagName(tagName)

matchTagFromTagName(tagName: string): string | number;

Parse the tag from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the tag.

matchVersionFromVersionName(versionName)

matchVersionFromVersionName(versionName: string): string | number;

Parse the version from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the version.

matchYumArtifactFromYumArtifactName(yumArtifactName)

matchYumArtifactFromYumArtifactName(yumArtifactName: string): string | number;

Parse the yum_artifact from YumArtifact resource.

Parameter
NameDescription
yumArtifactName string

A fully-qualified path representing YumArtifact resource.

Returns
TypeDescription
string | number

{string} A string representing the yum_artifact.

projectSettingsPath(project)

projectSettingsPath(project: string): string;

Return a fully-qualified projectSettings resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

repositoryPath(project, location, repository)

repositoryPath(project: string, location: string, repository: string): string;

Return a fully-qualified repository resource name string.

Parameters
NameDescription
project string
location string
repository string
Returns
TypeDescription
string

{string} Resource name string.

setIamPolicy(request, options)

setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.ISetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Updates the IAM policy for a given resource.

Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being specified.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  REQUIRED: The complete policy to be applied to the `resource`. The size of
   *  the policy is limited to a few 10s of KB. An empty policy is a
   *  valid policy but certain Cloud Platform services (such as Projects)
   *  might reject them.
   */
  // const policy = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callSetIamPolicy() {
    // Construct request
    const request = {
      resource,
      policy,
    };

    // Run request
    const response = await artifactregistryClient.setIamPolicy(request);
    console.log(response);
  }

  callSetIamPolicy();

setIamPolicy(request, options, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setIamPolicy(request, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

tagPath(project, location, repository, packageParam, tag)

tagPath(project: string, location: string, repository: string, packageParam: string, tag: string): string;

Return a fully-qualified tag resource name string.

Parameters
NameDescription
project string
location string
repository string
packageParam string
tag string
Returns
TypeDescription
string

{string} Resource name string.

testIamPermissions(request, options)

testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.ITestIamPermissionsResponse,
        protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
        {} | undefined
    ]>;

Tests if the caller has a list of permissions on a resource.

Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TestIamPermissionsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy detail is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  The set of permissions to check for the `resource`. Permissions with
   *  wildcards (such as '*' or 'storage.*') are not allowed. For more
   *  information see
   *  IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
   */
  // const permissions = 'abc123'

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callTestIamPermissions() {
    // Construct request
    const request = {
      resource,
      permissions,
    };

    // Run request
    const response = await artifactregistryClient.testIamPermissions(request);
    console.log(response);
  }

  callTestIamPermissions();

testIamPermissions(request, options, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

testIamPermissions(request, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateProjectSettings(request, options)

updateProjectSettings(request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IProjectSettings,
        (protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest | undefined),
        {} | undefined
    ]>;

Updates the Settings for the Project.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, (protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ProjectSettings]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The project settings.
   */
  // const projectSettings = {}
  /**
   *  Field mask to support partial updates.
   */
  // const updateMask = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callUpdateProjectSettings() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.updateProjectSettings(request);
    console.log(response);
  }

  callUpdateProjectSettings();

updateProjectSettings(request, options, callback)

updateProjectSettings(request: protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateProjectSettings(request, callback)

updateProjectSettings(request: protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateRepository(request, options)

updateRepository(request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.IRepository,
        (protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest | undefined),
        {} | undefined
    ]>;

Updates a repository.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.IRepository, (protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Repository]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The repository that replaces the resource on the server.
   */
  // const repository = {}
  /**
   *  The update mask applies to the resource. For the `FieldMask` definition,
   *  see
   *  https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
   */
  // const updateMask = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callUpdateRepository() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.updateRepository(request);
    console.log(response);
  }

  callUpdateRepository();

updateRepository(request, options, callback)

updateRepository(request: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateRepository(request, callback)

updateRepository(request: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.IRepository, protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTag(request, options)

updateTag(request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, options?: CallOptions): Promise<[
        protos.google.devtools.artifactregistry.v1beta2.ITag,
        (protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest | undefined),
        {} | undefined
    ]>;

Updates a tag.

Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.devtools.artifactregistry.v1beta2.ITag, (protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Tag]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The tag that replaces the resource on the server.
   */
  // const tag = {}
  /**
   *  The update mask applies to the resource. For the `FieldMask` definition,
   *  see
   *  https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
   */
  // const updateMask = {}

  // Imports the Artifactregistry library
  const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2;

  // Instantiates a client
  const artifactregistryClient = new ArtifactRegistryClient();

  async function callUpdateTag() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await artifactregistryClient.updateTag(request);
    console.log(response);
  }

  callUpdateTag();

updateTag(request, options, callback)

updateTag(request: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, options: CallOptions, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest
options CallOptions
callback Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTag(request, callback)

updateTag(request: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, callback: Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest
callback Callback<protos.google.devtools.artifactregistry.v1beta2.ITag, protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

versionPath(project, location, repository, packageParam, version)

versionPath(project: string, location: string, repository: string, packageParam: string, version: string): string;

Return a fully-qualified version resource name string.

Parameters
NameDescription
project string
location string
repository string
packageParam string
version string
Returns
TypeDescription
string

{string} Resource name string.

yumArtifactPath(project, location, repository, yumArtifact)

yumArtifactPath(project: string, location: string, repository: string, yumArtifact: string): string;

Return a fully-qualified yumArtifact resource name string.

Parameters
NameDescription
project string
location string
repository string
yumArtifact string
Returns
TypeDescription
string

{string} Resource name string.