Budget

Budget #

A Budget is a planned amount of cost expenditure for reduction and prediction of infrastructure costs.

Package : spaceone.api.cost_analysis.v1



Budget #

Budget Methods:

MethodRequestResponse
createCreateBudgetRequestBudgetInfo
updateUpdateBudgetRequestBudgetInfo
set_notificationSetBudgetNotificationRequestBudgetInfo
deleteBudgetRequestEmpty
getBudgetRequestBudgetInfo
listBudgetQueryBudgetsInfo
statBudgetStatQueryStruct

create #

Creates a new Budget. When creating a Budget, it should be set for a specific ProjectGroup or Project. The budgeted amount and date of the planned_limits should be specified on a monthly or yearly basis.

POST /cost-analysis/v1/budget/create

CreateBudgetRequest

  • data_source_id (string) Required

  • time_unit (TimeUnit) Required

  • start (string) Required

  • end (string) Required

  • resource_group (ResourceGroup) Required

  • name (string)

  • limit (float)

  • planned_limits (PlannedLimit) Repeated

  • provider_filter (ProviderFilter)

  • notifications (BudgetNotification) Repeated

  • tags (Struct)

  • workspace_id (string)

  • project_id (string)

{
   "name": "Cloudforet-Budget",
   "planned_limits": [{"date": "2022-01", "limit": 1000.0},
                      {"date": "2022-02", "limit": 1100.0},
                      {"date": "2022-03", "limit": 1200.0},
                      {"date": "2022-04", "limit": 1300.0},
                      {"date": "2022-05", "limit": 1400.0},
                      {"date": "2022-06", "limit": 1500.0},
                      {"date": "2022-07", "limit": 1600.0},
                      {"date": "2022-08", "limit": 1700.0},
                      {"date": "2022-09", "limit": 1800.0},
                      {"date": "2022-10", "limit": 1900.0},
                      {"date": "2022-11", "limit": 2000.0},
                      {"date": "2022-12", "limit": 2100.0}],
   "time_unit": "MONTHLY",
   "start": "2022-01",
   "end": "2022-12",
   "project_group_id": "pg-812c90990877",
   "data_source_id": "ds-fcba92ca73b1"
}

BudgetInfo

  • budget_id (string) Required

  • name (string) Required

  • limit (float) Required

  • planned_limits (PlannedLimit) Repeated Required

  • currency (string) Required

  • provider_filter (ProviderFilter) Required

  • time_unit (TimeUnit) Required

  • start (string) Required

  • end (string) Required

  • notifications (BudgetNotification) Repeated Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • data_source_id (string) Required

  • created_at (string) Required

  • updated_at (string) Required

{
       "budget_id": "budget-d51b6b6a9910",
       "name": "Cloudforet-Budget",
       "limit": 18600.0,
       "planned_limits": [
           {
               "date": "2022-01",
               "limit": 1000.0
           },
           {
               "date": "2022-02",
               "limit": 1100.0
           },
           {
               "date": "2022-03",
               "limit": 1200.0
           },
           {
               "date": "2022-04",
               "limit": 1300.0
           },
           {
               "date": "2022-05",
               "limit": 1400.0
           },
           {
               "date": "2022-06",
               "limit": 1500.0
           },
           {
               "date": "2022-07",
               "limit": 1600.0
           },
           {
               "date": "2022-08",
               "limit": 1700.0
           },
           {
               "date": "2022-09",
               "limit": 1800.0
           },
           {
               "date": "2022-10",
               "limit": 1900.0
           },
           {
               "date": "2022-11",
               "limit": 2000.0
           },
           {
               "date": "2022-12",
               "limit": 2100.0
           }
       ],
       "currency": "USD",
       "provider_filter": {
           "state": "ENABLED",
           "providers": [
               "aws",
               "google_cloud"
           ]
       },
       "time_unit": "MONTHLY",
       "start": "2022-01",
       "end": "2022-12",
       "tags": {},
       "project_group_id": "pg-812c90990877",
       "data_source_id": "ds-fcba92ca73b1",
       "domain_id": "domain-58010aa2e451",
       "created_at": "2022-07-18T09:30:56.901Z",
       "updated_at": "2022-07-18T09:30:56.901Z"
}

