Skip to content

reject_predictions async

reject_predictions(
    domain_identifier: DomainId,
    identifier: AssetIdentifier,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    revision: Optional[Revision] = None,
    reject_rule: Optional[RejectRule] = None,
    reject_choices: Optional[RejectChoices] = None,
    client_token: Optional[ClientToken] = None,
) -> RejectPredictionsOutput

Rejects automatically generated business-friendly metadata for your Amazon DataZone assets.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain.

  • identifier (AssetIdentifier) –

    The identifier of the prediction.

  • revision (Optional[Revision], default: None ) –

    The revision that is to be made to the asset.

  • reject_rule (Optional[RejectRule], default: None ) –

    Specifies the rule (or the conditions) under which a prediction can be rejected.

  • reject_choices (Optional[RejectChoices], default: None ) –

    Specifies the prediction (aka, the automatically generated piece of metadata) and the target (for example, a column name) that can be rejected.

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

    A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def reject_predictions(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.asset_identifier.AssetIdentifier",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    revision: Optional["capo_datazone.types.revision.Revision"] = None,
    reject_rule: Optional["capo_datazone.types.reject_rule.RejectRule"] = None,
    reject_choices: Optional[
        "capo_datazone.types.reject_choices.RejectChoices"
    ] = None,
    client_token: Optional["capo_datazone.types.client_token.ClientToken"] = None,
) -> "capo_datazone.types.reject_predictions_output.RejectPredictionsOutput":
    """<p>Rejects automatically generated business-friendly metadata for your Amazon DataZone assets.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain.</p>
        identifier: <p>The identifier of the prediction.</p>
        revision: <p>The revision that is to be made to the asset.</p>
        reject_rule: <p>Specifies the rule (or the conditions) under which a prediction can be rejected.</p>
        reject_choices: <p>Specifies the prediction (aka, the automatically generated piece of metadata) and the target (for example, a column name) that can be rejected.</p>
        client_token: <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.reject_predictions_input.RejectPredictionsInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.reject_predictions_output.RejectPredictionsOutput"
    ]:
        import capo_datazone._operations.data_zone.reject_predictions

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.reject_predictions.async_reject_predictions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RejectPredictions")
    )
    input_: capo_datazone.types.reject_predictions_input.RejectPredictionsInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
    }
    if revision is not None:
        input_["revision"] = revision
    if reject_rule is not None:
        input_["reject_rule"] = reject_rule
    if reject_choices is not None:
        input_["reject_choices"] = reject_choices
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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