Skip to main content

update-allocation

restish dci update-allocation id

Updates the allocation specified by the Id.

Request

Content-Type: application/json

Schema

{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Allocation name",
"nullable": true
},
"description": {
"type": "string",
"description": "Allocation description",
"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
}
}
}

Responses

200 (application/json)

OK - Allocation updated.

{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the created allocation"
},
"type": {
"type": "string",
"description": "Type of the created allocation",
"enum": [
"single",
"group"
]
}
}
}

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: update-allocation, updateallocation