update #

Updates a specific Budget. You can make changes in the budgeted amount of the time period specified while creating the resource.

POST /cost-analysis/v1/budget/update

UpdateBudgetRequest

  • budget_id (string) Required

  • name (string)

  • limit (float)

  • planned_limits (PlannedLimit) Repeated

  • tags (Struct)

{
   "budget_id": "budget-d51b6b6a9910",
   "name": "Cloudforet-Budget-test", "limit": 15000.0,
   "planned_limits": [{"date": "2022-01", "limit": 500.0},
                      {"date": "2022-02", "limit": 500.0},
                      {"date": "2022-03", "limit": 500.0},
                      {"date": "2022-04", "limit": 500.0},
                      {"date": "2022-05", "limit": 500.0},
                      {"date": "2022-06", "limit": 500.0},
                      {"date": "2022-07", "limit": 500.0},
                      {"date": "2022-08", "limit": 500.0},
                      {"date": "2022-09", "limit": 500.0}],
   "end": "2022-12",
   "tags": {}
}

BudgetInfo

  • budget_id (string) Required

  • name (string) Required

  • limit (float) Required

  • planned_limits (PlannedLimit) Repeated Required

  • currency (string) Required

  • provider_filter (ProviderFilter) Required

  • time_unit (TimeUnit) Required

  • start (string) Required

  • end (string) Required

  • notifications (BudgetNotification) Repeated Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • data_source_id (string) Required

  • created_at (string) Required

  • updated_at (string) Required

{
       "budget_id": "budget-d51b6b6a9910",
       "name": "Cloudforet-Budget",
       "limit": 18600.0,
       "planned_limits": [
           {
               "date": "2022-01",
               "limit": 1000.0
           },
           {
               "date": "2022-02",
               "limit": 1100.0
           },
           {
               "date": "2022-03",
               "limit": 1200.0
           },
           {
               "date": "2022-04",
               "limit": 1300.0
           },
           {
               "date": "2022-05",
               "limit": 1400.0
           },
           {
               "date": "2022-06",
               "limit": 1500.0
           },
           {
               "date": "2022-07",
               "limit": 1600.0
           },
           {
               "date": "2022-08",
               "limit": 1700.0
           },
           {
               "date": "2022-09",
               "limit": 1800.0
           },
           {
               "date": "2022-10",
               "limit": 1900.0
           },
           {
               "date": "2022-11",
               "limit": 2000.0
           },
           {
               "date": "2022-12",
               "limit": 2100.0
           }
       ],
       "currency": "USD",
       "provider_filter": {
           "state": "ENABLED",
           "providers": [
               "aws",
               "google_cloud"
           ]
       },
       "time_unit": "MONTHLY",
       "start": "2022-01",
       "end": "2022-12",
       "tags": {},
       "project_group_id": "pg-812c90990877",
       "data_source_id": "ds-fcba92ca73b1",
       "domain_id": "domain-58010aa2e451",
       "created_at": "2022-07-18T09:30:56.901Z",
       "updated_at": "2022-07-18T09:30:56.901Z"
}

set_notification #

Sets a notification on a specific Budget. Sets a threshold on the budget, and if the cost exceeds the threshold, a notification is raised.

POST /cost-analysis/v1/budget/set-notification

SetBudgetNotificationRequest

  • budget_id (string) Required

  • notifications (BudgetNotification) Repeated Required

{
   "budget_id": "budget-4c8606da4521",
   "notifications": [
       {
           "threshold": 20.0,
           "unit": "PERCENT",
           "notification_type": "CRITICAL"
       },
       {
           "threshold": 1000.0,
           "unit": "ACTUAL_COST",
           "notification_type": "WARNING"
       }
   ]
}

BudgetInfo

  • budget_id (string) Required

  • name (string) Required

  • limit (float) Required

  • planned_limits (PlannedLimit) Repeated Required

  • currency (string) Required

  • provider_filter (ProviderFilter) Required

  • time_unit (TimeUnit) Required

  • start (string) Required

  • end (string) Required

  • notifications (BudgetNotification) Repeated Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • data_source_id (string) Required

  • created_at (string) Required

  • updated_at (string) Required

{
       "budget_id": "budget-d51b6b6a9910",
       "name": "Cloudforet-Budget",
       "limit": 18600.0,
       "planned_limits": [
           {
               "date": "2022-01",
               "limit": 1000.0
           },
           {
               "date": "2022-02",
               "limit": 1100.0
           },
           {
               "date": "2022-03",
               "limit": 1200.0
           },
           {
               "date": "2022-04",
               "limit": 1300.0
           },
           {
               "date": "2022-05",
               "limit": 1400.0
           },
           {
               "date": "2022-06",
               "limit": 1500.0
           },
           {
               "date": "2022-07",
               "limit": 1600.0
           },
           {
               "date": "2022-08",
               "limit": 1700.0
           },
           {
               "date": "2022-09",
               "limit": 1800.0
           },
           {
               "date": "2022-10",
               "limit": 1900.0
           },
           {
               "date": "2022-11",
               "limit": 2000.0
           },
           {
               "date": "2022-12",
               "limit": 2100.0
           }
       ],
       "currency": "USD",
       "provider_filter": {
           "state": "ENABLED",
           "providers": [
               "aws",
               "google_cloud"
           ]
       },
       "time_unit": "MONTHLY",
       "start": "2022-01",
       "end": "2022-12",
       "tags": {},
       "project_group_id": "pg-812c90990877",
       "data_source_id": "ds-fcba92ca73b1",
       "domain_id": "domain-58010aa2e451",
       "created_at": "2022-07-18T09:30:56.901Z",
       "updated_at": "2022-07-18T09:30:56.901Z"
}

delete #

Deletes a specific Budget. You must specify the budget_id of the Budget to delete.

POST /cost-analysis/v1/budget/delete

BudgetRequest

  • budget_id (string) Required
{
   "budget_id": "budget-d51b6b6a9910"
}

get #

Gets a specific Budget. Prints detailed information about the Budget, including planned_limits of the project group or project for the pre-defined period.

POST /cost-analysis/v1/budget/get

BudgetRequest

  • budget_id (string) Required
{
   "budget_id": "budget-d51b6b6a9910"
}

BudgetInfo

  • budget_id (string) Required

  • name (string) Required

  • limit (float) Required

  • planned_limits (PlannedLimit) Repeated Required

  • currency (string) Required

  • provider_filter (ProviderFilter) Required

  • time_unit (TimeUnit) Required

  • start (string) Required

  • end (string) Required

  • notifications (BudgetNotification) Repeated Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • data_source_id (string) Required

  • created_at (string) Required

  • updated_at (string) Required

{
       "budget_id": "budget-d51b6b6a9910",
       "name": "Cloudforet-Budget",
       "limit": 18600.0,
       "planned_limits": [
           {
               "date": "2022-01",
               "limit": 1000.0
           },
           {
               "date": "2022-02",
               "limit": 1100.0
           },
           {
               "date": "2022-03",
               "limit": 1200.0
           },
           {
               "date": "2022-04",
               "limit": 1300.0
           },
           {
               "date": "2022-05",
               "limit": 1400.0
           },
           {
               "date": "2022-06",
               "limit": 1500.0
           },
           {
               "date": "2022-07",
               "limit": 1600.0
           },
           {
               "date": "2022-08",
               "limit": 1700.0
           },
           {
               "date": "2022-09",
               "limit": 1800.0
           },
           {
               "date": "2022-10",
               "limit": 1900.0
           },
           {
               "date": "2022-11",
               "limit": 2000.0
           },
           {
               "date": "2022-12",
               "limit": 2100.0
           }
       ],
       "currency": "USD",
       "provider_filter": {
           "state": "ENABLED",
           "providers": [
               "aws",
               "google_cloud"
           ]
       },
       "time_unit": "MONTHLY",
       "start": "2022-01",
       "end": "2022-12",
       "tags": {},
       "project_group_id": "pg-812c90990877",
       "data_source_id": "ds-fcba92ca73b1",
       "domain_id": "domain-58010aa2e451",
       "created_at": "2022-07-18T09:30:56.901Z",
       "updated_at": "2022-07-18T09:30:56.901Z"
}

list #

Gets a list of all Budgets. You can use a query to get a filtered list of Budgets.

POST /cost-analysis/v1/budget/list

BudgetQuery

  • query (Query)

  • budget_id (string)

  • name (string)

  • time_unit (TimeUnit)

  • workspace_id (string)

  • project_id (string)

  • data_source_id (string)

{
   "query": {}
}

BudgetsInfo

  • results (BudgetInfo) Repeated Required

  • total_count (int32) Required

{
       "results": [
           {
               "budget_id": "budget-409e33836ea2",
               "name": "Budget 2 - Monthly",
               "limit": 18600.0,
               "planned_limits": [
                   {
                       "date": "2022-01",
                       "limit": 1000.0
                   },
                   {
                       "date": "2022-02",
                       "limit": 1100.0
                   },
                   {
                       "date": "2022-03",
                       "limit": 1200.0
                   },
                   {
                       "date": "2022-04",
                       "limit": 1300.0
                   },
                   {
                       "date": "2022-05",
                       "limit": 1400.0
                   },
                   {
                       "date": "2022-06",
                       "limit": 1500.0
                   },
                   {
                       "date": "2022-07",
                       "limit": 1600.0
                   },
                   {
                       "date": "2022-08",
                       "limit": 1700.0
                   },
                   {
                       "date": "2022-09",
                       "limit": 1800.0
                   },
                   {
                       "date": "2022-10",
                       "limit": 1900.0
                   },
                   {
                       "date": "2022-11",
                       "limit": 2000.0
                   },
                   {
                       "date": "2022-12",
                       "limit": 2100.0
                   }
               ],
               "currency": "USD",
               "provider_filter": {
                   "state": "ENABLED",
                   "providers": [
                       "aws",
                       "google_cloud"
                   ]
               },
               "time_unit": "MONTHLY",
               "start": "2022-01",
               "end": "2022-12",
               "tags": {},
               "project_group_id": "pg-812c90990877",
               "data_source_id": "ds-fcba92ca73b1",
               "domain_id": "domain-58010aa2e451",
               "created_at": "2022-04-12T06:09:56.917Z",
               "updated_at": "2022-04-12T06:09:56.917Z"
           }
       ],
       "total_count": 6
}

stat #

POST /cost-analysis/v1/budget/stat



Message #

BudgetInfo #

  • budget_id (string) Required

  • name (string) Required

  • limit (float) Required

  • planned_limits (PlannedLimit) Repeated Required

  • currency (string) Required

  • provider_filter (ProviderFilter) Required

  • time_unit (TimeUnit) Required

  • start (string) Required

  • end (string) Required

  • notifications (BudgetNotification) Repeated Required

  • tags (Struct) Required

  • resource_group (ResourceGroup) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • data_source_id (string) Required

  • created_at (string) Required

  • updated_at (string) Required


BudgetNotification #

  • threshold (float) Required

  • unit (Unit) Required

  • notification_type (NotificationType) Required


BudgetQuery #

  • query (Query)

  • budget_id (string)

  • name (string)

  • time_unit (TimeUnit)

  • workspace_id (string)

  • project_id (string)

  • data_source_id (string)


BudgetRequest #

  • budget_id (string) Required


BudgetStatQuery #

  • query (StatisticsQuery) Required


BudgetsInfo #

  • results (BudgetInfo) Repeated Required

  • total_count (int32) Required


CreateBudgetRequest #

  • data_source_id (string) Required

  • time_unit (TimeUnit) Required

  • start (string) Required

  • end (string) Required

  • resource_group (ResourceGroup) Required

  • name (string)

  • limit (float)

  • planned_limits (PlannedLimit) Repeated

  • provider_filter (ProviderFilter)

  • notifications (BudgetNotification) Repeated

  • tags (Struct)

  • workspace_id (string)

  • project_id (string)


PlannedLimit #

  • date (string) Required

  • limit (float) Required


ProviderFilter #

  • state (State) Required

  • providers (string) Repeated Required


SetBudgetNotificationRequest #

  • budget_id (string) Required

  • notifications (BudgetNotification) Repeated Required


UpdateBudgetRequest #

  • budget_id (string) Required

  • name (string)

  • limit (float)

  • planned_limits (PlannedLimit) Repeated

  • tags (Struct)


Calendar May 17, 2024
Edit Edit this page