azure.confidentialledger.
ConfidentialLedgerCertificateCredential
(certificate_path: Union[bytes, str, os.PathLike])[source]¶
A certificate-based credential for the ConfidentialLedgerClient.
certificate_path (Union[bytes, str, os.PathLike]) â Path to the PEM certificate to use for authentication.
certificate_path
¶
The path to the certificate file for this credential.
The path to the certificate file for this credential.
Union[bytes, str, os.PathLike]
azure.confidentialledger.
ConfidentialLedgerClient
(endpoint: str, credential: Union[azure.confidentialledger._patch.ConfidentialLedgerCertificateCredential, azure.core.credentials.TokenCredential], *, ledger_certificate_path: Union[bytes, str, os.PathLike], **kwargs: Any)[source]¶
The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service.
endpoint (str) â The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com.
credential (Union[ ConfidentialLedgerCertificateCredential, TokenCredential]) â A credential object for authenticating with the Confidential Ledger.
ledger_certificate_path (Union[bytes, str, os.PathLike]) â The path to the Confidential Ledgerâs TLS certificate. If this file does not exist yet, the Confidential Ledgerâs TLS certificate will be fetched and saved to this file.
api_version (str) â Api Version. Default value is â2022-05-13â. Note that overriding this default value may result in unsupported behavior.
begin_create_ledger_entry
(entry: Union[collections.abc.MutableMapping[str, Any], IO], *, collection_id: Optional[str] = None, **kwargs: Any) → azure.core.polling._poller.LROPoller[collections.abc.MutableMapping[str, Any]]¶
Writes a ledger entry and returns a poller to wait for it to be durably committed. The poller returns the result for the initial call to create the ledger entry.
A collection id may optionally be specified.
begin_get_ledger_entry
(transaction_id: str, *, collection_id: Optional[str] = None, **kwargs: Any) → azure.core.polling._poller.LROPoller[collections.abc.MutableMapping[str, Any]]¶
Returns a poller to fetch the ledger entry at the specified transaction id.
A collection id may optionally be specified to indicate the collection from which to fetch the value.
begin_get_receipt
(transaction_id: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[collections.abc.MutableMapping[str, Any]]¶
Returns a poller for getting a receipt certifying ledger contents at a particular transaction id.
begin_wait_for_commit
(transaction_id, **kwargs) → azure.core.polling._poller.LROPoller[collections.abc.MutableMapping[str, Any]]¶
Creates a poller that queries the state of the specified transaction until it is Committed, a state that indicates the transaction is durably stored in the Confidential Ledger.
close
() → None[source]¶
create_ledger_entry
(entry: Union[collections.abc.MutableMapping[str, Any], IO], *, collection_id: Optional[str] = None, **kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Writes a ledger entry.
The result is the expected JSON response with an additional field âtransactionIdâ which represents the transaction identifier for this write operation.
A collection id may optionally be specified.
entry (Union[JSON, IO]) â Ledger entry.
collection_id (str) â The collection id. Default value is None.
JSON object
JSON
~azure.core.exceptions.HttpResponseError
Example
# JSON input template you can fill out and use as your body input. entry = { "collectionId": { "collectionId": "str" # Required. }, "contents": "str", # Required. Contents of the ledger entry. "transactionId": "str" # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. }
create_or_update_user
(user_id: str, user_details: Union[collections.abc.MutableMapping[str, Any], IO], **kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Adds a user or updates a userâs fields.
A JSON merge patch is applied for existing users.
user_id (str) â The user id, either an AAD object ID or certificate fingerprint. Required.
user_details (JSON or IO) â Details about a Confidential Ledger user. Is either a model type or a IO type. Required.
content_type (str) â Body Parameter content-type. Known values are: âapplication/merge-patch+jsonâ. Default value is None.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "assignedRole": "str", # Represents an assignable role. Required. Known values are: "Administrator", "Contributor", and "Reader". "userId": "str" # Optional. Identifier for the user. This must either be an AAD object id or a certificate fingerprint. }
delete_user
(user_id: str, **kwargs: Any) → None¶
Deletes a user from the Confidential Ledger.
Deletes a user from the Confidential Ledger.
user_id (str) â The user id, either an AAD object ID or certificate fingerprint. Required.
None
get_constitution
(**kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Gets the constitution used for governance.
The constitution is a script that assesses and applies proposals from consortium members.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "digest": "str", # SHA256 digest of the constitution script. Required. "script": "str" # Contents of the constitution. Required. }
get_current_ledger_entry
(*, collection_id: Optional[str] = None, **kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Gets the current value available in the ledger.
A collection id may optionally be specified.
collection_id (str) â The collection id. Default value is None.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "collectionId": "str", # Optional. "contents": "str", # Contents of the ledger entry. Required. "transactionId": "str" # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. }
get_enclave_quotes
(**kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Gets quotes for all nodes of the Confidential Ledger.
A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "currentNodeId": "str", # Id of the Confidential Ledger node responding to the request. Required. "enclaveQuotes": { "str": { "mrenclave": "str", # Optional. MRENCLAVE value of the code running in the enclave. "nodeId": "str", # ID assigned to this node. Required. "quoteVersion": "str", # Version of the quote presented. Required. "raw": "str" # Raw SGX quote, parsable by tools like Open Enclave's oeverify. Required. } } }
get_ledger_entry
(transaction_id: str, *, collection_id: Optional[str] = None, **kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Gets the ledger entry at the specified transaction id. A collection id may optionally be specified to indicate the collection from which to fetch the value.
To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing.
transaction_id (str) â Identifies a write transaction. Required.
collection_id (str) â The collection id. Default value is None.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "entry": { "collectionId": "str", # Optional. The ledger entry found as a result of the query. This is only available if the query is in Ready state. "contents": "str", # Contents of the ledger entry. Required. "transactionId": "str" # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. }, "state": "str" # State of a ledger query. Required. Known values are: "Loading" and "Ready". }
get_receipt
(transaction_id: str, **kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Gets a receipt certifying ledger contents at a particular transaction id.
Gets a receipt certifying ledger contents at a particular transaction id.
transaction_id (str) â Identifies a write transaction. Required.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "receipt": { "cert": "str", # Optional. "leaf": "str", # Optional. "leafComponents": { "claimsDigest": "str", # Optional. "commitEvidence": "str", # Optional. "writeSetDigest": "str" # Optional. }, "nodeId": "str", # Required. "proof": [ { "left": "str", # Optional. Required. "right": "str" # Optional. Required. } ], "root": "str", # Optional. "serviceEndorsements": [ "str" # Optional. ], "signature": "str" # Required. }, "state": "str", # State of a ledger query. Required. Known values are: "Loading" and "Ready". "transactionId": "str" # A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. Required. }
get_transaction_status
(transaction_id: str, **kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Gets the status of an entry identified by a transaction id.
Gets the status of an entry identified by a transaction id.
transaction_id (str) â Identifies a write transaction. Required.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "state": "str", # Represents the state of the transaction. Required. Known values are: "Committed" and "Pending". "transactionId": "str" # A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. Required. }
get_user
(user_id: str, **kwargs: Any) → collections.abc.MutableMapping[str, Any]¶
Gets a user.
Gets a user.
user_id (str) â The user id, either an AAD object ID or certificate fingerprint. Required.
JSON object
JSON
Example
# response body for status code(s): 200 response == { "assignedRole": "str", # Represents an assignable role. Required. Known values are: "Administrator", "Contributor", and "Reader". "userId": "str" # Optional. Identifier for the user. This must either be an AAD object id or a certificate fingerprint. }
list_collections
(**kwargs: Any) → Iterable[collections.abc.MutableMapping[str, Any]]¶
Retrieves a list of collection ids present in the Confidential Ledger.
Collection ids are user-created collections of ledger entries.
An iterator like instance of JSON object
ItemPaged[JSON]
Example
# response body for status code(s): 200 response == { "collectionId": "str" # Required. }
list_consortium_members
(**kwargs: Any) → Iterable[collections.abc.MutableMapping[str, Any]]¶
Lists the consortium members.
Consortium members can manage the Confidential Ledger.
An iterator like instance of JSON object
ItemPaged[JSON]
Example
# response body for status code(s): 200 response == { "certificate": "str", # PEM-encoded certificate associated with the member. Required. "id": "str" # Identifier assigned to the member. Required. }
list_ledger_entries
(*, collection_id: Optional[str] = None, from_transaction_id: Optional[str] = None, to_transaction_id: Optional[str] = None, **kwargs: Any) → Iterable[collections.abc.MutableMapping[str, Any]]¶
Gets ledger entries from a collection corresponding to a range.
A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned.
An iterator like instance of JSON object
ItemPaged[JSON]
Example
# response body for status code(s): 200 response == { "collectionId": "str", # Optional. "contents": "str", # Contents of the ledger entry. Required. "transactionId": "str" # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. }
send_request
(request: azure.core.rest._rest_py3.HttpRequest, **kwargs: Any) → azure.core.rest._rest_py3.HttpResponse[source]¶
Runs the network request through the clientâs chained policies.
>>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") <HttpRequest [GET], url: 'https://www.example.org/'> >>> response = client.send_request(request) <HttpResponse: 200 OK>
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
request (HttpRequest) â The network request you want to make. Required.
stream (bool) â Whether the response payload will be streamed. Defaults to False.
The response of your network call. Does not do error handling on your response.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4