Elasticsearch API
  1. BillingCostsAnalysis
Elasticsearch API
  • Accounts
    • Updates the current account
      PUT
    • Updates the current account
      PATCH
    • Fetch current account information
      GET
  • Authentication
    • Delete API key
      DELETE
    • Get API key
      GET
    • Create API key
      POST
    • Delete API keys
      DELETE
    • Get all API keys
      GET
  • BillingCostsAnalysis
    • Get costs overview for the organization
      GET
    • Get deployments costs for the organization
      GET
    • Get itemized costs for the organization
      GET
    • Get itemized costs by deployments
      GET
  • DeploymentTemplates
    • Get deployment templates
      GET
    • Get deployment template
      GET
  • Deployments
    • Shutdown Deployment Elasticsearch Resource
      POST
    • Start all instances
      POST
    • Restores a shutdown resource
      POST
    • Restores a shutdown Deployment
      POST
    • Set remote clusters
      PUT
    • Get remote clusters
      GET
    • Stop instances
      POST
    • Reset the secret token for an APM resource.
      POST
    • Get Deployment Enterprise Search Resource Info
      GET
    • Get Deployment Kibana Resource Info
      GET
    • Set AppSearch read-only status
      PUT
    • Set AppSearch read-only status
      GET
    • Start instances
      POST
    • Restart Deployment Stateless Resource
      POST
    • Shuts down Deployment
      POST
    • Migrate Elasticsearch resource to use SLM
      POST
    • Start maintenance mode
      POST
    • Restart Deployment Elasticsearch Resource
      POST
    • Start maintenance mode (all instances)
      POST
    • Reset 'elastic' user password
      POST
    • Stop all instances
      POST
    • Migrate Elasticsearch and associated Kibana resources to enable CCR
      POST
    • Add or remove settings from the Elasticsearch resource keystore
      PATCH
    • Get the settings from the Elasticsearch resource keystore
      GET
    • Search Deployments
      POST
    • Get eligible remote clusters
      POST
    • Update Deployment
      PUT
    • Get Deployment
      GET
    • Get Deployment Elasticsearch Resource Info
      GET
    • Stop maintenance mode (all instances)
      POST
    • Migrate Elasticsearch resource to use ILM
      POST
    • Shutdown Deployment Stateless Resource
      POST
    • Get Deployment APM Resource Info
      GET
    • Stop maintenance mode
      POST
    • Cancel resource pending plan
      DELETE
    • Get Deployment App Search Resource Info
      GET
    • Get eligible remote clusters
      POST
    • Create Deployment
      POST
    • List Deployments
      GET
    • Upgrade Kibana, APM, AppSearch inside Deployment
      POST
  • DeploymentsTrafficFilter
    • Delete ruleset association
    • Create ruleset association
    • Get associated deployments
    • Create a ruleset
    • List traffic filter rulesets
    • Get associated rulesets
    • Updates a ruleset
    • Delete a ruleset
    • Retrieves the ruleset by ID.
  • Extensions
    • Create an extension
    • List Extensions
    • Uploads the Extension
    • Update Extension
    • Delete Extension
    • Get Extension
  • Stack
    • Get stack versions
  1. BillingCostsAnalysis

Get itemized costs by deployments

开发环境
http://127.0.0.1
开发环境
http://127.0.0.1
GET
/billing/costs/{organization_id}/deployments/{deployment_id}/items
BillingCostsAnalysis
EXPERIMENTAL (it may change in future versions): Retrieves the itemized costs for the given deployment.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://127.0.0.1/billing/costs//deployments//items' \
--header 'Authorization: ApiKey {{EC_API_KEY}}'
响应示例响应示例
200 - 示例 1
{
    "costs": {
        "total": 0,
        "resources": 0,
        "data_transfer_and_storage": 0
    },
    "resources": [
        {
            "sku": "string",
            "kind": "string",
            "name": "string",
            "price": 0,
            "period": {
                "start": "2019-08-24T14:15:22Z",
                "end": "2019-08-24T14:15:22Z"
            },
            "instance_count": 0,
            "hours": 0,
            "price_per_hour": 0
        }
    ],
    "data_transfer_and_storage": [
        {
            "sku": "string",
            "name": "string",
            "rate": {
                "formatted_value": "string",
                "value": 0
            },
            "cost": 0,
            "type": "string",
            "quantity": {
                "formatted_value": "string",
                "value": 0
            }
        }
    ]
}

请求参数

Path 参数
organization_id
必需
Identifier for the organization
deployment_id
必需
Id of a Deployment
Query 参数
from
可选
A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.
to
可选
A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.
Header 参数
Authorization
string 
可选
默认值:
ApiKey {{EC_API_KEY}}

返回响应

🟢200The costs associated to a set items billed for a single deployment.
application/json
Body
Costs associated to a set of Elastic Cloud resources for an organization. All of the costs are expressed in Elastic Consumption Unit (ECU).
costs
object (Costs) 
必需
Costs overview for an organization. All of the costs, credits, trials are expressed in Elastic Consumption Unit (ECU).
total
number <double>
必需
Total costs
resources
number <double>
必需
Total costs associated to the Elastic Cloud resources
data_transfer_and_storage
number <double>
必需
Total costs associated to Data Transfer and Storage (DTS)
resources
array[object (ItemCosts) {8}] 
必需
Costs of the list of resources
sku
string 
必需
Stock Keeping Unit (SKU)
kind
string 
必需
Kind of resource
name
string 
必需
Resource name
price
number <double>
必需
Resource price
period
object (Period) 
Period
必需
instance_count
integer <int32>
必需
Number of instances
hours
integer <int64>
必需
Resource usage in hours
price_per_hour
number <double>
必需
Price per hour
data_transfer_and_storage
array[object (DtsDimensionCosts) {6}] 
必需
List of the detailed costs associated to the Data Transfer and Storage (DTS) dimensions
sku
string 
必需
DTS dimension Stock Keeping Unit (SKU)
name
string 
必需
DTS dimension name
rate
object (DtsRate) 
DTS Rate
必需
cost
number <double>
必需
Costs associated to the Data Transfer and Storage (DTS) dimensions for an organization
type
string 
必需
Type of the DTS dimension usage
quantity
object (DtsQuantity) 
必需
DTS quantity
🟠403The current user does not have access to the requested organization. (code: `organization.invalid_access`)
上一页
Get itemized costs for the organization
下一页
Get deployment templates
Built with