All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.insights.DataCollectionRuleAssociation Maven / Gradle / Ivy

// *** 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.azurenative.insights;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.insights.DataCollectionRuleAssociationArgs;
import com.pulumi.azurenative.insights.outputs.DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData;
import com.pulumi.azurenative.insights.outputs.DataCollectionRuleAssociationResponseMetadata;
import com.pulumi.core.Alias;
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 java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Definition of generic ARM proxy resource.
 * Azure REST API version: 2022-06-01. Prior API version in Azure Native 1.x: 2019-11-01-preview.
 * 
 * Other available API versions: 2023-03-11.
 * 
 * ## Example Usage
 * ### Create or update association
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.insights.DataCollectionRuleAssociation;
 * import com.pulumi.azurenative.insights.DataCollectionRuleAssociationArgs;
 * 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) {
 *         var dataCollectionRuleAssociation = new DataCollectionRuleAssociation("dataCollectionRuleAssociation", DataCollectionRuleAssociationArgs.builder()
 *             .associationName("myAssociation")
 *             .dataCollectionRuleId("/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule")
 *             .resourceUri("subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:insights:DataCollectionRuleAssociation myAssociation /{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName} * ``` * */ @ResourceType(type="azure-native:insights:DataCollectionRuleAssociation") public class DataCollectionRuleAssociation extends com.pulumi.resources.CustomResource { /** * The resource ID of the data collection endpoint that is to be associated. * */ @Export(name="dataCollectionEndpointId", refs={String.class}, tree="[0]") private Output dataCollectionEndpointId; /** * @return The resource ID of the data collection endpoint that is to be associated. * */ public Output> dataCollectionEndpointId() { return Codegen.optional(this.dataCollectionEndpointId); } /** * The resource ID of the data collection rule that is to be associated. * */ @Export(name="dataCollectionRuleId", refs={String.class}, tree="[0]") private Output dataCollectionRuleId; /** * @return The resource ID of the data collection rule that is to be associated. * */ public Output> dataCollectionRuleId() { return Codegen.optional(this.dataCollectionRuleId); } /** * Description of the association. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Description of the association. * */ public Output> description() { return Codegen.optional(this.description); } /** * Resource entity tag (ETag). * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return Resource entity tag (ETag). * */ public Output etag() { return this.etag; } /** * Metadata about the resource * */ @Export(name="metadata", refs={DataCollectionRuleAssociationResponseMetadata.class}, tree="[0]") private Output metadata; /** * @return Metadata about the resource * */ public Output metadata() { return this.metadata; } /** * The name of the resource. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource. * */ public Output name() { return this.name; } /** * The resource provisioning state. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The resource provisioning state. * */ public Output provisioningState() { return this.provisioningState; } /** * Metadata pertaining to creation and last modification of the resource. * */ @Export(name="systemData", refs={DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData.class}, tree="[0]") private Output systemData; /** * @return Metadata pertaining to creation and last modification of the resource. * */ public Output systemData() { return this.systemData; } /** * The type of the resource. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public DataCollectionRuleAssociation(java.lang.String name) { this(name, DataCollectionRuleAssociationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public DataCollectionRuleAssociation(java.lang.String name, DataCollectionRuleAssociationArgs 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 DataCollectionRuleAssociation(java.lang.String name, DataCollectionRuleAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:DataCollectionRuleAssociation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private DataCollectionRuleAssociation(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:DataCollectionRuleAssociation", name, null, makeResourceOptions(options, id), false); } private static DataCollectionRuleAssociationArgs makeArgs(DataCollectionRuleAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DataCollectionRuleAssociationArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:insights/v20191101preview:DataCollectionRuleAssociation").build()), Output.of(Alias.builder().type("azure-native:insights/v20210401:DataCollectionRuleAssociation").build()), Output.of(Alias.builder().type("azure-native:insights/v20210901preview:DataCollectionRuleAssociation").build()), Output.of(Alias.builder().type("azure-native:insights/v20220601:DataCollectionRuleAssociation").build()), Output.of(Alias.builder().type("azure-native:insights/v20230311:DataCollectionRuleAssociation").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static DataCollectionRuleAssociation get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DataCollectionRuleAssociation(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy