Skip to content

batch_delete_scheduled_action async

batch_delete_scheduled_action(
    *,
    config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
    auto_scaling_group_name: Optional[XmlStringMaxLen255] = None,
    scheduled_action_names: Optional[ScheduledActionNames] = None,
) -> BatchDeleteScheduledActionAnswer

Deletes one or more scheduled actions for the specified Auto Scaling group.

Parameters:

Raises:

  • ResourceContentionFault –

    You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
async def batch_delete_scheduled_action(
    self,
    *,
    config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
    auto_scaling_group_name: Optional[
        "capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
    ] = None,
    scheduled_action_names: Optional[
        "capo_auto_scaling.types.scheduled_action_names.ScheduledActionNames"
    ] = None,
) -> "capo_auto_scaling.types.batch_delete_scheduled_action_answer.BatchDeleteScheduledActionAnswer":
    """<p>Deletes one or more scheduled actions for the specified Auto Scaling group.</p>

    Args:
        auto_scaling_group_name: <p>The name of the Auto Scaling group.</p>
        scheduled_action_names: <p>The names of the scheduled actions to delete. The maximum number allowed is 50. </p>

    Raises:
        capo_auto_scaling.errors.resource_contention_fault.ResourceContentionFault: <p>You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).</p>
        capo_auto_scaling.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_auto_scaling.types.batch_delete_scheduled_action_type.BatchDeleteScheduledActionType]",
    ) -> AsyncOperationResponse[
        "capo_auto_scaling.types.batch_delete_scheduled_action_answer.BatchDeleteScheduledActionAnswer"
    ]:
        import capo_auto_scaling._operations.auto_scaling_2011_01_01.batch_delete_scheduled_action

        (
            output,
            http_response,
        ) = await capo_auto_scaling._operations.auto_scaling_2011_01_01.batch_delete_scheduled_action.async_batch_delete_scheduled_action(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteScheduledAction")
    )
    input_: capo_auto_scaling.types.batch_delete_scheduled_action_type.BatchDeleteScheduledActionType = {}
    if auto_scaling_group_name is not None:
        input_["auto_scaling_group_name"] = auto_scaling_group_name
    if scheduled_action_names is not None:
        input_["scheduled_action_names"] = scheduled_action_names

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