Skip to content

update_publishing_destination async

update_publishing_destination(
    detector_id: DetectorId,
    destination_id: String,
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    destination_properties: Optional[DestinationProperties] = None,
) -> UpdatePublishingDestinationResponse

Updates information about the publishing destination specified by the destinationId.

Parameters:

  • detector_id (DetectorId) –

    The ID of the detector associated with the publishing destinations to update.

    To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

  • destination_id (String) –

    The ID of the publishing destination to update.

  • destination_properties (Optional[DestinationProperties], default: None ) –

    A DestinationProperties object that includes the DestinationArn and KmsKeyArn of the publishing destination.

Raises:

Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
async def update_publishing_destination(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    destination_id: "capo_guardduty.types.string.String",
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    destination_properties: Optional[
        "capo_guardduty.types.destination_properties.DestinationProperties"
    ] = None,
) -> "capo_guardduty.types.update_publishing_destination_response.UpdatePublishingDestinationResponse":
    """<p>Updates information about the publishing destination specified by the <code>destinationId</code>.</p>

    Args:
        detector_id: <p>The ID of the detector associated with the publishing destinations to update.</p> <p>To find the <code>detectorId</code> in the current Region, see the Settings page in the GuardDuty console, or run the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html">ListDetectors</a> API.</p>
        destination_id: <p>The ID of the publishing destination to update.</p>
        destination_properties: <p>A <code>DestinationProperties</code> object that includes the <code>DestinationArn</code> and <code>KmsKeyArn</code> of the publishing destination.</p>

    Raises:
        capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
        capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
        capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_guardduty.types.update_publishing_destination_request.UpdatePublishingDestinationRequest]",
    ) -> AsyncOperationResponse[
        "capo_guardduty.types.update_publishing_destination_response.UpdatePublishingDestinationResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.update_publishing_destination

        (
            output,
            http_response,
        ) = await capo_guardduty._operations.guard_duty_api_service.update_publishing_destination.async_update_publishing_destination(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePublishingDestination")
    )
    input_: capo_guardduty.types.update_publishing_destination_request.UpdatePublishingDestinationRequest = {
        "detector_id": detector_id,
        "destination_id": destination_id,
    }
    if destination_properties is not None:
        input_["destination_properties"] = destination_properties

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