이 문서에서는 Google Cloud 프로젝트에서 사용 설정되었거나 사용 가능한 API 및 서비스를 나열하는 방법을 설명합니다. 사용 가능하거나 사용 설정된 API 및 서비스 목록에는 Pub/Sub와 같은 공개 Google Cloud 서비스 및 Cloud Endpoints를 사용하여 생성된 서비스와 같이 비공개로 공유된 모든 API와 서비스가 포함될 수 있습니다. 공개 API 및 서비스와 비공개 API 및 서비스의 차이점에 대한 자세한 내용은 공개 및 비공개 서비스를 참조하세요.
이 가이드의 curl 예시를 사용하려면 시작하기의 안내에 따라 초기 설정을 완료합니다. 이러한 단계에는 표준 curl 명령어의 인증된 별칭인 gcurl을 정의하고 환경 변수 PROJECT_NUMBER를 정의하는 과정이 포함됩니다.
조직의 사용 설정된 서비스 나열
조직 전체에서 사용 설정된 서비스를 나열하려면 Cloud 애셋 인벤토리를 사용합니다. 단일 RPC 호출로 조직에서 관리하는 모든 프로젝트의 상태를 내보낼 수 있습니다. Cloud 애셋 인벤토리는 상태 변경을 모니터링하는 데 사용될 수도 있습니다.
특정 조직에 사용 설정된 모든 서비스를 내보내려면 애셋 나열에 대한 Cloud 애셋 인벤토리 문서를 따르세요.
조직에 사용 설정된 API를 나열하려면 조직 및 결제 프로젝트 ID를 설정한 후 다음 명령어를 실행합니다.
NOW=$(TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ")
gcloud asset list \
--organization='ORGANIZATION_ID' \
--billing-project='BILLING_PROJECT_ID' \
--asset-types='serviceusage.googleapis.com/Service' \
--snapshot-time=$NOW \
--content-type='resource'
위의 명령어를 실행하면 충분한 권한을 가진 사용자가 조직의 모든 프로젝트에 사용 설정된 서비스 집합을 나열할 수 있습니다.
Cloud 애셋 인벤토리 명령어를 실험하려면 이러한 명령어를 특정 프로젝트에 적용합니다. 예를 들어 다음 명령어는 특정 프로젝트에 사용 설정된 모든 서비스를 나열합니다.
NOW=$(TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ")
gcloud asset list \
--project='PROJECT_ID' \
--billing-project='BILLING_PROJECT_ID' \
--asset-types='serviceusage.googleapis.com/Service' \
--snapshot-time=$NOW \
--content-type='resource'
프로젝트의 사용 설정된 서비스 나열
사용 설정된 서비스 나열은 serviceusage.googleapis.com/list_enabled_requests 할당량 측정항목의 할당량을 사용합니다. 사용 가능한 기본 할당량은 초당 쿼리 수(QPS) 10개입니다.
API 및 서비스 페이지가 나타납니다. 이 페이지의 표에서 Google Cloud 프로젝트에 사용 설정된 API 목록을 확인할 수 있습니다.
gcloud
현재 프로젝트에서 사용 설정된 API 및 서비스를 나열하려면 다음 명령어를 실행합니다.
gcloud services list
이 명령어는 다음과 비슷한 출력을 생성합니다.
NAME TITLE
pubsub.googleapis.com Google Cloud Pub/Sub API
bigquery.googleapis.com BigQuery API
cloudtrace.googleapis.com Stackdriver Trace API
servicemanagement.googleapis.com Google Service Management API
monitoring.googleapis.com Stackdriver Monitoring API
storage-api.googleapis.com Google Cloud Storage JSON API
logging.googleapis.com Stackdriver Logging API
clouddebugger.googleapis.com Stackdriver Debugger API
...
curl
사용 가능한 서비스를 나열하려면 state:ENABLED 필터를 사용하여 services.list 메서드를 호출합니다.
사용 가능한 모든 서비스를 나열하면 serviceusage.googleapis.com/list_available_requests 할당량의 할당량이 사용됩니다. 사용 가능한 기본 할당량은 1QPS입니다. 사용 가능한 서비스 집합은 거의 변경되지 않으며 장기간 캐시될 수 있습니다.
API 라이브러리 화면이 표시됩니다. 이 화면에서 사용 가능한 API를 검색하거나 스크롤할 수 있습니다.
gcloud
현재 프로젝트에서 사용 가능한 API 및 서비스를 나열하려면 다음 명령어를 실행합니다.
gcloud services list --available
이미 사용 설정된 모든 서비스와 현재 프로젝트에서 사용 설정할 수 있는 서비스가 결과에 포함됩니다.
이 명령어는 다음과 비슷한 출력을 생성합니다.
NAME TITLE
places-backend.googleapis.com Google Places API Web Service
clouderrorreporting.googleapis.com Stackdriver Error Reporting API
analyticsreporting.googleapis.com Google Analytics Reporting API
youtube.googleapis.com YouTube Data API v3
adsense.googleapis.com AdSense Management API
sqladmin.googleapis.com Google Cloud SQL API
genomics.googleapis.com Genomics API
adexchangebuyer.googleapis.com Ad Exchange Buyer API II
...
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[],[],null,["# Listing Services\n================\n\nThis document describes how to list the APIs and services that are enabled or\navailable in a Google Cloud project. The list of available or enabled\nAPIs and services can contain both public\n[Google Cloud services](/terms/services) such as\n[Pub/Sub](/pubsub), and any APIs and services shared privately with you,\nsuch as services created using [Cloud Endpoints](/endpoints). For more\ninformation on the differences between public and private APIs and services,\nsee\n[Public and Private Services](/service-usage/docs/public-vs-private).\n\n- To get or monitor the enabled services for an organization, see [List enabled services in an organization](#org-list-enabled).\n- To list services in a project, we recommend that you use the Google Cloud console or the Google Cloud CLI. This document describes how to use both interfaces.\n- To program against the Service Usage API, use one of our provided [client libraries](/service-usage/docs/libraries).\n- To experiment with the API, we recommend that you use the `curl` command. You don't need to set up a full application environment; however, there is some required setup.\n\nBefore you begin\n----------------\n\nTo list the enabled and available APIs and services you need:\n\n- A Google Cloud project. To learn how to create a Google Cloud project, see [Creating and Managing Projects](/resource-manager/docs/creating-managing-projects).\n- The correct [Identity and Access Management](/iam) permissions. To learn about the IAM requirements for Service Usage, see [Access Control](/service-usage/docs/access-control).\n- To install the [Google Cloud CLI](/sdk/docs/install).\n- If you want to use the `curl` examples in this guide, make sure you follow the instructions to complete the initial setup in [Getting Started](/service-usage/docs/set-up-development-environment). These steps include defining `gcurl`, which is an authenticated alias for the standard `curl` command, and defining the environment variable `PROJECT_NUMBER`.\n\nList enabled services in an organization\n----------------------------------------\n\nTo list which services are enabled across an organization use\n[Cloud Asset Inventory](/asset-inventory/docs/overview), which allows exporting\nthe state of all projects under the control of an organization in a single RPC\ncall. Cloud Asset Inventory can also be used to\n[monitor for state changes](/asset-inventory/docs/monitoring-asset-changes).\nTo export all enabled services for a particular organization, follow the Cloud Asset Inventory docs for [Listing Assets](/asset-inventory/docs/listing-assets).\n\nTo list the enabled APIs for an organization, run the following command after\nyou set your organization and billing project IDs: \n\n```\nNOW=$(TZ=GMT date +\"%Y-%m-%dT%H:%M:%SZ\")\ngcloud asset list \\\n--organization='ORGANIZATION_ID' \\\n--billing-project='BILLING_PROJECT_ID' \\\n--asset-types='serviceusage.googleapis.com/Service' \\\n--snapshot-time=$NOW \\\n--content-type='resource'\n```\n\nExecuting the previous command lets a sufficiently privileged user list the set\nof enabled services for all projects in an organization.\n\nTo experiment with Cloud Asset Inventory commands, apply these commands to a\nspecific project. For example, the following command\nlists all enabled services for a particular project: \n\n```\nNOW=$(TZ=GMT date +\"%Y-%m-%dT%H:%M:%SZ\")\ngcloud asset list \\\n--project='PROJECT_ID' \\\n--billing-project='BILLING_PROJECT_ID' \\\n--asset-types='serviceusage.googleapis.com/Service' \\\n--snapshot-time=$NOW \\\n--content-type='resource'\n```\n\nList enabled services in a project\n----------------------------------\n\nListing enabled services uses quota from the\n`serviceusage.googleapis.com/list_enabled_requests` quota metric. The default\navailable quota is 10 queries per second (QPS). \n\n### console\n\nTo list the enabled APIs and services in a project:\n\n1. Go to the Google Cloud console [API Dashboard](https://console.cloud.google.com/project/_/apis/dashboard) page. \n [go to the API Dashboard page](https://console.cloud.google.com/project/_/apis/dashboard)\n2. Select your Google Cloud project by performing one of the following:\n\n - Click on a Google Cloud project under **Select a recent project**.\n\n - Use the Google Cloud project browser by performing the following\n steps:\n\n 1. Click **Select project** to open the Google Cloud project browser.\n 2. Find your project and then click on the Google Cloud project name.\n 3. Click **Open** to open the project.\n\n The **APIs \\& Services** page appears. You can find the list of APIs\n enabled in your Google Cloud project in the table on this page.\n\n### gcloud\n\nTo list the enabled APIs and services in your current project, run the\nfollowing command: \n\n```\ngcloud services list\n```\n\nThe command produces output similar to the following: \n\n```\nNAME TITLE\npubsub.googleapis.com Google Cloud Pub/Sub API\nbigquery.googleapis.com BigQuery API\ncloudtrace.googleapis.com Stackdriver Trace API\nservicemanagement.googleapis.com Google Service Management API\nmonitoring.googleapis.com Stackdriver Monitoring API\nstorage-api.googleapis.com Google Cloud Storage JSON API\nlogging.googleapis.com Stackdriver Logging API\nclouddebugger.googleapis.com Stackdriver Debugger API\n...\n```\n\n### curl\n\nTo list enabled services, call the\n[`services.list`](/service-usage/docs/reference/rest/v1/services/list)\nmethod with the `state:ENABLED` filter.\n\nTo list the enabled APIs and services in your project, run the following\ncommand: \n\n gcurl \"https://serviceusage.googleapis.com/v1/projects/${PROJECT_NUMBER}/services?filter=state:ENABLED\"\n\nList available services in a project\n------------------------------------\n\n| **Caution:** The list of available services is substantially larger than the list of enabled services. If you only need the set of enabled services, then use the instructions in the previous section, List enabled services in a project. Listing all services might take as long as 30 seconds due to the amount of data returned. We recommend that you save the list of all available services, as changes to this list are infrequent.\n\nListing all available services uses quota from the\n`serviceusage.googleapis.com/list_available_requests` quota. The default\navailable quota is 1 QPS. The set of available services rarely changes and\ncan be cached for extended periods of time. \n\n### console\n\nTo list the APIs and services available to you in a project:\n\n1. Go to the Google Cloud console [API Library](https://console.cloud.google.com/project/_/apis/library) page. \n [Go to the API Library page](https://console.cloud.google.com/project/_/apis/library)\n2. Select your Google Cloud project by performing one of the following:\n\n - Click on a Google Cloud project under **Select a recent project**.\n\n - Use the Google Cloud project browser by performing the following\n steps:\n\n 1. Click **Select project** to open the Google Cloud project browser.\n 2. Find your project and then click on the Google Cloud project name.\n 3. Click **Open** to open the project.\n\n The **API Library** screen appears. You can search for or scroll through\n available APIs from this screen.\n\n### gcloud\n\nTo list the APIs and services available to you in\nyour current project, run the following command: \n\n```\ngcloud services list --available\n```\n\nThe results include any services that have already been enabled, as\nwell as services that are available to be enabled for the current project.\nThe command produces output similar to the following: \n\n```\nNAME TITLE\nplaces-backend.googleapis.com Google Places API Web Service\nclouderrorreporting.googleapis.com Stackdriver Error Reporting API\nanalyticsreporting.googleapis.com Google Analytics Reporting API\nyoutube.googleapis.com YouTube Data API v3\nadsense.googleapis.com AdSense Management API\nsqladmin.googleapis.com Google Cloud SQL API\ngenomics.googleapis.com Genomics API\nadexchangebuyer.googleapis.com Ad Exchange Buyer API II\n...\n```\n\n### curl\n\nTo list available services, call the\n[`services.list`](/service-usage/docs/reference/rest/v1/services/list)\nmethod.\n\nTo list the available APIs and services in your project, run the following command: \n\n gcurl \"https://serviceusage.googleapis.com/v1/projects/${PROJECT_NUMBER}/services\"\n\nThe result includes all public services, all services for which the calling\nuser has the `servicemanagement.services.bind` permission, and all services\nthat have already been enabled on the project.\n\nIt is possible to exclude the services that are currently active on the\nproject by passing `filter=state:DISABLED` to the previous call.\n\nNext steps\n----------\n\nFor information about how to enable or disable services in your\nGoogle Cloud project, see\n[Enabling and Disabling Services](/service-usage/docs/enable-disable)."]]