get-allocation
restish dci get-allocation id
Returns an allocation by the specified Id.
Responses
200 (application/json)
OK - Allocation returned.
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Allocation ID"
},
"name": {
"type": "string",
"description": "Allocation name"
},
"description": {
"type": "string",
"description": "Allocation description"
},
"type": {
"type": "string",
"description": "Type of allocation (preset or custom)"
},
"allocationType": {
"type": "string",
"description": "Type of allocation (single or group)",
"enum": [
"single",
"group"
]
},
"createTime": {
"type": "integer",
"description": "The time when the allocation was created (in UNIX timestamp).",
"format": "int64"
},
"updateTime": {
"type": "integer",
"description": "Last time the allocation was modified (in UNIX timestamp).",
"format": "int64"
},
"anomalyDetection": {
"type": "boolean",
"description": "Whether anomaly detection is enabled for this allocation",
"nullable": true
},
"rule": {
"required": [
"components",
"formula"
],
"type": "object",
"description": "Single allocation rule (required for single type allocation)",
"nullable": true,
"properties": {
"components": {
"type": "array",
"description": "List of allocation filter components",
"items": {
"required": [
"key",
"type",
"values",
"mode"
],
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Key of a dimension. Examples: \"billing_account_id\", \"country\", etc. Dimension must exist."
},
"type": {
"type": "string",
"enum": [
"datetime",
"fixed",
"optional",
"label",
"tag",
"project_label",
"system_label",
"attribution",
"attribution_group",
"gke",
"gke_label"
]
},
"values": {
"type": "array",
"items": {
"type": "string",
"description": "Values to filter on"
}
},
"inverse_selection": {
"type": "boolean",
"description": "If true, all selected values will be excluded.",
"default": false
},
"include_null": {
"type": "boolean",
"description": "Include null values",
"default": false
},
"mode": {
"type": "string",
"description": "Filter mode to apply",
"enum": [
"is",
"starts_with",
"ends_with",
"contains",
"regexp"
]
}
}
}
},
"formula": {
"type": "string",
"description": "Formula for combining components (A is the first component, B is the second one, etc.)",
"example": "A AND B"
}
}
},
"rules": {
"type": "array",
"items": {
"required": [
"action"
],
"type": "object",
"nullable": true,
"description": "Allocation rule for a group (required for group type allocation)",
"properties": {
"name": {
"type": "string",
"description": "Name for the allocation rule"
},
"description": {
"type": "string",
"description": "Description for the allocation rule"
},
"action": {
"type": "string",
"description": "Action to perform with this rule",
"enum": [
"create",
"update",
"select"
]
},
"id": {
"type": "string",
"description": "ID of existing allocation (required for 'update' or 'select' action)"
},
"components": {
"type": "array",
"description": "List of allocation filter components (required for 'create' or 'update' action)",
"items": {
"required": [
"key",
"type",
"values",
"mode"
],
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Key of a dimension. Examples: \"billing_account_id\", \"country\", etc. Dimension must exist."
},
"type": {
"type": "string",
"enum": [
"datetime",
"fixed",
"optional",
"label",
"tag",
"project_label",
"system_label",
"attribution",
"attribution_group",
"gke",
"gke_label"
]
},
"values": {
"type": "array",
"items": {
"type": "string",
"description": "Values to filter on"
}
},
"inverse_selection": {
"type": "boolean",
"description": "If true, all selected values will be excluded.",
"default": false
},
"include_null": {
"type": "boolean",
"description": "Include null values",
"default": false
},
"mode": {
"type": "string",
"description": "Filter mode to apply",
"enum": [
"is",
"starts_with",
"ends_with",
"contains",
"regexp"
]
}
}
}
},
"formula": {
"type": "string",
"description": "Formula for combining components (A is the first component, B is the second one, etc.)",
"example": "A AND B"
}
}
}
},
"unallocatedCosts": {
"type": "string",
"description": "Custom label for any values that do not fit into allocation (required for group type allocation)",
"nullable": true
}
}
}
400 (application/json)
Bad Request - The server cannot process the request, often due to a malformed request.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
401 (application/json)
Unauthorized - Invalid API key.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
403 (application/json)
Forbidden - The client is not authorized to perform the request.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
404 (application/json)
Not Found - The requested resource does not exist.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
Aliases: get-allocation, getallocation