Skip to content

disassociate_feed

disassociate_feed(
    id: FeedId,
    associated_resource_name: AssociatedResourceName,
    *,
    config_overrides: Optional[ElementalInferenceClientConfig] = None,
    dry_run: Optional[bool] = None,
) -> DisassociateFeedResponse

Releases the resource (the source media) that is associated with this feed. The outputs in the feed become DISABLED.

Parameters:

  • id (FeedId) –

    The ID of the feed where you want to release the resource.

  • associated_resource_name (AssociatedResourceName) –

    The name of the resource currently associated with the feed.

  • dry_run (Optional[bool], default: None ) –

    Set to true if you want to do a dry run of the disassociate action.

    Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions. If the dry run fails, the action returns a 4xx error code.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    The request could not be completed due to a conflict.

  • InternalServerErrorException –

    An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support.

  • ResourceNotFoundException –

    The resource specified in the action doesn't exist.

  • TooManyRequestException –

    The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying.

  • ValidationException –

    The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying.

  • UnknownServiceError –

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

Source code in docs_src/capo_elementalinference/_services/elemental_inference.py
def disassociate_feed(
    self,
    id: "capo_elementalinference.types.feed_id.FeedId",
    associated_resource_name: "capo_elementalinference.types.associated_resource_name.AssociatedResourceName",
    *,
    config_overrides: Optional[ElementalInferenceClientConfig] = None,
    dry_run: Optional[bool] = None,
) -> "capo_elementalinference.types.disassociate_feed_response.DisassociateFeedResponse":
    """<p>Releases the resource (the source media) that is associated with this feed. The outputs in the feed become DISABLED. </p>

    Args:
        id: <p>The ID of the feed where you want to release the resource.</p>
        associated_resource_name: <p>The name of the resource currently associated with the feed.</p>
        dry_run: <p>Set to true if you want to do a dry run of the disassociate action.</p> <p>Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions. If the dry run fails, the action returns a 4xx error code. </p>

    Raises:
        capo_elementalinference.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_elementalinference.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict.</p>
        capo_elementalinference.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support. </p>
        capo_elementalinference.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the action doesn't exist.</p>
        capo_elementalinference.errors.too_many_request_exception.TooManyRequestException: <p>The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying. </p>
        capo_elementalinference.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying. </p>
        capo_elementalinference.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elementalinference.types.disassociate_feed_request.DisassociateFeedRequest]",
    ) -> OperationResponse[
        "capo_elementalinference.types.disassociate_feed_response.DisassociateFeedResponse"
    ]:
        import capo_elementalinference._operations.elemental_inference.disassociate_feed

        output, http_response = (
            capo_elementalinference._operations.elemental_inference.disassociate_feed.disassociate_feed(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateFeed")
    )
    input_: capo_elementalinference.types.disassociate_feed_request.DisassociateFeedRequest = {
        "id": id,
        "associated_resource_name": associated_resource_name,
    }
    if dry_run is not None:
        input_["dry_run"] = dry_run

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