AWS Cost Explorer Service

2020/09/23 - AWS Cost Explorer Service - 10 new api methods

Changes  This release provides access to Cost Anomaly Detection Public Preview APIs. Cost Anomaly Detection finds cost anomalies based on your historical cost and usage using Machine Learning models.

GetAnomalies (new) Link ¶

Retrieves all of the cost anomalies detected on your account, during the time period specified by the DateInterval object.

See also: AWS API Documentation

Request Syntax

client.get_anomalies(
    MonitorArn='string',
    DateInterval={
        'StartDate': 'string',
        'EndDate': 'string'
    },
    Feedback='YES'|'NO'|'PLANNED_ACTIVITY',
    TotalImpact={
        'NumericOperator': 'EQUAL'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'GREATER_THAN'|'LESS_THAN'|'BETWEEN',
        'StartValue': 123.0,
        'EndValue': 123.0
    },
    NextPageToken='string',
    MaxResults=123
)
type MonitorArn

string

param MonitorArn

Retrieves all of the cost anomalies detected for a specific cost anomaly monitor Amazon Resource Name (ARN).

type DateInterval

dict

param DateInterval

[REQUIRED]

Assigns the start and end dates for retrieving cost anomalies. The returned anomaly object will have an AnomalyEndDate in the specified time range.

  • StartDate (string) -- [REQUIRED]

    The first date an anomaly was observed.

  • EndDate (string) --

    The last date an anomaly was observed.

type Feedback

string

param Feedback

Filters anomaly results by the feedback field on the anomaly object.

type TotalImpact

dict

param TotalImpact

Filters anomaly results by the total impact field on the anomaly object. For example, you can filter anomalies GREATER_THAN 200.00 to retrieve anomalies, with an estimated dollar impact greater than 200.

  • NumericOperator (string) -- [REQUIRED]

    The comparing value used in the filter.

  • StartValue (float) -- [REQUIRED]

    The lower bound dollar value used in the filter.

  • EndValue (float) --

    The upper bound dollar value used in the filter.

type NextPageToken

string

param NextPageToken

The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

type MaxResults

integer

param MaxResults

The number of entries a paginated response contains.

rtype

dict

returns

Response Syntax

{
    'Anomalies': [
        {
            'AnomalyId': 'string',
            'AnomalyStartDate': 'string',
            'AnomalyEndDate': 'string',
            'DimensionValue': 'string',
            'RootCauses': [
                {
                    'Service': 'string',
                    'Region': 'string',
                    'LinkedAccount': 'string',
                    'UsageType': 'string'
                },
            ],
            'AnomalyScore': {
                'MaxScore': 123.0,
                'CurrentScore': 123.0
            },
            'Impact': {
                'MaxImpact': 123.0,
                'TotalImpact': 123.0
            },
            'MonitorArn': 'string',
            'Feedback': 'YES'|'NO'|'PLANNED_ACTIVITY'
        },
    ],
    'NextPageToken': 'string'
}

Response Structure

  • (dict) --

    • Anomalies (list) --

      A list of cost anomalies.

      • (dict) --

        An unusual cost pattern. This consists of the detailed metadata and the current status of the anomaly object.

        • AnomalyId (string) --

          The unique identifier for the anomaly.

        • AnomalyStartDate (string) --

          The first day the anomaly is detected.

        • AnomalyEndDate (string) --

          The last day the anomaly is detected.

        • DimensionValue (string) --

          The dimension for the anomaly. For example, an AWS service in a service monitor.

        • RootCauses (list) --

          The list of identified root causes for the anomaly.

          • (dict) --

            The combination of AWS service, linked account, Region, and usage type where a cost anomaly is observed.

            • Service (string) --

              The AWS service name associated with the cost anomaly.

            • Region (string) --

              The AWS Region associated with the cost anomaly.

            • LinkedAccount (string) --

              The linked account value associated with the cost anomaly.

            • UsageType (string) --

              The UsageType value associated with the cost anomaly.

        • AnomalyScore (dict) --

          The latest and maximum score for the anomaly.

          • MaxScore (float) --

            The maximum score observed during the AnomalyDateInterval .

          • CurrentScore (float) --

            The last observed score.

        • Impact (dict) --

          The dollar impact for the anomaly.

          • MaxImpact (float) --

            The maximum dollar value observed for an anomaly.

          • TotalImpact (float) --

            The cumulative dollar value observed for an anomaly.

        • MonitorArn (string) --

          The Amazon Resource Name (ARN) for the cost monitor that generated this anomaly.

        • Feedback (string) --

          The feedback value.

    • NextPageToken (string) --

      The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

CreateAnomalySubscription (new) Link ¶

Adds a subscription to a cost anomaly detection monitor. You can use each subscription to define subscribers with email or SNS notifications. Email subscribers can set a dollar threshold and a time frequency for receiving notifications.

See also: AWS API Documentation

Request Syntax

client.create_anomaly_subscription(
    AnomalySubscription={
        'SubscriptionArn': 'string',
        'AccountId': 'string',
        'MonitorArnList': [
            'string',
        ],
        'Subscribers': [
            {
                'Address': 'string',
                'Type': 'EMAIL'|'SNS',
                'Status': 'CONFIRMED'|'DECLINED'
            },
        ],
        'Threshold': 123.0,
        'Frequency': 'DAILY'|'IMMEDIATE'|'WEEKLY',
        'SubscriptionName': 'string'
    }
)
type AnomalySubscription

dict

param AnomalySubscription

[REQUIRED]

The cost anomaly subscription object that you want to create.

  • SubscriptionArn (string) --

    The AnomalySubscription Amazon Resource Name (ARN).

  • AccountId (string) --

    Your unique account identifier.

  • MonitorArnList (list) -- [REQUIRED]

    A list of cost anomaly monitors.

    • (string) --

  • Subscribers (list) -- [REQUIRED]

    A list of subscribers to notify.

    • (dict) --

      The recipient of AnomalySubscription notifications.

      • Address (string) --

        The email address or SNS Amazon Resource Name (ARN), depending on the Type .

      • Type (string) --

        The notification delivery channel.

      • Status (string) --

        Indicates if the subscriber accepts the notifications.

  • Threshold (float) -- [REQUIRED]

    The dollar value that triggers a notification if the threshold is exceeded.

  • Frequency (string) -- [REQUIRED]

    The frequency at which anomaly reports are sent over email.

  • SubscriptionName (string) -- [REQUIRED]

    The name for the subscription.

rtype

dict

returns

Response Syntax

{
    'SubscriptionArn': 'string'
}

Response Structure

  • (dict) --

    • SubscriptionArn (string) --

      The unique identifier of your newly created cost anomaly subscription.

DeleteAnomalySubscription (new) Link ¶

Deletes a cost anomaly subscription.

See also: AWS API Documentation

Request Syntax

client.delete_anomaly_subscription(
    SubscriptionArn='string'
)
type SubscriptionArn

string

param SubscriptionArn

[REQUIRED]

The unique identifier of the cost anomaly subscription that you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteAnomalyMonitor (new) Link ¶

Deletes a cost anomaly monitor.

See also: AWS API Documentation

Request Syntax

client.delete_anomaly_monitor(
    MonitorArn='string'
)
type MonitorArn

string

param MonitorArn

[REQUIRED]

The unique identifier of the cost anomaly monitor that you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ProvideAnomalyFeedback (new) Link ¶

Modifies the feedback property of a given cost anomaly.

See also: AWS API Documentation

Request Syntax

client.provide_anomaly_feedback(
    AnomalyId='string',
    Feedback='YES'|'NO'|'PLANNED_ACTIVITY'
)
type AnomalyId

string

param AnomalyId

[REQUIRED]

A cost anomaly ID.

type Feedback

string

param Feedback

[REQUIRED]

Describes whether the cost anomaly was a planned activity or you considered it an anomaly.

rtype

dict

returns

Response Syntax

{
    'AnomalyId': 'string'
}

Response Structure

  • (dict) --

    • AnomalyId (string) --

      The ID of the modified cost anomaly.

UpdateAnomalySubscription (new) Link ¶

Updates an existing cost anomaly monitor subscription.

See also: AWS API Documentation

Request Syntax

client.update_anomaly_subscription(
    SubscriptionArn='string',
    Threshold=123.0,
    Frequency='DAILY'|'IMMEDIATE'|'WEEKLY',
    MonitorArnList=[
        'string',
    ],
    Subscribers=[
        {
            'Address': 'string',
            'Type': 'EMAIL'|'SNS',
            'Status': 'CONFIRMED'|'DECLINED'
        },
    ],
    SubscriptionName='string'
)
type SubscriptionArn

string

param SubscriptionArn

[REQUIRED]

A cost anomaly subscription Amazon Resource Name (ARN).

type Threshold

float

param Threshold

The update to the threshold value for receiving notifications.

type Frequency

string

param Frequency

