com.pulumi.azure.appservice.WebAppHybridConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.WebAppHybridConnectionArgs;
import com.pulumi.azure.appservice.inputs.WebAppHybridConnectionState;
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 Web 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.appservice.WindowsWebApp;
* import com.pulumi.azure.appservice.WindowsWebAppArgs;
* import com.pulumi.azure.appservice.inputs.WindowsWebAppSiteConfigArgs;
* import com.pulumi.azure.appservice.WebAppHybridConnection;
* import com.pulumi.azure.appservice.WebAppHybridConnectionArgs;
* 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 exampleWindowsWebApp = new WindowsWebApp("exampleWindowsWebApp", WindowsWebAppArgs.builder()
* .name("example-web-app")
* .location(example.location())
* .resourceGroupName(example.name())
* .servicePlanId(exampleServicePlan.id())
* .siteConfig()
* .build());
*
* var exampleWebAppHybridConnection = new WebAppHybridConnection("exampleWebAppHybridConnection", WebAppHybridConnectionArgs.builder()
* .webAppId(exampleWindowsWebApp.id())
* .relayId(exampleHybridConnection.id())
* .hostname("myhostname.example")
* .port(8081)
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* a Web App Hybrid Connection can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:appservice/webAppHybridConnection:WebAppHybridConnection example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/hybridConnectionNamespaces/hybridConnectionNamespace1/relays/relay1"
* ```
*
*/
@ResourceType(type="azure:appservice/webAppHybridConnection:WebAppHybridConnection")
public class WebAppHybridConnection extends com.pulumi.resources.CustomResource {
/**
* 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* @Nullable */ String> 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;
}
/**
* The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.
*
*/
@Export(name="webAppId", refs={String.class}, tree="[0]")
private Output webAppId;
/**
* @return The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.
*
*/
public Output webAppId() {
return this.webAppId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public WebAppHybridConnection(java.lang.String name) {
this(name, WebAppHybridConnectionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public WebAppHybridConnection(java.lang.String name, WebAppHybridConnectionArgs 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 WebAppHybridConnection(java.lang.String name, WebAppHybridConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:appservice/webAppHybridConnection:WebAppHybridConnection", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private WebAppHybridConnection(java.lang.String name, Output id, @Nullable WebAppHybridConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:appservice/webAppHybridConnection:WebAppHybridConnection", name, state, makeResourceOptions(options, id), false);
}
private static WebAppHybridConnectionArgs makeArgs(WebAppHybridConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? WebAppHybridConnectionArgs.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 WebAppHybridConnection get(java.lang.String name, Output id, @Nullable WebAppHybridConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new WebAppHybridConnection(name, id, state, options);
}
}