cloudforet-apis
  • README
  • content
    • en
      • Cloudforet API Documentation
      • board
        • _index
        • v1
          • Board
          • Post
          • v1
      • config
        • _index
        • v1
          • DomainConfig
          • PublicConfig
          • UserConfig
          • WorkspaceConfig
          • v1
      • core
        • _index
        • v1
          • Handler
          • Query
          • ServerInfo
          • v1
        • v2
          • Handler
          • Plugin
          • Query
          • v2
      • cost_analysis
        • _index
        • plugin
          • Cost
          • DataSource
          • Job
          • plugin
        • v1
          • Budget
          • BudgetUsage
          • Cost
          • CostQuerySet
          • CostReport
          • CostReportConfig
          • CostReportData
          • CustomWidget
          • DataSource
          • DataSourceAccount
          • DataSourceRule
          • ExchangeRate
          • Job
          • JobTask
          • PublicDashboard
          • Schedule
          • UnifiedCost
          • UserDashboard
          • v1
      • dashboard
        • _index
        • v1
          • CustomWidget
          • Dashboard
          • DomainDashboard
          • PrivateDashboard
          • PrivateDataTable
          • PrivateFolder
          • PrivateWidget
          • ProjectDashboard
          • PublicDashboard
          • PublicDataTable
          • PublicFolder
          • PublicWidget
          • v1
      • file_manager
        • _index
        • v1
          • File
          • PublicFile
          • v1
      • identity
        • _index
        • plugin
          • AccountCollector
          • Auth
          • ExternalAuth
          • plugin
        • v1
          • ApiKey
          • Authorization
          • Domain
          • DomainOwner
          • Endpoint
          • Policy
          • Project
          • ProjectGroup
          • Provider
          • Role
          • RoleBinding
          • ServiceAccount
          • Token
          • User
          • v1
        • v2
          • Agent
          • ApiKey
          • App
          • Authorization
          • Domain
          • Endpoint
          • ExternalAuth
          • Job
          • Package
          • Policy
          • Project
          • ProjectGroup
          • Provider
          • Role
          • RoleBinding
          • Schema
          • ServiceAccount
          • System
          • Token
          • TrustedAccount
          • TrustedServiceAccount
          • User
          • UserGroup
          • UserProfile
          • Workspace
          • WorkspaceGroup
          • WorkspaceGroupDetails
          • WorkspaceGroupUser
          • WorkspaceUser
          • v2
      • inventory
        • _index
        • plugin
          • Collector
          • Job
          • plugin
        • v1
          • ChangeHistory
          • CloudService
          • CloudServiceQuerySet
          • CloudServiceReport
          • CloudServiceStats
          • CloudServiceType
          • Collector
          • CollectorRule
          • Job
          • JobTask
          • Metric
          • MetricData
          • MetricExample
          • Namespace
          • Note
          • Region
          • ResourceGroup
          • v1
        • v2
          • Region
          • v2
      • monitoring
        • _index
        • plugin
          • DataSource
          • Event
          • Log
          • Metric
          • Webhook
          • plugin
        • v1
          • Alert
          • DataSource
          • EscalationPolicy
          • Event
          • EventRule
          • Log
          • MaintenanceWindow
          • Metric
          • Note
          • ProjectAlertConfig
          • Webhook
          • v1
      • mzc_service_api
        • _index
        • v1
          • Contract
          • Offering
          • Organization
          • v1
      • notification
        • _index
        • plugin
          • Notification
          • Protocol
          • plugin
        • v1
          • Notification
          • NotificationUsage
          • ProjectChannel
          • Protocol
          • Quota
          • UserChannel
          • v1
      • opsflow
        • _index
        • v1
          • Comment
          • Event
          • Task
          • TaskCategory
          • TaskType
          • v1
      • plugin
        • _index
        • v1
          • Plugin
          • Supervisor
          • v1
      • repository
        • _index
        • v1
          • DashboardTemplate
          • Plugin
          • Policy
          • Repository
          • Schema
          • v1
        • v2
          • Common
          • Provider
          • RemoteRepository
          • Schema
          • v2
      • sample
        • _index
        • v1
          • Helloworld
          • v1
      • search
        • _index
        • v1
          • Resource
          • v1
      • secret
        • _index
        • v1
          • Secret
          • SecretGroup
          • TrustedSecret
          • UserSecret
          • v1
      • statistics
        • _index
        • plugin
          • Storage
          • plugin
        • v1
          • History
          • Resource
          • Schedule
          • Storage
          • v1
Powered by GitBook
On this page
  • Budget
  • create
  • update
  • set_notification
  • delete
  • get
  • list
  • stat
  • Message
  • BudgetInfo
  • BudgetNotification
  • BudgetQuery
  • BudgetRequest
  • BudgetStatQuery
  • BudgetsInfo
  • CreateBudgetRequest
  • PlannedLimit
  • ProviderFilter
  • SetBudgetNotificationRequest
  • UpdateBudgetRequest
  1. content
  2. en
  3. cost_analysis
  4. v1

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:

Method
Request
Response

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

{{< tabs " create " >}}

{{< tab "Request Example" >}}

  • 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)

{{< highlight json >}} { "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" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

  • 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

{{< highlight json >}} { "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" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

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

{{< tabs " update " >}}

{{< tab "Request Example" >}}

  • budget_id (string) Required

  • name (string)

  • limit (float)

  • planned_limits (PlannedLimit) Repeated

  • tags (Struct)

{{< highlight json >}} { "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": {} } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

  • 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

{{< highlight json >}} { "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" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

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

{{< tabs " set_notification " >}}

{{< tab "Request Example" >}}

  • budget_id (string) Required

  • notifications (BudgetNotification) Repeated Required

{{< highlight json >}} { "budget_id": "budget-4c8606da4521", "notifications": [ { "threshold": 20.0, "unit": "PERCENT", "notification_type": "CRITICAL" }, { "threshold": 1000.0, "unit": "ACTUAL_COST", "notification_type": "WARNING" } ] } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

  • 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

{{< highlight json >}} { "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" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

delete

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

POST /cost-analysis/v1/budget/delete

{{< tabs " delete " >}}

{{< tab "Request Example" >}}

  • budget_id (string) Required

{{< highlight json >}} { "budget_id": "budget-d51b6b6a9910" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

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

{{< tabs " get " >}}

{{< tab "Request Example" >}}

  • budget_id (string) Required

{{< highlight json >}} { "budget_id": "budget-d51b6b6a9910" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

  • 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

{{< highlight json >}} { "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" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

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

{{< tabs " list " >}}

{{< tab "Request Example" >}}

  • query (Query)

  • budget_id (string)

  • name (string)

  • time_unit (TimeUnit)

  • workspace_id (string)

  • project_id (string)

  • data_source_id (string)

{{< highlight json >}} { "query": {} } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

  • results (BudgetInfo) Repeated Required

  • total_count (int32) Required

{{< highlight json >}} { "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 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

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)

Previousv1NextBudgetUsage

Last updated 1 year ago

CreateBudgetRequest
UpdateBudgetRequest
SetBudgetNotificationRequest
BudgetRequest
BudgetRequest
BudgetQuery
BudgetInfo
BudgetInfo
BudgetInfo
BudgetInfo
BudgetsInfo
create
CreateBudgetRequest
BudgetInfo
update
UpdateBudgetRequest
BudgetInfo
set_notification
SetBudgetNotificationRequest
BudgetInfo
delete
BudgetRequest
Empty
get
BudgetRequest
BudgetInfo
list
BudgetQuery
BudgetsInfo
stat
BudgetStatQuery
Struct