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

package com.azure.analytics.purview.scanning.generated;

import com.azure.analytics.purview.scanning.KeyVaultConnectionsClient;
import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder;
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;

public class KeyVaultConnectionsCreate {
    public static void main(String[] args) {
        KeyVaultConnectionsClient keyVaultConnectionsClient =
                new PurviewScanningClientBuilder()
                        .credential(new DefaultAzureCredentialBuilder().build())
                        .endpoint("{Endpoint}")
                        .buildKeyVaultConnectionsClient();
        // BEGIN:com.azure.analytics.purview.scanning.generated.keyvaultconnectionscreate.keyvaultconnectionscreate
        BinaryData body =
                BinaryData.fromString(
                        "{\"properties\":{\"description\":\"This is a Key Vault\",\"baseUrl\":\"https://babylon-sample-kv.vault.azure.net/\"}}");
        RequestOptions requestOptions = new RequestOptions();
        Response<BinaryData> response = keyVaultConnectionsClient.createWithResponse("KeyVault1", body, requestOptions);
        // END:com.azure.analytics.purview.scanning.generated.keyvaultconnectionscreate.keyvaultconnectionscreate
    }
}
