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

package com.azure.resourcemanager.security;

import com.azure.core.util.Context;

/** Samples for ServerVulnerabilityAssessment CreateOrUpdate. */
public final class ServerVulnerabilityAssessmentCreateOrUpdateSamples {
    /**
     * Sample code: Create a server vulnerability assessments on a resource. Only 'default' resource is supported. Once
     * creating the resource, the server will be onboarded to vulnerability assessment by Microsoft.Security.
     *
     * @param securityManager Entry point to SecurityManager. API spec for Microsoft.Security (Azure Security Center)
     *     resource provider.
     */
    public static void
        createAServerVulnerabilityAssessmentsOnAResourceOnlyDefaultResourceIsSupportedOnceCreatingTheResourceTheServerWillBeOnboardedToVulnerabilityAssessmentByMicrosoftSecurity(
            com.azure.resourcemanager.security.SecurityManager securityManager) {
        securityManager
            .serverVulnerabilityAssessments()
            .createOrUpdateWithResponse("rg1", "Microsoft.Compute", "virtualMachines", "vm1", Context.NONE);
    }
}
