CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.
Starts a refresh of the specified dashboard.
Each time a dashboard is refreshed, CloudTrail runs queries to populate the dashboard's widgets. CloudTrail must be granted permissions to run the StartQuery operation on your behalf. To provide permissions, run the PutResourcePolicy operation to attach a resource-based policy to each event data store. For more information, see Example: Allow CloudTrail to run queries to populate a dashboard in the CloudTrail User Guide.
Parameters:
-
dashboard_id
(DashboardArn)
–
The name or ARN of the dashboard.
-
query_parameter_values
(Optional[QueryParameterValues], default:
None
)
–
The query parameter values for the dashboard
For custom dashboards, the following query parameters are valid: $StartTime$, $EndTime$, and $Period$.
For managed dashboards, the following query parameters are valid: $StartTime$, $EndTime$, $Period$, and $EventDataStoreId$. The $EventDataStoreId$ query parameter is required.
Raises:
Source code in docs_src/capo_cloudtrail/_services/async_cloud_trail.py
| async def start_dashboard_refresh(
self,
dashboard_id: "capo_cloudtrail.types.dashboard_arn.DashboardArn",
*,
config_overrides: Optional[AsyncCloudTrailClientConfig] = None,
query_parameter_values: Optional[
"capo_cloudtrail.types.query_parameter_values.QueryParameterValues"
] = None,
) -> "capo_cloudtrail.types.start_dashboard_refresh_response.StartDashboardRefreshResponse":
"""<important> <p>CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-service-availability-change.html">CloudTrail Lake availability change</a>.</p> </important> <p> Starts a refresh of the specified dashboard. </p> <p> Each time a dashboard is refreshed, CloudTrail runs queries to populate the dashboard's widgets. CloudTrail must be granted permissions to run the <code>StartQuery</code> operation on your behalf. To provide permissions, run the <code>PutResourcePolicy</code> operation to attach a resource-based policy to each event data store. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html#security_iam_resource-based-policy-examples-eds-dashboard">Example: Allow CloudTrail to run queries to populate a dashboard</a> in the <i>CloudTrail User Guide</i>. </p>
Args:
dashboard_id: <p> The name or ARN of the dashboard. </p>
query_parameter_values: <p> The query parameter values for the dashboard </p> <p>For custom dashboards, the following query parameters are valid: <code>$StartTime$</code>, <code>$EndTime$</code>, and <code>$Period$</code>.</p> <p>For managed dashboards, the following query parameters are valid: <code>$StartTime$</code>, <code>$EndTime$</code>, <code>$Period$</code>, and <code>$EventDataStoreId$</code>. The <code>$EventDataStoreId$</code> query parameter is required.</p>
Raises:
capo_cloudtrail.errors.event_data_store_not_found_exception.EventDataStoreNotFoundException: <p>The specified event data store was not found.</p>
capo_cloudtrail.errors.inactive_event_data_store_exception.InactiveEventDataStoreException: <p>The event data store is inactive.</p>
capo_cloudtrail.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when the specified resource is not found.</p>
capo_cloudtrail.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> This exception is thrown when the quota is exceeded. For information about CloudTrail quotas, see <a href="https://docs.aws.amazon.com/general/latest/gr/ct.html#limits_cloudtrail">Service quotas</a> in the <i>Amazon Web Services General Reference</i>. </p>
capo_cloudtrail.errors.unsupported_operation_exception.UnsupportedOperationException: <p>This exception is thrown when the requested operation is not supported.</p>
capo_cloudtrail.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudtrail.types.start_dashboard_refresh_request.StartDashboardRefreshRequest]",
) -> AsyncOperationResponse[
"capo_cloudtrail.types.start_dashboard_refresh_response.StartDashboardRefreshResponse"
]:
import capo_cloudtrail._operations.cloud_trail_20131101.start_dashboard_refresh
(
output,
http_response,
) = await capo_cloudtrail._operations.cloud_trail_20131101.start_dashboard_refresh.async_start_dashboard_refresh(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartDashboardRefresh")
)
input_: capo_cloudtrail.types.start_dashboard_refresh_request.StartDashboardRefreshRequest = {
"dashboard_id": dashboard_id
}
if query_parameter_values is not None:
input_["query_parameter_values"] = query_parameter_values
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|