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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.appservice.FunctionAppHybridConnectionArgs;
import com.pulumi.azure.appservice.inputs.FunctionAppHybridConnectionState;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Function App Hybrid Connection.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.appservice.ServicePlan;
 * import com.pulumi.azure.appservice.ServicePlanArgs;
 * import com.pulumi.azure.relay.Namespace;
 * import com.pulumi.azure.relay.NamespaceArgs;
 * import com.pulumi.azure.relay.HybridConnection;
 * import com.pulumi.azure.relay.HybridConnectionArgs;
 * import com.pulumi.azure.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.appservice.WindowsWebApp;
 * import com.pulumi.azure.appservice.WindowsWebAppArgs;
 * import com.pulumi.azure.appservice.inputs.WindowsWebAppSiteConfigArgs;
 * import com.pulumi.azure.appservice.WindowsFunctionApp;
 * import com.pulumi.azure.appservice.WindowsFunctionAppArgs;
 * import com.pulumi.azure.appservice.inputs.WindowsFunctionAppSiteConfigArgs;
 * import com.pulumi.azure.appservice.FunctionAppHybridConnection;
 * import com.pulumi.azure.appservice.FunctionAppHybridConnectionArgs;
 * 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 exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleServicePlan = new ServicePlan(&#34;exampleServicePlan&#34;, ServicePlanArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .osType(&#34;Windows&#34;)
 *             .skuName(&#34;S1&#34;)
 *             .build());
 * 
 *         var exampleNamespace = new Namespace(&#34;exampleNamespace&#34;, NamespaceArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .skuName(&#34;Standard&#34;)
 *             .build());
 * 
 *         var exampleHybridConnection = new HybridConnection(&#34;exampleHybridConnection&#34;, HybridConnectionArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .relayNamespaceName(exampleNamespace.name())
 *             .build());
 * 
 *         var exampleAccount = new Account(&#34;exampleAccount&#34;, AccountArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .accountTier(&#34;Standard&#34;)
 *             .accountReplicationType(&#34;GRS&#34;)
 *             .build());
 * 
 *         var exampleWindowsWebApp = new WindowsWebApp(&#34;exampleWindowsWebApp&#34;, WindowsWebAppArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .servicePlanId(exampleServicePlan.id())
 *             .siteConfig()
 *             .build());
 * 
 *         var exampleWindowsFunctionApp = new WindowsFunctionApp(&#34;exampleWindowsFunctionApp&#34;, WindowsFunctionAppArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .servicePlanId(exampleServicePlan.id())
 *             .storageAccountName(exampleAccount.name())
 *             .storageAccountAccessKey(exampleAccount.primaryAccessKey())
 *             .siteConfig()
 *             .build());
 * 
 *         var exampleFunctionAppHybridConnection = new FunctionAppHybridConnection(&#34;exampleFunctionAppHybridConnection&#34;, FunctionAppHybridConnectionArgs.builder()        
 *             .functionAppId(exampleWindowsWebApp.id())
 *             .relayId(exampleHybridConnection.id())
 *             .hostname(&#34;myhostname.example&#34;)
 *             .port(8081)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * a Function App Hybrid Connection can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:appservice/functionAppHybridConnection:FunctionAppHybridConnection example &#34;/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/hybridConnectionNamespaces/hybridConnectionNamespace1/relays/relay1&#34;
 * ```
 * 
 */
@ResourceType(type="azure:appservice/functionAppHybridConnection:FunctionAppHybridConnection")
public class FunctionAppHybridConnection extends com.pulumi.resources.CustomResource {
    /**
     * The ID of the Function App for this Hybrid Connection. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="functionAppId", refs={String.class}, tree="[0]")
    private Output<String> functionAppId;

    /**
     * @return The ID of the Function App for this Hybrid Connection. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> functionAppId() {
        return this.functionAppId;
    }
    /**
     * The hostname of the endpoint.
     * 
     */
    @Export(name="hostname", refs={String.class}, tree="[0]")
    private Output<String> hostname;

    /**
     * @return The hostname of the endpoint.
     * 
     */
    public Output<String> hostname() {
        return this.hostname;
    }
    /**
     * The name of the Relay Namespace.
     * 
     */
    @Export(name="namespaceName", refs={String.class}, tree="[0]")
    private Output<String> namespaceName;

    /**
     * @return The name of the Relay Namespace.
     * 
     */
    public Output<String> namespaceName() {
        return this.namespaceName;
    }
    /**
     * The port to use for the endpoint
     * 
     */
    @Export(name="port", refs={Integer.class}, tree="[0]")
    private Output<Integer> port;

    /**
     * @return The port to use for the endpoint
     * 
     */
    public Output<Integer> port() {
        return this.port;
    }
    /**
     * The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="relayId", refs={String.class}, tree="[0]")
    private Output<String> relayId;

    /**
     * @return The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> relayId() {
        return this.relayId;
    }
    /**
     * The name of the Relay in use.
     * 
     */
    @Export(name="relayName", refs={String.class}, tree="[0]")
    private Output<String> relayName;

    /**
     * @return The name of the Relay in use.
     * 
     */
    public Output<String> relayName() {
        return this.relayName;
    }
    /**
     * The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey`
     * 
     */
    @Export(name="sendKeyName", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> sendKeyName;

    /**
     * @return The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey`
     * 
     */
    public Output<Optional<String>> sendKeyName() {
        return Codegen.optional(this.sendKeyName);
    }
    /**
     * The Primary Access Key for the `send_key_name`
     * 
     */
    @Export(name="sendKeyValue", refs={String.class}, tree="[0]")
    private Output<String> sendKeyValue;

    /**
     * @return The Primary Access Key for the `send_key_name`
     * 
     */
    public Output<String> sendKeyValue() {
        return this.sendKeyValue;
    }
    /**
     * The Service Bus Namespace.
     * 
     */
    @Export(name="serviceBusNamespace", refs={String.class}, tree="[0]")
    private Output<String> serviceBusNamespace;

    /**
     * @return The Service Bus Namespace.
     * 
     */
    public Output<String> serviceBusNamespace() {
        return this.serviceBusNamespace;
    }
    /**
     * The suffix for the endpoint.
     * 
     */
    @Export(name="serviceBusSuffix", refs={String.class}, tree="[0]")
    private Output<String> serviceBusSuffix;

    /**
     * @return The suffix for the endpoint.
     * 
     */
    public Output<String> serviceBusSuffix() {
        return this.serviceBusSuffix;
    }

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

    private FunctionAppHybridConnection(String name, Output<String> id, @Nullable FunctionAppHybridConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:appservice/functionAppHybridConnection:FunctionAppHybridConnection", 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())
            .additionalSecretOutputs(List.of(
                "sendKeyValue"
            ))
            .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 FunctionAppHybridConnection get(String name, Output<String> id, @Nullable FunctionAppHybridConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new FunctionAppHybridConnection(name, id, state, options);
    }
}
