CostFormation Language Reference

Conditions

This sections lists the supported conditions.

And

This condition evaluates a list of conditions as a logical And operation.

  - And:
    - <Condition 1>
    - <Condition 2>
    ...
    - <Condition N>

This condition evaluates to True only if all conditions evaluate to True. If a single condition in the list evaluates to False, then the entire condition evaluates to False.

BeginsWith

This condition checks whether the source value begins with the any of the specified strings. This condition can optionally specify its own source properties.

  - BeginsWith: <Value>
    <Source Properties>

Or

  - BeginsWith:
      - <Value 1>
      - <Value 2>
      ...
      - <Value N>
    <Source Properties>

Contains

This condition checks whether the source value contains any of the specified strings. This condition can optionally specify its own source properties.

  - Contains: <Value>
    <Source Properties>

Or

  - Contains:
      - <Value 1>
      - <Value 2>
      ...
      - <Value N>
    <Source Properties>

Equals

This condition checks whether the source value equals any of the specified strings. This condition can optionally specify its own source properties.

  - Equals: <Value>
    <Source Properties>

Or

  - Equals:
      - <Value 1>
      - <Value 2>
      ...
      - <Value N>
    <Source Properties>

HasValue

This condition checks whether the source value has an actual value or not. This condition can optionally specify its own source properties.

  - HasValue: <True|False>
    <Source Properties>

If HasValue is set to True, then the condition evaluates to True if the source has a value. If HasValue is False, then the condition evaluates to False if the source does not have a value.

Not

This condition evaluates the list of conditions as a logical Or and then negates the result.

  - Not:
    - <Condition 1>
    - <Condition 2>
    ...
    - <Condition N>

This condition evaluates to True only if all conditions evaluate to False. If a single condition in the list evaluates to True, then the entire condition evaluates to False.

Or

This condition evaluates the list of conditions as a logical Or.

  - Or:
    - <Condition 1>
    - <Condition 2>
    ...
    - <Condition N>

This condition evaluates to True if any of the list of conditions evaluate to True. If all conditions in the list evaluate to False, then the entire condition evaluates to False.

Sources

This section describe the available sources that can be referenced when building Custom Dimensions with CostFormation. The sources are broken down by types of sources (i.e. sources direct from billing data, resource tags, etc). Each table shows the Source ID which is the ID of the source that would be used in the Custom Dimension definition.

📘

Dimensions in the Explorer and Views

Not all source dimensions listed in this section are available in the Explorer or Views and some are located with a slightly different name than their ID. Check the Name in Explorer/Views column to see which source IDs are visible in the Explorer and Views and under which name.

Core Cloud Provider Dimensions

These dimensions are derived directly from billing data from your cloud provider.

Source ID

Name in Explorer/Views

Description

Account

Account

Elements consist of the account IDs for any cloud account you have connected to CloudZero.

CloudProvider

Cloud Provider

Elements consist of the cloud providers supported by CloudZero (i.e. AWS and Snowflake)

InvoiceId

Not Available

Elements consist of the corresponding invoice id of the charges.

LineItemType

Not Available

Elements consist of the type of charge for a given billing line item.

Operation

Not Available

Elements consist of the specific cloud provider operation covered by the billing line item.

PayerAccount

Not Available

Elements consist of the Management Account associated with the charges

PricingTerm

Not Available

Elements consist of how charges are priced (i.e. on-demand, reserved, etc.)

Region

Region

Elements consist of the cloud region where the billed resource is located.

Resource

Resource

Elements consist of the resource identifier, such as the AWS resource ARN, Snowflake Name, or CloudZero CZRN.

RequestType

Not Available

Elements consist of incoming request type, such as from CloudFront for example

Service

Service

Elements consist of the cloud provider service type, such as an AWS service or Snowflake service

TransferType

Not Available

Elements consist of the type of data transfer, outbound, intra-region, etc.

UsageFamily

Usage Family

Elements consist of the cloud service charges.

UsageType

Not Available

Elements consist of the usage details of the billing line item in AWS or equivalent in Snowflake account usage

Tag Dimensions

The CloudZero platform inspects all of your cloud resources and compiles the list of tags, both AWS tags and user tags, and exposes them as Dimensions that can be used throughout the platform. All tags are available in the Explorer and Views.

Source ID

Name in Explorer/Views (Found under Cloud Dimensions)

Description

Tag:

Tag -> <Tag Name>

Elements consist of the different values for the given tag.

Kubernetes Dimensions

Some dimensions are derived from dynamic data that is discovered through integration with Kubernetes. All Kubernetes dimensions are available in the Explorer and Views.

Source ID

Name in Explorer/Views (Found under Kubernetes)

Description

K8s:Cluster

Cluster

Elements consist of the Kubernetes cluster names

K8s:Namespace

Namespace

Elements consist of the Kubernetes namespace across all Kubernetes clusters

K8:Label:<Label Name>

Label -> <Label Name>

Elements consist of the Kubernetes labels exposed from any Kubernetes configurations for resources such as pods or policies, etc.

K8s:Pod

Pod

Elements consist of the deployed pods in any of your Kubernetes clusters.

Additional Cloud Provider Dimensions

The following dimensions are built using CostFormation and published by CloudZero for all organizations. They are available in the Explorer and Views.

Source ID

Name in Explorer/Views (Found under Product Dimensions)

Description

CZ:Defined:Category

Service Category

Elements consist of the different categories of services similar to what you would see in the AWS console (e.g. Networking, Compute, etc.)

CZ:Defined:Elasticity

Elasticity

CZ:Defined:InstanceType

Instance Type

Elements are grouped by a sub-section of the UsageType name and filtered to show costs specifically related to the type, size, and family of a resource. This pertains to services like AmazonEC2, AmazonES, ElasticMapReduce, AmazonRDS, AmazonElastiCache, and AmazonSageMaker.

CZ:Defined:NetworkingCategory

Networking Category

Elements comprising the major types of networking spend, including VPC Endpoints, Data Transfer, Content Delivery, etc.

CZ:Defined:NetworkingSubCategory

Networking Sub-category

Elements comprising a deeper breakdown of networking related costs, including VPC Endpoint (Hours), VPC Endpoint (Bytes), AWS Outbound, S3 Outbound, etc.

CZ:Defined:PaymentOption

Payment Option

CZ:Defined:ResourceNameOnly

Not Available

CZ:Defined:ServiceDisplay

Not Available

Custom Dimensions

All Custom Dimensions are available in the Explorer and Views.

Source ID

Name in Explorer/Views

Description

User:Defined:<Dimension ID>

<Dimension Name>

Elements are grouped according to the logic in the CostFormation definition.

Transforms

Lower

This transform will lowercase all of the letters in the source value. This transform has no parameters.

  - Type: Lower

Example:

Source Value

Transform Result

ProductionResource 1

productionresource 1

Normalize

This transform will lowercase all of the letters in a the source value and will also convert any instance of the characters .,/#!$%^&*;:=_~()\' to a dash (-). This transform has no parameters.

  - Type: Normalize

Example:

Source Value

Transform Result

Production/Resources#4561

production-resources-4561

Split

This transform will split the source value into a list of substrings using a specified delimiter. It will then extract the substring based on the specified index. The index is 1 based.

  - Type: Split
    Delimiter: <delimiter>
    Index: <1 based index>

Example:

Parameters

Source Value

Transform Result

Delimiter: '-'
Index: 1

eu-west-1

eu


Did this page help you?