このページの一部またはすべての情報は、S3NS の Trusted Cloud に適用されない場合があります。
リポジトリの表示とリスティング
このページでは、Artifact Registry リポジトリを表示および一覧表示する方法について説明します。
始める前に
省略可: Google Cloud CLI コマンドのデフォルトを構成します。
必要なロール
リポジトリを表示して一覧表示するために必要な権限を取得するには、管理者に次の IAM ロールを付与するよう依頼してください。
ロールの付与については、プロジェクト、フォルダ、組織へのアクセスを管理するをご覧ください。
これらの事前定義ロールには、リポジトリの表示と一覧表示に必要な権限が含まれています。必要とされる正確な権限については、「必要な権限」セクションを開いてご確認ください。
必要な権限
リポジトリを表示および一覧表示するには、次の権限が必要です。
-
artifactregistry.repositories.get
-
artifactregistry.repositories.list
カスタムロールや他の事前定義ロールを使用して、これらの権限を取得することもできます。
リポジトリの表示
Trusted Cloud プロジェクト内のリポジトリを表示できます。
リポジトリのリストを表示するには:
コンソール
Google Cloud コンソールで [リポジトリ] ページを開きます。
[リポジトリ] ページを開く
リポジトリのリストが表示されます。
Artifact Registry リポジトリのリストをフィルタリングするには:
- リポジトリ リストの上の [テーブルをフィルタ] をクリックします。
- フィルタリストからフィルタを選択します。
- リストのフィルタに使用する値を指定します。
gcloud
既存のリポジトリを一覧表示するには、次のコマンドを実行します。
gcloud artifacts repositories list [--project=PROJECT] \
[--location=LOCATION]
リポジトリに構成されている暗号化のタイプを表示するには、次のコマンドを実行します。
gcloud artifacts repositories describe REPOSITORY \
[--project=PROJECT] [--location=LOCATION]
上記のコマンドで、次の値を置き換えます。
PROJECT
は、プロジェクト ID です。このフラグを省略すると、現在のプロジェクトまたはデフォルトのプロジェクトが使用されます。
REPOSITORY
はリポジトリの名前です。
LOCATION
は、リポジトリのリージョン ロケーションです。
--location
フラグを使用して、特定のロケーションのリポジトリを表示します。
--location=all
を使用して、すべてのロケーションのリポジトリを一覧表示することもできます。
このフラグを省略すると、このコマンドは、デフォルトが構成されている場合に デフォルト ロケーションを使用します。それ以外の場合は、このフラグを省略すると、すべてのロケーションのリポジトリが一覧表示されます。
このコマンドの詳細をご覧になるには、次のコマンドを実行します。
gcloud artifacts repositories list --help
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-19 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-02-19 UTC。"],[[["\u003cp\u003eThis page explains how to view and list Artifact Registry repositories within a Google Cloud project using the console or the gcloud command-line tool.\u003c/p\u003e\n"],["\u003cp\u003eTo view and list repositories, you need the Artifact Registry Reader role (\u003ccode\u003eroles/artifactregistry.reader\u003c/code\u003e) on the project or the specific repository, or equivalent permissions.\u003c/p\u003e\n"],["\u003cp\u003eThe console allows you to filter the repository list using various criteria, and the gcloud command enables listing repositories with optional filtering by project and location, or across all locations.\u003c/p\u003e\n"],["\u003cp\u003eThe gcloud command can also be used to view the encryption type of a specific repository.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to set a default project and location to be used with the gcloud command.\u003c/p\u003e\n"]]],[],null,["# View and list repositories\n\nThis page describes how to view and list Artifact Registry repositories.\n\nBefore you begin\n----------------\n\nOptional: [Configure defaults for Google Cloud CLI commands](/artifact-registry/docs/repositories/gcloud-defaults).\n\n### Required roles\n\n\nTo get the permissions that\nyou need to view and list repositories,\n\nask your administrator to grant you the\nfollowing IAM roles:\n\n- View and list all repositories in a Google Cloud project: [Artifact Registry Reader](/iam/docs/roles-permissions/artifactregistry#artifactregistry.reader) (`roles/artifactregistry.reader`) on the project\n- View a specific repository: [Artifact Registry Reader](/iam/docs/roles-permissions/artifactregistry#artifactregistry.reader) (`roles/artifactregistry.reader`) on the repository\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThese predefined roles contain\n\nthe permissions required to view and list repositories. To see the exact permissions that are\nrequired, expand the **Required permissions** section:\n\n\n#### Required permissions\n\nThe following permissions are required to view and list repositories:\n\n- ` artifactregistry.repositories.get `\n- ` artifactregistry.repositories.list`\n\n\nYou might also be able to get\nthese permissions\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\n\nViewing repositories\n--------------------\n\nYou can view repositories within a Google Cloud project.\n\nTo view a list of repositories: \n\n### Console\n\nOpen the **Repositories** page in the Google Cloud console.\n\n\u003cbr /\u003e\n\n[Open the Repositories page](https://console.cloud.google.com/artifacts)\n\n\u003cbr /\u003e\n\nThe page displays a list of your repositories.\n\nTo filter the Artifact Registry repository list:\n\n1. Above the repository list, click **Filter Table**.\n2. Choose a filter from the filter list.\n3. Specify the value that you want to use for filtering the list.\n\n### gcloud\n\nTo list existing repositories, run the following command: \n\n```bash\ngcloud artifacts repositories list [--project=PROJECT] \\\n[--location=LOCATION]\n```\n\nTo view the type of encryption configured for a repository, run the following\ncommand: \n\n```bash\ngcloud artifacts repositories describe REPOSITORY \\\n[--project=PROJECT] [--location=LOCATION]\n```\n\nIn the previous commands, replace the following values:\n\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePROJECT\u003c/code\u003e\u003c/var\u003e is the project ID. If this flag is omitted, the current or default project is used.\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eREPOSITORY\u003c/code\u003e\u003c/var\u003e is the name of the repository.\n-\n\n \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eLOCATION\u003c/code\u003e\u003c/var\u003e is the regional or multi-regional\n [location](/artifact-registry/docs/repo-locations) of the repository.\n\n\n Use the `--location` flag to view repositories in a specific location.\n You can also use `--location=all` to list repositories across all\n locations.\n\n If you omit this flag, the command uses the [default](/artifact-registry/docs/repositories/gcloud-defaults#set)\n location if a default is configured. Otherwise, omitting this flag lists\n repositories across all locations.\n\nFor more information about the command, run the following command: \n\n gcloud artifacts repositories list --help\n\nWhat's next\n-----------\n\n- Configure [access](/artifact-registry/docs/access-control) to your repositories.\n- [Download individual files](/artifact-registry/docs/repositories/download-files) within artifacts stored in your repositories.\n- Learn to [restrict artifact downloads with download rules](/artifact-registry/docs/restrict-artifact-downloads)."]]