RegistryArtifact interface
Artifact は、コンテナー レジストリに格納されている項目の一般的な用語であり、Docker イメージまたはその他の Open Container Initiative (OCI) 成果物の種類を含めることができます。
RegistryArtifact インターフェイスは、コンテナー レジストリ内のイメージまたは成果物に関する情報と操作をグループ化するヘルパーです。
プロパティ
| fully |
成果物の完全修飾参照。 |
| registry |
Azure Container Registry エンドポイント。 |
| repository |
リポジトリ名。 |
メソッド
| delete(Delete |
マニフェストを削除して、このレジストリ成果物を削除します。 |
| delete |
タグを削除します。 これにより、アーティファクトとそのマニフェストからタグが削除されます。 |
| get |
この成果物を一意に識別するマニフェストのプロパティを取得します。 |
| get |
指定したタグのプロパティを取得します。 |
| list |
非同期反復可能な反復子を返し、この成果物とそれぞれのプロパティを一意に識別するタグを一覧表示します。
|
| update |
成果物のマニフェストのプロパティを更新します。 使用例:
|
| update |
特定のタグのプロパティを更新します。 使用例:
|
プロパティの詳細
fullyQualifiedReference
成果物の完全修飾参照。
fullyQualifiedReference: string
プロパティ値
string
registryEndpoint
Azure Container Registry エンドポイント。
registryEndpoint: string
プロパティ値
string
repositoryName
リポジトリ名。
repositoryName: string
プロパティ値
string
メソッドの詳細
delete(DeleteArtifactOptions)
マニフェストを削除して、このレジストリ成果物を削除します。
function delete(options?: DeleteArtifactOptions): Promise<void>
パラメーター
- options
- DeleteArtifactOptions
戻り値
Promise<void>
deleteTag(string, DeleteTagOptions)
タグを削除します。 これにより、アーティファクトとそのマニフェストからタグが削除されます。
function deleteTag(tag: string, options?: DeleteTagOptions): Promise<void>
パラメーター
- tag
-
string
削除するタグの名前。
- options
- DeleteTagOptions
戻り値
Promise<void>
getManifestProperties(GetManifestPropertiesOptions)
この成果物を一意に識別するマニフェストのプロパティを取得します。
function getManifestProperties(options?: GetManifestPropertiesOptions): Promise<ArtifactManifestProperties>
パラメーター
- options
- GetManifestPropertiesOptions
戻り値
Promise<ArtifactManifestProperties>
getTagProperties(string, GetTagPropertiesOptions)
指定したタグのプロパティを取得します。
function getTagProperties(tag: string, options?: GetTagPropertiesOptions): Promise<ArtifactTagProperties>
パラメーター
- tag
-
string
プロパティを取得するタグ。
- options
- GetTagPropertiesOptions
タグプロパティを取得するオプション
戻り値
Promise<ArtifactTagProperties>
listTagProperties(ListTagPropertiesOptions)
非同期反復可能な反復子を返し、この成果物とそれぞれのプロパティを一意に識別するタグを一覧表示します。
for-await-of 構文の使用例:
import { ContainerRegistryClient } from "@azure/container-registry";
import { DefaultAzureCredential } from "@azure/identity";
const endpoint = "https://myregistryname.azurecr.io";
const repositoryName = "library/hello-world";
const artifactTagOrDigest = "latest";
const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());
const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);
for await (const tag of artifact.listTagProperties()) {
console.log("tag: ", tag);
}
function listTagProperties(options?: ListTagPropertiesOptions): PagedAsyncIterableIterator<ArtifactTagProperties, ArtifactTagProperties[], PageSettings>
パラメーター
- options
- ListTagPropertiesOptions
タグリストのオプション
戻り値
updateManifestProperties(UpdateManifestPropertiesOptions)
成果物のマニフェストのプロパティを更新します。
使用例:
import { ContainerRegistryClient } from "@azure/container-registry";
import { DefaultAzureCredential } from "@azure/identity";
const endpoint = "https://myregistryname.azurecr.io";
const repositoryName = "library/hello-world";
const artifactTagOrDigest = "latest";
const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());
const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);
const updated = await artifact.updateManifestProperties({
canDelete: false,
canList: false,
canRead: false,
canWrite: false,
});
function updateManifestProperties(options: UpdateManifestPropertiesOptions): Promise<ArtifactManifestProperties>
パラメーター
- options
- UpdateManifestPropertiesOptions
戻り値
Promise<ArtifactManifestProperties>
updateTagProperties(string, UpdateTagPropertiesOptions)
特定のタグのプロパティを更新します。
使用例:
import { ContainerRegistryClient } from "@azure/container-registry";
import { DefaultAzureCredential } from "@azure/identity";
const endpoint = "https://myregistryname.azurecr.io";
const repositoryName = "library/hello-world";
const artifactTagOrDigest = "latest";
const tag = "latest";
const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());
const artifact = client.getArtifact(repositoryName, artifactTagOrDigest);
const updated = await artifact.updateTagProperties(tag, {
canDelete: false,
canList: false,
canRead: false,
canWrite: false,
});
function updateTagProperties(tag: string, options: UpdateTagPropertiesOptions): Promise<ArtifactTagProperties>
パラメーター
- tag
-
string
プロパティを更新するタグの名前
- options
- UpdateTagPropertiesOptions
戻り値
Promise<ArtifactTagProperties>