์ด ๋ฌธ์์์๋ ์์ฝ ๋๋ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ํ์ธํ๋ ๋ฐฉ๋ฒ์ ์ค๋ช ํฉ๋๋ค. ๋ค์ํ ์ ํ์ ์์ฝ์ ๋ํด ์์ธํ ์์๋ณด๋ ค๋ฉด ์์ฝ ์ ํ ์ ํ์ ์ฐธ์กฐํ์ธ์.
์์ฝ ๋๋ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ณด๋ฉด ๋ค์์ ์ํํ ์ ์์ต๋๋ค.
์์ฝ ์ค์ ๋ณด๊ธฐ. ์ด๋ฌํ ๊ฒํ ์์ ์ ์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ํ์ธํ๊ณ , ์๊ตฌ๋ฅผ ์ถฉ์กฑํ๋์ง ํ์ธํ๊ณ , ์ฉ๋์ ๊ณํํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค.
์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค ์ ๊ฒฐ์ . ์ด๋ฌํ ํ์ธ ์์ ์ ์์ฝ๋ ์ฉ๋์ ์๋นํ ์ ์๋ Compute Engine ์ธ์คํด์ค ์๋ฅผ ๊ฒฐ์ ํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค.
์ ํ์ฌํญ
์ฌ์ฉ์๊ฐ ๋ง๋ ํ๋ก์ ํธ์์๋ง ๊ณต์ ์์ฝ ๋๋ ๊ณต์ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ณผ ์ ์์ต๋๋ค.
์์ํ๊ธฐ ์ ์
-
์์ง ์ธ์ฆ์ ์ค์ ํ์ง ์์๋ค๋ฉด ์ค์ ํฉ๋๋ค.
์ธ์ฆ์ Google Cloud ์๋น์ค ๋ฐ API์ ์ก์ธ์คํ๊ธฐ ์ํด ID๋ฅผ ํ์ธํ๋ ํ๋ก์ธ์ค์
๋๋ค.
๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์์ ์ฝ๋ ๋๋ ์ํ์ ์คํํ๋ ค๋ฉด ๋ค์ ์ต์
์ค ํ๋๋ฅผ ์ ํํ์ฌ Compute Engine์ ์ธ์ฆํ๋ฉด ๋ฉ๋๋ค.
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
- Set a default region and zone.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
Go
๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์์ ์ด ํ์ด์ง์ Go ์ํ์ ์ฌ์ฉํ๋ ค๋ฉด gcloud CLI๋ฅผ ์ค์น ๋ฐ ์ด๊ธฐํํ ๋ค์ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ก ์ ํ๋ฆฌ์ผ์ด์ ๊ธฐ๋ณธ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ฅผ ์ค์ ํ์ธ์.
์์ธํ ๋ด์ฉ์ ๋ค์์ ์ฐธ์กฐํ์ธ์: Set up authentication for a local development environment.
Java
๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์์ ์ด ํ์ด์ง์ Java ์ํ์ ์ฌ์ฉํ๋ ค๋ฉด gcloud CLI๋ฅผ ์ค์น ๋ฐ ์ด๊ธฐํํ ๋ค์ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ก ์ ํ๋ฆฌ์ผ์ด์ ๊ธฐ๋ณธ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ฅผ ์ค์ ํ์ธ์.
์์ธํ ๋ด์ฉ์ ๋ค์์ ์ฐธ์กฐํ์ธ์: Set up authentication for a local development environment.
Node.js
๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์์ ์ด ํ์ด์ง์ Node.js ์ํ์ ์ฌ์ฉํ๋ ค๋ฉด gcloud CLI๋ฅผ ์ค์น ๋ฐ ์ด๊ธฐํํ ๋ค์ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ก ์ ํ๋ฆฌ์ผ์ด์ ๊ธฐ๋ณธ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ฅผ ์ค์ ํ์ธ์.
์์ธํ ๋ด์ฉ์ ๋ค์์ ์ฐธ์กฐํ์ธ์: Set up authentication for a local development environment.
Python
๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์์ ์ด ํ์ด์ง์ Python ์ํ์ ์ฌ์ฉํ๋ ค๋ฉด gcloud CLI๋ฅผ ์ค์น ๋ฐ ์ด๊ธฐํํ ๋ค์ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ก ์ ํ๋ฆฌ์ผ์ด์ ๊ธฐ๋ณธ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ฅผ ์ค์ ํ์ธ์.
์์ธํ ๋ด์ฉ์ ๋ค์์ ์ฐธ์กฐํ์ธ์: Set up authentication for a local development environment.
REST
๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์์ ์ด ํ์ด์ง์ REST API ์ํ์ ์ฌ์ฉํ๋ ค๋ฉด gcloud CLI์ ์ ๊ณตํ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด๋ฅผ ์ฌ์ฉํฉ๋๋ค.
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
์์ธํ ๋ด์ฉ์ Google Cloud ์ธ์ฆ ๋ฌธ์์ REST ์ฌ์ฉ์ ์ํ ์ธ์ฆ์ ์ฐธ์กฐํ์ธ์.
-
ํ์ํ ์ญํ
์์ฝ ๋๋ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ณด๋ ๋ฐ ํ์ํ ๊ถํ์ ์ป์ผ๋ ค๋ฉด ๊ด๋ฆฌ์์๊ฒ ํ๋ก์ ํธ์ ๋ํ ์ปดํจํ
๊ด๋ฆฌ์(roles/compute.admin
) IAM ์ญํ ์ ๋ถ์ฌํด ๋ฌ๋ผ๊ณ ์์ฒญํ์ธ์.
์ญํ ๋ถ์ฌ์ ๋ํ ์์ธํ ๋ด์ฉ์ ํ๋ก์ ํธ, ํด๋, ์กฐ์ง์ ๋ํ ์ก์ธ์ค ๊ด๋ฆฌ๋ฅผ ์ฐธ์กฐํ์ธ์.
์ด ์ฌ์ ์ ์๋ ์ญํ ์๋ ์์ฝ ๋๋ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ณด๋ ๋ฐ ํ์ํ ๊ถํ์ด ํฌํจ๋์ด ์์ต๋๋ค. ํ์ํ ์ ํํ ๊ถํ์ ๋ณด๋ ค๋ฉด ํ์ ๊ถํ ์น์ ์ ํผ์น์ธ์.
ํ์ ๊ถํ
์์ฝ ๋๋ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ณด๋ ค๋ฉด ๋ค์ ๊ถํ์ด ํ์ํฉ๋๋ค.
-
์์ฝ ๋ชฉ๋ก ๋ณด๊ธฐ:
ํ๋ก์ ํธ์ ๋ํ
compute.reservations.list
๊ถํ -
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ ๋ชฉ๋ก ๋ณด๊ธฐ: ํ๋ก์ ํธ์ ๋ํ
compute.futureReservations.list
๊ถํ -
์์ฝ์ ์ธ๋ถ์ ๋ณด ๋ณด๊ธฐ:
ํ๋ก์ ํธ์ ๋ํ
compute.reservations.get
๊ถํ -
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ํ๋ก์ ํธ์ ๋ํ
compute.futureReservations.get
๊ถํ์ด ํ์ํฉ๋๋ค.
์ปค์คํ ์ญํ ์ด๋ ๋ค๋ฅธ ์ฌ์ ์ ์๋ ์ญํ ์ ์ฌ์ฉํ์ฌ ์ด ๊ถํ์ ๋ถ์ฌ๋ฐ์ ์๋ ์์ต๋๋ค.
์์ฝ ์ค์ ๋ณด๊ธฐ
๋ค์ ์น์ ์์๋ ์์ฝ ๋๋ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ค์ ์ ํ์ธํ๋ ๋ฐฉ๋ฒ์ ์ค๋ช ํฉ๋๋ค.
์์ฝ ๋ณด๊ธฐ
ํ๋ ์ด์์ ์์ฝ ์ค์ ์ ๋ณด๋ ค๋ฉด ์ด ์น์ ์ ์ค๋ช ๋ ๋ค์ ๋ฐฉ๋ฒ ์ค ํ๋๋ฅผ ์ฌ์ฉํฉ๋๋ค.
ํ๋ก์ ํธ์ ๋ชจ๋ ์์ฝ ๊ฐ์๋ฅผ ๋ณด๋ ค๋ฉด ์์ฝ ๋ชฉ๋ก์ ํ์ธํฉ๋๋ค.
๋จ์ผ ์์ฝ์ ์ ์ฒด ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ์์ฝ์ ์ธ๋ถ์ ๋ณด๋ฅผ ํ์ธํฉ๋๋ค.
์์ฝ์์ deleteAtTime
๋ฐ reservationSharingPolicy
ํ๋(๋ฏธ๋ฆฌ๋ณด๊ธฐ)๋ฅผ ๋ณด๋ ค๋ฉด Google Cloud CLI๋ฅผ ์ฌ์ฉํ์ฌ ์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๊ฑฐ๋ REST API๋ฅผ ์ฌ์ฉํ์ฌ ์์ฝ์ ๋ด
๋๋ค. ์ด๋ฌํ ํ๋๊ฐ ํ์ํ์ง ์์ผ๋ฉด ๋ค์ ์ต์
์ค์์ ์ ํํ์ฌ ์์ฝ์ ๋ด
๋๋ค.
์ฝ์
Google Cloud ์ฝ์์์ ์์ฝ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
์จ๋๋งจ๋ ์์ฝ ํญ(๊ธฐ๋ณธ๊ฐ)์์ ํ ์ด๋ธ์ ๊ฐ ์์ฝ์ด ๋์ด๋๊ณ , ๊ฐ ํ ์ด๋ธ ์ด์ ์์ฑ ์ค๋ช ์ด ํ์๋ฉ๋๋ค.
์ ํ์ฌํญ: ์จ๋๋งจ๋ ์์ฝ ํ ์ด๋ธ์์ ๋ค์ ์ค ํ๋ ๋๋ ๋ชจ๋๋ฅผ ์ํํฉ๋๋ค.
์์ฝ ๋ณด์ฅ๋ ๊ฐ์๋ฅผ ํ์ํ๋ ค๋ฉด ์ด ํ์ ์ต์ ...์ ํด๋ฆญํ๊ณ ๋ณด์ฅ๋ ์ ์ฒดํฌ๋ฐ์ค๋ฅผ ์ ํํ ํ ํ์ธ์ ํด๋ฆญํฉ๋๋ค.
์์ฝ ๋ชฉ๋ก์ ๋ฏธ์ธ ์กฐ์ ํ๋ ค๋ฉด
ํํฐ ํ๋์์ ์์ฝ์ ํํฐ๋งํ๋ ค๋ ์์ฑ์ ์ ํํฉ๋๋ค.
์์ฝ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ์ด๋ฆ ์ด์์ ์์ฝ ์ด๋ฆ์ ํด๋ฆญํฉ๋๋ค. ์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ์ ๊ณตํ๋ ํ์ด์ง๊ฐ ์ด๋ฆฝ๋๋ค.
gcloud
์์ฝ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด
gcloud compute reservations list
๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํฉ๋๋ค.gcloud compute reservations list
์ถ๋ ฅ์ ๋ค์ ์์์ ๋น์ทํฉ๋๋ค.
NAME: r-01 IN_USE_COUNT: 0 COUNT: 5 ZONE: us-central1-a SHARE_TYPE: LOCAL NAME: r-02 IN_USE_COUNT: 3 COUNT: 10 ZONE: us-central1-f SHARE_TYPE: LOCAL
์ ํ์ ์ผ๋ก ํํฐ ํํ์์ ์ฌ์ฉํ์ฌ ์์ฝ ๋ชฉ๋ก์ ๋ฏธ์ธ ์กฐ์ ํ๋ ค๋ฉด
--filter
ํ๋๊ทธ๋ฅผ ํฌํจํฉ๋๋ค.gcloud compute reservations list \ --filter="FILTER_EXPRESSION"
FILTER_EXPRESSION
์ ํํฐ ํํ์์ผ๋ก ๋ฐ๊ฟ๋๋ค.์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด
gcloud compute reservations describe
๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํฉ๋๋ค.gcloud compute reservations describe RESERVATION_NAME \ --zone=ZONE
๋ค์์ ๋ฐ๊ฟ๋๋ค.
RESERVATION_NAME
: ๊ธฐ์กด ์์ฝ์ ์ด๋ฆ์ ๋๋ค.ZONE
: ์์ฝ์ด ์๋ ์์ญ์ ๋๋ค.
์ถ๋ ฅ์ ๋ค์ ์์์ ๋น์ทํฉ๋๋ค.
creationTimestamp: '2024-10-11T03:25:23.192-07:00' id: '4488228526648280060' kind: compute#reservation name: r-01 selfLink: https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/reservations/r-01 shareSettings: shareType: LOCAL specificReservation: assuredCount: '50' count: '50' inUseCount: '25' instanceProperties: machineType: n2-standard-2 specificReservationRequired: false status: READY zone: https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a
Go
์์ฝ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
์๋ฐ
์์ฝ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
Node.js
์์ฝ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
Python
์์ฝ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ๋ค์ ์ฝ๋ ์ํ์ ์ฌ์ฉํ์ธ์.
REST
์์ฝ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด
GET
์์ฒญ์reservations.list
๋ฉ์๋๋ก ์ ์กํฉ๋๋ค.GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations
๋ค์์ ๋ฐ๊ฟ๋๋ค.
PROJECT_ID
: ์์ฝ์ ๋ง๋ ํ๋ก์ ํธ์ ID์ ๋๋ค.ZONE
: ์์ฝ์ด ์๋ ์์ญ์ ๋๋ค.
์ถ๋ ฅ์ ๋ค์ ์์์ ๋น์ทํฉ๋๋ค.
{ "kind": "compute#reservation", "id": "4100668622331754141", "creationTimestamp": "2019-09-27T08:21:14.707-07:00", "selfLink": "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/reservations/reservation-05", "zone": "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a", "name": "reservation-05", "specificReservation": { "instanceProperties": { "machineType": "n1-standard-2" }, "count": "100", "inUseCount": "0", "assuredCount": "100" }, "specificReservationRequired": false, "status": "READY", "shareSettings": { "shareType": "LOCAL" } }, { "kind": "compute#reservation", "id": "2533514314332214789", "creationTimestamp": "2019-09-27T08:21:14.707-07:00", "selfLink": "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/reservations/reservation-04", "zone": "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a", "name": "reservation-04", "specificReservation": { "instanceProperties": { "machineType": "n1-standard-2", "guestAccelerators": [ { "acceleratorType": "nvidia-tesla-t4", "acceleratorCount": 1 } ], "localSsds": [ { "diskSizeGb": "375", "interface": "SCSI" } ] }, "count": "50", "inUseCount": "25", "assuredCount": "50" }, "specificReservationRequired": false, "status": "READY", "shareSettings": { "shareType": "LOCAL" } }
์ ํ์ ์ผ๋ก ํํฐ ํํ์์ ์ฌ์ฉํ์ฌ ์์ฝ ๋ชฉ๋ก์ ๋ฏธ์ธ ์กฐ์ ํ๋ ค๋ฉด
filter
์ฟผ๋ฆฌ ํ๋ผ๋ฏธํฐ๋ฅผ ํฌํจํฉ๋๋ค.GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations?filter=FILTER_EXPRESSION
FILTER_EXPRESSION
์ URL ์ธ์ฝ๋ฉ ๊ฐ์ ์ฌ์ฉํ๋ ํํฐ ํํ์์ผ๋ก ๋ฐ๊ฟ๋๋ค.์์ฝ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด
GET
์์ฒญ์reservations.get
๋ฉ์๋๋ก ์ ์กํฉ๋๋ค.GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME
๋ค์์ ๋ฐ๊ฟ๋๋ค.
PROJECT_ID
: ์์ฝ์ ๋ง๋ ํ๋ก์ ํธ์ ID์ ๋๋ค.ZONE
: ์์ฝ์ด ์๋ ์์ญ์ ๋๋ค.RESERVATION_NAME
: ๊ธฐ์กด ์์ฝ์ ์ด๋ฆ์ ๋๋ค.
์ถ๋ ฅ์ ๋ค์ ์์์ ๋น์ทํฉ๋๋ค.
{ "kind": "compute#reservation", "id": "4488228526648280060", "creationTimestamp": "2024-10-11T03:25:23.192-07:00", "selfLink": "https://www.googleapis.com/compute/v1/projects/davide-experimental/zones/us-central1-a/reservations/r-01", "zone": "https://www.googleapis.com/compute/v1/projects/davide-experimental/zones/us-central1-a", "name": "r-01", "specificReservation": { "instanceProperties": { "machineType": "n2-standard-2" }, "count": "50", "inUseCount": "25", "assuredCount": "50" }, "specificReservationRequired": false, "status": "READY", "shareSettings": { "shareType": "LOCAL" } }
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ ๋ณด๊ธฐ
ํ๋ ์ด์์ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ค์ ์ ๋ณด๋ ค๋ฉด ์ด ์น์ ์ ์ค๋ช ๋ ๋ค์ ๋ฐฉ๋ฒ ์ค ํ๋๋ฅผ ์ฌ์ฉํฉ๋๋ค.
ํ๋ก์ ํธ์์ ๋ชจ๋ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๊ฐ์๋ฅผ ๋ณด๋ ค๋ฉด ์์ฒญ ๋ชฉ๋ก์ ๋ด ๋๋ค.
๋จ์ผ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ ์ฒด ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ํด๋น ์์ฒญ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ด ๋๋ค.
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ณด๋ ค๋ฉด ๋ค์ ์ต์ ์ค ํ๋๋ฅผ ์ ํํฉ๋๋ค.
์ฝ์
Google Cloud ์ฝ์์์ ์์ฝ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
๋ฏธ๋์ฉ ์์ฝ ํญ์ ํด๋ฆญํฉ๋๋ค.
ํ์ ๊ฐ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ด ๋์ด๋๊ณ ๊ฐ ํ ์ด๋ธ ์ด์ ์์ฑ ์ค๋ช ์ด ํ์๋ฉ๋๋ค.
์ ํ์ฌํญ: ์์ฒญ ๋ชฉ๋ก์ ๋ฏธ์ธ ์กฐ์ ํ๋ ค๋ฉด
ํํฐ ํ๋์์ ์์ฒญ์ ํํฐ๋งํ๋ ค๋ ์์ฑ์ ์ ํํฉ๋๋ค.์์ฒญ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ์ด๋ฆ ์ด์์ ์์ฒญ์ ์ด๋ฆ์ ํด๋ฆญํฉ๋๋ค. ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ํ ์ธ๋ถ์ ๋ณด๊ฐ ํฌํจ๋ ํ์ด์ง๊ฐ ์ด๋ฆฝ๋๋ค.
gcloud
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด
gcloud beta compute future-reservations list
๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํฉ๋๋ค.gcloud beta compute future-reservations list
์ถ๋ ฅ์ ๋ค์ ์์์ ๋น์ทํฉ๋๋ค.
NAME: fr-04 TOTAL_COUNT: 100 START_TIME: 2025-07-20T07:00:00Z END_TIME: 2025-08-05T07:00:00Z PROCUREMENT_STATUS: FULFILLED ZONE: us-east1-a NAME: fr-05 TOTAL_COUNT: 10 START_TIME: 2025-07-20T07:00:00Z END_TIME: 2025-12-01T00:00:00Z PROCUREMENT_STATUS: PENDING_APPROVAL ZONE: us-west1-c
์ ํ์ ์ผ๋ก ํํฐ ํํ์์ ์ฌ์ฉํ์ฌ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ ๋ชฉ๋ก์ ๋ฏธ์ธ ์กฐ์ ํ๋ ค๋ฉด
--filter
ํ๋๊ทธ๋ฅผ ํฌํจํฉ๋๋ค.gcloud beta compute future-reservations list \ --filter="FILTER_EXPRESSION"
FILTER_EXPRESSION
์ ํํฐ ํํ์์ผ๋ก ๋ฐ๊ฟ๋๋ค.๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด
gcloud beta compute future-reservations describe
๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํฉ๋๋ค.gcloud beta compute future-reservations describe FUTURE_RESERVATION_NAME \ --zone=ZONE
๋ค์์ ๋ฐ๊ฟ๋๋ค.
FUTURE_RESERVATION_NAME
: ๊ธฐ์กด ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ด๋ฆ์ ๋๋ค.ZONE
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ด ์๋ ์์ญ์ ๋๋ค.
์ถ๋ ฅ์ ๋ค์ ์์์ ๋น์ทํฉ๋๋ค.
autoCreatedReservationsDeleteTime: '2025-05-02T01:00:00Z' creationTimestamp: '2025-03-23T10:08:31.613-07:00' id: '5212276518668495076' kind: compute#futureReservation name: fr-01 planningStatus: SUBMITTED selfLink: https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-a/futureReservations/fr-01 selfLinkWithId: https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-a/futureReservations/5212276518668495076 shareSettings: shareType: LOCAL specificSkuProperties: instanceProperties: machineType: n1-standard-64 totalCount: '800' status: existingMatchingUsageInfo: count: '3' timestamp: '2025-03-30T01:00:00Z' lockTime: '2025-03-30T17:09:59.297799Z' procurementStatus: APPROVED timeWindow: endTime: '2025-05-02T01:00:00Z' startTime: '2025-04-30T17:30:00Z' zone: https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-a
REST
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด ๋ฒ ํ
futureReservations.list
๋ฉ์๋์ ๋ํดGET
์์ฒญ์ ์ํํฉ๋๋ค.GET https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/futureReservations
๋ค์์ ๋ฐ๊ฟ๋๋ค.
PROJECT_ID
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ง๋ ํ๋ก์ ํธ์ ID์ ๋๋ค.ZONE
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ด ์๋ ์์ญ์ ๋๋ค.
์ถ๋ ฅ์ ๋ค์ ์์์ ๋น์ทํฉ๋๋ค.
{ "id": "projects/my-project/zones/us-east1-a/futureReservations", "items": [ { "id": "743865190848184978", "creationTimestamp": "2025-03-23T18:16:45.274-07:00", "selfLink": "https://www.googleapis.com/compute/beta/projects/my-project/zones/us-east1-a/futureReservations/fr-base", "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/my-project/zones/us-east1-a/futureReservations/743865190848184978", "zone": "https://www.googleapis.com/compute/beta/projects/my-project/zones/us-east1-a", "name": "fr-base", "specificSkuProperties": { "instanceProperties": { "machineType": "n1-standard-1" }, "totalCount": "100" }, "planningStatus": "SUBMITTED", "timeWindow": { "endTime": "2025-05-02T01:00:00Z", "startTime": "2025-04-30T17:30:00Z" }, "status": { "procurementStatus": "FULFILLED", "lockTime": "2025-03-30T07:00:00Z", "existingMatchingUsageInfo": { "count": "3", "timestamp": "2025-03-30T01:00:00Z" } }, "kind": "compute#futureReservation" }, ... ], "selfLink": "https://www.googleapis.com/compute/beta/projects/my-project/zones/us-east1-a/futureReservations", "etag": "AnzKY34l-cvvV-JnniESJ0dtQvQ=/hvc4jaHpxFAZmOt1FVtKNgzZu-M=", "kind": "compute#futureReservationsListResponse" }
์ ํ์ ์ผ๋ก ํํฐ ํํ์์ ์ฌ์ฉํ์ฌ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ ๋ชฉ๋ก์ ๋ฏธ์ธ ์กฐ์ ํ๋ ค๋ฉด
filter
์ฟผ๋ฆฌ ํ๋ผ๋ฏธํฐ๋ฅผ ํฌํจํฉ๋๋ค.GET https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/aggregated/futureReservations?filter=FILTER_EXPRESSION
FILTER_EXPRESSION
์ URL ์ธ์ฝ๋ฉ ๊ฐ์ ์ฌ์ฉํ๋ ํํฐ ํํ์์ผ๋ก ๋ฐ๊ฟ๋๋ค.๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด ๋ฒ ํ
futureReservations.get
๋ฉ์๋์GET
์์ฒญ์ ์ํํฉ๋๋ค.GET https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/futureReservations/FUTURE_RESERVATION_NAME
๋ค์์ ๋ฐ๊ฟ๋๋ค.
PROJECT_ID
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ง๋ ํ๋ก์ ํธ์ ID์ ๋๋ค.ZONE
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ด ์๋ ์์ญ์ ๋๋ค.FUTURE_RESERVATION_NAME
: ๊ธฐ์กด ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ด๋ฆ์ ๋๋ค.
์ถ๋ ฅ์ ๋ค์๊ณผ ๋น์ทํฉ๋๋ค.
{ "autoCreatedReservationsDeleteTime": "2025-05-02T01:00:00Z", "creationTimestamp": "2025-03-23T10:08:31.613-07:00", "id": "5212276518668495076", "kind": "compute#futureReservation", "name": "fr-01", "planningStatus": "SUBMITTED", "selfLink": "https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-a/futureReservations/fr-01", "selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-a/futureReservations/5212276518668495076", "shareSettings": { "shareType": "LOCAL" }, "specificSkuProperties": { "instanceProperties": { "machineType": "n1-standard-64" }, "totalCount": "800" }, "status": { "lockTime": "2025-03-30T17:09:59.297799Z", "procurementStatus": "APPROVED", "existingMatchingUsageInfo": { "count": "3", "timestamp": "2025-03-30T01:00:00Z" } }, "timeWindow": { "endTime": "2025-05-02T01:00:00Z", "startTime": "2025-04-30T17:30:00Z" }, "zone": "https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-a" }
์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค ์ ๊ฒฐ์
์์ฝ๋ ์ฉ๋์ ์๋นํ ์ ์๋ ์ปดํจํ ์ธ์คํด์ค ์๋ฅผ ๊ฒฐ์ ํ๋ ค๋ฉด ๋ค์ ์ค ํ๋๋ฅผ ์ํํฉ๋๋ค.
์์ฝ์ ์๋นํ ์ ์๋ ์ต๋ ์ธ์คํด์ค ์๋ฅผ ๋ณด๋ ค๋ฉด ์์ฝ์์ ์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค๋ฅผ ์ฐธ์กฐํ์ธ์.
Compute Engine์ด ์์ฒญ ์์ ์๊ฐ์ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ํด ์์ฝํ๋๋ก ์ค์ ๋ ์ธ์คํด์ค ์๋ฅผ ๋ณด๋ ค๋ฉด ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค๋ฅผ ์ฐธ์กฐํ์ธ์.
Compute Engine์ด ์์ฒญ ์์ ์๊ฐ์ ์บ๋ฆฐ๋ ๋ชจ๋์ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ํด ์์ฝํ๋๋ก ์ค์ ๋ ์ธ์คํด์ค ์๋ฅผ ๋ณด๋ ค๋ฉด ์บ๋ฆฐ๋ ๋ชจ๋์ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค๋ฅผ ์ฐธ์กฐํ์ธ์.
์์ฝ์ ์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค
์์ฝ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณผ ๋๋ ๋ค์ ํ๋๋ฅผ ํ์ธํ์ฌ ์์ฝ์ ์๋น ์ค์ธ ์ปดํจํ ์ธ์คํด์ค ์, ์์ฝ์ ์๋นํ ์ ์๋ ์ธ์คํด์ค ์๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
๋ณด์ฅ๋ ์(
assuredCount
): ์์ฝ ์์ญ ๋ด์ ๋ฌผ๋ฆฌ์ ์ผ๋ก ์์ฝ๋ ์ธ์คํด์ค ์์ ๋๋ค. ์ด ์ซ์์๋ ์ฌ์ฉ์์ ํ๋ก์ ํธ ๊ทธ๋ฆฌ๊ณ ๊ณต์ ์์ฝ์ด ๊ณต์ ๋ ๋ชจ๋ ํ๋ก์ ํธ์ ๋ํด ์์ฝ๋ ์ธ์คํด์ค๊ฐ ํฌํจ๋ฉ๋๋ค.์ด ๊ฐ์(
count
): ์์ฝ์ ์ง์ ๋ ์์ฝ๋ ์ธ์คํด์ค ์์ ๋๋ค. ์ด ์ซ์๋ ๋ณด์ฅ๋ ์์ ์ผ์นํด์ผ ํฉ๋๋ค.์ฌ์ฉ ์ค์ธ ๋จธ์ (
inUseCount
): ์ฌ์ฉ์์ ํ๋ก์ ํธ ๋๋ ๊ณต์ ์์ฝ์ด ๊ณต์ ๋ ํ๋ก์ ํธ์์ ์์ฝ์ ์๋น ์ค์ด๊ณ ์คํ ์ค์ธ ์ธ์คํด์ค ์์ ๋๋ค.
์๋ฅผ ๋ค์ด ๋ณด์ฅ๋ ์(assuredCount
)์ ์ด ๊ฐ์(count
)๊ฐ ๋ชจ๋ 50์ด๊ณ , ์์ฝ์ ์๋น ์ค์ธ ์ธ์คํด์ค ์(inUseCount
)๊ฐ 25๋ฉด, ๋๋จธ์ง 25๊ฐ์ ์ธ์คํด์ค๊ฐ ์์ฝ์ ๋ ์๋นํ ์ ์์ผ๋ฉฐ, ๊ทธ๋ฐ ๋ค์์ ์์ฝ์ด ์์ ํ ์๋น๋ฉ๋๋ค.
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์์ํ ๋ Compute Engine์ด ์์ฝ์ ๋ง๋๋ ์ปดํจํ ์ธ์คํด์ค ์๋ฅผ ๊ฒฐ์ ํ ์ ์์ต๋๋ค. ์ด์, ๋๊ธฐ ์ค์ธ ์น์ธ, ์น์ธ๋ ์์ฒญ์ ๊ฒฝ์ฐ ์ด ์ซ์๋ฅผ ๋ค์๊ณผ ๊ฐ์ด ๊ฒฐ์ ํ ์ ์์ต๋๋ค.
์ฌ์ฉ์์ ํ๋ก์ ํธ ๊ทธ๋ฆฌ๊ณ ์์ฒญ์ด ๊ณต์ ๋์๊ณ ์์ฒญ ์์ฑ๊ณผ ์ผ์นํ๋ ํ๋ก์ ํธ์์ ์คํ ์ค์ธ ์ธ์คํด์ค์ ์ฌ์ฉ๋์ง ์์ ์์ฝ ์๋ฅผ ํ์ธํฉ๋๋ค.
์์ฒญ์ ์ด ๊ฐ์์์ ์ผ์นํ๋ ์คํ ์ค์ธ ์ธ์คํด์ค ๋ฐ ์ฌ์ฉ๋์ง ์์ ์์ฝ ์๋ฅผ ๋บ๋๋ค.
๋จ์ผ ๋๋ ์ฌ๋ฌ ์์ฒญ์ ๋ํด ํ ๋ฒ์ ์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค ์๋ฅผ ํ์ธํ ์ ์์ต๋๋ค. ์ฌ๋ฌ ์์ฒญ์ ๊ฒฝ์ฐ Google Cloud ์ฝ์ ๋๋ REST API๋ฅผ ์ฌ์ฉํฉ๋๋ค. ๋จ์ผ ์์ฒญ์ ๊ฒฝ์ฐ ๋ค์ ์ต์ ์ ์ ํํฉ๋๋ค.
์ฝ์
Google Cloud ์ฝ์์์ ์์ฝ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
๋ฏธ๋์ฉ ์์ฝ ํญ์ ํด๋ฆญํฉ๋๋ค.
ํ์ ๊ฐ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ด ๋์ด๋๊ณ ๊ฐ ํ ์ด๋ธ ์ด์ ์์ฑ ์ค๋ช ์ด ํ์๋ฉ๋๋ค.
Compute Engine์ด ์์ ์ ์์ฒญ์ ๋ํด ์์ฝํ๋ ค๋ ์ธ์คํด์ค ์๋ฅผ ๊ฒฐ์ ํ๋ ค๋ฉด ์ด ๊ฐ์ ์ด์์ ์ผ์น ๊ฐ์ ์ด์ ๋บ๋๋ค.
์ผ์น ๊ฐ์ ์ด์ ๋ค์ ๊ฒฝ๊ณ ์ค ํ๋๊ฐ ํ์๋ฉ๋๋ค.
์ผ์น ๊ฐ์๊ฐ 0์: ์ฌ์ฉ์์ ํ๋ก์ ํธ ๋๋ ์์ฒญ์ด ๊ณต์ ๋ ํ๋ก์ ํธ์์ ์ผ์นํ๋ ์คํ ์ค์ธ ์ธ์คํด์ค ๋๋ ์ฌ์ฉ๋์ง ์์ ์์ฝ์ด ์์ต๋๋ค.
์ผ์น ๊ฐ์๊ฐ ์ด ๊ฐ์์ ๊ฐ์: Compute Engine์ด ์์ ์ ์์ฒญ์ ๋ํด ์ธ์คํด์ค๋ฅผ ์์ฝํ์ง ์์ต๋๋ค.
์์ฒญ์ ์์ ํ๊ฑฐ๋ ์์ฒญ๊ณผ ์ผ์นํ๋ ์ ์ธ์คํด์ค ๋๋ ์์ฝ์ ๋ง๋ค๋ฉด Compute Engine์ด 30๋ถ ๋ด์ ์ผ์น ๊ฐ์ ์ด์ ์ ๋ฐ์ดํธํฉ๋๋ค.
์ ํ์ฌํญ: ์์ฒญ์์ ์ผ์น ๊ฐ์ ์ด์ด ๋ง์ง๋ง์ผ๋ก ์ ๋ฐ์ดํธ๋ ์๊ฐ์ ํ์ธํ๋ ค๋ฉด ๋ค์์ ์ํํฉ๋๋ค.
์ด๋ฆ ์ด์์ ์์ฒญ์ ์ด๋ฆ์ ํด๋ฆญํฉ๋๋ค. ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ํ ์ธ๋ถ์ ๋ณด๊ฐ ํฌํจ๋ ํ์ด์ง๊ฐ ์ด๋ฆฝ๋๋ค.
๋ฆฌ์์ค ์ธ๋ถ์ ๋ณด ์น์ ์์ ๋ง์ง๋ง ์ผ์น ์ฌ์ฉ๋ ํ๊ฐ ์๊ฐ ํ๋๋ฅผ ํ์ธํฉ๋๋ค.
gcloud
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณด๋ ค๋ฉด
gcloud beta compute future-reservations describe
๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํฉ๋๋ค.gcloud beta compute future-reservations describe FUTURE_RESERVATION_NAME \ --zone=ZONE
๋ค์์ ๋ฐ๊ฟ๋๋ค.
FUTURE_RESERVATION_NAME
: ๊ธฐ์กด ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ด๋ฆ์ ๋๋ค.ZONE
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ด ์๋ ์์ญ์ ๋๋ค.
์ถ๋ ฅ์์
count
๋ฐtotalCount
ํ๋๋ฅผ ์ฐพ์ต๋๋ค.... specificSkuProperties: ... totalCount: '100' status: existingMatchingUsageInfo: count: '50' timestamp: '2025-03-30T01:00:00Z' ... procurementStatus: DRAFTING ...
totalCount
์์count
์ ๊ฐ์ ๋บ๋๋ค. ์๋ฅผ ๋ค์ดcount
๊ฐ 50์ด๊ณtotalCount
๊ฐ 100์ด๋ฉด Compute Engine์ด ์์ฒญ ์์ ์์ 50๊ฐ ์ธ์คํด์ค์ ๋ํด ์๋์ผ๋ก ์์ฝ์ ๋ง๋ญ๋๋ค.์์ฒญ์ ์์ ํ๊ฑฐ๋ ์์ฒญ๊ณผ ์ผ์นํ๋ ์ ์ธ์คํด์ค ๋๋ ์์ฝ์ ๋ง๋ค๋ฉด Compute Engine์ด 30๋ถ ๋ด์
existingMatchingUsageInfo
ํ๋๋ฅผ ์ ๋ฐ์ดํธํฉ๋๋ค. ์ด ํ๋๊ฐ ๋ง์ง๋ง์ผ๋ก ์ ๋ฐ์ดํธ๋ ์์ ์ ํ์ธํ๋ ค๋ฉดexistingMatchingUsageInfo.timestamp
์ ๊ฐ์ ํ์ธํฉ๋๋ค.
REST
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด ๋ฒ ํ
futureReservations.list
๋ฉ์๋์ ๋ํดGET
์์ฒญ์ ์ํํฉ๋๋ค. ์์ฒญ URL์์filter
์ฟผ๋ฆฌ ํ๋ผ๋ฏธํฐ๋ฅผ ํฌํจํ๊ณname
,specificSkuProperties
,status
ํ๋๋ง ํ์ํ๋๋ก ์ง์ ํฉ๋๋ค.GET https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/futureReservations?fields=items.name,items.specificSkuProperties,items.status
๋ค์์ ๋ฐ๊ฟ๋๋ค.
PROJECT_ID
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ๋ง๋ ํ๋ก์ ํธ์ ID์ ๋๋ค.ZONE
: ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ด ์๋ ์์ญ์ ๋๋ค.
์ถ๋ ฅ์์ ๊ฐ ์ด์, ๋๊ธฐ ์ค์ธ ์น์ธ, ์น์ธ๋ ์์ฒญ์ ๋ํด
count
๋ฐtotalCount
ํ๋๋ฅผ ์ฐพ์ต๋๋ค.{ "items": [ { "specificSkuProperties": { ... totalCount: "100" }, "name": "fr-01", "status": { "procurementStatus": "APPROVED", ... existingMatchingUsageInfo: { count: "50", "timestamp": "2025-01-22T07:54:26.295Z" } } }, { "specificSkuProperties": { ... totalCount: "20" }, "name": "fr-02", "status": { "procurementStatus": "DRAFTING", ... existingMatchingUsageInfo: { "count": "2", "timestamp": "2025-01-22T07:54:26.295Z" } } } ] }
๊ฐ ์์ฒญ์ ๋ํด
totalCount
์์count
์ ๊ฐ์ ๋บ๋๋ค. ์๋ฅผ ๋ค์ดcount
๊ฐ 50์ด๊ณtotalCount
๊ฐ 100์ด๋ฉด Compute Engine์ด ์์ฒญ ์์ ์์ 50๊ฐ ์ธ์คํด์ค์ ๋ํด ์๋์ผ๋ก ์์ฝ์ ๋ง๋ญ๋๋ค.์์ฒญ์ ์์ ํ๊ฑฐ๋ ์์ฒญ๊ณผ ์ผ์นํ๋ ์ ์ธ์คํด์ค ๋๋ ์์ฝ์ ๋ง๋ค๋ฉด Compute Engine์ด 30๋ถ ๋ด์
existingMatchingUsageInfo
ํ๋๋ฅผ ์ ๋ฐ์ดํธํฉ๋๋ค. ์ด ํ๋๊ฐ ๋ง์ง๋ง์ผ๋ก ์ ๋ฐ์ดํธ๋ ์์ ์ ํ์ธํ๋ ค๋ฉดexistingMatchingUsageInfo.timestamp
์ ๊ฐ์ ํ์ธํฉ๋๋ค.
์บ๋ฆฐ๋ ๋ชจ๋์ ๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์๋น ๊ฐ๋ฅํ ์ธ์คํด์ค
๋ฏธ๋์ฉ ์์ฝ ์์ฒญ์ ์ธ๋ถ์ ๋ณด๋ฅผ ๋ณผ ๋ Compute Engine์ด ์์ฒญ ์์ ์๊ฐ์ ํ๋ก๋น์ ๋ํ ์ปดํจํ ์ธ์คํด์ค ์๋ฅผ ํ์ธํ ์ ์์ต๋๋ค. Compute Engine์ ํ๋ก์ ํธ ๋๋ ์์ฒญ์ด ๊ณต์ ๋ ํ๋ก์ ํธ์์ ์ผ์นํ๋ ์ธ์คํด์ค ์์ ๊ด๊ณ์์ด ์์ฒญ์ ์ง์ ๋ ์ธ์คํด์ค ์๋ฅผ ๋ง๋ญ๋๋ค.
๋ค์ ๋จ๊ณ
์์ฝ์ ์ฝ์ ์ ์ฐ๊ฒฐํ๋ ๋ฐฉ๋ฒ ์์๋ณด๊ธฐ
์์ฝ ์ฌ์ฉ ๋ฐฉ๋ฒ ์์๋ณด๊ธฐ
์์ฝ ์์ ๋ฐฉ๋ฒ ์์๋ณด๊ธฐ
์์ฝ ์ญ์ ๋ฐฉ๋ฒ ์์๋ณด๊ธฐ