Skip to main content

ledgers

Creates, updates, deletes, gets or lists a ledgers resource.

Overview

Nameledgers
TypeResource
Idazure.confidential_ledger.ledgers

Fields

The following fields are returned by SELECT queries:

The request was successful; response contains the Confidential Ledger

NameDatatypeDescription
locationstringThe geo-location where the resource lives
propertiesobjectProperties of Confidential Ledger Resource. (title: LedgerProperties)
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, ledgerNameRetrieves the properties of a Confidential Ledger.
list_by_resource_groupselectsubscriptionId, resourceGroupName$filterRetrieves the properties of all Confidential Ledgers.
list_by_subscriptionselectsubscriptionId$filterRetrieves the properties of all Confidential Ledgers.
createinsertsubscriptionId, resourceGroupName, ledgerNameCreates a Confidential Ledger with the specified ledger parameters.
updateupdatesubscriptionId, resourceGroupName, ledgerNameUpdates properties of Confidential Ledger
deletedeletesubscriptionId, resourceGroupName, ledgerNameDeletes an existing Confidential Ledger.
backupexecsubscriptionId, resourceGroupName, ledgerName, uriBacks up a Confidential Ledger Resource.
restoreexecsubscriptionId, resourceGroupName, ledgerName, fileShareName, restoreRegion, uriRestores a Confidential Ledger Resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ledgerNamestringName of the Confidential Ledger
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
$filterstringThe filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'

SELECT examples

Retrieves the properties of a Confidential Ledger.

SELECT
location,
properties,
tags
FROM azure.confidential_ledger.ledgers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND ledgerName = '{{ ledgerName }}' -- required
;

INSERT examples

Creates a Confidential Ledger with the specified ledger parameters.

INSERT INTO azure.confidential_ledger.ledgers (
data__tags,
data__location,
data__properties,
subscriptionId,
resourceGroupName,
ledgerName
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ ledgerName }}'
RETURNING
location,
properties,
tags
;

UPDATE examples

Updates properties of Confidential Ledger

UPDATE azure.confidential_ledger.ledgers
SET
data__tags = '{{ tags }}',
data__location = '{{ location }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND ledgerName = '{{ ledgerName }}' --required
RETURNING
location,
properties,
tags;

DELETE examples

Deletes an existing Confidential Ledger.

DELETE FROM azure.confidential_ledger.ledgers
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND ledgerName = '{{ ledgerName }}' --required
;

Lifecycle Methods

Backs up a Confidential Ledger Resource.

EXEC azure.confidential_ledger.ledgers.backup 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@ledgerName='{{ ledgerName }}' --required
@@json=
'{
"restoreRegion": "{{ restoreRegion }}",
"uri": "{{ uri }}"
}'
;