Sustainability / Paginator / GetEstimatedCarbonEmissions

GetEstimatedCarbonEmissions

class Sustainability.Paginator.GetEstimatedCarbonEmissions
paginator = client.get_paginator('get_estimated_carbon_emissions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Sustainability.Client.get_estimated_carbon_emissions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TimePeriod={
        'Start': datetime(2015, 1, 1),
        'End': datetime(2015, 1, 1)
    },
    GroupBy=[
        'USAGE_ACCOUNT_ID'|'REGION'|'SERVICE',
    ],
    FilterBy={
        'Dimensions': {
            'string': [
                'string',
            ]
        }
    },
    EmissionsTypes=[
        'TOTAL_LBM_CARBON_EMISSIONS'|'TOTAL_MBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_1_CARBON_EMISSIONS'|'TOTAL_SCOPE_2_LBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_2_MBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_3_LBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_3_MBM_CARBON_EMISSIONS',
    ],
    Granularity='YEARLY_CALENDAR'|'YEARLY_FISCAL'|'QUARTERLY_CALENDAR'|'QUARTERLY_FISCAL'|'MONTHLY',
    GranularityConfiguration={
        'FiscalYearStartMonth': 123
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • TimePeriod (dict) –

    [REQUIRED]

    The date range for fetching estimated carbon emissions.

    • Start (datetime) – [REQUIRED]

      The start (inclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ

    • End (datetime) – [REQUIRED]

      The end (exclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ

  • GroupBy (list) –

    The dimensions available for grouping estimated carbon emissions.

    • (string) –

      Specifies the dimensions available for grouping and filtering emissions data.

  • FilterBy (dict) –

    The criteria for filtering estimated carbon emissions.

    • Dimensions (dict) –

      Filters emission values by specific dimension values.

      • (string) –

        Specifies the dimensions available for grouping and filtering emissions data.

        • (list) –

          • (string) –

  • EmissionsTypes (list) –

    The emission types to include in the results. If absent, returns TOTAL_LBM_CARBON_EMISSIONS and TOTAL_MBM_CARBON_EMISSIONS emissions types.

    • (string) –

      Specifies the types of carbon emissions calculations available.

  • Granularity (string) – The time granularity for the results. If absent, uses MONTHLY time granularity.

  • GranularityConfiguration (dict) –

    Configuration for fiscal year calculations when using YEARLY_FISCAL or QUARTERLY_FISCAL granularity.

    • FiscalYearStartMonth (integer) –

      The month (1-12) when the fiscal year begins. Used for YEARLY_FISCAL and QUARTERLY_FISCAL granularity. Defaults to 1 (January).

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'Results': [
        {
            'TimePeriod': {
                'Start': datetime(2015, 1, 1),
                'End': datetime(2015, 1, 1)
            },
            'DimensionsValues': {
                'string': 'string'
            },
            'ModelVersion': 'string',
            'EmissionsValues': {
                'string': {
                    'Value': 123.0,
                    'Unit': 'MTCO2e'
                }
            }
        },
    ],

}

Response Structure

  • (dict) –

    • Results (list) –

      The result of the requested inputs.

      • (dict) –

        Contains estimated carbon emissions data for a specific time period and dimension grouping.

        • TimePeriod (dict) –

          The reporting period for emission values.

          • Start (datetime) –

            The start (inclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ

          • End (datetime) –

            The end (exclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ

        • DimensionsValues (dict) –

          The dimensions used to group emissions values.

          • (string) –

            Specifies the dimensions available for grouping and filtering emissions data.

            • (string) –

        • ModelVersion (string) –

          The semantic version-formatted string that indicates the methodology version used to calculate the emission values.

          Note

          The AWS Sustainability service reflects the most recent model version for every month. You will not see two entries for the same month with different ModelVersion values. To track the evolution of the methodology and compare emission values from previous versions, we recommend creating a Data Export.

        • EmissionsValues (dict) –

          The emissions values for the requested emissions types.

          • (string) –

            Specifies the types of carbon emissions calculations available.

            • (dict) –

              Represents a carbon emissions quantity with its value and unit of measurement.

              • Value (float) –

                The numeric value of the emissions quantity.

              • Unit (string) –

                The unit of measurement for the emissions value.