Skip to content

modify_instance_event_start_time async

modify_instance_event_start_time(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    instance_id: Optional[InstanceId] = None,
    instance_event_id: Optional[String] = None,
    not_before: Optional[DateTime] = None,
) -> ModifyInstanceEventStartTimeResult

Modifies the start time for a scheduled Amazon EC2 instance event.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • instance_id (Optional[InstanceId], default: None ) –

    The ID of the instance with the scheduled event.

  • instance_event_id (Optional[String], default: None ) –

    The ID of the event whose date and time you are modifying.

  • not_before (Optional[DateTime], default: None ) –

    The new date and time when the event will take place.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def modify_instance_event_start_time(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    instance_id: Optional["capo_ec2.types.instance_id.InstanceId"] = None,
    instance_event_id: Optional["capo_ec2.types.string.String"] = None,
    not_before: Optional["capo_ec2.types.date_time.DateTime"] = None,
) -> "capo_ec2.types.modify_instance_event_start_time_result.ModifyInstanceEventStartTimeResult":
    """<p>Modifies the start time for a scheduled Amazon EC2 instance event.</p>

    Args:
        dry_run: <p>Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        instance_id: <p>The ID of the instance with the scheduled event.</p>
        instance_event_id: <p>The ID of the event whose date and time you are modifying.</p>
        not_before: <p>The new date and time when the event will take place.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.modify_instance_event_start_time_request.ModifyInstanceEventStartTimeRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.modify_instance_event_start_time_result.ModifyInstanceEventStartTimeResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_instance_event_start_time

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.modify_instance_event_start_time.async_modify_instance_event_start_time(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyInstanceEventStartTime")
    )
    input_: capo_ec2.types.modify_instance_event_start_time_request.ModifyInstanceEventStartTimeRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if instance_id is not None:
        input_["instance_id"] = instance_id
    if instance_event_id is not None:
        input_["instance_event_id"] = instance_event_id
    if not_before is not None:
        input_["not_before"] = not_before

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