Skip to main content

create-attribution (deprecated)

Deprecated

This command is deprecated and may be removed in a future release.

restish dci create-attribution

Creates a new attribution.

Request

Content-Type: application/json

Schema

{
"required": [
"components",
"name"
],
"type": "object",
"properties": {
"components": {
"type": "array",
"description": "List of Attribution filters",
"example": [
{
"key": "cloud_provider",
"type": "fixed",
"values": [
"amazon-web-services"
],
"inverse_selection": false,
"regexp": null,
"include_null": false
},
{
"key": "cost_type",
"type": "fixed",
"values": [
"Fee",
"RIFee"
],
"inverse_selection": false,
"regexp": null,
"include_null": false
}
],
"items": {
"required": [
"key",
"type"
],
"type": "object",
"properties": {
"include_null": {
"type": "boolean"
},
"inverse_selection": {
"type": "boolean",
"description": "If true, all selected values will be excluded."
},
"key": {
"type": "string",
"description": "Key of a dimension. Examples: \"service_id\", \"cloud_provider\", \"sku_description\"",
"example": "service_id"
},
"regexp": {
"type": "string",
"description": "Filter the dimension values using a regular expression."
},
"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": "Value of the dimension. Examples: \"152E-C115-5142\", \"google-cloud\", \"team-a\"",
"example": "google-cloud"
}
}
}
}
},
"description": {
"type": "string",
"description": "Description of the attribution",
"example": "This is an example attribution"
},
"formula": {
"type": "string",
"description": "Attribution formula (A is the first component, B is the second one, and so on.)",
"example": "A AND B"
},
"name": {
"type": "string",
"description": "Name of the attribution",
"example": "An example attribution"
}
}
}

Responses

201 (application/json)

Created - Id of the new attribution returned.

{
"type": "string"
}

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: create-attribution, createattribution