Google Cloud ๋ ํน์ Google Cloud ๋ฆฌ์์ค์๋ ์ก์ธ์ค ๊ถํ์ ๋ถ์ฌํ๊ณ , ๋ค๋ฅธ ๋ฆฌ์์ค์๋ ๋ถ์ฌํ์ง ์๋๋ก ์ค์ ํ ์ ์๋ Identity and Access Management(IAM)๋ฅผ ์ ๊ณตํฉ๋๋ค. IAM์ ์ต์ ๊ถํ์ ๋ณด์ ์์น์ ์ฑํํ์ฌ ๋ฆฌ์์ค์ ๋ํด ํ์ํ ์ก์ธ์ค ๊ถํ๋ง ๋ถ์ฌํ ์ ์๊ฒ ํด์ค๋๋ค.
IAM์ ์ฌ์ฉํ๋ฉด IAM ํ์ฉ ์ ์ฑ ์ ์ค์ ํ์ฌ ์ด๋ ํ ๋ฆฌ์์ค์ ๋ํด ๋๊ตฌ(์ฌ์ฉ์)์๊ฒ ์ด๋ ํ ์ก์ธ์ค ๊ถํ(์ญํ )์ด ์๋์ง ์ ์ดํ ์ ์์ต๋๋ค. ํ์ฉ ์ ์ฑ ์ ์ฌ์ฉ์์๊ฒ ํน์ ์ญํ ์ ๋ถ์ฌํ๋ฉฐ ์ฌ์ฉ์๋ ํด๋น ์ญํ ์์ ๊ถํ์ ๋ถ์ฌ๋ฐ์ต๋๋ค.
์ด ํ์ด์ง์์๋ Cloud Billing API์์ ์ฌ์ฉํ ์ ์๋ IAM ์ญํ ์ ์ค๋ช ํฉ๋๋ค. ์๋ฅผ ๋ค์ด IAM์ ์ฌ์ฉํ์ฌ Cloud Billing ๊ณ์ ์ ๋ํ ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ๋ทฐ์ด์ ๊ฐ์ ์ญํ ์ ๋ถ์ฌํ ์ ์์ต๋๋ค. IAM๊ณผ ๊ทธ ๊ธฐ๋ฅ์ ๋ํ ์์ธํ ์ค๋ช ์ IAM ๋ฌธ์๋ฅผ ์ฐธ์กฐํ์ธ์. ํนํ ํ๋ก์ ํธ, ํด๋, ์กฐ์ง์ ๋ํ ์ก์ธ์ค ๊ด๋ฆฌ ๋ฐ ๋ค๋ฅธ ๋ฆฌ์์ค์ ๋ํ ์ก์ธ์ค ๊ด๋ฆฌ๋ฅผ ์ฐธ์กฐํ์ธ์.
๊ถํ ๋ฐ ์ญํ
์ฌ์ฉ์๊ฐ Google Cloud ์ฝ์์์ Cloud Billing ๊ณ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๊ฑฐ๋ Cloud Billing API ๋ฉ์๋๊ฐ Cloud Billing ๊ณ์ ์ ๋ณด๋ฅผ ๋ฐํํ๋ ค๋ฉด ์ฌ์ฉ์๋ ํธ์ถ์์๊ฒ ํ์ํ ๊ถํ์ด ์์ด์ผ ํฉ๋๋ค.
Cloud Billing Catalog API์ ํ์ํ ๊ถํ
Cloud Billing Catalog API(์๋น์ค ๋ชฉ๋ก ๋ฐ SKU ๋ชฉ๋ก)๋ฅผ ์ฌ์ฉํ๋ ๋ฐ ๊ถํ์ด ํ์ํ์ง ์์ต๋๋ค. ์ด API์์ ๋ฐํํ๋ ๋ชจ๋ ๋ฐ์ดํฐ๋ ๊ณต๊ฐ ๋ฐ์ดํฐ์ ๋๋ค.
Cloud Billing Budget API์ ํ์ํ ๊ถํ
๋ค์ ํ์์๋ ๊ฐ Cloud Billing Budget API ๋ฉ์๋๋ฅผ ํธ์ถํ๋ ๋ฐ ํ์ํ ๊ถํ์ ์ค๋ช ํฉ๋๋ค. ์ด๋ฌํ ๊ถํ์ ์๋์ผ๋ก ๋ถ์ฌํ๋ ํ์ค IAM ๊ฒฐ์ ์ญํ ๋ ํฌํจ๋ฉ๋๋ค.
API ๋ฉ์๋ | ํ์ํ ๊ถํ | ๊ถํ์ ๋ถ์ฌํ๋ IAM ์ญํ |
---|---|---|
GetBudget |
์์ฐ ์ธ๋ถ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ค๋ ค๋ฉด ํธ์ถ์์๊ฒ ์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ billing.budgets.get ๊ถํ์ด ์์ด์ผ ํฉ๋๋ค.
๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํธ์ถ์๋ ๊ฒฐ์ ๊ณ์ ๊ถํ ๋์ ํ๋ก์ ํธ์ ๋ํ |
์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ ๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ๋ทฐ์ด ๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํ๋ก์ ํธ์ ๋ํ ํ๋ก์ ํธ ์์ ์, ํ๋ก์ ํธ ํธ์ง์ ๋๋ ํ๋ก์ ํธ ๋ทฐ์ด |
ListBudgets |
Cloud Billing ๊ณ์ ์ ์ ์ฉ๋ ์์ฐ ๋ชฉ๋ก์ ๋ฐํํ๋ ค๋ฉด ํธ์ถ์์๊ฒ Cloud Billing ๊ณ์ ์ ๋ํ billing.budgets.list ๊ถํ์ด ์์ด์ผ ํฉ๋๋ค.
๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํธ์ถ์๋ ๊ฒฐ์ ๊ณ์ ๊ถํ ๋์ ํ๋ก์ ํธ์ ๋ํ |
์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ ๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ๋ทฐ์ด ๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํ๋ก์ ํธ์ ๋ํ ํ๋ก์ ํธ ์์ ์, ํ๋ก์ ํธ ํธ์ง์ ๋๋ ํ๋ก์ ํธ ๋ทฐ์ด |
CreateBudget |
์ ์์ฐ์ ์์ฑํ๋ ค๋ฉด ํธ์ถ์์๊ฒ ์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ billing.budgets.create ๊ถํ์ด ์์ด์ผ ํฉ๋๋ค.
๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํธ์ถ์๋ ๊ฒฐ์ ๊ณ์ ๊ถํ ๋์ ํ๋ก์ ํธ์ ๋ํ |
์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ ๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์ ๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํ๋ก์ ํธ์ ๋ํ ํ๋ก์ ํธ ์์ ์ ๋๋ ํ๋ก์ ํธ ํธ์ง์ |
UpdateBudget |
๊ธฐ์กด ์์ฐ์ ์
๋ฐ์ดํธํ๋ ค๋ฉด ํธ์ถ์์๊ฒ ์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ billing.budgets.update ๊ถํ์ด ์์ด์ผ ํฉ๋๋ค.
๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํธ์ถ์๋ ๊ฒฐ์ ๊ณ์ ๊ถํ ๋์ ํ๋ก์ ํธ์ ๋ํ |
์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ ๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์ ๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํ๋ก์ ํธ์ ๋ํ ํ๋ก์ ํธ ์์ ์ ๋๋ ํ๋ก์ ํธ ํธ์ง์ |
DeleteBudget |
๊ธฐ์กด ์์ฐ์ ์ญ์ ํ๋ ค๋ฉด ํธ์ถ์์๊ฒ ์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ billing.budgets.delete ๊ถํ์ด ์์ด์ผ ํฉ๋๋ค.
๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํธ์ถ์๋ ๊ฒฐ์ ๊ณ์ ๊ถํ ๋์ ํ๋ก์ ํธ์ ๋ํ |
์์ฐ์ Cloud Billing ๊ณ์ ์ ๋ํ ๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์ ๋จ์ผ ํ๋ก์ ํธ ์์ฐ์ ๊ฒฝ์ฐ ํ๋ก์ ํธ์ ๋ํ ํ๋ก์ ํธ ์์ ์ ๋๋ ํ๋ก์ ํธ ํธ์ง์ |
Cloud Billing Account API์ ํ์ํ ๊ถํ
๋ค์ ํ์๋ ๊ฐ Cloud Billing ๊ณ์ API ๋ฉ์๋๋ฅผ ํธ์ถํ๋ ๋ฐ ํ์ํ ๊ถํ๊ณผ ์ด๋ฌํ ๊ถํ์ด ํฌํจ๋ Cloud Billing์ IAM ์ญํ ์ด ๋์ ์์ต๋๋ค.
API ๋ฉ์๋ | ํ์ ๊ถํ | ๊ถํ์ด ํฌํจ๋ IAM ์ญํ |
---|---|---|
billingAccounts.create |
๋ฉ์๋๋ ์ Cloud Billing ํ์ ๊ณ์ ์ ๋ง๋๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. ํธ์ถ์๋ ํ์ ๊ณ์ ์ ์์ Cloud Billing ๊ณ์ ์ billing.accounts.update ๊ฐ ์์ด์ผ ํฉ๋๋ค.
|
๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์ |
billingAccounts.get |
Cloud Billing ๊ณ์ ์์ billing.accounts.get |
๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋ทฐ์ด ๋๋ ๊ฒฐ์ ๊ณ์ ์ฌ์ฉ์ |
billingAccounts.list |
์์ ์ด ๋ฉ์๋๋ ํธ์ถ์๊ฐ ์ก์ธ์คํ ๊ถํ์ด ์๋ ๋ชจ๋ ๊ณ์ ์ ๋ฐํํฉ๋๋ค. | Cloud Billing ๊ณ์ ์ ๋ํ ๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋ทฐ์ด ๋๋ ๊ฒฐ์ ๊ณ์ ์ฌ์ฉ์ ๋๋ ํ๋ก์ ํธ์ ๋ํ ํ๋ก์ ํธ ๊ฒฐ์ ๊ด๋ฆฌ์ |
billingAccounts.getIamPolicy |
Cloud Billing ๊ณ์ ์์ billing.accounts.getIamPolicy |
๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋ทฐ์ด ๋๋ ๊ฒฐ์ ๊ณ์ ์ฌ์ฉ์ |
billingAccounts.setIamPolicy |
Cloud Billing ๊ณ์ ์์ billing.accounts.setIamPolicy |
๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์ |
billingAccounts.testIamPermissions |
์์ ์ด ๋ฉ์๋๋ ํธ์ถ์๊ฐ ๋ณด์ ํ Cloud Billing ๊ณ์ ์ ๊ถํ์ ํ์ธํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. | ํด๋น ์ฌํญ ์์ |
billingAccounts.patch |
Cloud Billing ๊ณ์ ์์ billing.accounts.update |
๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์ |
billingAccounts.projects.list |
Cloud Billing ๊ณ์ ์์ billing.resourceAssociations.list
|
๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์, ๊ฒฐ์ ๊ณ์ ๋น์ฉ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ๋ทฐ์ด |
projects.getBillingInfo |
ํ๋ก์ ํธ์ resourcemanager.projects.get ์์ธํ ๋ด์ฉ์ ํ๋ก์ ํธ ์ก์ธ์ค ์ ์ด๋ฅผ ์ฐธ์กฐํ์ธ์. |
ํ๋ก์ ํธ ์์ ์, ํ๋ก์ ํธ ํธ์ง์ ๋๋ ํ๋ก์ ํธ ๋ทฐ์ด |
projects.updateBillingInfo |
Cloud Billing ๊ณ์ ์ billing.resourceAssociations.create ๋ฐ ํ๋ก์ ํธ์ resourcemanager.projects.createBillingAssignment |
๊ฒฐ์ ๊ณ์ ๊ด๋ฆฌ์ ๋๋ ๊ฒฐ์ ๊ณ์ ์ฌ์ฉ์ ๋ฐ ํ๋ก์ ํธ ๊ฒฐ์ ๊ด๋ฆฌ์ |
์ญํ
์ฌ์ฉ์์๊ฒ ๊ถํ์ ์ง์ ๋ถ์ฌํ๋ ๋์ ํ๋ ์ด์์ ๊ถํ์ด ๋ฒ๋ค๋ก ํฌํจ๋ ์ญํ ์ ๋ถ์ฌํฉ๋๋ค.
๋์ผํ ๋ฆฌ์์ค์ ํ๋ ์ด์์ ์ญํ ์ ๋ถ์ฌํ ์ ์์ต๋๋ค.
๋ค์ ํ์๋ Cloud Billing API์ ์ก์ธ์คํ๊ธฐ ์ํด ๋ถ์ฌํ ์ ์๋ IAM ์ญํ , ๊ฐ ์ญํ ์ ๋ํ ์ค๋ช , ๊ฐ ์ญํ ์ ํฌํจ๋ ๊ถํ์ ๋ณด์ฌ์ค๋๋ค. ์ด๋ฌํ ์ญํ ์ค ์ผ๋ถ์๋ ๋ค๋ฅธ Google Cloud ์๋น์ค์ ๋ํ ๊ถํ๋ ํฌํจ๋์ด ์์ต๋๋ค.
Role | Permissions |
---|---|
Billing Account Administrator( Provides access to see and manage all aspects of billing accounts. Lowest-level resources where you can grant this role:
|
|
Carbon Footprint Viewer(
|
|
Billing Account Costs Manager( Manage budgets for a billing account, and view, analyze, and export cost information of a billing account. Lowest-level resources where you can grant this role:
|
|
Billing Account Creator( Provides access to create billing accounts. Lowest-level resources where you can grant this role:
|
|
Project Billing Costs Manager( When granted in conjunction with cost view permissions on projects, provides access to billing information scoped to the projects to which the user has cost access. Lowest-level resources where you can grant this role:
|
|
Project Billing Manager( When granted in conjunction with the Billing Account User role, provides access to assign a project's billing account or disable its billing. Lowest-level resources where you can grant this role:
|
|
Billing Account User( When granted in conjunction with the Project Owner role or Project Billing Manager role, provides access to associate projects with billing accounts. Lowest-level resources where you can grant this role:
|
|
Billing Account Viewer( View billing account cost and pricing information, transactions, and billing and commitment recommendations. Lowest-level resources where you can grant this role:
|
|
roles/billing.admin
, roles/billing.costsManager
, roles/billing.viewer
, roles/billing.projectManager
์ญํ ์๋ ๋ค๋ฅธ Google Cloud ์๋น์ค์ ๋ํ ๊ถํ๋ ํฌํจ๋ฉ๋๋ค.
๊ด๋ จ ์ฃผ์
- IAM ๋ฌธ์์ ํ๋ก์ ํธ, ํด๋, ์กฐ์ง์ ๋ํ ์ก์ธ์ค ๊ด๋ฆฌ
- IAM ๋ฌธ์์ ๋ค๋ฅธ ๋ฆฌ์์ค์ ๋ํ ์ก์ธ์ค ๊ด๋ฆฌ
- Cloud Billing์ฉ ์ปค์คํ ์ญํ ๋ง๋ค๊ธฐ