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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.trafficmanager.ProfileArgs;
import com.pulumi.azure.trafficmanager.inputs.ProfileState;
import com.pulumi.azure.trafficmanager.outputs.ProfileDnsConfig;
import com.pulumi.azure.trafficmanager.outputs.ProfileMonitorConfig;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Traffic Manager Profile to which multiple endpoints can be attached.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.random.RandomId;
 * import com.pulumi.random.RandomIdArgs;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.TrafficManagerProfile;
 * import com.pulumi.azure.network.TrafficManagerProfileArgs;
 * import com.pulumi.azure.network.inputs.TrafficManagerProfileDnsConfigArgs;
 * import com.pulumi.azure.network.inputs.TrafficManagerProfileMonitorConfigArgs;
 * 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 server = new RandomId(&#34;server&#34;, RandomIdArgs.builder()        
 *             .keepers(Map.of(&#34;azi_id&#34;, 1))
 *             .byteLength(8)
 *             .build());
 * 
 *         var exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleTrafficManagerProfile = new TrafficManagerProfile(&#34;exampleTrafficManagerProfile&#34;, TrafficManagerProfileArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .trafficRoutingMethod(&#34;Weighted&#34;)
 *             .dnsConfig(TrafficManagerProfileDnsConfigArgs.builder()
 *                 .relativeName(server.hex())
 *                 .ttl(100)
 *                 .build())
 *             .monitorConfig(TrafficManagerProfileMonitorConfigArgs.builder()
 *                 .protocol(&#34;HTTP&#34;)
 *                 .port(80)
 *                 .path(&#34;/&#34;)
 *                 .intervalInSeconds(30)
 *                 .timeoutInSeconds(9)
 *                 .toleratedNumberOfFailures(3)
 *                 .build())
 *             .tags(Map.of(&#34;environment&#34;, &#34;Production&#34;))
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Traffic Manager Profiles can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:trafficmanager/profile:Profile exampleProfile /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/trafficManagerProfiles/mytrafficmanagerprofile1
 * ```
 * 
 * @deprecated
 * azure.trafficmanager.Profile has been deprecated in favor of azure.network.TrafficManagerProfile
 * 
 */
@Deprecated /* azure.trafficmanager.Profile has been deprecated in favor of azure.network.TrafficManagerProfile */
@ResourceType(type="azure:trafficmanager/profile:Profile")
public class Profile extends com.pulumi.resources.CustomResource {
    /**
     * This block specifies the DNS configuration of the Profile, it supports the fields documented below.
     * 
     */
    @Export(name="dnsConfig", refs={ProfileDnsConfig.class}, tree="[0]")
    private Output<ProfileDnsConfig> dnsConfig;

    /**
     * @return This block specifies the DNS configuration of the Profile, it supports the fields documented below.
     * 
     */
    public Output<ProfileDnsConfig> dnsConfig() {
        return this.dnsConfig;
    }
    /**
     * The FQDN of the created Profile.
     * 
     */
    @Export(name="fqdn", refs={String.class}, tree="[0]")
    private Output<String> fqdn;

    /**
     * @return The FQDN of the created Profile.
     * 
     */
    public Output<String> fqdn() {
        return this.fqdn;
    }
    /**
     * The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`.
     * 
     * &gt; **NOTE:** `max_return` must be set when the `traffic_routing_method` is `MultiValue`.
     * 
     */
    @Export(name="maxReturn", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> maxReturn;

    /**
     * @return The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`.
     * 
     * &gt; **NOTE:** `max_return` must be set when the `traffic_routing_method` is `MultiValue`.
     * 
     */
    public Output<Optional<Integer>> maxReturn() {
        return Codegen.optional(this.maxReturn);
    }
    /**
     * This block specifies the Endpoint monitoring configuration for the Profile, it supports the fields documented below.
     * 
     */
    @Export(name="monitorConfig", refs={ProfileMonitorConfig.class}, tree="[0]")
    private Output<ProfileMonitorConfig> monitorConfig;

    /**
     * @return This block specifies the Endpoint monitoring configuration for the Profile, it supports the fields documented below.
     * 
     */
    public Output<ProfileMonitorConfig> monitorConfig() {
        return this.monitorConfig;
    }
    /**
     * The name of the Traffic Manager profile. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name of the Traffic Manager profile. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`.
     * 
     */
    @Export(name="profileStatus", refs={String.class}, tree="[0]")
    private Output<String> profileStatus;

    /**
     * @return The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`.
     * 
     */
    public Output<String> profileStatus() {
        return this.profileStatus;
    }
    /**
     * The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`.
     * 
     */
    @Export(name="trafficRoutingMethod", refs={String.class}, tree="[0]")
    private Output<String> trafficRoutingMethod;

    /**
     * @return Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`.
     * 
     */
    public Output<String> trafficRoutingMethod() {
        return this.trafficRoutingMethod;
    }
    /**
     * Indicates whether Traffic View is enabled for the Traffic Manager profile.
     * 
     */
    @Export(name="trafficViewEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> trafficViewEnabled;

    /**
     * @return Indicates whether Traffic View is enabled for the Traffic Manager profile.
     * 
     */
    public Output<Optional<Boolean>> trafficViewEnabled() {
        return Codegen.optional(this.trafficViewEnabled);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public Profile(String name) {
        this(name, ProfileArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public Profile(String name, ProfileArgs 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 Profile(String name, ProfileArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:trafficmanager/profile:Profile", name, args == null ? ProfileArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private Profile(String name, Output<String> id, @Nullable ProfileState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:trafficmanager/profile:Profile", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> 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 Profile get(String name, Output<String> id, @Nullable ProfileState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new Profile(name, id, state, options);
    }
}
