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

com.pulumi.azure.monitoring.outputs.DiagnosticSettingMetric Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.monitoring.outputs;

import com.pulumi.azure.monitoring.outputs.DiagnosticSettingMetricRetentionPolicy;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class DiagnosticSettingMetric {
    /**
     * @return The name of a Diagnostic Metric Category for this Resource.
     * 
     * > **NOTE:** The Metric Categories available vary depending on the Resource being used. You may wish to use the `azure.monitoring.getDiagnosticCategories` Data Source to identify which categories are available for a given Resource.
     * 
     */
    private String category;
    /**
     * @return Is this Diagnostic Metric enabled? Defaults to `true`.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @deprecated
     * `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention
     * 
     */
    @Deprecated /* `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention */
    private @Nullable DiagnosticSettingMetricRetentionPolicy retentionPolicy;

    private DiagnosticSettingMetric() {}
    /**
     * @return The name of a Diagnostic Metric Category for this Resource.
     * 
     * > **NOTE:** The Metric Categories available vary depending on the Resource being used. You may wish to use the `azure.monitoring.getDiagnosticCategories` Data Source to identify which categories are available for a given Resource.
     * 
     */
    public String category() {
        return this.category;
    }
    /**
     * @return Is this Diagnostic Metric enabled? Defaults to `true`.
     * 
     */
    public Optional enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @deprecated
     * `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention
     * 
     */
    @Deprecated /* `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention */
    public Optional retentionPolicy() {
        return Optional.ofNullable(this.retentionPolicy);
    }

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

    public static Builder builder(DiagnosticSettingMetric defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String category;
        private @Nullable Boolean enabled;
        private @Nullable DiagnosticSettingMetricRetentionPolicy retentionPolicy;
        public Builder() {}
        public Builder(DiagnosticSettingMetric defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.category = defaults.category;
    	      this.enabled = defaults.enabled;
    	      this.retentionPolicy = defaults.retentionPolicy;
        }

        @CustomType.Setter
        public Builder category(String category) {
            if (category == null) {
              throw new MissingRequiredPropertyException("DiagnosticSettingMetric", "category");
            }
            this.category = category;
            return this;
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {

            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder retentionPolicy(@Nullable DiagnosticSettingMetricRetentionPolicy retentionPolicy) {

            this.retentionPolicy = retentionPolicy;
            return this;
        }
        public DiagnosticSettingMetric build() {
            final var _resultValue = new DiagnosticSettingMetric();
            _resultValue.category = category;
            _resultValue.enabled = enabled;
            _resultValue.retentionPolicy = retentionPolicy;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy