次の方法で共有


ContainerRepository interface

repositoryコンテナー レジストリ内の は、同じ名前を共有するイメージまたは成果物の論理的なグループです。 たとえば、アプリケーションの異なるバージョンでは hello-world 、タグ v1v2を持ち、リポジトリ hello-worldによってグループ化できます。

ContainerRepository インターフェイスは、このコンテナー レジストリ内のリポジトリに関する情報と操作をグループ化するヘルパーです。

プロパティ

name

リポジトリ名。

registryEndpoint

Azure Container Registry エンドポイント。

メソッド

delete(DeleteRepositoryOptions)

このリポジトリとその論理グループの一部であるすべての成果物を削除します。

getArtifact(string)

指定されたタグまたはダイジェストの RegistryArtifact のヘルパー インスタンスを返します。

getProperties(GetRepositoryPropertiesOptions)

このリポジトリのプロパティを取得します。

listManifestProperties(ListManifestPropertiesOptions)

マニフェスト のプロパティを一覧表示する非同期反復可能な反復子を返します。 これは、各成果物がそのマニフェストによって一意に識別されるため、このリポジトリに関連付けられている成果物のコレクションを決定する場合に便利です。

構文の使用 for-await-of 例:

const client = new ContainerRegistryClient(url, credential);
const repository = client.getRepository(repositoryName)
for await (const manifest of repository.listManifestProperties()) {
  console.log("manifest: ", manifest);
}

iter.next() の使用例:

const iter = repository.listManifestProperties();
let item = await iter.next();
while (!item.done) {
  console.log("manifest properties: ", item.value);
  item = await iter.next();
}

byPage() の使用例:

const pages = repository.listManifestProperties().byPage({ maxPageSize: 2 });
let page = await pages.next();
let i = 1;
while (!page.done) {
 if (page.value) {
   console.log(`-- page ${i++}`);
   for (const manifestProperties of page.value) {
     console.log(`  manifest properties: ${manifestProperties}`);
   }
 }
 page = await pages.next();
}
updateProperties(UpdateRepositoryPropertiesOptions)

このリポジトリのプロパティを更新します。

使用例:

const client = new ContainerRegistryClient(url, credential);
const repository = client.getRepository(repositoryName)
const updated = await repository.updateProperties({
  canDelete: false,
  canList: false,
  canRead: false,
  canWrite: false
});

プロパティの詳細

name

リポジトリ名。

name: string

プロパティ値

string

registryEndpoint

Azure Container Registry エンドポイント。

registryEndpoint: string

プロパティ値

string

メソッドの詳細

delete(DeleteRepositoryOptions)

このリポジトリとその論理グループの一部であるすべての成果物を削除します。

function delete(options?: DeleteRepositoryOptions): Promise<void>

パラメーター

options
DeleteRepositoryOptions

操作の省略可能な構成

戻り値

Promise<void>

getArtifact(string)

指定されたタグまたはダイジェストの RegistryArtifact のヘルパー インスタンスを返します。

function getArtifact(tagOrDigest: string): RegistryArtifact

パラメーター

tagOrDigest

string

成果物のタグまたはダイジェスト

戻り値

getProperties(GetRepositoryPropertiesOptions)

このリポジトリのプロパティを取得します。

function getProperties(options?: GetRepositoryPropertiesOptions): Promise<ContainerRepositoryProperties>

パラメーター

戻り値

listManifestProperties(ListManifestPropertiesOptions)

マニフェスト のプロパティを一覧表示する非同期反復可能な反復子を返します。 これは、各成果物がそのマニフェストによって一意に識別されるため、このリポジトリに関連付けられている成果物のコレクションを決定する場合に便利です。

構文の使用 for-await-of 例:

const client = new ContainerRegistryClient(url, credential);
const repository = client.getRepository(repositoryName)
for await (const manifest of repository.listManifestProperties()) {
  console.log("manifest: ", manifest);
}

iter.next() の使用例:

const iter = repository.listManifestProperties();
let item = await iter.next();
while (!item.done) {
  console.log("manifest properties: ", item.value);
  item = await iter.next();
}

byPage() の使用例:

const pages = repository.listManifestProperties().byPage({ maxPageSize: 2 });
let page = await pages.next();
let i = 1;
while (!page.done) {
 if (page.value) {
   console.log(`-- page ${i++}`);
   for (const manifestProperties of page.value) {
     console.log(`  manifest properties: ${manifestProperties}`);
   }
 }
 page = await pages.next();
}
function listManifestProperties(options?: ListManifestPropertiesOptions): PagedAsyncIterableIterator<ArtifactManifestProperties, ArtifactManifestProperties[], PageSettings>

パラメーター

戻り値

updateProperties(UpdateRepositoryPropertiesOptions)

このリポジトリのプロパティを更新します。

使用例:

const client = new ContainerRegistryClient(url, credential);
const repository = client.getRepository(repositoryName)
const updated = await repository.updateProperties({
  canDelete: false,
  canList: false,
  canRead: false,
  canWrite: false
});
function updateProperties(options: UpdateRepositoryPropertiesOptions): Promise<ContainerRepositoryProperties>

パラメーター

戻り値