// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.security.confidentialledger.certificate.generated;

import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.security.confidentialledger.certificate.ConfidentialLedgerCertificateClient;
import com.azure.security.confidentialledger.certificate.ConfidentialLedgerCertificateClientBuilder;

public class GetLedgerIdentity {
    public static void main(String[] args) {
        ConfidentialLedgerCertificateClient confidentialLedgerCertificateClient =
                new ConfidentialLedgerCertificateClientBuilder()
                        .credential(new DefaultAzureCredentialBuilder().build())
                        .certificateEndpoint("identity.confidential-ledger.core.azure.com")
                        .buildClient();
        // BEGIN:com.azure.security.confidentialledger.certificate.generated.getledgeridentity.getledgeridentity
        RequestOptions requestOptions = new RequestOptions();
        Response<BinaryData> response =
                confidentialLedgerCertificateClient.getLedgerIdentityWithResponse(
                        "contoso-ledger-12345", requestOptions);
        // END:com.azure.security.confidentialledger.certificate.generated.getledgeridentity.getledgeridentity
    }
}
