Java Component
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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",
},
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Properties
Link copied to clipboard
Type of the Java Component.
Link copied to clipboard
List of Java Components configuration properties
Link copied to clipboard
Provisioning state of the Java Component.
Link copied to clipboard
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.