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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.customip.PrefixArgs;
import com.pulumi.azure.customip.inputs.PrefixState;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a custom IPv4 prefix or custom IPv6 prefix.
 * 
 * ## Import
 * 
 * A Custom IP Prefix can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:customip/prefix:Prefix example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/customIPPrefixes/customIPPrefix1
 * ```
 * 
 */
@ResourceType(type="azure:customip/prefix:Prefix")
public class Prefix extends com.pulumi.resources.CustomResource {
    /**
     * The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="cidr", refs={String.class}, tree="[0]")
    private Output<String> cidr;

    /**
     * @return The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> cidr() {
        return this.cidr;
    }
    /**
     * Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`.
     * 
     * !&gt; **Warning** Changing the value of `commissioning_enabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting.
     * 
     */
    @Export(name="commissioningEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> commissioningEnabled;

    /**
     * @return Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`.
     * 
     * !&gt; **Warning** Changing the value of `commissioning_enabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting.
     * 
     */
    public Output<Optional<Boolean>> commissioningEnabled() {
        return Codegen.optional(this.commissioningEnabled);
    }
    /**
     * Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`.
     * 
     * !&gt; **Warning** Changing the value of `internet_advertising_disabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting.
     * 
     */
    @Export(name="internetAdvertisingDisabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> internetAdvertisingDisabled;

    /**
     * @return Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`.
     * 
     * !&gt; **Warning** Changing the value of `internet_advertising_disabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting.
     * 
     */
    public Output<Optional<Boolean>> internetAdvertisingDisabled() {
        return Codegen.optional(this.internetAdvertisingDisabled);
    }
    /**
     * The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * The name of the Custom IP Prefix. 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 Custom IP Prefix. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="parentCustomIpPrefixId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> parentCustomIpPrefixId;

    /**
     * @return Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<String>> parentCustomIpPrefixId() {
        return Codegen.optional(this.parentCustomIpPrefixId);
    }
    /**
     * The name of the Resource Group in which to create the Custom IP Prefix. 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 Custom IP Prefix. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="roaValidityEndDate", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> roaValidityEndDate;

    /**
     * @return The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<String>> roaValidityEndDate() {
        return Codegen.optional(this.roaValidityEndDate);
    }
    /**
     * A mapping of tags to assign to the Custom IP Prefix.
     * 
     */
    @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 Custom IP Prefix.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="wanValidationSignedMessage", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> wanValidationSignedMessage;

    /**
     * @return The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<String>> wanValidationSignedMessage() {
        return Codegen.optional(this.wanValidationSignedMessage);
    }
    /**
     * Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created.
     * 
     * &gt; **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can&#39;t be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties.
     * 
     */
    @Export(name="zones", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> zones;

    /**
     * @return Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created.
     * 
     * &gt; **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can&#39;t be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties.
     * 
     */
    public Output<Optional<List<String>>> zones() {
        return Codegen.optional(this.zones);
    }

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

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