Skip to content

list_asset_contracts

list_asset_contracts(
    contract_filter: ContractFilter,
    *,
    config_overrides: Optional[ManagedBlockchainQueryClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[int] = None,
) -> ListAssetContractsOutput

Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet address).

The Bitcoin blockchain networks do not support this operation.

Parameters:

  • contract_filter (ContractFilter) –

    Contains the filter parameter for the request.

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

    The pagination token that indicates the next set of results to retrieve.

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

    The maximum number of contracts to list.

    Default: 100

    Even if additional results can be retrieved, the request can return less results than maxResults or an empty array of results.

    To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return

Raises:

  • AccessDeniedException –

    The Amazon Web Services account doesn’t have access to this resource.

  • InternalServerException –

    The request processing has failed because of an internal error in the service.

  • ServiceQuotaExceededException –

    The service quota has been exceeded for this resource.

  • ThrottlingException –

    The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.

  • ValidationException –

    The resource passed is invalid.

  • UnknownServiceError –

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

Source code in docs_src/capo_managedblockchain_query/_services/managed_blockchain_query.py
def list_asset_contracts(
    self,
    contract_filter: "capo_managedblockchain_query.types.contract_filter.ContractFilter",
    *,
    config_overrides: Optional[ManagedBlockchainQueryClientConfig] = None,
    next_token: Optional[
        "capo_managedblockchain_query.types.next_token.NextToken"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_managedblockchain_query.types.list_asset_contracts_output.ListAssetContractsOutput":
    """<p>Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet address).</p> <p>The Bitcoin blockchain networks do not support this operation.</p>

    Args:
        contract_filter: <p>Contains the filter parameter for the request.</p>
        next_token: <p> The pagination token that indicates the next set of results to retrieve.</p>
        max_results: <p>The maximum number of contracts to list.</p> <p>Default: <code>100</code> </p> <note> <p>Even if additional results can be retrieved, the request can return less results than <code>maxResults</code> or an empty array of results.</p> <p>To retrieve the next set of results, make another request with the returned <code>nextToken</code> value. The value of <code>nextToken</code> is <code>null</code> when there are no more results to return</p> </note>

    Raises:
        capo_managedblockchain_query.errors.access_denied_exception.AccessDeniedException: <p>The Amazon Web Services account doesn’t have access to this resource. </p>
        capo_managedblockchain_query.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an internal error in the service.</p>
        capo_managedblockchain_query.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded for this resource.</p>
        capo_managedblockchain_query.errors.throttling_exception.ThrottlingException: <p>The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.</p>
        capo_managedblockchain_query.errors.validation_exception.ValidationException: <p>The resource passed is invalid.</p>
        capo_managedblockchain_query.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_managedblockchain_query.types.list_asset_contracts_input.ListAssetContractsInput]",
    ) -> OperationResponse[
        "capo_managedblockchain_query.types.list_asset_contracts_output.ListAssetContractsOutput"
    ]:
        import capo_managedblockchain_query._operations.tieton_chain_query_service.list_asset_contracts

        output, http_response = (
            capo_managedblockchain_query._operations.tieton_chain_query_service.list_asset_contracts.list_asset_contracts(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAssetContracts")
    )
    input_: capo_managedblockchain_query.types.list_asset_contracts_input.ListAssetContractsInput = {
        "contract_filter": contract_filter
    }
    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