com.pulumi.azurenative.app.ContainerAppsSessionPool 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.app;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.app.ContainerAppsSessionPoolArgs;
import com.pulumi.azurenative.app.outputs.CustomContainerTemplateResponse;
import com.pulumi.azurenative.app.outputs.DynamicPoolConfigurationResponse;
import com.pulumi.azurenative.app.outputs.ScaleConfigurationResponse;
import com.pulumi.azurenative.app.outputs.SessionNetworkConfigurationResponse;
import com.pulumi.azurenative.app.outputs.SessionPoolSecretResponse;
import com.pulumi.azurenative.app.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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Container App session pool.
* Azure REST API version: 2024-02-02-preview.
*
* ## Example Usage
* ### Create or Update Session Pool
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.app.ContainerAppsSessionPool;
* import com.pulumi.azurenative.app.ContainerAppsSessionPoolArgs;
* import com.pulumi.azurenative.app.inputs.CustomContainerTemplateArgs;
* import com.pulumi.azurenative.app.inputs.SessionIngressArgs;
* import com.pulumi.azurenative.app.inputs.DynamicPoolConfigurationArgs;
* import com.pulumi.azurenative.app.inputs.ScaleConfigurationArgs;
* import com.pulumi.azurenative.app.inputs.SessionNetworkConfigurationArgs;
* 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 containerAppsSessionPool = new ContainerAppsSessionPool("containerAppsSessionPool", ContainerAppsSessionPoolArgs.builder()
* .containerType("CustomContainer")
* .customContainerTemplate(CustomContainerTemplateArgs.builder()
* .containers(SessionContainerArgs.builder()
* .args(
* "-c",
* "while true; do echo hello; sleep 10;done")
* .command("/bin/sh")
* .image("repo/testcontainer:v4")
* .name("testinitcontainer")
* .resources(SessionContainerResourcesArgs.builder()
* .cpu(0.25)
* .memory("0.5Gi")
* .build())
* .build())
* .ingress(SessionIngressArgs.builder()
* .targetPort(80)
* .build())
* .build())
* .dynamicPoolConfiguration(DynamicPoolConfigurationArgs.builder()
* .cooldownPeriodInSeconds(600)
* .executionType("Timed")
* .build())
* .environmentId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube")
* .location("East US")
* .poolManagementType("Dynamic")
* .resourceGroupName("rg")
* .scaleConfiguration(ScaleConfigurationArgs.builder()
* .maxConcurrentSessions(500)
* .readySessionInstances(100)
* .build())
* .sessionNetworkConfiguration(SessionNetworkConfigurationArgs.builder()
* .status("EgressEnabled")
* .build())
* .sessionPoolName("testsessionpool")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:app:ContainerAppsSessionPool testsessionpool /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}
* ```
*
*/
@ResourceType(type="azure-native:app:ContainerAppsSessionPool")
public class ContainerAppsSessionPool extends com.pulumi.resources.CustomResource {
/**
* The container type of the sessions.
*
*/
@Export(name="containerType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> containerType;
/**
* @return The container type of the sessions.
*
*/
public Output> containerType() {
return Codegen.optional(this.containerType);
}
/**
* The custom container configuration if the containerType is CustomContainer.
*
*/
@Export(name="customContainerTemplate", refs={CustomContainerTemplateResponse.class}, tree="[0]")
private Output* @Nullable */ CustomContainerTemplateResponse> customContainerTemplate;
/**
* @return The custom container configuration if the containerType is CustomContainer.
*
*/
public Output> customContainerTemplate() {
return Codegen.optional(this.customContainerTemplate);
}
/**
* The pool configuration if the poolManagementType is dynamic.
*
*/
@Export(name="dynamicPoolConfiguration", refs={DynamicPoolConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ DynamicPoolConfigurationResponse> dynamicPoolConfiguration;
/**
* @return The pool configuration if the poolManagementType is dynamic.
*
*/
public Output> dynamicPoolConfiguration() {
return Codegen.optional(this.dynamicPoolConfiguration);
}
/**
* Resource ID of the session pool's environment.
*
*/
@Export(name="environmentId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> environmentId;
/**
* @return Resource ID of the session pool's environment.
*
*/
public Output> environmentId() {
return Codegen.optional(this.environmentId);
}
/**
* The geo-location where the resource lives
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The geo-location where the resource lives
*
*/
public Output location() {
return 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;
}
/**
* The number of nodes the session pool is using.
*
*/
@Export(name="nodeCount", refs={Integer.class}, tree="[0]")
private Output nodeCount;
/**
* @return The number of nodes the session pool is using.
*
*/
public Output nodeCount() {
return this.nodeCount;
}
/**
* The endpoint to manage the pool.
*
*/
@Export(name="poolManagementEndpoint", refs={String.class}, tree="[0]")
private Output poolManagementEndpoint;
/**
* @return The endpoint to manage the pool.
*
*/
public Output poolManagementEndpoint() {
return this.poolManagementEndpoint;
}
/**
* The pool management type of the session pool.
*
*/
@Export(name="poolManagementType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> poolManagementType;
/**
* @return The pool management type of the session pool.
*
*/
public Output> poolManagementType() {
return Codegen.optional(this.poolManagementType);
}
/**
* Provisioning state of the session pool.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return Provisioning state of the session pool.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The scale configuration of the session pool.
*
*/
@Export(name="scaleConfiguration", refs={ScaleConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ ScaleConfigurationResponse> scaleConfiguration;
/**
* @return The scale configuration of the session pool.
*
*/
public Output> scaleConfiguration() {
return Codegen.optional(this.scaleConfiguration);
}
/**
* The secrets of the session pool.
*
*/
@Export(name="secrets", refs={List.class,SessionPoolSecretResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> secrets;
/**
* @return The secrets of the session pool.
*
*/
public Output>> secrets() {
return Codegen.optional(this.secrets);
}
/**
* The network configuration of the sessions in the session pool.
*
*/
@Export(name="sessionNetworkConfiguration", refs={SessionNetworkConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ SessionNetworkConfigurationResponse> sessionNetworkConfiguration;
/**
* @return The network configuration of the sessions in the session pool.
*
*/
public Output> sessionNetworkConfiguration() {
return Codegen.optional(this.sessionNetworkConfiguration);
}
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ContainerAppsSessionPool(java.lang.String name) {
this(name, ContainerAppsSessionPoolArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ContainerAppsSessionPool(java.lang.String name, ContainerAppsSessionPoolArgs 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 ContainerAppsSessionPool(java.lang.String name, ContainerAppsSessionPoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:app:ContainerAppsSessionPool", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ContainerAppsSessionPool(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:app:ContainerAppsSessionPool", name, null, makeResourceOptions(options, id), false);
}
private static ContainerAppsSessionPoolArgs makeArgs(ContainerAppsSessionPoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ContainerAppsSessionPoolArgs.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:app/v20240202preview:ContainerAppsSessionPool").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 ContainerAppsSessionPool get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ContainerAppsSessionPool(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy