Skip to content

update_threat_intel_set async

update_threat_intel_set(
    detector_id: DetectorId,
    threat_intel_set_id: String,
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    name: Optional[Name] = None,
    location: Optional[Location] = None,
    activate: Optional[Boolean] = None,
    expected_bucket_owner: Optional[AccountId] = None,
) -> UpdateThreatIntelSetResponse

Updates the ThreatIntelSet specified by the ThreatIntelSet ID.

Parameters:

  • detector_id (DetectorId) –

    The detectorID that specifies the GuardDuty service whose ThreatIntelSet you want to update.

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

  • threat_intel_set_id (String) –

    The unique ID that specifies the ThreatIntelSet that you want to update.

  • name (Optional[Name], default: None ) –

    The unique ID that specifies the ThreatIntelSet that you want to update.

  • location (Optional[Location], default: None ) –

    The updated URI of the file that contains the ThreateIntelSet.

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

    The updated Boolean value that specifies whether the ThreateIntelSet is active or not.

  • expected_bucket_owner (Optional[AccountId], default: None ) –

    The Amazon Web Services account ID that owns the Amazon S3 bucket specified in the location parameter.

Raises:

Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
async def update_threat_intel_set(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    threat_intel_set_id: "capo_guardduty.types.string.String",
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    name: Optional["capo_guardduty.types.name.Name"] = None,
    location: Optional["capo_guardduty.types.location.Location"] = None,
    activate: Optional["capo_guardduty.types.boolean.Boolean"] = None,
    expected_bucket_owner: Optional[
        "capo_guardduty.types.account_id.AccountId"
    ] = None,
) -> "capo_guardduty.types.update_threat_intel_set_response.UpdateThreatIntelSetResponse":
    """<p>Updates the ThreatIntelSet specified by the ThreatIntelSet ID.</p>

    Args:
        detector_id: <p>The detectorID that specifies the GuardDuty service whose ThreatIntelSet you want 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>
        threat_intel_set_id: <p>The unique ID that specifies the ThreatIntelSet that you want to update.</p>
        name: <p>The unique ID that specifies the ThreatIntelSet that you want to update.</p>
        location: <p>The updated URI of the file that contains the ThreateIntelSet.</p>
        activate: <p>The updated Boolean value that specifies whether the ThreateIntelSet is active or not.</p>
        expected_bucket_owner: <p>The Amazon Web Services account ID that owns the Amazon S3 bucket specified in the <b>location</b> parameter.</p>

    Raises:
        capo_guardduty.errors.access_denied_exception.AccessDeniedException: <p>An access denied exception object.</p>
        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_threat_intel_set_request.UpdateThreatIntelSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_guardduty.types.update_threat_intel_set_response.UpdateThreatIntelSetResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.update_threat_intel_set

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateThreatIntelSet")
    )
    input_: capo_guardduty.types.update_threat_intel_set_request.UpdateThreatIntelSetRequest = {
        "detector_id": detector_id,
        "threat_intel_set_id": threat_intel_set_id,
    }
    if name is not None:
        input_["name"] = name
    if location is not None:
        input_["location"] = location
    if activate is not None:
        input_["activate"] = activate
    if expected_bucket_owner is not None:
        input_["expected_bucket_owner"] = expected_bucket_owner

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