The update to the frequency value at which subscribers will receive notifications.

type MonitorArnList

list

param MonitorArnList

A list of cost anomaly subscription ARNs.

  • (string) --

type Subscribers

list

param Subscribers

The update to the subscriber list.

  • (dict) --

    The recipient of AnomalySubscription notifications.

    • Address (string) --

      The email address or SNS Amazon Resource Name (ARN), depending on the Type .

    • Type (string) --

      The notification delivery channel.

    • Status (string) --

      Indicates if the subscriber accepts the notifications.

type SubscriptionName

string

param SubscriptionName

The subscription's new name.

rtype

dict

returns

Response Syntax

{
    'SubscriptionArn': 'string'
}

Response Structure

  • (dict) --

    • SubscriptionArn (string) --

      A cost anomaly subscription ARN.

UpdateAnomalyMonitor (new) Link ¶

Updates an existing cost anomaly monitor. The changes made are applied going forward, and does not change anomalies detected in the past.

See also: AWS API Documentation

Request Syntax

client.update_anomaly_monitor(
    MonitorArn='string',
    MonitorName='string'
)
type MonitorArn

string

param MonitorArn

[REQUIRED]

Cost anomaly monitor Amazon Resource Names (ARNs).

type MonitorName

string

param MonitorName

The new name for the cost anomaly monitor.

rtype

dict

returns

Response Syntax

{
    'MonitorArn': 'string'
}

Response Structure

  • (dict) --

    • MonitorArn (string) --

      A cost anomaly monitor ARN.

GetAnomalySubscriptions (new) Link ¶

Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).

See also: AWS API Documentation

Request Syntax

client.get_anomaly_subscriptions(
    SubscriptionArnList=[
        'string',
    ],
    MonitorArn='string',
    NextPageToken='string',
    MaxResults=123
)
type SubscriptionArnList

list

param SubscriptionArnList

A list of cost anomaly subscription ARNs.

  • (string) --

type MonitorArn

string

param MonitorArn

Cost anomaly monitor ARNs.

type NextPageToken

string

param NextPageToken

The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

type MaxResults

integer

param MaxResults

The number of entries a paginated response contains.

rtype

dict

returns

Response Syntax

{
    'AnomalySubscriptions': [
        {
            'SubscriptionArn': 'string',
            'AccountId': 'string',
            'MonitorArnList': [
                'string',
            ],
            'Subscribers': [
                {
                    'Address': 'string',
                    'Type': 'EMAIL'|'SNS',
                    'Status': 'CONFIRMED'|'DECLINED'
                },
            ],
            'Threshold': 123.0,
            'Frequency': 'DAILY'|'IMMEDIATE'|'WEEKLY',
            'SubscriptionName': 'string'
        },
    ],
    'NextPageToken': 'string'
}

Response Structure

  • (dict) --

    • AnomalySubscriptions (list) --

      A list of cost anomaly subscriptions that includes the detailed metadata for each one.

      • (dict) --

        The association between a monitor, threshold, and list of subscribers used to deliver notifications about anomalies detected by a monitor that exceeds a threshold. The content consists of the detailed metadata and the current status of the AnomalySubscription object.

        • SubscriptionArn (string) --

          The AnomalySubscription Amazon Resource Name (ARN).

        • AccountId (string) --

          Your unique account identifier.

        • MonitorArnList (list) --

          A list of cost anomaly monitors.

          • (string) --

        • Subscribers (list) --

          A list of subscribers to notify.

          • (dict) --

            The recipient of AnomalySubscription notifications.

            • Address (string) --

              The email address or SNS Amazon Resource Name (ARN), depending on the Type .

            • Type (string) --

              The notification delivery channel.

            • Status (string) --

              Indicates if the subscriber accepts the notifications.

        • Threshold (float) --

          The dollar value that triggers a notification if the threshold is exceeded.

        • Frequency (string) --

          The frequency at which anomaly reports are sent over email.

        • SubscriptionName (string) --

          The name for the subscription.

    • NextPageToken (string) --

      The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

CreateAnomalyMonitor (new) Link ¶

Creates a new cost anomaly detection monitor with the requested type and monitor specification.

See also: AWS API Documentation

Request Syntax

client.create_anomaly_monitor(
    AnomalyMonitor={
        'MonitorArn': 'string',
        'MonitorName': 'string',
        'CreationDate': 'string',
        'LastUpdatedDate': 'string',
        'LastEvaluatedDate': 'string',
        'MonitorType': 'DIMENSIONAL'|'CUSTOM',
        'MonitorDimension': 'SERVICE',
        'MonitorSpecification': {
            'Or': [
                {'... recursive ...'},
            ],
            'And': [
                {'... recursive ...'},
            ],
            'Not': {'... recursive ...'},
            'Dimensions': {
                'Key': 'AZ'|'INSTANCE_TYPE'|'LINKED_ACCOUNT'|'LINKED_ACCOUNT_NAME'|'OPERATION'|'PURCHASE_TYPE'|'REGION'|'SERVICE'|'SERVICE_CODE'|'USAGE_TYPE'|'USAGE_TYPE_GROUP'|'RECORD_TYPE'|'OPERATING_SYSTEM'|'TENANCY'|'SCOPE'|'PLATFORM'|'SUBSCRIPTION_ID'|'LEGAL_ENTITY_NAME'|'DEPLOYMENT_OPTION'|'DATABASE_ENGINE'|'CACHE_ENGINE'|'INSTANCE_TYPE_FAMILY'|'BILLING_ENTITY'|'RESERVATION_ID'|'RESOURCE_ID'|'RIGHTSIZING_TYPE'|'SAVINGS_PLANS_TYPE'|'SAVINGS_PLAN_ARN'|'PAYMENT_OPTION',
                'Values': [
                    'string',
                ],
                'MatchOptions': [
                    'EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CASE_SENSITIVE'|'CASE_INSENSITIVE',
                ]
            },
            'Tags': {
                'Key': 'string',
                'Values': [
                    'string',
                ],
                'MatchOptions': [
                    'EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CASE_SENSITIVE'|'CASE_INSENSITIVE',
                ]
            },
            'CostCategories': {
                'Key': 'string',
                'Values': [
                    'string',
                ]
            }
        },
        'DimensionalValueCount': 123
    }
)
type AnomalyMonitor

dict

param AnomalyMonitor

[REQUIRED]

