import type { TokenCredential } from "@azure/core-auth"; import type { CommonClientOptions, OperationOptions } from "@azure/core-client"; import type { PagedAsyncIterableIterator } from "@azure/core-paging"; import type { RepositoryPageResponse } from "./models.js"; import type { ContainerRepository, DeleteRepositoryOptions } from "./containerRepository.js"; import type { RegistryArtifact } from "./registryArtifact.js"; /** * Client options used to configure Container Registry Repository API requests. */ export interface ContainerRegistryClientOptions extends CommonClientOptions { /** * Gets or sets the audience to use for authentication with Azure Active Directory. * The authentication scope will be set from this audience. * See {@link KnownContainerRegistryAudience} for known audience values. */ audience?: string; /** * The version of service API to make calls against. */ serviceVersion?: "2021-07-01"; } /** * Options for the `listRepositories` method of `ContainerRegistryClient`. */ export interface ListRepositoriesOptions extends OperationOptions { } /** * The client class used to interact with the Container Registry service. */ export declare class ContainerRegistryClient { /** * The Azure Container Registry endpoint. */ readonly endpoint: string; private client; /** * Creates an instance of a ContainerRegistryClient. * * Example usage: * ```ts snippet:ReadmeSampleCreateClient_Node * import { ContainerRegistryClient, KnownContainerRegistryAudience } from "@azure/container-registry"; * import { DefaultAzureCredential } from "@azure/identity"; * * const endpoint = "https://myregistryname.azurecr.io"; * // Create a ContainerRegistryClient that will authenticate through Active Directory * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential(), { * audience: KnownContainerRegistryAudience.AzureResourceManagerPublicCloud, * }); * ``` * @param endpoint - the URL endpoint of the container registry * @param credential - used to authenticate requests to the service * @param options - optional configuration used to send requests to the service */ constructor(endpoint: string, credential: TokenCredential, options?: ContainerRegistryClientOptions); /** * Creates an instance of a ContainerRegistryClient to interact with * an Azure Container Registry that has anonymous pull access enabled. * Only operations that support anonymous access are enabled. Other service * methods will throw errors. * * Example usage: * ```ts snippet:ReadmeSampleCreateClient_Anonymous * import { ContainerRegistryClient, KnownContainerRegistryAudience } from "@azure/container-registry"; * * const endpoint = "https://myregistryname.azurecr.io"; * // Create a new ContainerRegistryClient for anonymous access * const client = new ContainerRegistryClient(endpoint, { * audience: KnownContainerRegistryAudience.AzureResourceManagerPublicCloud, * }); * ``` * @param endpoint - the URL endpoint of the container registry * @param options - optional configuration used to send requests to the service */ constructor(endpoint: string, options?: ContainerRegistryClientOptions); /** * Deletes the repository identified by the given name and all associated artifacts. * * @param repositoryName - the name of repository to delete * @param options - optional configuration for the operation */ deleteRepository(repositoryName: string, options?: DeleteRepositoryOptions): Promise; /** * Returns an instance of {@link RegistryArtifact} for calling service methods related to the artifact specified by `repositoryName` and `tagOrDigest`. * * @param repositoryName - the name of repository * @param tagOrDigest - tag or digest of the artifact to retrieve */ getArtifact(repositoryName: string, tagOrDigest: string): RegistryArtifact; /** * Returns an instance of {@link ContainerRepository} for calling service methods related to the repository specified by `repositoryName`. * * @param repositoryName - the name of repository */ getRepository(repositoryName: string): ContainerRepository; /** * Returns an async iterable iterator to list names of repositories in this registry. * * Example usage: * ```ts snippet:SampleReadmeListRepositories * import { ContainerRegistryClient, KnownContainerRegistryAudience } from "@azure/container-registry"; * import { DefaultAzureCredential } from "@azure/identity"; * * const endpoint = "https://myregistryname.azurecr.io"; * const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential(), { * audience: KnownContainerRegistryAudience.AzureResourceManagerPublicCloud, * }); * * const iterator = client.listRepositoryNames(); * for await (const repository of iterator) { * console.log(` repository: ${repository}`); * } * ``` * * @param options - The options for the request */ listRepositoryNames(options?: ListRepositoriesOptions): PagedAsyncIterableIterator; private listRepositoryItems; private listRepositoriesPage; } //# sourceMappingURL=containerRegistryClient.d.ts.map