![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.arcmachine.AutomanageConfigurationAssignment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.arcmachine;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.arcmachine.AutomanageConfigurationAssignmentArgs;
import com.pulumi.azure.arcmachine.inputs.AutomanageConfigurationAssignmentState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;
/**
* Manages an Arc Machine Automanage Configuration Profile Assignment.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.arcmachine.ArcmachineFunctions;
* import com.pulumi.azure.arcmachine.inputs.GetArgs;
* import com.pulumi.azure.automanage.Configuration;
* import com.pulumi.azure.automanage.ConfigurationArgs;
* import com.pulumi.azure.arcmachine.AutomanageConfigurationAssignment;
* import com.pulumi.azure.arcmachine.AutomanageConfigurationAssignmentArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* final var config = ctx.config();
* final var arcMachineName = config.get("arcMachineName");
* var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
*
* final var example = ArcmachineFunctions.get(GetArgs.builder()
* .name(arcMachineName)
* .resourceGroupName(exampleResourceGroup.name())
* .build());
*
* var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()
* .name("example-configuration")
* .resourceGroupName(exampleResourceGroup.name())
* .location(exampleResourceGroup.location())
* .build());
*
* var exampleAutomanageConfigurationAssignment = new AutomanageConfigurationAssignment("exampleAutomanageConfigurationAssignment", AutomanageConfigurationAssignmentArgs.builder()
* .arcMachineId(example.applyValue(getResult -> getResult).applyValue(example -> example.applyValue(getResult -> getResult.id())))
* .configurationId(exampleConfiguration.id())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Virtual Machine Automanage Configuration Profile Assignment can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.AutoManage/configurationProfileAssignments/default
* ```
*
*/
@ResourceType(type="azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment")
public class AutomanageConfigurationAssignment extends com.pulumi.resources.CustomResource {
/**
* The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
*
*/
@Export(name="arcMachineId", refs={String.class}, tree="[0]")
private Output arcMachineId;
/**
* @return The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
*
*/
public Output arcMachineId() {
return this.arcMachineId;
}
/**
* The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
*
* > **NOTE:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
*
*/
@Export(name="configurationId", refs={String.class}, tree="[0]")
private Output configurationId;
/**
* @return The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
*
* > **NOTE:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
*
*/
public Output configurationId() {
return this.configurationId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public AutomanageConfigurationAssignment(java.lang.String name) {
this(name, AutomanageConfigurationAssignmentArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public AutomanageConfigurationAssignment(java.lang.String name, AutomanageConfigurationAssignmentArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public AutomanageConfigurationAssignment(java.lang.String name, AutomanageConfigurationAssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private AutomanageConfigurationAssignment(java.lang.String name, Output id, @Nullable AutomanageConfigurationAssignmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment", name, state, makeResourceOptions(options, id), false);
}
private static AutomanageConfigurationAssignmentArgs makeArgs(AutomanageConfigurationAssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? AutomanageConfigurationAssignmentArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static AutomanageConfigurationAssignment get(java.lang.String name, Output id, @Nullable AutomanageConfigurationAssignmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new AutomanageConfigurationAssignment(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy