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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.cdn.FrontdoorOriginArgs;
import com.pulumi.azure.cdn.inputs.FrontdoorOriginState;
import com.pulumi.azure.cdn.outputs.FrontdoorOriginPrivateLink;
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.Optional;
import javax.annotation.Nullable;

/**
 * ## Import
 * 
 * Front Door Origins can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:cdn/frontdoorOrigin:FrontdoorOrigin example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1/origins/origin1
 * ```
 * 
 */
@ResourceType(type="azure:cdn/frontdoorOrigin:FrontdoorOrigin")
public class FrontdoorOrigin extends com.pulumi.resources.CustomResource {
    /**
     * The ID of the Front Door Origin Group within which this Front Door Origin should exist. Changing this forces a new Front Door Origin to be created.
     * 
     */
    @Export(name="cdnFrontdoorOriginGroupId", refs={String.class}, tree="[0]")
    private Output<String> cdnFrontdoorOriginGroupId;

    /**
     * @return The ID of the Front Door Origin Group within which this Front Door Origin should exist. Changing this forces a new Front Door Origin to be created.
     * 
     */
    public Output<String> cdnFrontdoorOriginGroupId() {
        return this.cdnFrontdoorOriginGroupId;
    }
    /**
     * Specifies whether certificate name checks are enabled for this origin.
     * 
     */
    @Export(name="certificateNameCheckEnabled", refs={Boolean.class}, tree="[0]")
    private Output<Boolean> certificateNameCheckEnabled;

    /**
     * @return Specifies whether certificate name checks are enabled for this origin.
     * 
     */
    public Output<Boolean> certificateNameCheckEnabled() {
        return this.certificateNameCheckEnabled;
    }
    /**
     * Should the origin be enabled? Possible values are `true` or `false`. Defaults to `true`.
     * 
     * &gt; **NOTE:** The `enabled` field will need to be explicitly set until the 4.0 provider is released due to the deprecation of the `health_probes_enabled` property in version 3.x of the AzureRM Provider.
     * 
     */
    @Export(name="enabled", refs={Boolean.class}, tree="[0]")
    private Output<Boolean> enabled;

    /**
     * @return Should the origin be enabled? Possible values are `true` or `false`. Defaults to `true`.
     * 
     * &gt; **NOTE:** The `enabled` field will need to be explicitly set until the 4.0 provider is released due to the deprecation of the `health_probes_enabled` property in version 3.x of the AzureRM Provider.
     * 
     */
    public Output<Boolean> enabled() {
        return this.enabled;
    }
    /**
     * @deprecated
     * `health_probes_enabled` will be removed in favour of the `enabled` property in version 4.0 of the AzureRM Provider.
     * 
     */
    @Deprecated /* `health_probes_enabled` will be removed in favour of the `enabled` property in version 4.0 of the AzureRM Provider. */
    @Export(name="healthProbesEnabled", refs={Boolean.class}, tree="[0]")
    private Output<Boolean> healthProbesEnabled;

    public Output<Boolean> healthProbesEnabled() {
        return this.healthProbesEnabled;
    }
    /**
     * The IPv4 address, IPv6 address or Domain name of the Origin.
     * 
     * !&gt; **IMPORTANT:** This must be unique across all Front Door Origins within a Front Door Endpoint.
     * 
     */
    @Export(name="hostName", refs={String.class}, tree="[0]")
    private Output<String> hostName;

