ContainerRegistryClient class
Container Registry 서비스와 상호 작용하는 데 사용되는 클라이언트 클래스입니다.
생성자
Container |
익명 끌어오기 액세스가 사용하도록 설정된 Azure Container Registry 상호 작용하는 ContainerRegistryClient의 인스턴스를 만듭니다. 익명 액세스를 지원하는 작업만 사용하도록 설정됩니다. 다른 서비스 메서드는 오류를 throw합니다. 예제 사용법:
|
Container |
ContainerRegistryClient의 인스턴스를 만듭니다. 예제 사용법:
|
속성
endpoint | Azure Container Registry 엔드포인트입니다. |
메서드
delete |
지정된 이름과 연결된 모든 아티팩트로 식별되는 리포지토리를 삭제합니다. |
get |
및 |
get |
에서 지정한 리포지토리와 관련된 서비스 메서드를 호출하기 위한 ContainerRepository 인스턴스를 |
list |
이 레지스트리의 리포지토리 이름을 나열하는 비동기 반복기를 반환합니다. 사용 예제:
|
생성자 세부 정보
ContainerRegistryClient(string, ContainerRegistryClientOptions)
익명 끌어오기 액세스가 사용하도록 설정된 Azure Container Registry 상호 작용하는 ContainerRegistryClient의 인스턴스를 만듭니다. 익명 액세스를 지원하는 작업만 사용하도록 설정됩니다. 다른 서비스 메서드는 오류를 throw합니다.
예제 사용법:
import { ContainerRegistryClient } from "@azure/container-registry";
const client = new ContainerRegistryClient(
"<container registry API endpoint>",
);
new ContainerRegistryClient(endpoint: string, options?: ContainerRegistryClientOptions)
매개 변수
- endpoint
-
string
컨테이너 레지스트리의 URL 엔드포인트
- options
- ContainerRegistryClientOptions
서비스에 요청을 보내는 데 사용되는 선택적 구성
ContainerRegistryClient(string, TokenCredential, ContainerRegistryClientOptions)
ContainerRegistryClient의 인스턴스를 만듭니다.
예제 사용법:
import { ContainerRegistryClient } from "@azure/container-registry";
import { DefaultAzureCredential} from "@azure/identity";
const client = new ContainerRegistryClient(
"<container registry API endpoint>",
new DefaultAzureCredential()
);
new ContainerRegistryClient(endpoint: string, credential: TokenCredential, options?: ContainerRegistryClientOptions)
매개 변수
- endpoint
-
string
컨테이너 레지스트리의 URL 엔드포인트
- credential
- TokenCredential
서비스에 대한 요청을 인증하는 데 사용됩니다.
- options
- ContainerRegistryClientOptions
서비스에 요청을 보내는 데 사용되는 선택적 구성
속성 세부 정보
endpoint
Azure Container Registry 엔드포인트입니다.
endpoint: string
속성 값
string
메서드 세부 정보
deleteRepository(string, DeleteRepositoryOptions)
지정된 이름과 연결된 모든 아티팩트로 식별되는 리포지토리를 삭제합니다.
function deleteRepository(repositoryName: string, options?: DeleteRepositoryOptions): Promise<void>
매개 변수
- repositoryName
-
string
삭제할 리포지토리의 이름
- options
- DeleteRepositoryOptions
작업에 대한 선택적 구성
반환
Promise<void>
getArtifact(string, string)
및 tagOrDigest
에서 지정한 아티팩트와 관련된 서비스 메서드를 호출하기 위한 RegistryArtifact 인스턴스를 repositoryName
반환합니다.
function getArtifact(repositoryName: string, tagOrDigest: string): RegistryArtifact
매개 변수
- repositoryName
-
string
리포지토리의 이름
- tagOrDigest
-
string
검색할 아티팩트 태그 또는 다이제스트
반환
getRepository(string)
에서 지정한 리포지토리와 관련된 서비스 메서드를 호출하기 위한 ContainerRepository 인스턴스를 repositoryName
반환합니다.
function getRepository(repositoryName: string): ContainerRepository
매개 변수
- repositoryName
-
string
리포지토리의 이름
반환
listRepositoryNames(ListRepositoriesOptions)
이 레지스트리의 리포지토리 이름을 나열하는 비동기 반복기를 반환합니다.
사용 예제:
let client = new ContainerRegistryClient(url, credential);
for await (const repository of client.listRepositoryNames()) {
console.log("repository name: ", repository);
}
iter.next()
을(를) 사용하는 예제:
let iter = client.listRepositoryNames();
let item = await iter.next();
while (!item.done) {
console.log(`repository name: ${item.value}`);
item = await iter.next();
}
byPage()
을(를) 사용하는 예제:
const pages = client.listRepositoryNames().byPage({ maxPageSize: 2 });
let page = await pages.next();
let i = 1;
while (!page.done) {
if (page.value) {
console.log(`-- page ${i++}`);
for (const name of page.value) {
console.log(` repository name: ${name}`);
}
}
page = await pages.next();
}
function listRepositoryNames(options?: ListRepositoriesOptions): PagedAsyncIterableIterator<string, RepositoryPageResponse, PageSettings>
매개 변수
- options
- ListRepositoriesOptions