Skip to content

list_asset_revisions

list_asset_revisions(
    domain_identifier: DomainId,
    identifier: AssetIdentifier,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListAssetRevisionsOutput

Lists the revisions for the asset.

Prerequisites:

  • The asset must exist in the domain.

  • There must be at least one revision of the asset (which happens automatically after creation).

  • The domain must be valid and active.

  • User must have permissions on the asset and domain.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the domain.

  • identifier (AssetIdentifier) –

    The identifier of the asset.

  • next_token (Optional[PaginationToken], default: None ) –

    When the number of revisions is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of revisions, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListAssetRevisions to list the next set of revisions.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of revisions to return in a single call to ListAssetRevisions. When the number of revisions to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListAssetRevisions to list the next set of revisions.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def list_asset_revisions(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.asset_identifier.AssetIdentifier",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_datazone.types.max_results.MaxResults"] = None,
) -> "capo_datazone.types.list_asset_revisions_output.ListAssetRevisionsOutput":
    """<p>Lists the revisions for the asset.</p> <p>Prerequisites:</p> <ul> <li> <p>The asset must exist in the domain. </p> </li> <li> <p>There must be at least one revision of the asset (which happens automatically after creation).</p> </li> <li> <p>The domain must be valid and active.</p> </li> <li> <p>User must have permissions on the asset and domain.</p> </li> </ul>

    Args:
        domain_identifier: <p>The identifier of the domain.</p>
        identifier: <p>The identifier of the asset.</p>
        next_token: <p>When the number of revisions is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of revisions, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListAssetRevisions</code> to list the next set of revisions.</p>
        max_results: <p>The maximum number of revisions to return in a single call to <code>ListAssetRevisions</code>. When the number of revisions to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListAssetRevisions</code> to list the next set of revisions.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.list_asset_revisions_input.ListAssetRevisionsInput]",
    ) -> OperationResponse[
        "capo_datazone.types.list_asset_revisions_output.ListAssetRevisionsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_asset_revisions

        output, http_response = (
            capo_datazone._operations.data_zone.list_asset_revisions.list_asset_revisions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAssetRevisions")
    )
    input_: capo_datazone.types.list_asset_revisions_input.ListAssetRevisionsInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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