Deletes the specified schedule group. Deleting a schedule group results in EventBridge Scheduler deleting all schedules associated with the group. When you delete a group, it remains in a DELETING state until all of its associated schedules are deleted. Schedules associated with the group that are set to run while the schedule group is in the process of being deleted might continue to invoke their targets until the schedule group and its associated schedules are deleted.
This operation is eventually consistent.
Parameters:
-
name
(ScheduleGroupName)
–
The name of the schedule group to delete.
-
client_token
(Optional[ClientToken], default:
None
)
–
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.
Raises:
Source code in docs_src/capo_scheduler/_services/scheduler.py
| def delete_schedule_group(
self,
name: "capo_scheduler.types.schedule_group_name.ScheduleGroupName",
*,
config_overrides: Optional[SchedulerClientConfig] = None,
client_token: Optional["capo_scheduler.types.client_token.ClientToken"] = None,
) -> "capo_scheduler.types.delete_schedule_group_output.DeleteScheduleGroupOutput":
"""<p>Deletes the specified schedule group. Deleting a schedule group results in EventBridge Scheduler deleting all schedules associated with the group. When you delete a group, it remains in a <code>DELETING</code> state until all of its associated schedules are deleted. Schedules associated with the group that are set to run while the schedule group is in the process of being deleted might continue to invoke their targets until the schedule group and its associated schedules are deleted.</p> <note> <p> This operation is eventually consistent. </p> </note>
Args:
name: <p>The name of the schedule group to delete.</p>
client_token: <p> Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency. </p>
Raises:
capo_scheduler.errors.conflict_exception.ConflictException: <p>Updating or deleting the resource can cause an inconsistent state.</p>
capo_scheduler.errors.internal_server_exception.InternalServerException: <p>Unexpected error encountered while processing the request.</p>
capo_scheduler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
capo_scheduler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_scheduler.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
capo_scheduler.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_scheduler.types.delete_schedule_group_input.DeleteScheduleGroupInput]",
) -> OperationResponse[
"capo_scheduler.types.delete_schedule_group_output.DeleteScheduleGroupOutput"
]:
import capo_scheduler._operations.aws_chronos_service.delete_schedule_group
output, http_response = (
capo_scheduler._operations.aws_chronos_service.delete_schedule_group.delete_schedule_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteScheduleGroup")
)
input_: capo_scheduler.types.delete_schedule_group_input.DeleteScheduleGroupInput = {
"name": name
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|