Skip to content

update_trusted_entity_set

update_trusted_entity_set(
    detector_id: DetectorId,
    trusted_entity_set_id: String,
    *,
    config_overrides: Optional[GuardDutyClientConfig] = None,
    name: Optional[Name] = None,
    location: Optional[Location] = None,
    expected_bucket_owner: Optional[ExpectedBucketOwner] = None,
    activate: Optional[Boolean] = None,
) -> UpdateTrustedEntitySetResponse

Updates the trusted entity set associated with the specified trustedEntitySetId.

Parameters:

  • detector_id (DetectorId) –

    The unique ID of the GuardDuty detector associated with the threat entity set that 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.

  • trusted_entity_set_id (String) –

    The ID returned by GuardDuty after updating the trusted entity set resource.

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

    A user-friendly name to identify the trusted entity set.

    The name of your list can include lowercase letters, uppercase letters, numbers, dash (-), and underscore (_).

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

    The URI of the file that contains the trusted entity set.

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

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

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

    A boolean value that indicates whether GuardDuty is to start using this updated trusted entity set. After you update an entity set, you will need to activate it again. It might take up to 15 minutes for the updated entity set to be effective.

Raises:

Source code in docs_src/capo_guardduty/_services/guard_duty.py
def update_trusted_entity_set(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    trusted_entity_set_id: "capo_guardduty.types.string.String",
    *,
    config_overrides: Optional[GuardDutyClientConfig] = None,
    name: Optional["capo_guardduty.types.name.Name"] = None,
    location: Optional["capo_guardduty.types.location.Location"] = None,
    expected_bucket_owner: Optional[
        "capo_guardduty.types.expected_bucket_owner.ExpectedBucketOwner"
    ] = None,
    activate: Optional["capo_guardduty.types.boolean.Boolean"] = None,
) -> "capo_guardduty.types.update_trusted_entity_set_response.UpdateTrustedEntitySetResponse":
    """<p>Updates the trusted entity set associated with the specified <code>trustedEntitySetId</code>.</p>

    Args:
        detector_id: <p>The unique ID of the GuardDuty detector associated with the threat entity set that 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>
        trusted_entity_set_id: <p>The ID returned by GuardDuty after updating the trusted entity set resource.</p>
        name: <p>A user-friendly name to identify the trusted entity set.</p> <p>The name of your list can include lowercase letters, uppercase letters, numbers, dash (-), and underscore (_).</p>
        location: <p>The URI of the file that contains the trusted entity set.</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>
        activate: <p>A boolean value that indicates whether GuardDuty is to start using this updated trusted entity set. After you update an entity set, you will need to activate it again. It might take up to 15 minutes for the updated entity set to be effective.</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.
    """

    def _handler(
        req: "OperationRequest[capo_guardduty.types.update_trusted_entity_set_request.UpdateTrustedEntitySetRequest]",
    ) -> OperationResponse[
        "capo_guardduty.types.update_trusted_entity_set_response.UpdateTrustedEntitySetResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.update_trusted_entity_set

        output, http_response = (
            capo_guardduty._operations.guard_duty_api_service.update_trusted_entity_set.update_trusted_entity_set(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTrustedEntitySet")
    )
    input_: capo_guardduty.types.update_trusted_entity_set_request.UpdateTrustedEntitySetRequest = {
        "detector_id": detector_id,
        "trusted_entity_set_id": trusted_entity_set_id,
    }
    if name is not None:
        input_["name"] = name
    if location is not None:
        input_["location"] = location
    if expected_bucket_owner is not None:
        input_["expected_bucket_owner"] = expected_bucket_owner
    if activate is not None:
        input_["activate"] = activate

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output