Skip to content

get_estimated_water_allocation_dimension_values async

get_estimated_water_allocation_dimension_values(
    time_period: TimePeriod,
    dimensions: DimensionList,
    *,
    config_overrides: Optional[AsyncSustainabilityClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> GetEstimatedWaterAllocationDimensionValuesResponse

Returns the possible dimension values available for a customer's account. We recommend using pagination to ensure that the operation returns quickly and successfully.

Parameters:

  • time_period (TimePeriod) –

    The date range for fetching the dimension values. The range must include the start date of a year for that year's data to be included in the response.

  • dimensions (DimensionList) –

    The dimensions available for grouping estimated water allocation.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return in a single call. Default is 1000.

  • next_token (Optional[NextToken], default: None ) –

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

Raises:

Examples:

GetEstimatedWaterAllocationDimensionValuesSuccess

>>> await client.get_estimated_water_allocation_dimension_values(time_period={'Start': '2025-01-01T00:00:00.00Z', 'End': '2026-01-01T00:00:00.00Z'}, dimensions=['REGION', 'SERVICE', 'USAGE_ACCOUNT_ID'])
Source code in docs_src/capo_sustainability/_services/async_sustainability.py
async def get_estimated_water_allocation_dimension_values(
    self,
    time_period: "capo_sustainability.types.time_period.TimePeriod",
    dimensions: "capo_sustainability.types.dimension_list.DimensionList",
    *,
    config_overrides: Optional[AsyncSustainabilityClientConfig] = None,
    max_results: Optional[
        "capo_sustainability.types.max_results.MaxResults"
    ] = None,
    next_token: Optional["capo_sustainability.types.next_token.NextToken"] = None,
) -> "capo_sustainability.types.get_estimated_water_allocation_dimension_values_response.GetEstimatedWaterAllocationDimensionValuesResponse":
    """<p>Returns the possible dimension values available for a customer's account. We recommend using pagination to ensure that the operation returns quickly and successfully. </p>

    Args:
        time_period: <p> The date range for fetching the dimension values. The range must include the start date of a year for that year's data to be included in the response. </p>
        dimensions: <p>The dimensions available for grouping estimated water allocation.</p>
        max_results: <p>The maximum number of results to return in a single call. Default is 1000.</p>
        next_token: <p>The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page. </p>

    Raises:
        capo_sustainability.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_sustainability.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
        capo_sustainability.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_sustainability.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_sustainability.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        GetEstimatedWaterAllocationDimensionValuesSuccess

        >>> await client.get_estimated_water_allocation_dimension_values(time_period={'Start': '2025-01-01T00:00:00.00Z', 'End': '2026-01-01T00:00:00.00Z'}, dimensions=['REGION', 'SERVICE', 'USAGE_ACCOUNT_ID'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sustainability.types.get_estimated_water_allocation_dimension_values_request.GetEstimatedWaterAllocationDimensionValuesRequest]",
    ) -> AsyncOperationResponse[
        "capo_sustainability.types.get_estimated_water_allocation_dimension_values_response.GetEstimatedWaterAllocationDimensionValuesResponse"
    ]:
        import capo_sustainability._operations.aws_sustainability_api_service.get_estimated_water_allocation_dimension_values

        (
            output,
            http_response,
        ) = await capo_sustainability._operations.aws_sustainability_api_service.get_estimated_water_allocation_dimension_values.async_get_estimated_water_allocation_dimension_values(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetEstimatedWaterAllocationDimensionValues"),
    )
    input_: capo_sustainability.types.get_estimated_water_allocation_dimension_values_request.GetEstimatedWaterAllocationDimensionValuesRequest = {
        "time_period": time_period,
        "dimensions": dimensions,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output