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

package com.azure.resourcemanager.operationsmanagement.generated;

import com.azure.resourcemanager.operationsmanagement.fluent.models.ManagementAssociationInner;
import com.azure.resourcemanager.operationsmanagement.models.ManagementAssociationProperties;

/** Samples for ManagementAssociations CreateOrUpdate. */
public final class ManagementAssociationsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/examples/ManagementAssociationCreate.json
     */
    /**
     * Sample code: SolutionCreate.
     *
     * @param manager Entry point to OperationsManagementManager.
     */
    public static void solutionCreate(
        com.azure.resourcemanager.operationsmanagement.OperationsManagementManager manager) {
        manager
            .managementAssociations()
            .createOrUpdateWithResponse(
                "rg1",
                "providerName",
                "resourceType",
                "resourceName",
                "managementAssociation1",
                new ManagementAssociationInner()
                    .withLocation("East US")
                    .withProperties(
                        new ManagementAssociationProperties()
                            .withApplicationId(
                                "/subscriptions/sub1/resourcegroups/rg1/providers/Microsoft.Appliance/Appliances/appliance1")),
                com.azure.core.util.Context.NONE);
    }
}
