Skip to content

update_subscriber async

update_subscriber(
    subscriber_id: UUID,
    *,
    config_overrides: Optional[AsyncSecurityLakeClientConfig] = None,
    subscriber_identity: Optional[AwsIdentity] = None,
    subscriber_name: Optional[SafeString] = None,
    subscriber_description: Optional[DescriptionString] = None,
    sources: Optional[LogSourceResourceList] = None,
) -> UpdateSubscriberResponse

Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from.

Parameters:

  • subscriber_id (UUID) –

    A value created by Security Lake that uniquely identifies your subscription.

  • subscriber_identity (Optional[AwsIdentity], default: None ) –

    The Amazon Web Services identity used to access your data.

  • subscriber_name (Optional[SafeString], default: None ) –

    The name of the Security Lake account subscriber.

  • subscriber_description (Optional[DescriptionString], default: None ) –

    The description of the Security Lake account subscriber.

  • sources (Optional[LogSourceResourceList], default: None ) –

    The supported Amazon Web Services services from which logs and events are collected. For the list of supported Amazon Web Services services, see the Amazon Security Lake User Guide.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific Amazon Web Services action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement.

  • BadRequestException –

    The request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

  • ConflictException –

    Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.

  • InternalServerException –

    Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again.

  • ResourceNotFoundException –

    The resource could not be found.

  • ThrottlingException –

    The limit on the number of requests per second was exceeded.

  • UnknownServiceError –

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

Source code in docs_src/capo_securitylake/_services/async_security_lake.py
async def update_subscriber(
    self,
    subscriber_id: "capo_securitylake.types.uuid.UUID",
    *,
    config_overrides: Optional[AsyncSecurityLakeClientConfig] = None,
    subscriber_identity: Optional[
        "capo_securitylake.types.aws_identity.AwsIdentity"
    ] = None,
    subscriber_name: Optional[
        "capo_securitylake.types.safe_string.SafeString"
    ] = None,
    subscriber_description: Optional[
        "capo_securitylake.types.description_string.DescriptionString"
    ] = None,
    sources: Optional[
        "capo_securitylake.types.log_source_resource_list.LogSourceResourceList"
    ] = None,
) -> "capo_securitylake.types.update_subscriber_response.UpdateSubscriberResponse":
    """<p>Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from.</p>

    Args:
        subscriber_id: <p>A value created by Security Lake that uniquely identifies your subscription.</p>
        subscriber_identity: <p>The Amazon Web Services identity used to access your data.</p>
        subscriber_name: <p>The name of the Security Lake account subscriber.</p>
        subscriber_description: <p>The description of the Security Lake account subscriber.</p>
        sources: <p>The supported Amazon Web Services services from which logs and events are collected. For the list of supported Amazon Web Services services, see the <a href="https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html">Amazon Security Lake User Guide</a>.</p>

    Raises:
        capo_securitylake.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific Amazon Web Services action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement.</p>
        capo_securitylake.errors.bad_request_exception.BadRequestException: <p>The request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
        capo_securitylake.errors.conflict_exception.ConflictException: <p>Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.</p>
        capo_securitylake.errors.internal_server_exception.InternalServerException: <p>Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again.</p>
        capo_securitylake.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_securitylake.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_securitylake.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_securitylake.types.update_subscriber_request.UpdateSubscriberRequest]",
    ) -> AsyncOperationResponse[
        "capo_securitylake.types.update_subscriber_response.UpdateSubscriberResponse"
    ]:
        import capo_securitylake._operations.security_lake.update_subscriber

        (
            output,
            http_response,
        ) = await capo_securitylake._operations.security_lake.update_subscriber.async_update_subscriber(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSubscriber")
    )
    input_: capo_securitylake.types.update_subscriber_request.UpdateSubscriberRequest = {
        "subscriber_id": subscriber_id
    }
    if subscriber_identity is not None:
        input_["subscriber_identity"] = subscriber_identity
    if subscriber_name is not None:
        input_["subscriber_name"] = subscriber_name
    if subscriber_description is not None:
        input_["subscriber_description"] = subscriber_description
    if sources is not None:
        input_["sources"] = sources

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