get_estimated_water_allocation
¶
get_estimated_water_allocation(
time_period: TimePeriod,
*,
config_overrides: Optional[SustainabilityClientConfig] = None,
group_by: Optional[DimensionList] = None,
filter_by: Optional[FilterExpression] = None,
allocation_types: Optional[WaterAllocationTypeList] = None,
granularity: Optional[TimeGranularity] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> GetEstimatedWaterAllocationResponse
Returns estimated water allocation values based on customer grouping and filtering parameters. We recommend using pagination to ensure that the operation returns quickly and successfully.
Parameters:
-
time_period(TimePeriod) –The date range for fetching estimated water allocation. The range must include the start date of a year for that year's data to be included in the response.
-
group_by(Optional[DimensionList], default:None) –The dimensions available for grouping estimated water allocation.
-
filter_by(Optional[FilterExpression], default:None) –The criteria for filtering estimated water allocation. To determine which dimensions are available to be filtered by, you can first call GetEstimatedWaterAllocationDimensionValues
-
allocation_types(Optional[WaterAllocationTypeList], default:None) –The allocation types to include in the results. If absent, returns
TOTAL_WATER_WITHDRAWALSallocation types. -
granularity(Optional[TimeGranularity], default:None) –The time granularity for the results. Only
YEARLY_CALENDARtime granularity is currently supported for water allocation. Defaults toYEARLY_CALENDARif absent.If requesting partial time periods, data will be returned based on the smallest supported granularity. For example, requesting
2025-04-01T00:00:00Zto2026-04-01T00:00:00ZwithYEARLY_CALENDARwill return all the data for 2026 only. -
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:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–The request processing has failed because of an unknown error, exception, or failure.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
GetEstimatedWaterAllocationSuccess
>>> client.get_estimated_water_allocation(time_period={'Start': '2025-01-01T00:00:00.00Z', 'End': '2026-01-01T00:00:00.00Z'}, group_by=['SERVICE'], allocation_types=['TOTAL_WATER_WITHDRAWALS'], granularity='YEARLY_CALENDAR')
Source code in docs_src/capo_sustainability/_services/sustainability.py
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | |