BillingPlan
Overview
SCP에서 제공하는 BillingPlan 서비스를 프로그램적으로 이용할 수 있도록 지원하는 응용 프로그램 인터페이스(Application Programming Interface, API)를 제공합니다.
본 가이드는 BillingPlan 서비스에 대한 간략한 설명 및 API를 호출하는 방법을 제공합니다.
API는 RESTful API 방식으로 제공되며, JSON 형식으로 응답합니다.
Version
| Version | Status | Supported Until |
|---|
| 1.0 | CURRENT | - |
OpenAPI URL
https://billingplan.{environment}.samsungsdscloud.com
Environment and Region List
| environment | region |
|---|
| s | kr-west1 |
| s | kr-east1 |
| g | kr-south1 |
| g | kr-south2 |
| g | kr-south3 |
| e | kr-west1 |
| e | kr-east1 |
1.1.1 - 1.0
put /v1/planned-computes/{planned_compute_id}
Description
Change action request planned compute.
상태
ACTIVE (CURRENT)
Parameters
| Type | Name | Description | Schema | Default |
|---|
| path | planned_compute_id required | Planned Compute Id Example : 5f3688a192094ddeb0c94166a3e88935
| string | None |
| body | body required |
| PlannedComputeChangeRequest | |
Responses
Example HTTP request
Request path
/v1/planned-computes/{planned_compute_id}
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Request body
{
"action": "EXTEND_CHANGE",
"contract_type": "01",
"server_type": "s1v1m2"
}
Example HTTP response
Response 200
{
"planned_compute": {
"start_date": "2024-08-01",
"end_date": "2024-08-01",
"id": "5f3688a192094ddeb0c94166a3e88935",
"contract_id": "C002612775",
"account_id": "228cb9e4a7934f84853594c7f26f7a21",
"region": "kr-west1",
"service_id": "VIRTUAL_SERVER",
"service_name": "Virtual Server",
"os_type": "OPEN_SOURCE",
"os_name": "Open Source",
"server_type": "s1v1m2",
"server_type_description": "",
"srn": "srn:e::26affb52e16944038a0cd2cc26060e1c:kr1-west1::compute:instance/INSTANCE-UPOg3Z6ZqyiMM0QyC3sI2m",
"resource_type": "instance",
"contract_type": "1-year",
"next_contract_type": "1-year",
"first_contract_start_at": "2024-08-01",
"next_start_date": "2024-08-01",
"next_end_date": "2024-08-31",
"state": "ACTIVE",
"delete_yn": "N",
"resource_name": "test-vm",
"created_at": "2024-08-01 00:00:00",
"created_by": "user123",
"modified_at": "2024-08-01 00:00:00",
"modified_by": "kim"
}
}
1.2.1 - 1.0
post /v1/planned-computes
Description
Create request planned compute.
상태
ACTIVE (CURRENT)
Parameters
Responses
Example HTTP request
Request path
/v1/planned-computes
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Request body
{
"service_id": "VIRTUAL_SERVER",
"service_name": "Virtual Server",
"server_type": "s1v1m2",
"os_type": "OPEN_SOURCE",
"contract_type": "01",
"tag": [
{
"key": "key1",
"value": "value1"
}
]
}
Example HTTP response
Response 200
{
"planned_compute": {
"start_date": "2024-08-01",
"end_date": "2024-08-01",
"id": "5f3688a192094ddeb0c94166a3e88935",
"contract_id": "C002612775",
"account_id": "228cb9e4a7934f84853594c7f26f7a21",
"region": "kr-west1",
"service_id": "VIRTUAL_SERVER",
"service_name": "Virtual Server",
"os_type": "OPEN_SOURCE",
"os_name": "Open Source",
"server_type": "s1v1m2",
"server_type_description": "",
"srn": "srn:e::26affb52e16944038a0cd2cc26060e1c:kr1-west1::compute:instance/INSTANCE-UPOg3Z6ZqyiMM0QyC3sI2m",
"resource_type": "instance",
"contract_type": "1-year",
"next_contract_type": "1-year",
"first_contract_start_at": "2024-08-01",
"next_start_date": "2024-08-01",
"next_end_date": "2024-08-31",
"state": "ACTIVE",
"delete_yn": "N",
"resource_name": "test-vm",
"created_at": "2024-08-01 00:00:00",
"created_by": "user123",
"modified_at": "2024-08-01 00:00:00",
"modified_by": "kim"
}
}
1.3.1 - 1.0
get /v1/planned-computes/{planned_compute_id}
Description
Get planned compute.
상태
ACTIVE (CURRENT)
Parameters
| Type | Name | Description | Schema | Default |
|---|
| path | planned_compute_id required | Planned Compute Id Example : 5f3688a192094ddeb0c94166a3e88935
| string | None |
Responses
Example HTTP request
Request path
/v1/planned-computes/{planned_compute_id}
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Example HTTP response
Response 200
{
"planned_compute": {
"start_date": "2024-08-01",
"end_date": "2024-08-01",
"id": "5f3688a192094ddeb0c94166a3e88935",
"contract_id": "C002612775",
"account_id": "228cb9e4a7934f84853594c7f26f7a21",
"region": "kr-west1",
"service_id": "VIRTUAL_SERVER",
"service_name": "Virtual Server",
"os_type": "OPEN_SOURCE",
"os_name": "Open Source",
"server_type": "s1v1m2",
"server_type_description": "",
"srn": "srn:e::26affb52e16944038a0cd2cc26060e1c:kr1-west1::compute:instance/INSTANCE-UPOg3Z6ZqyiMM0QyC3sI2m",
"resource_type": "instance",
"contract_type": "1-year",
"next_contract_type": "1-year",
"first_contract_start_at": "2024-08-01",
"next_start_date": "2024-08-01",
"next_end_date": "2024-08-31",
"state": "ACTIVE",
"delete_yn": "N",
"resource_name": "test-vm",
"created_at": "2024-08-01 00:00:00",
"created_by": "user123",
"modified_at": "2024-08-01 00:00:00",
"modified_by": "kim"
}
}
1.4.1 - 1.0
post /v1/planned-computes/cancellation-fee
Description
Get Cancellation Fee
상태
ACTIVE (CURRENT)
Parameters
Responses
Example HTTP request
Request path
/v1/planned-computes/cancellation-fee
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Request body
{
"region": "kr-west1",
"planned_compute_id": "5f3688a192094ddeb0c94166a3e88935"
}
Example HTTP response
Response 200
{
"bill_year_month": "2022-10",
"cancellation_fee": 100000,
"currency": {
"code": "KRW",
"symbol": "₩"
}
}
1.5.1 - 1.0
get /v1/planned-computes/contract-types
Description
Get Contract Type List.
상태
ACTIVE (CURRENT)
Parameters
| Type | Name | Description | Schema | Default |
|---|
| query | service_id optional | Service Id Example : VIRTUAL_SERVER
| string | None |
| query | server_type optional | Server Type Example : s1v1m2
| string | None |
Responses
Example HTTP request
Request path
/v1/planned-computes/contract-types
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Example HTTP response
Response 200
{
"contract_types": [
{
"code": "01",
"display_name": "1-year"
}
],
"extension_types": [
{
"code": "01",
"display_name": "1-year"
}
]
}
1.6.1 - 1.0
get /v1/planned-computes/os-types
Description
Get Os System List.
상태
ACTIVE (CURRENT)
Parameters
| Type | Name | Description | Schema | Default |
|---|
| query | service_id optional | Service Id Example : VIRTUAL_SERVER
| string | None |
Responses
Example HTTP request
Request path
/v1/planned-computes/os-types
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Example HTTP response
Response 200
{
"os_types": [
{
"os_type_id": "OPEN_SOURCE",
"display_name": "Open Source",
"os_type_value": "opensource"
}
]
}
1.7.1 - 1.0
get /v1/planned-computes/instances
Description
Get Planned Compute Covered Resource List.
상태
ACTIVE (CURRENT)
Parameters
| Type | Name | Description | Schema | Default |
|---|
| query | service_id required | Service Id Example : VIRTUAL_SERVER
| string | None |
| query | os_type required | OS Type Example : OPEN_SOURCE
| string | None |
| query | server_type required | Server Type Example : s1v1m2
| string | None |
| query | start_date required | Start date (YYYY-MM-dd) Example : 2024-08-01
| string | None |
| query | end_date required | End date (YYYY-MM-dd) Example : 2024-08-01
| string | None |
Responses
Example HTTP request
Request path
/v1/planned-computes/instances?service_id={service_id}&os_type={os_type}&server_type={server_type}&start_date={start_date}&end_date={end_date}
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Example HTTP response
Response 200
{
"service": {
"service_id": "VIRTUAL_SERVER",
"display_name": "Virtual Server"
},
"server_type": "s1v1m2",
"server_type_description": "",
"os": "OPEN_SOURCE",
"order_count": "0",
"amount": {
"no_contract_used": 0,
"used": 0,
"non_applied": 0,
"total": 0
},
"coverages": [
{
"resource_name": "test-vm",
"contract_id": "C002612775",
"used_time": "10",
"unit_price": {
"krw": "0.000",
"usd": "0.00"
},
"used_amount": {
"krw": "0.000",
"usd": "0.00"
},
"non_applied_amount": {
"krw": "0.000",
"usd": "0.00"
},
"request_at": "2024-08-01 00:00:00"
}
]
}
1.8.1 - 1.0
get /v1/planned-computes
Description
Get planned compute list.
상태
ACTIVE (CURRENT)
Parameters
| Type | Name | Description | Schema | Default |
|---|
| query | limit optional | LIMIT Example : 10
| integer | None |
| query | page optional | Page Example : 1
| integer | None |
| query | start_date optional | Start date (YYYY-MM-dd) Example : 2024-08-01
| string | None |
| query | end_date optional | End date (YYYY-MM-dd) Example : 2024-08-01
| string | None |
| query | server_type optional | Server Type Example : s1v1m2
| any of [string, null] | None |
| query | contract_id optional | Contract Id Example : C002612775
| any of [string, null] | None |
| query | contract_type optional | Contract Type Example : 01
| array[string] | None |
| query | next_contract_type optional | Next Contract Type Example : 01
| array[string] | None |
| query | service_id optional | Service Id Example : VIRTUAL_SERVER
| array[string] | None |
| query | os_type optional | OS Type Example : OPEN_SOURCE
| array[string] | None |
| query | state optional | Planned Compute State Example : ACTIVE
| array[string] | None |
| query | created_by optional | Created by Example : user123
| string | None |
| query | modified_by optional | Modified by Example : kim
| string | None |
| query | sort optional | Sort Example : created_by:asc
| any of [string, null] | None |
Responses
Example HTTP request
Request path
/v1/planned-computes
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Example HTTP response
Response 200
{
"planned_computes": [
{
"start_date": "2024-08-01",
"end_date": "2024-08-01",
"id": "5f3688a192094ddeb0c94166a3e88935",
"contract_id": "C002612775",
"account_id": "228cb9e4a7934f84853594c7f26f7a21",
"region": "kr-west1",
"service_id": "VIRTUAL_SERVER",
"service_name": "Virtual Server",
"os_type": "OPEN_SOURCE",
"os_name": "Open Source",
"server_type": "s1v1m2",
"server_type_description": "",
"srn": "srn:e::26affb52e16944038a0cd2cc26060e1c:kr1-west1::compute:instance/INSTANCE-UPOg3Z6ZqyiMM0QyC3sI2m",
"resource_type": "instance",
"contract_type": "1-year",
"next_contract_type": "1-year",
"first_contract_start_at": "2024-08-01",
"next_start_date": "2024-08-01",
"next_end_date": "2024-08-31",
"state": "ACTIVE",
"delete_yn": "N",
"resource_name": "test-vm",
"created_at": "2024-08-01 00:00:00",
"created_by": "user123",
"modified_at": "2024-08-01 00:00:00",
"modified_by": "kim"
}
],
"total_pages": "0",
"total_count": "0",
"current_page": "0"
}
1.9.1 - 1.0
get /v1/planned-computes/server-types
Description
Get Server Type List
상태
ACTIVE (CURRENT)
Parameters
| Type | Name | Description | Schema | Default |
|---|
| query | service_id optional | Service Id Example : VIRTUAL_SERVER
| string | None |
| query | current_server_type optional | Server Type Example : s1v1m2
| any of [string, null] | None |
| query | os_type optional | OS Type Example : OPEN_SOURCE
| any of [string, null] | None |
Responses
Example HTTP request
Request path
/v1/planned-computes/server-types
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Example HTTP response
Response 200
{
"server_types": [
{
"server_type": "s1v1m2",
"server_type_description": "",
"instance_type": "s1",
"core": "1",
"memory_gb": "2",
"gpu_name": "a100",
"scale_up_yn": "Y"
}
]
}
1.10.1 - 1.0
get /v1/planned-computes/service-types
Description
Get Service Type List
상태
ACTIVE (CURRENT)
Responses
Example HTTP request
Request path
/v1/planned-computes/service-types
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = billingplan 1.0"
Example HTTP response
Response 200
{
"services": [
{
"service_id": "VIRTUAL_SERVER",
"display_name": "Virtual Server"
}
]
}