이 페이지에서는 Service Consumer Management API 사용을 시작하기 전에 완료해야 하는 단계를 설명합니다. 이미 Google Cloud 프로젝트가 있고, 해당 프로젝트 안에 관리형 서비스(Cloud Endpoints를 사용하여 만든 관리형 서비스 등)가 있으며, 테넌시 유닛에 대해 잘 이해하고 있는 것으로 가정합니다.
서비스 활성화
Service Consumer Management API는 소유 중인 관리형 서비스의 사용을 관리하는 데 도움이 되지만, 그 자체도 서비스입니다. 따라서 사용하려면 먼저 관리형 서비스를 호스팅하는 Google Cloud 프로젝트에 대해 Service Consumer Management API를 활성화해야 합니다. 이 프로젝트를 서비스 제작자 프로젝트라고 합니다.
서비스 제작자 프로젝트에 대해 Service Consumer Management API를 사용 설정하는 가장 간단한 방법은 Google Cloud Console을 사용하는 것입니다.
또는 명령줄에서 또는 프로그래매틱 방식으로 사용 설정할 수 있습니다. 자세한 내용은 서비스 사용 설정 및 중지를 참조하세요.
권한 설정
Service Consumer Management API가 서비스 제작자 프로젝트에 대해 사용 설정된 다음에는 고유한 서비스 ID를 만들고 폴더에 테넌트 프로젝트를 만들고 테넌트 프로젝트에 대해 올바른 결제 계정을 설정할 수 있도록 여기에 리소스에 대한 권한을 부여해야 합니다. 이러한 작업은 Service Consumer Management API 소유의 서비스 계정에 의해 실행되며, 이 계정은 다음과 같은 형식으로 지정됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-04-21(UTC)"],[],[],null,["# Getting Started with the Service Consumer Management API\n\nThe page describes the steps that need to be completed before you\ncan start to use the Service Consumer Management API. It assumes that you already have a\nGoogle Cloud project and a [managed service](/service-infrastructure/docs/glossary#managed)\n(such as a managed service created using [Cloud Endpoints](/endpoints/docs)) in\nthat project, and that you understand\n[Tenancy Units](/service-infrastructure/docs/glossary#tenancy).\n\nActivating the service\n----------------------\n\nWhile the Service Consumer Management API helps you to manage the usage of your own\n[managed services](/service-infrastructure/docs/glossary#managed), it is also a service\nitself. Therefore, before you can use it, you must activate the\nService Consumer Management API for the Google Cloud project that hosts your managed\nservice. This project is known as a [service producer](/service-infrastructure/docs/glossary#producer)\nproject.\n\nThe simplest way to enable the Service Consumer Management API for your service\nproducer project is to use the\n[Google Cloud console](https://console.cloud.google.com/apis/api/serviceconsumermanagement.googleapis.com).\nAlternatively, you can enable it from the command line or programmatically. You\ncan find out more in\n[Enabling and Disabling Services](/service-usage/docs/enable-disable).\n\nSetting permissions\n-------------------\n\nAfter the Service Consumer Management API is enabled for your service producer\nproject, you must create your own service identity and grant it permissions on\nyour resources so that it can create [tenant projects](/service-infrastructure/docs/glossary#tenant) in\nyour folders and set up the correct billing account on tenant projects. These\nactions are executed by a service account owned by the Service Consumer Management\nAPI, which is specified in the following format: \n\n```\nservice-PROJECT_NUMBER@service-consumer-management.iam.gserviceaccount.com\n```\n\nwhere *PROJECT_NUMBER* is the project number for your service producer project\nthat activated the Service Consumer Management service.\n\nThe remainder of this guide uses *GCM_SA* to represent the\nService Consumer Management API service account.\n\nYou can use the following commands to generate the service identity.\n\n1. Login with your user account.\n\n```\ngcloud auth login\n```\n\n1. Generate the service identity.\n\n```\ngcloud beta services identity create --service=serviceconsumermanagement.googleapis.com --project=PROJECT_ID\n```\n\n### Setting folder permissions\n\n1. Ensure that you have a folder for holding your tenant projects: you'll need\n to have an [Organization](/resource-manager/docs/creating-managing-organization)\n to create folders within your service producer project. If you don't have a\n folder, follow the instructions in\n [Creating and Managing Folders](/resource-manager/docs/creating-managing-folders#create-folder)\n to create one. Your folder will have an integer based *FOLDER_ID*.\n\n2. On your folder, assign the **Project Creator/Deleter** role to the\n Service Consumer Management API service account. Follow the instructions in\n [Configuring Access to Folders](/resource-manager/docs/creating-managing-folders#configuring_access_to_folders)\n to add the **Project Creator** and **Project Deleter** role, using *GCM_SA* as\n the user.\n\n### Setting billing account permissions\n\n1. Ensure that you have a billing account that can be shared for tenant\n projects. If you don't have a billing account, see\n [Create, Modify, or Close a Billing Account](/billing/docs/how-to/manage-billing-account)\n for instructions to create one.\n\n2. Follow the\n [instructions](/billing/docs/how-to/billing-access)\n to add the **Billing Account User** role to *GCM_SA*.\n\nResource requirements\n---------------------\n\n- The Service Consumer Management API creates [tenant projects](/service-infrastructure/docs/glossary#tenant) on your behalf, so ensure you have enough quota to create them.\n- See the [project limits](https://cloud.google.com/resource-manager/docs/limits#project-limits) documentation to know how many projects can be created by default and to request increases to that limit."]]