com.pulumi.azurenative.signalrservice.SignalR Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.azurenative.signalrservice;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.signalrservice.SignalRArgs;
import com.pulumi.azurenative.signalrservice.outputs.LiveTraceConfigurationResponse;
import com.pulumi.azurenative.signalrservice.outputs.ManagedIdentityResponse;
import com.pulumi.azurenative.signalrservice.outputs.PrivateEndpointConnectionResponse;
import com.pulumi.azurenative.signalrservice.outputs.ResourceLogConfigurationResponse;
import com.pulumi.azurenative.signalrservice.outputs.ResourceSkuResponse;
import com.pulumi.azurenative.signalrservice.outputs.ServerlessSettingsResponse;
import com.pulumi.azurenative.signalrservice.outputs.ServerlessUpstreamSettingsResponse;
import com.pulumi.azurenative.signalrservice.outputs.SharedPrivateLinkResourceResponse;
import com.pulumi.azurenative.signalrservice.outputs.SignalRCorsSettingsResponse;
import com.pulumi.azurenative.signalrservice.outputs.SignalRFeatureResponse;
import com.pulumi.azurenative.signalrservice.outputs.SignalRNetworkACLsResponse;
import com.pulumi.azurenative.signalrservice.outputs.SignalRTlsSettingsResponse;
import com.pulumi.azurenative.signalrservice.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
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.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* A class represent a resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-05-01.
*
* Other available API versions: 2018-10-01, 2023-03-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2024-01-01-preview, 2024-03-01, 2024-04-01-preview, 2024-08-01-preview.
*
* ## Example Usage
* ### SignalR_CreateOrUpdate
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.signalrservice.SignalR;
* import com.pulumi.azurenative.signalrservice.SignalRArgs;
* import com.pulumi.azurenative.signalrservice.inputs.SignalRCorsSettingsArgs;
* import com.pulumi.azurenative.signalrservice.inputs.SignalRFeatureArgs;
* import com.pulumi.azurenative.signalrservice.inputs.ManagedIdentityArgs;
* import com.pulumi.azurenative.signalrservice.inputs.LiveTraceConfigurationArgs;
* import com.pulumi.azurenative.signalrservice.inputs.SignalRNetworkACLsArgs;
* import com.pulumi.azurenative.signalrservice.inputs.NetworkACLArgs;
* import com.pulumi.azurenative.signalrservice.inputs.ServerlessSettingsArgs;
* import com.pulumi.azurenative.signalrservice.inputs.ResourceSkuArgs;
* import com.pulumi.azurenative.signalrservice.inputs.SignalRTlsSettingsArgs;
* import com.pulumi.azurenative.signalrservice.inputs.ServerlessUpstreamSettingsArgs;
* 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 signalR = new SignalR("signalR", SignalRArgs.builder()
* .cors(SignalRCorsSettingsArgs.builder()
* .allowedOrigins(
* "https://foo.com",
* "https://bar.com")
* .build())
* .disableAadAuth(false)
* .disableLocalAuth(false)
* .features(
* SignalRFeatureArgs.builder()
* .flag("ServiceMode")
* .properties()
* .value("Serverless")
* .build(),
* SignalRFeatureArgs.builder()
* .flag("EnableConnectivityLogs")
* .properties()
* .value("True")
* .build(),
* SignalRFeatureArgs.builder()
* .flag("EnableMessagingLogs")
* .properties()
* .value("False")
* .build(),
* SignalRFeatureArgs.builder()
* .flag("EnableLiveTrace")
* .properties()
* .value("False")
* .build())
* .identity(ManagedIdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .kind("SignalR")
* .liveTraceConfiguration(LiveTraceConfigurationArgs.builder()
* .categories(LiveTraceCategoryArgs.builder()
* .enabled("true")
* .name("ConnectivityLogs")
* .build())
* .enabled("false")
* .build())
* .location("eastus")
* .networkACLs(SignalRNetworkACLsArgs.builder()
* .defaultAction("Deny")
* .privateEndpoints(PrivateEndpointACLArgs.builder()
* .allow("ServerConnection")
* .name("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")
* .build())
* .publicNetwork(NetworkACLArgs.builder()
* .allow("ClientConnection")
* .build())
* .build())
* .publicNetworkAccess("Enabled")
* .resourceGroupName("myResourceGroup")
* .resourceName("mySignalRService")
* .serverless(ServerlessSettingsArgs.builder()
* .connectionTimeoutInSeconds(5)
* .build())
* .sku(ResourceSkuArgs.builder()
* .capacity(1)
* .name("Premium_P1")
* .tier("Premium")
* .build())
* .tags(Map.of("key1", "value1"))
* .tls(SignalRTlsSettingsArgs.builder()
* .clientCertEnabled(false)
* .build())
* .upstream(ServerlessUpstreamSettingsArgs.builder()
* .templates(UpstreamTemplateArgs.builder()
* .auth(UpstreamAuthSettingsArgs.builder()
* .managedIdentity(ManagedIdentitySettingsArgs.builder()
* .resource("api://example")
* .build())
* .type("ManagedIdentity")
* .build())
* .categoryPattern("*")
* .eventPattern("connect,disconnect")
* .hubPattern("*")
* .urlTemplate("https://example.com/chat/api/connect")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:signalrservice:SignalR mySignalRService /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}
* ```
*
*/
@ResourceType(type="azure-native:signalrservice:SignalR")
public class SignalR extends com.pulumi.resources.CustomResource {
/**
* Cross-Origin Resource Sharing (CORS) settings.
*
*/
@Export(name="cors", refs={SignalRCorsSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ SignalRCorsSettingsResponse> cors;
/**
* @return Cross-Origin Resource Sharing (CORS) settings.
*
*/
public Output> cors() {
return Codegen.optional(this.cors);
}
/**
* DisableLocalAuth
* Enable or disable aad auth
* When set as true, connection with AuthType=aad won't work.
*
*/
@Export(name="disableAadAuth", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> disableAadAuth;
/**
* @return DisableLocalAuth
* Enable or disable aad auth
* When set as true, connection with AuthType=aad won't work.
*
*/
public Output> disableAadAuth() {
return Codegen.optional(this.disableAadAuth);
}
/**
* DisableLocalAuth
* Enable or disable local auth with AccessKey
* When set as true, connection with AccessKey=xxx won't work.
*
*/
@Export(name="disableLocalAuth", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> disableLocalAuth;
/**
* @return DisableLocalAuth
* Enable or disable local auth with AccessKey
* When set as true, connection with AccessKey=xxx won't work.
*
*/
public Output> disableLocalAuth() {
return Codegen.optional(this.disableLocalAuth);
}
/**
* The publicly accessible IP of the resource.
*
*/
@Export(name="externalIP", refs={String.class}, tree="[0]")
private Output externalIP;
/**
* @return The publicly accessible IP of the resource.
*
*/
public Output externalIP() {
return this.externalIP;
}
/**
* List of the featureFlags.
*
* FeatureFlags that are not included in the parameters for the update operation will not be modified.
* And the response will only include featureFlags that are explicitly set.
* When a featureFlag is not explicitly set, its globally default value will be used
* But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags.
*
*/
@Export(name="features", refs={List.class,SignalRFeatureResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> features;
/**
* @return List of the featureFlags.
*
* FeatureFlags that are not included in the parameters for the update operation will not be modified.
* And the response will only include featureFlags that are explicitly set.
* When a featureFlag is not explicitly set, its globally default value will be used
* But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags.
*
*/
public Output>> features() {
return Codegen.optional(this.features);
}
/**
* FQDN of the service instance.
*
*/
@Export(name="hostName", refs={String.class}, tree="[0]")
private Output hostName;
/**
* @return FQDN of the service instance.
*
*/
public Output hostName() {
return this.hostName;
}
/**
* Deprecated.
*
*/
@Export(name="hostNamePrefix", refs={String.class}, tree="[0]")
private Output hostNamePrefix;
/**
* @return Deprecated.
*
*/
public Output hostNamePrefix() {
return this.hostNamePrefix;
}
/**
* A class represent managed identities used for request and response
*
*/
@Export(name="identity", refs={ManagedIdentityResponse.class}, tree="[0]")
private Output* @Nullable */ ManagedIdentityResponse> identity;
/**
* @return A class represent managed identities used for request and response
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* The kind of the service, it can be SignalR or RawWebSockets
*
*/
@Export(name="kind", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> kind;
/**
* @return The kind of the service, it can be SignalR or RawWebSockets
*
*/
public Output> kind() {
return Codegen.optional(this.kind);
}
/**
* Live trace configuration of a Microsoft.SignalRService resource.
*
*/
@Export(name="liveTraceConfiguration", refs={LiveTraceConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ LiveTraceConfigurationResponse> liveTraceConfiguration;
/**
* @return Live trace configuration of a Microsoft.SignalRService resource.
*
*/
public Output> liveTraceConfiguration() {
return Codegen.optional(this.liveTraceConfiguration);
}
/**
* The GEO location of the resource. e.g. West US | East US | North Central US | South Central US.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> location;
/**
* @return The GEO location of the resource. e.g. West US | East US | North Central US | South Central US.
*
*/
public Output> location() {
return Codegen.optional(this.location);
}
/**
* The name of the resource.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource.
*
*/
public Output name() {
return this.name;
}
/**
* Network ACLs for the resource
*
*/
@Export(name="networkACLs", refs={SignalRNetworkACLsResponse.class}, tree="[0]")
private Output* @Nullable */ SignalRNetworkACLsResponse> networkACLs;
/**
* @return Network ACLs for the resource
*
*/
public Output> networkACLs() {
return Codegen.optional(this.networkACLs);
}
/**
* Private endpoint connections to the resource.
*
*/
@Export(name="privateEndpointConnections", refs={List.class,PrivateEndpointConnectionResponse.class}, tree="[0,1]")
private Output> privateEndpointConnections;
/**
* @return Private endpoint connections to the resource.
*
*/
public Output> privateEndpointConnections() {
return this.privateEndpointConnections;
}
/**
* Provisioning state of the resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return Provisioning state of the resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* Enable or disable public network access. Default to "Enabled".
* When it's Enabled, network ACLs still apply.
* When it's Disabled, public network access is always disabled no matter what you set in network ACLs.
*
*/
@Export(name="publicNetworkAccess", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> publicNetworkAccess;
/**
* @return Enable or disable public network access. Default to "Enabled".
* When it's Enabled, network ACLs still apply.
* When it's Disabled, public network access is always disabled no matter what you set in network ACLs.
*
*/
public Output> publicNetworkAccess() {
return Codegen.optional(this.publicNetworkAccess);
}
/**
* The publicly accessible port of the resource which is designed for browser/client side usage.
*
*/
@Export(name="publicPort", refs={Integer.class}, tree="[0]")
private Output publicPort;
/**
* @return The publicly accessible port of the resource which is designed for browser/client side usage.
*
*/
public Output publicPort() {
return this.publicPort;
}
/**
* Resource log configuration of a Microsoft.SignalRService resource.
*
*/
@Export(name="resourceLogConfiguration", refs={ResourceLogConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ ResourceLogConfigurationResponse> resourceLogConfiguration;
/**
* @return Resource log configuration of a Microsoft.SignalRService resource.
*
*/
public Output> resourceLogConfiguration() {
return Codegen.optional(this.resourceLogConfiguration);
}
/**
* The publicly accessible port of the resource which is designed for customer server side usage.
*
*/
@Export(name="serverPort", refs={Integer.class}, tree="[0]")
private Output serverPort;
/**
* @return The publicly accessible port of the resource which is designed for customer server side usage.
*
*/
public Output serverPort() {
return this.serverPort;
}
/**
* Serverless settings.
*
*/
@Export(name="serverless", refs={ServerlessSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ ServerlessSettingsResponse> serverless;
/**
* @return Serverless settings.
*
*/
public Output> serverless() {
return Codegen.optional(this.serverless);
}
/**
* The list of shared private link resources.
*
*/
@Export(name="sharedPrivateLinkResources", refs={List.class,SharedPrivateLinkResourceResponse.class}, tree="[0,1]")
private Output> sharedPrivateLinkResources;
/**
* @return The list of shared private link resources.
*
*/
public Output> sharedPrivateLinkResources() {
return this.sharedPrivateLinkResources;
}
/**
* The billing information of the resource.
*
*/
@Export(name="sku", refs={ResourceSkuResponse.class}, tree="[0]")
private Output* @Nullable */ ResourceSkuResponse> sku;
/**
* @return The billing information of the resource.
*
*/
public Output> sku() {
return Codegen.optional(this.sku);
}
/**
* Metadata pertaining to creation and last modification of the resource.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Metadata pertaining to creation and last modification of the resource.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Tags of the service which is a list of key value pairs that describe the resource.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Tags of the service which is a list of key value pairs that describe the resource.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* TLS settings for the resource
*
*/
@Export(name="tls", refs={SignalRTlsSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ SignalRTlsSettingsResponse> tls;
/**
* @return TLS settings for the resource
*
*/
public Output> tls() {
return Codegen.optional(this.tls);
}
/**
* The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
*
*/
public Output type() {
return this.type;
}
/**
* The settings for the Upstream when the service is in server-less mode.
*
*/
@Export(name="upstream", refs={ServerlessUpstreamSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ ServerlessUpstreamSettingsResponse> upstream;
/**
* @return The settings for the Upstream when the service is in server-less mode.
*
*/
public Output> upstream() {
return Codegen.optional(this.upstream);
}
/**
* Version of the resource. Probably you need the same or higher version of client SDKs.
*
*/
@Export(name="version", refs={String.class}, tree="[0]")
private Output version;
/**
* @return Version of the resource. Probably you need the same or higher version of client SDKs.
*
*/
public Output version() {
return this.version;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SignalR(java.lang.String name) {
this(name, SignalRArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SignalR(java.lang.String name, SignalRArgs 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 SignalR(java.lang.String name, SignalRArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:signalrservice:SignalR", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private SignalR(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:signalrservice:SignalR", name, null, makeResourceOptions(options, id), false);
}
private static SignalRArgs makeArgs(SignalRArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SignalRArgs.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())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:signalrservice/v20180301preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20181001:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20200501:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20200701preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20210401preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20210601preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20210901preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20211001:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20220201:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20220801preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20230201:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20230301preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20230601preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20230801preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20240101preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20240301:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20240401preview:SignalR").build()),
Output.of(Alias.builder().type("azure-native:signalrservice/v20240801preview:SignalR").build())
))
.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 options Optional settings to control the behavior of the CustomResource.
*/
public static SignalR get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SignalR(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy