This class represents one of two things:

Arguments in a call to a service

Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object.

As an example, if Att1 is expected to be a Paws::CostExplorer::Expression object:

  $service_obj->Method(Att1 => { And => $value, ..., Tags => $value  });

Results returned from an API call

Use accessors for each attribute. If Att1 is expected to be an Paws::CostExplorer::Expression object:

  $result = $service_obj->Method(...);


Use Expression to filter by cost or by usage. There are two patterns:

  • Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for INSTANCE_TYPE==m4.xlarge OR INSTANCE_TYPE==c4.large. The Expression for that looks like this:

    { "Dimensions": { "Key": "INSTANCE_TYPE", "Values": [ "m4.xlarge", “c4.large” ] } }

    The list of dimension values are OR'd together to retrieve cost or usage data. You can create Expression and DimensionValues objects using either with* methods or set* methods in multiple lines.

  • Compound dimension values with logical operations - You can use multiple Expression types and the logical operators AND/OR/NOT to create a list of one or more Expression objects. This allows you to filter on more advanced options. For example, you can filter on ((INSTANCE_TYPE == m4.large OR INSTANCE_TYPE == m3.large) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). The Expression for that looks like this:

    { "And": [ {"Or": [ {"Dimensions": { "Key": "INSTANCE_TYPE", "Values": [ "m4.x.large", "c4.large" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

    Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that creates an error.

    { "And": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }


And => ArrayRef[Paws::CostExplorer::Expression]

  Return results that match both C<Dimension> objects.

Dimensions => Paws::CostExplorer::DimensionValues

  The specific C<Dimension> to use for C<Expression>.

Not => Paws::CostExplorer::Expression

  Return results that don't match a C<Dimension> object.

Or => ArrayRef[Paws::CostExplorer::Expression]

  Return results that match either C<Dimension> object.

Tags => Paws::CostExplorer::TagValues

  The specific C<Tag> to use for C<Expression>.


This class forms part of Paws, describing an object used in Paws::CostExplorer


The source code is located here:

Please report bugs to: