Triggers an immediate execution of a scheduled report, outside of its regular schedule. The scheduled report must be in ENABLED state. Calling this operation on a DISABLED scheduled report returns a ValidationException.
If a clientToken is provided, the service uses it for idempotency. Requests with the same client token will not trigger a new execution within the same minute.
Parameters:
-
arn
(ScheduledReportArn)
–
The ARN of the scheduled report to execute.
-
client_token
(Optional[ClientToken], default:
None
)
–
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
-
dry_run
(Optional[bool], default:
None
)
–
When set to true, validates the scheduled report configuration without triggering an actual execution.
Raises:
-
AccessDeniedException
–
You do not have sufficient permissions to perform this action. Verify your IAM permissions and any resource policies.
-
ConflictException
–
The request could not be completed due to a conflict with the current state of the resource. For example, attempting to create a resource that already exists or is being created.
-
InternalServerException
–
An internal error occurred while processing the request. Retry your request. If the problem persists, contact Amazon Web Services Support.
-
ResourceNotFoundException
–
The specified resource (dashboard, policy, or widget) was not found. Verify the ARN and try again.
-
ThrottlingException
–
The request was denied due to request throttling. Reduce the frequency of requests and use exponential backoff.
-
ValidationException
–
The input parameters do not satisfy the requirements. Check the error message for specific validation details.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_bcm_dashboards/_services/bcm_dashboards.py
| def execute_scheduled_report(
self,
arn: "capo_bcm_dashboards.types.scheduled_report_arn.ScheduledReportArn",
*,
config_overrides: Optional[BCMDashboardsClientConfig] = None,
client_token: Optional[
"capo_bcm_dashboards.types.client_token.ClientToken"
] = None,
dry_run: Optional[bool] = None,
) -> "capo_bcm_dashboards.types.execute_scheduled_report_response.ExecuteScheduledReportResponse":
"""<p>Triggers an immediate execution of a scheduled report, outside of its regular schedule. The scheduled report must be in <code>ENABLED</code> state. Calling this operation on a <code>DISABLED</code> scheduled report returns a <code>ValidationException</code>.</p> <note> <p>If a <code>clientToken</code> is provided, the service uses it for idempotency. Requests with the same client token will not trigger a new execution within the same minute.</p> </note>
Args:
arn: <p>The ARN of the scheduled report to execute.</p>
client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
dry_run: <p>When set to <code>true</code>, validates the scheduled report configuration without triggering an actual execution.</p>
Raises:
capo_bcm_dashboards.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action. Verify your IAM permissions and any resource policies.</p>
capo_bcm_dashboards.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to create a resource that already exists or is being created.</p>
capo_bcm_dashboards.errors.internal_server_exception.InternalServerException: <p>An internal error occurred while processing the request. Retry your request. If the problem persists, contact Amazon Web Services Support.</p>
capo_bcm_dashboards.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource (dashboard, policy, or widget) was not found. Verify the ARN and try again.</p>
capo_bcm_dashboards.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Reduce the frequency of requests and use exponential backoff.</p>
capo_bcm_dashboards.errors.validation_exception.ValidationException: <p>The input parameters do not satisfy the requirements. Check the error message for specific validation details.</p>
capo_bcm_dashboards.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_bcm_dashboards.types.execute_scheduled_report_request.ExecuteScheduledReportRequest]",
) -> OperationResponse[
"capo_bcm_dashboards.types.execute_scheduled_report_response.ExecuteScheduledReportResponse"
]:
import capo_bcm_dashboards._operations.awsbcm_dashboards_service.execute_scheduled_report
output, http_response = (
capo_bcm_dashboards._operations.awsbcm_dashboards_service.execute_scheduled_report.execute_scheduled_report(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ExecuteScheduledReport")
)
input_: capo_bcm_dashboards.types.execute_scheduled_report_request.ExecuteScheduledReportRequest = {
"arn": arn
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
if dry_run is not None:
input_["dry_run"] = dry_run
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|