The cost anomaly detection monitor object that you want to create.

  • MonitorArn (string) --

    The Amazon Resource Name (ARN) value.

  • MonitorName (string) -- [REQUIRED]

    The name of the monitor.

  • CreationDate (string) --

    The date when the monitor was created.

  • LastUpdatedDate (string) --

    The date when the monitor was last updated.

  • LastEvaluatedDate (string) --

    The date when the monitor last evaluated for anomalies.

  • MonitorType (string) -- [REQUIRED]

    The possible type values.

  • MonitorDimension (string) --

    The dimensions to evaluate.

  • MonitorSpecification (dict) --

    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 . The Expression for that looks like this: { "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. This allows you to 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 looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

    Note

    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" ] } }

    Note

    For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

    • Or (list) --

      Return results that match either Dimension object.

      • (dict) --

        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 . The Expression for that looks like this: { "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. This allows you to 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 looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

        Note

        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" ] } }

        Note

        For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

    • And (list) --

      Return results that match both Dimension objects.

      • (dict) --

        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 . The Expression for that looks like this: { "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. This allows you to 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 looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

        Note

        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" ] } }

        Note

        For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

    • Not (dict) --

      Return results that don't match a Dimension object.

    • Dimensions (dict) --

      The specific Dimension to use for Expression .

      • Key (string) --

        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) --

        The metadata values that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

        • (string) --

      • MatchOptions (list) --

        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 .

        • (string) --

    • Tags (dict) --

      The specific Tag to use for Expression .

      • Key (string) --

        The key for the tag.

      • Values (list) --

        The specific value of the tag.

        • (string) --

      • MatchOptions (list) --

        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 .

        • (string) --

    • CostCategories (dict) --

      The filter based on CostCategory values.

      • Key (string) --

        The unique name of the Cost Category.

      • Values (list) --

        The specific value of the Cost Category.

        • (string) --

  • DimensionalValueCount (integer) --

    The value for evaluated dimensions.

rtype

dict

returns

Response Syntax

{
    'MonitorArn': 'string'
}

Response Structure

  • (dict) --

    • MonitorArn (string) --

      The unique identifier of your newly created cost anomaly detection monitor.

GetAnomalyMonitors (new) Link ¶

Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).

See also: AWS API Documentation

Request Syntax

client.get_anomaly_monitors(
    MonitorArnList=[
        'string',
    ],
    NextPageToken='string',
    MaxResults=123
)
type MonitorArnList

list

param MonitorArnList

A list of cost anomaly monitor ARNs.

  • (string) --

type NextPageToken

string

param NextPageToken

The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

type MaxResults

integer

param MaxResults

The number of entries a paginated response contains.

rtype

dict

returns

Response Syntax

{
    'AnomalyMonitors': [
        {
            'MonitorArn': 'string',
            'MonitorName': 'string',
            'CreationDate': 'string',
            'LastUpdatedDate': 'string',
            'LastEvaluatedDate': 'string',
            'MonitorType': 'DIMENSIONAL'|'CUSTOM',
            'MonitorDimension': 'SERVICE',
            'MonitorSpecification': {
                'Or': [
                    {'... recursive ...'},
                ],
                'And': [
                    {'... recursive ...'},
                ],
                'Not': {'... recursive ...'},
                'Dimensions': {
                    'Key': 'AZ'|'INSTANCE_TYPE'|'LINKED_ACCOUNT'|'LINKED_ACCOUNT_NAME'|'OPERATION'|'PURCHASE_TYPE'|'REGION'|'SERVICE'|'SERVICE_CODE'|'USAGE_TYPE'|'USAGE_TYPE_GROUP'|'RECORD_TYPE'|'OPERATING_SYSTEM'|'TENANCY'|'SCOPE'|'PLATFORM'|'SUBSCRIPTION_ID'|'LEGAL_ENTITY_NAME'|'DEPLOYMENT_OPTION'|'DATABASE_ENGINE'|'CACHE_ENGINE'|'INSTANCE_TYPE_FAMILY'|'BILLING_ENTITY'|'RESERVATION_ID'|'RESOURCE_ID'|'RIGHTSIZING_TYPE'|'SAVINGS_PLANS_TYPE'|'SAVINGS_PLAN_ARN'|'PAYMENT_OPTION',
                    'Values': [
                        'string',
                    ],
                    'MatchOptions': [
                        'EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CASE_SENSITIVE'|'CASE_INSENSITIVE',
                    ]
                },
                'Tags': {
                    'Key': 'string',
                    'Values': [
                        'string',
                    ],
                    'MatchOptions': [
                        'EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CASE_SENSITIVE'|'CASE_INSENSITIVE',
                    ]
                },
                'CostCategories': {
                    'Key': 'string',
                    'Values': [
                        'string',
                    ]
                }
            },
            'DimensionalValueCount': 123
        },
    ],
    'NextPageToken': 'string'
}

Response Structure

  • (dict) --

    • AnomalyMonitors (list) --

      A list of cost anomaly monitors that includes the detailed metadata for each monitor.

      • (dict) --

        This object continuously inspects your account's cost data for anomalies, based on MonitorType and MonitorSpecification . The content consists of detailed metadata and the current status of the monitor object.

        • MonitorArn (string) --

          The Amazon Resource Name (ARN) value.

        • MonitorName (string) --

          The name of the monitor.

        • CreationDate (string) --

          The date when the monitor was created.

        • LastUpdatedDate (string) --

          The date when the monitor was last updated.

        • LastEvaluatedDate (string) --

          The date when the monitor last evaluated for anomalies.

        • MonitorType (string) --

          The possible type values.

        • MonitorDimension (string) --

          The dimensions to evaluate.

        • MonitorSpecification (dict) --

          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 . The Expression for that looks like this: { "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. This allows you to 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 looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

          Note

          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" ] } }

          Note

          For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

          • Or (list) --

            Return results that match either Dimension object.

            • (dict) --

              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 . The Expression for that looks like this: { "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. This allows you to 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 looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

              Note

              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" ] } }

              Note

              For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

          • And (list) --

            Return results that match both Dimension objects.

            • (dict) --

              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 . The Expression for that looks like this: { "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. This allows you to 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 looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

              Note

              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" ] } }

              Note

              For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

          • Not (dict) --

            Return results that don't match a Dimension object.

          • Dimensions (dict) --

            The specific Dimension to use for Expression .

            • Key (string) --

              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) --

              The metadata values that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

              • (string) --

            • MatchOptions (list) --

              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 .

              • (string) --

          • Tags (dict) --

            The specific Tag to use for Expression .

            • Key (string) --

              The key for the tag.

            • Values (list) --

              The specific value of the tag.

              • (string) --

            • MatchOptions (list) --

              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 .

              • (string) --

          • CostCategories (dict) --

            The filter based on CostCategory values.

            • Key (string) --

              The unique name of the Cost Category.

            • Values (list) --

              The specific value of the Cost Category.

              • (string) --

        • DimensionalValueCount (integer) --

          The value for evaluated dimensions.

    • NextPageToken (string) --

      The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.