    /**
     * @return The IPv4 address, IPv6 address or Domain name of the Origin.
     * 
     * !&gt; **IMPORTANT:** This must be unique across all Front Door Origins within a Front Door Endpoint.
     * 
     */
    public Output<String> hostName() {
        return this.hostName;
    }
    /**
     * The value of the HTTP port. Must be between `1` and `65535`. Defaults to `80`.
     * 
     */
    @Export(name="httpPort", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> httpPort;

    /**
     * @return The value of the HTTP port. Must be between `1` and `65535`. Defaults to `80`.
     * 
     */
    public Output<Optional<Integer>> httpPort() {
        return Codegen.optional(this.httpPort);
    }
    /**
     * The value of the HTTPS port. Must be between `1` and `65535`. Defaults to `443`.
     * 
     */
    @Export(name="httpsPort", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> httpsPort;

    /**
     * @return The value of the HTTPS port. Must be between `1` and `65535`. Defaults to `443`.
     * 
     */
    public Output<Optional<Integer>> httpsPort() {
        return Codegen.optional(this.httpsPort);
    }
    /**
     * The name which should be used for this Front Door Origin. Changing this forces a new Front Door Origin to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name which should be used for this Front Door Origin. Changing this forces a new Front Door Origin to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The host header value (an IPv4 address, IPv6 address or Domain name) which is sent to the origin with each request. If unspecified the hostname from the request will be used.
     * 
     * &gt; Azure Front Door Origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin&#39;s hostname. This field&#39;s value overrides the host header defined in the Front Door Endpoint. For more information on how to properly set the origin host header value please see the [product documentation](https://docs.microsoft.com/azure/frontdoor/origin?pivots=front-door-standard-premium#origin-host-header).
     * 
     */
    @Export(name="originHostHeader", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> originHostHeader;

    /**
     * @return The host header value (an IPv4 address, IPv6 address or Domain name) which is sent to the origin with each request. If unspecified the hostname from the request will be used.
     * 
     * &gt; Azure Front Door Origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin&#39;s hostname. This field&#39;s value overrides the host header defined in the Front Door Endpoint. For more information on how to properly set the origin host header value please see the [product documentation](https://docs.microsoft.com/azure/frontdoor/origin?pivots=front-door-standard-premium#origin-host-header).
     * 
     */
    public Output<Optional<String>> originHostHeader() {
        return Codegen.optional(this.originHostHeader);
    }
    /**
     * Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy. Must be between `1` and `5` (inclusive). Defaults to `1`.
     * 
     */
    @Export(name="priority", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> priority;

    /**
     * @return Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy. Must be between `1` and `5` (inclusive). Defaults to `1`.
     * 
     */
    public Output<Optional<Integer>> priority() {
        return Codegen.optional(this.priority);
    }
    /**
     * A `private_link` block as defined below.
     * 
     * &gt; **NOTE:** Private Link requires that the Front Door Profile this Origin is hosted within is using the SKU `Premium_AzureFrontDoor` and that the `certificate_name_check_enabled` field is set to `true`.
     * 
     */
    @Export(name="privateLink", refs={FrontdoorOriginPrivateLink.class}, tree="[0]")
    private Output</* @Nullable */ FrontdoorOriginPrivateLink> privateLink;

    /**
     * @return A `private_link` block as defined below.
     * 
     * &gt; **NOTE:** Private Link requires that the Front Door Profile this Origin is hosted within is using the SKU `Premium_AzureFrontDoor` and that the `certificate_name_check_enabled` field is set to `true`.
     * 
     */
    public Output<Optional<FrontdoorOriginPrivateLink>> privateLink() {
        return Codegen.optional(this.privateLink);
    }
    /**
     * The weight of the origin in a given origin group for load balancing. Must be between `1` and `1000`. Defaults to `500`.
     * 
     */
    @Export(name="weight", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> weight;

    /**
     * @return The weight of the origin in a given origin group for load balancing. Must be between `1` and `1000`. Defaults to `500`.
     * 
     */
    public Output<Optional<Integer>> weight() {
        return Codegen.optional(this.weight);
    }

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

    private FrontdoorOrigin(String name, Output<String> id, @Nullable FrontdoorOriginState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:cdn/frontdoorOrigin:FrontdoorOrigin", 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 FrontdoorOrigin get(String name, Output<String> id, @Nullable FrontdoorOriginState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new FrontdoorOrigin(name, id, state, options);
    }
}
