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

package com.azure.resourcemanager.keyvault.generated;

import com.azure.resourcemanager.keyvault.models.CheckMhsmNameAvailabilityParameters;

/** Samples for ManagedHsms CheckMhsmNameAvailability. */
public final class ManagedHsmsCheckMhsmNameAvailabilitySamples {
    /*
     * x-ms-original-file: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_checkMhsmNameAvailability.json
     */
    /**
     * Sample code: Validate a managed hsm name.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void validateAManagedHsmName(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .vaults()
            .manager()
            .serviceClient()
            .getManagedHsms()
            .checkMhsmNameAvailabilityWithResponse(
                new CheckMhsmNameAvailabilityParameters().withName("sample-mhsm"), com.azure.core.util.Context.NONE);
    }
}
