getDataCollectionRule

Use this data source to access information about an existing Data Collection Rule.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.monitoring.MonitoringFunctions;
import com.pulumi.azure.monitoring.inputs.GetDataCollectionRuleArgs;
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 example = MonitoringFunctions.getDataCollectionRule(GetDataCollectionRuleArgs.builder()
.name("example-rule")
.resourceGroupName(azurerm_resource_group.example().name())
.build());
ctx.export("ruleId", example.applyValue(getDataCollectionRuleResult -> getDataCollectionRuleResult.id()));
}
}

Return

A collection of values returned by getDataCollectionRule.

Parameters

argument

A collection of arguments for invoking getDataCollectionRule.


suspend fun getDataCollectionRule(name: String, resourceGroupName: String): GetDataCollectionRuleResult

Return

A collection of values returned by getDataCollectionRule.

See also

Parameters

name

Specifies the name of the Data Collection Rule.

resourceGroupName

Specifies the name of the resource group the Data Collection Rule is located in.


Return

A collection of values returned by getDataCollectionRule.

See also

Parameters

argument

Builder for com.pulumi.azure.monitoring.kotlin.inputs.GetDataCollectionRulePlainArgs.