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

com.pulumi.azurenative.insights.inputs.RuleMetricDataSourceArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * A rule metric data source. The discriminator value is always RuleMetricDataSource in this case.
 * 
 */
public final class RuleMetricDataSourceArgs extends com.pulumi.resources.ResourceArgs {

    public static final RuleMetricDataSourceArgs Empty = new RuleMetricDataSourceArgs();

    /**
     * the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     * 
     */
    @Import(name="legacyResourceId")
    private @Nullable Output legacyResourceId;

    /**
     * @return the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     * 
     */
    public Optional> legacyResourceId() {
        return Optional.ofNullable(this.legacyResourceId);
    }

    /**
     * the name of the metric that defines what the rule monitors.
     * 
     */
    @Import(name="metricName")
    private @Nullable Output metricName;

    /**
     * @return the name of the metric that defines what the rule monitors.
     * 
     */
    public Optional> metricName() {
        return Optional.ofNullable(this.metricName);
    }

    /**
     * the namespace of the metric.
     * 
     */
    @Import(name="metricNamespace")
    private @Nullable Output metricNamespace;

    /**
     * @return the namespace of the metric.
     * 
     */
    public Optional> metricNamespace() {
        return Optional.ofNullable(this.metricNamespace);
    }

    /**
     * specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource
     * Expected value is 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'.
     * 
     */
    @Import(name="odataType", required=true)
    private Output odataType;

    /**
     * @return specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource
     * Expected value is 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'.
     * 
     */
    public Output odataType() {
        return this.odataType;
    }

    /**
     * the location of the resource.
     * 
     */
    @Import(name="resourceLocation")
    private @Nullable Output resourceLocation;

    /**
     * @return the location of the resource.
     * 
     */
    public Optional> resourceLocation() {
        return Optional.ofNullable(this.resourceLocation);
    }

    /**
     * the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     * 
     */
    @Import(name="resourceUri")
    private @Nullable Output resourceUri;

    /**
     * @return the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     * 
     */
    public Optional> resourceUri() {
        return Optional.ofNullable(this.resourceUri);
    }

    private RuleMetricDataSourceArgs() {}

    private RuleMetricDataSourceArgs(RuleMetricDataSourceArgs $) {
        this.legacyResourceId = $.legacyResourceId;
        this.metricName = $.metricName;
        this.metricNamespace = $.metricNamespace;
        this.odataType = $.odataType;
        this.resourceLocation = $.resourceLocation;
        this.resourceUri = $.resourceUri;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(RuleMetricDataSourceArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private RuleMetricDataSourceArgs $;

        public Builder() {
            $ = new RuleMetricDataSourceArgs();
        }

        public Builder(RuleMetricDataSourceArgs defaults) {
            $ = new RuleMetricDataSourceArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param legacyResourceId the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
         * 
         * @return builder
         * 
         */
        public Builder legacyResourceId(@Nullable Output legacyResourceId) {
            $.legacyResourceId = legacyResourceId;
            return this;
        }

        /**
         * @param legacyResourceId the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
         * 
         * @return builder
         * 
         */
        public Builder legacyResourceId(String legacyResourceId) {
            return legacyResourceId(Output.of(legacyResourceId));
        }

        /**
         * @param metricName the name of the metric that defines what the rule monitors.
         * 
         * @return builder
         * 
         */
        public Builder metricName(@Nullable Output metricName) {
            $.metricName = metricName;
            return this;
        }

        /**
         * @param metricName the name of the metric that defines what the rule monitors.
         * 
         * @return builder
         * 
         */
        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

        /**
         * @param metricNamespace the namespace of the metric.
         * 
         * @return builder
         * 
         */
        public Builder metricNamespace(@Nullable Output metricNamespace) {
            $.metricNamespace = metricNamespace;
            return this;
        }

        /**
         * @param metricNamespace the namespace of the metric.
         * 
         * @return builder
         * 
         */
        public Builder metricNamespace(String metricNamespace) {
            return metricNamespace(Output.of(metricNamespace));
        }

        /**
         * @param odataType specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource
         * Expected value is 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'.
         * 
         * @return builder
         * 
         */
        public Builder odataType(Output odataType) {
            $.odataType = odataType;
            return this;
        }

        /**
         * @param odataType specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource
         * Expected value is 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'.
         * 
         * @return builder
         * 
         */
        public Builder odataType(String odataType) {
            return odataType(Output.of(odataType));
        }

        /**
         * @param resourceLocation the location of the resource.
         * 
         * @return builder
         * 
         */
        public Builder resourceLocation(@Nullable Output resourceLocation) {
            $.resourceLocation = resourceLocation;
            return this;
        }

        /**
         * @param resourceLocation the location of the resource.
         * 
         * @return builder
         * 
         */
        public Builder resourceLocation(String resourceLocation) {
            return resourceLocation(Output.of(resourceLocation));
        }

        /**
         * @param resourceUri the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
         * 
         * @return builder
         * 
         */
        public Builder resourceUri(@Nullable Output resourceUri) {
            $.resourceUri = resourceUri;
            return this;
        }

        /**
         * @param resourceUri the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
         * 
         * @return builder
         * 
         */
        public Builder resourceUri(String resourceUri) {
            return resourceUri(Output.of(resourceUri));
        }

        public RuleMetricDataSourceArgs build() {
            $.odataType = Codegen.stringProp("odataType").output().arg($.odataType).require();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy