Skip to content

send_data_set_notification async

send_data_set_notification(
    data_set_id: Id,
    type: NotificationType,
    *,
    config_overrides: Optional[AsyncDataExchangeClientConfig] = None,
    scope: Optional[ScopeDetails] = None,
    client_token: Optional[ClientToken] = None,
    comment: Optional[__stringMin0Max4096] = None,
    details: Optional[NotificationDetails] = None,
) -> SendDataSetNotificationResponse

The type of event associated with the data set.

Parameters:

  • scope (Optional[ScopeDetails], default: None ) –

    Affected scope of this notification such as the underlying resources affected by the notification event.

  • client_token (Optional[ClientToken], default: None ) –

    Idempotency key for the notification, this key allows us to deduplicate notifications that are sent in quick succession erroneously.

  • comment (Optional[__stringMin0Max4096], default: None ) –

    Free-form text field for providers to add information about their notifications.

  • data_set_id (Id) –

    Affected data set of the notification.

  • details (Optional[NotificationDetails], default: None ) –

    Extra details specific to this notification type.

  • type (NotificationType) –

    The type of the notification. Describing the kind of event the notification is alerting you to.

Raises:

Source code in docs_src/capo_dataexchange/_services/async_data_exchange.py
async def send_data_set_notification(
    self,
    data_set_id: "capo_dataexchange.types.id.Id",
    type: "capo_dataexchange.types.notification_type.NotificationType",
    *,
    config_overrides: Optional[AsyncDataExchangeClientConfig] = None,
    scope: Optional["capo_dataexchange.types.scope_details.ScopeDetails"] = None,
    client_token: Optional[
        "capo_dataexchange.types.client_token.ClientToken"
    ] = None,
    comment: Optional[
        "capo_dataexchange.types.__string_min0_max4096.__stringMin0Max4096"
    ] = None,
    details: Optional[
        "capo_dataexchange.types.notification_details.NotificationDetails"
    ] = None,
) -> "capo_dataexchange.types.send_data_set_notification_response.SendDataSetNotificationResponse":
    """<p>The type of event associated with the data set.</p>

    Args:
        scope: <p>Affected scope of this notification such as the underlying resources affected by the notification event.</p>
        client_token: <p>Idempotency key for the notification, this key allows us to deduplicate notifications that are sent in quick succession erroneously.</p>
        comment: <p>Free-form text field for providers to add information about their notifications.</p>
        data_set_id: <p>Affected data set of the notification.</p>
        details: <p>Extra details specific to this notification type.</p>
        type: <p>The type of the notification. Describing the kind of event the notification is alerting you to.</p>

    Raises:
        capo_dataexchange.errors.access_denied_exception.AccessDeniedException: <p>Access to the resource is denied.</p>
        capo_dataexchange.errors.conflict_exception.ConflictException: <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
        capo_dataexchange.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_dataexchange.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
        capo_dataexchange.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_dataexchange.errors.validation_exception.ValidationException: <p>The request was invalid.</p>
        capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_dataexchange.types.send_data_set_notification_request.SendDataSetNotificationRequest]",
    ) -> AsyncOperationResponse[
        "capo_dataexchange.types.send_data_set_notification_response.SendDataSetNotificationResponse"
    ]:
        import capo_dataexchange._operations.data_exchange.send_data_set_notification

        (
            output,
            http_response,
        ) = await capo_dataexchange._operations.data_exchange.send_data_set_notification.async_send_data_set_notification(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SendDataSetNotification")
    )
    input_: capo_dataexchange.types.send_data_set_notification_request.SendDataSetNotificationRequest = {
        "data_set_id": data_set_id,
        "type": type,
    }
    if scope is not None:
        input_["scope"] = scope
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if comment is not None:
        input_["comment"] = comment
    if details is not None:
        input_["details"] = details

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