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

com.pulumi.azure.appservice.FunctionAppHybridConnection Maven / Gradle / Ivy

// *** 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
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-rg")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
 *             .name("example-plan")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .osType("Windows")
 *             .skuName("S1")
 *             .build());
 * 
 *         var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
 *             .name("example-relay")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("Standard")
 *             .build());
 * 
 *         var exampleHybridConnection = new HybridConnection("exampleHybridConnection", HybridConnectionArgs.builder()
 *             .name("examplerhc1")
 *             .resourceGroupName(example.name())
 *             .relayNamespaceName(exampleNamespace.name())
 *             .build());
 * 
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("storageaccountname")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("GRS")
 *             .build());
 * 
 *         var exampleWindowsWebApp = new WindowsWebApp("exampleWindowsWebApp", WindowsWebAppArgs.builder()
 *             .name("example")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .servicePlanId(exampleServicePlan.id())
 *             .siteConfig()
 *             .build());
 * 
 *         var exampleWindowsFunctionApp = new WindowsFunctionApp("exampleWindowsFunctionApp", WindowsFunctionAppArgs.builder()
 *             .name("example-function-app")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .servicePlanId(exampleServicePlan.id())
 *             .storageAccountName(exampleAccount.name())
 *             .storageAccountAccessKey(exampleAccount.primaryAccessKey())
 *             .siteConfig()
 *             .build());
 * 
 *         var exampleFunctionAppHybridConnection = new FunctionAppHybridConnection("exampleFunctionAppHybridConnection", FunctionAppHybridConnectionArgs.builder()
 *             .functionAppId(exampleWindowsWebApp.id())
 *             .relayId(exampleHybridConnection.id())
 *             .hostname("myhostname.example")
 *             .port(8081)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * a Function App Hybrid Connection can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:appservice/functionAppHybridConnection:FunctionAppHybridConnection example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/hybridConnectionNamespaces/hybridConnectionNamespace1/relays/relay1" * ``` * */ @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 functionAppId; /** * @return The ID of the Function App for this Hybrid Connection. Changing this forces a new resource to be created. * */ public Output functionAppId() { return this.functionAppId; } /** * The hostname of the endpoint. * */ @Export(name="hostname", refs={String.class}, tree="[0]") private Output hostname; /** * @return The hostname of the endpoint. * */ public Output hostname() { return this.hostname; } /** * The name of the Relay Namespace. * */ @Export(name="namespaceName", refs={String.class}, tree="[0]") private Output namespaceName; /** * @return The name of the Relay Namespace. * */ public Output namespaceName() { return this.namespaceName; } /** * The port to use for the endpoint * */ @Export(name="port", refs={Integer.class}, tree="[0]") private Output port; /** * @return The port to use for the endpoint * */ public Output 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 relayId; /** * @return The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. * */ public Output relayId() { return this.relayId; } /** * The name of the Relay in use. * */ @Export(name="relayName", refs={String.class}, tree="[0]") private Output relayName; /** * @return The name of the Relay in use. * */ public Output 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 sendKeyName; /** * @return The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` * */ public Output> 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 sendKeyValue; /** * @return The Primary Access Key for the `send_key_name` * */ public Output sendKeyValue() { return this.sendKeyValue; } /** * The Service Bus Namespace. * */ @Export(name="serviceBusNamespace", refs={String.class}, tree="[0]") private Output serviceBusNamespace; /** * @return The Service Bus Namespace. * */ public Output serviceBusNamespace() { return this.serviceBusNamespace; } /** * The suffix for the endpoint. * */ @Export(name="serviceBusSuffix", refs={String.class}, tree="[0]") private Output serviceBusSuffix; /** * @return The suffix for the endpoint. * */ public Output serviceBusSuffix() { return this.serviceBusSuffix; } /** * * @param name The _unique_ name of the resulting resource. */ public FunctionAppHybridConnection(java.lang.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(java.lang.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(java.lang.String name, FunctionAppHybridConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appservice/functionAppHybridConnection:FunctionAppHybridConnection", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private FunctionAppHybridConnection(java.lang.String name, Output id, @Nullable FunctionAppHybridConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appservice/functionAppHybridConnection:FunctionAppHybridConnection", name, state, makeResourceOptions(options, id), false); } private static FunctionAppHybridConnectionArgs makeArgs(FunctionAppHybridConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? FunctionAppHybridConnectionArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output 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(java.lang.String name, Output id, @Nullable FunctionAppHybridConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new FunctionAppHybridConnection(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy