JavaComponent

class JavaComponent : KotlinCustomResource

Java Component. Uses Azure REST API version 2023-11-02-preview. Other available API versions: 2024-02-02-preview, 2024-08-02-preview, 2024-10-02-preview, 2025-01-01.

Example Usage

Create or Update Java Component

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var javaComponent = new AzureNative.App.JavaComponent("javaComponent", new()
{
ComponentType = AzureNative.App.JavaComponentType.SpringBootAdmin,
Configurations = new[]
{
new AzureNative.App.Inputs.JavaComponentConfigurationPropertyArgs
{
PropertyName = "spring.boot.admin.ui.enable-toasts",
Value = "true",
},
new AzureNative.App.Inputs.JavaComponentConfigurationPropertyArgs
{
PropertyName = "spring.boot.admin.monitor.status-interval",
Value = "10000ms",
},
},
EnvironmentName = "myenvironment",
Name = "myjavacomponent",
ResourceGroupName = "examplerg",
});
});
package main
import (
app "github.com/pulumi/pulumi-azure-native-sdk/app/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := app.NewJavaComponent(ctx, "javaComponent", &app.JavaComponentArgs{
ComponentType: pulumi.String(app.JavaComponentTypeSpringBootAdmin),
Configurations: app.JavaComponentConfigurationPropertyArray{
&app.JavaComponentConfigurationPropertyArgs{
PropertyName: pulumi.String("spring.boot.admin.ui.enable-toasts"),
Value: pulumi.String("true"),
},
&app.JavaComponentConfigurationPropertyArgs{
PropertyName: pulumi.String("spring.boot.admin.monitor.status-interval"),
Value: pulumi.String("10000ms"),
},
},
EnvironmentName: pulumi.String("myenvironment"),
Name: pulumi.String("myjavacomponent"),
ResourceGroupName: pulumi.String("examplerg"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.app.JavaComponent;
import com.pulumi.azurenative.app.JavaComponentArgs;
import com.pulumi.azurenative.app.inputs.JavaComponentConfigurationPropertyArgs;
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 javaComponent = new JavaComponent("javaComponent", JavaComponentArgs.builder()
.componentType("SpringBootAdmin")
.configurations(
JavaComponentConfigurationPropertyArgs.builder()
.propertyName("spring.boot.admin.ui.enable-toasts")
.value("true")
.build(),
JavaComponentConfigurationPropertyArgs.builder()
.propertyName("spring.boot.admin.monitor.status-interval")
.value("10000ms")
.build())
.environmentName("myenvironment")
.name("myjavacomponent")
.resourceGroupName("examplerg")
.build());
}
}

Create or Update Java Component with ServiceBinds

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var javaComponent = new AzureNative.App.JavaComponent("javaComponent", new()
{
ComponentType = AzureNative.App.JavaComponentType.SpringBootAdmin,
Configurations = new[]
{
new AzureNative.App.Inputs.JavaComponentConfigurationPropertyArgs
{
PropertyName = "spring.boot.admin.ui.enable-toasts",
Value = "true",
},
new AzureNative.App.Inputs.JavaComponentConfigurationPropertyArgs
{
PropertyName = "spring.boot.admin.monitor.status-interval",
Value = "10000ms",
},
},
EnvironmentName = "myenvironment",
Name = "myjavacomponent",
ResourceGroupName = "examplerg",
ServiceBinds = new[]
{
new AzureNative.App.Inputs.JavaComponentServiceBindArgs
{
Name = "yellowcat",
ServiceId = "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat",
},
},
});
});
package main
import (
app "github.com/pulumi/pulumi-azure-native-sdk/app/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := app.NewJavaComponent(ctx, "javaComponent", &app.JavaComponentArgs{
ComponentType: pulumi.String(app.JavaComponentTypeSpringBootAdmin),
Configurations: app.JavaComponentConfigurationPropertyArray{
&app.JavaComponentConfigurationPropertyArgs{
PropertyName: pulumi.String("spring.boot.admin.ui.enable-toasts"),
Value: pulumi.String("true"),
},
&app.JavaComponentConfigurationPropertyArgs{
PropertyName: pulumi.String("spring.boot.admin.monitor.status-interval"),
Value: pulumi.String("10000ms"),
},
},
EnvironmentName: pulumi.String("myenvironment"),
Name: pulumi.String("myjavacomponent"),
ResourceGroupName: pulumi.String("examplerg"),
ServiceBinds: app.JavaComponentServiceBindArray{
&app.JavaComponentServiceBindArgs{
Name: pulumi.String("yellowcat"),
ServiceId: pulumi.String("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.app.JavaComponent;
import com.pulumi.azurenative.app.JavaComponentArgs;
import com.pulumi.azurenative.app.inputs.JavaComponentConfigurationPropertyArgs;
import com.pulumi.azurenative.app.inputs.JavaComponentServiceBindArgs;
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 javaComponent = new JavaComponent("javaComponent", JavaComponentArgs.builder()
.componentType("SpringBootAdmin")
.configurations(
JavaComponentConfigurationPropertyArgs.builder()
.propertyName("spring.boot.admin.ui.enable-toasts")
.value("true")
.build(),
JavaComponentConfigurationPropertyArgs.builder()
.propertyName("spring.boot.admin.monitor.status-interval")
.value("10000ms")
.build())
.environmentName("myenvironment")
.name("myjavacomponent")
.resourceGroupName("examplerg")
.serviceBinds(JavaComponentServiceBindArgs.builder()
.name("yellowcat")
.serviceId("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")
.build())
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:app:JavaComponent myjavacomponent /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}

Properties

Link copied to clipboard
val componentType: Output<String>?

Type of the Java Component.

Link copied to clipboard

List of Java Components configuration properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

Provisioning state of the Java Component.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

List of Java Components that are bound to the Java component

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>