Skip to content

Instantly share code, notes, and snippets.

@ItayPodhajcer
Last active January 17, 2023 13:18
Show Gist options
  • Save ItayPodhajcer/1d2b62ad939a9191a434981b62194e2d to your computer and use it in GitHub Desktop.
Save ItayPodhajcer/1d2b62ad939a9191a434981b62194e2d to your computer and use it in GitHub Desktop.
terraform-azure-confidential-ledger/test-ledger.py#management
credential = DefaultAzureCredential()
confidential_ledger_mgmt = ConfidentialLedgerAPI(
credential, subscription_id
)
properties = {
"location": "eastus",
"tags": {},
"properties": {
"ledgerType": "Public",
"aadBasedSecurityPrincipals": [],
},
}
ledger_properties = ConfidentialLedger(**properties)
print(f"{resource_group} / {ledger_name}")
myledger = confidential_ledger_mgmt.ledger.get(resource_group, ledger_name)
print("Ledger details:")
print(f" Name: {myledger.name}")
print(f" Location: {myledger.location}")
print(f" ID: {myledger.id}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment