aws.costexplorer.anomaly_monitor
**Autogenerated function**
Deletes a cost anomaly monitor by the specified monitor ARN as resource_id.
Args:
name(Text): The Idem name of the anomaly monitor.
resource_id(Text): Monitor ARN to identify the resource.
Returns:
Dict[str, Any]
Examples:
.. code-block:: sls
cost_monitor1234:
aws.costexplorer.anomaly_monitor.absent:
- name: value
- resource_id: cost_monitor1234
**Autogenerated function**
Describe the resource in a way that can be recreated/managed with the corresponding "present" function
Returns a list of aws cost anomaly monitors. If a monitor arn or name is specified, the list contains only
the description of that monitor.
Returns:
Dict[str, Any]
Examples:
.. code-block:: bash
$ idem describe aws.costexplorer.anomaly_monitor
**Autogenerated function**
Creates a new cost anomaly detection monitor with the requested type and monitor specification.
Args:
name(Text): An Idem name of the resource.
resource_id(Text): Monitor ARN to identify the resource.
monitor_name: Name of anomaly monitor.
monitor_type(Text): Possible type values. Valid Values: DIMENSIONAL | CUSTOM
monitor_dimension(Text): The dimensions to evaluate : SERVICE
monitor_specification(Dict[str, Any], optional): 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 REGION==us-east-1 OR REGION==us-west-1. For GetRightsizingRecommendation, the
Region is a full name (for example, REGION==US East (N. Virginia). The Expression example is as
follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } 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.
By doing this, you can filter on more advanced options. For example, you can filter on ((REGION
== us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer).
The Expression for that is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION",
"Values": [ "us-east-1", "us-west-1" ] }}, {"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" ] } } For
the GetRightsizingRecommendation action, a combination of OR and NOT isn't supported. OR isn't
supported between different dimensions, or dimensions and tags. NOT operators aren't supported.
Dimensions are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the
GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR aren't supported.
Dimensions are limited to LINKED_ACCOUNT.
* Or (List[Dict[str, Any]], optional): Return results that match either Dimension object.
* Or (List[Dict[str, Any]], optional): Return results that match either Dimension object.
* And (List[Dict[str, Any]], optional): Return results that match both Dimension objects.
* Not (Dict[str, Any], optional): Return results that don't match a Dimension object.
* Dimensions (Dict[str, Any], optional): The specific Dimension to use for Expression.
* Key (str, optional): The names of the metadata types that you can use to filter and group your results. For example,
AZ returns a list of Availability Zones.
* Values (List[str], optional): The metadata values that you can use to filter and group your results. You can use
GetDimensionValues to find specific values.
* MatchOptions (List[str], optional): The match options that you can use to filter your results. MatchOptions is only applicable for
actions related to Cost Category. The default values for MatchOptions are EQUALS and
CASE_SENSITIVE.
* Tags (Dict[str, Any], optional): The specific Tag to use for Expression.
* Key (str, optional): The key for the tag.
* Values (List[str], optional): The specific value of the tag.
* MatchOptions (List[str], optional): The match options that you can use to filter your results. MatchOptions is only applicable for
actions related to Cost Category. The default values for MatchOptions are EQUALS and
CASE_SENSITIVE.
* CostCategories (Dict[str, Any], optional): The filter that's based on CostCategory values.
* Key (str, optional): The unique name of the Cost Category.
* Values (List[str], optional): The specific value of the Cost Category.
* MatchOptions (List[str], optional): The match options that you can use to filter your results. MatchOptions is only applicable for
actions related to cost category. The default values for MatchOptions is EQUALS and
CASE_SENSITIVE.
* And (List[Dict[str, Any]], optional): Return results that match both Dimension objects.
* Not (Dict[str, Any], optional): Return results that don't match a Dimension object.
* Dimensions (Dict[str, Any], optional): The specific Dimension to use for Expression.
* Tags (Dict[str, Any], optional): The specific Tag to use for Expression.
* CostCategories (Dict[str, Any], optional): The filter that's based on CostCategory values.
Request Syntax:
[monitor-resource-id]:
aws.costexplorer.anomaly_monitor.present:
- resource_id: 'string'
- monitor_name: 'string'
- monitor_type: 'string'
- monitor_specification:
- Dimensions: 'dict'
Returns:
Dict[str, str]
Examples:
.. code-block:: sls
cost_monitor1234:
aws.costexplorer.anomaly_monitor.present:
- name: cost_monitor1234
- resource_id: cost_monitor1234
- monitor_specification:
Dimensions:
Key: LINKED_ACCOUNT
Values:
- '820272282974'
- monitor_type: CUSTOM
Full plugin documentation is available on the Idem documentation site - aws.costexplorer.anomaly_monitor .