Gets the information about a specific contract deployed on the blockchain.
Parameters:
-
contract_identifier
(ContractIdentifier)
–
Contains the blockchain address and network information about the contract.
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.
-
ResourceNotFoundException
–
The resource was not found.
-
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/async_managed_blockchain_query.py
| async def get_asset_contract(
self,
contract_identifier: "capo_managedblockchain_query.types.contract_identifier.ContractIdentifier",
*,
config_overrides: Optional[AsyncManagedBlockchainQueryClientConfig] = None,
) -> "capo_managedblockchain_query.types.get_asset_contract_output.GetAssetContractOutput":
"""<p>Gets the information about a specific contract deployed on the blockchain.</p> <note> <ul> <li> <p>The Bitcoin blockchain networks do not support this operation.</p> </li> <li> <p>Metadata is currently only available for some <code>ERC-20</code> contracts. Metadata will be available for additional contracts in the future.</p> </li> </ul> </note>
Args:
contract_identifier: <p>Contains the blockchain address and network information about the contract.</p>
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.resource_not_found_exception.ResourceNotFoundException: <p>The resource was not found.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_managedblockchain_query.types.get_asset_contract_input.GetAssetContractInput]",
) -> AsyncOperationResponse[
"capo_managedblockchain_query.types.get_asset_contract_output.GetAssetContractOutput"
]:
import capo_managedblockchain_query._operations.tieton_chain_query_service.get_asset_contract
(
output,
http_response,
) = await capo_managedblockchain_query._operations.tieton_chain_query_service.get_asset_contract.async_get_asset_contract(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAssetContract")
)
input_: capo_managedblockchain_query.types.get_asset_contract_input.GetAssetContractInput = {
"contract_identifier": contract_identifier
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|