ApplicationArgs

data class ApplicationArgs(val acrAssumeRoleArn: Output<String>? = null, val acrInstanceId: Output<String>? = null, val appDescription: Output<String>? = null, val appName: Output<String>? = null, val autoConfig: Output<Boolean>? = null, val autoEnableApplicationScalingRule: Output<Boolean>? = null, val batchWaitTime: Output<Int>? = null, val changeOrderDesc: Output<String>? = null, val command: Output<String>? = null, val commandArgs: Output<String>? = null, val configMapMountDesc: Output<String>? = null, val cpu: Output<Int>? = null, val customHostAlias: Output<String>? = null, val deploy: Output<Boolean>? = null, val edasContainerVersion: Output<String>? = null, val enableAhas: Output<String>? = null, val enableGreyTagRoute: Output<Boolean>? = null, val envs: Output<String>? = null, val imageUrl: Output<String>? = null, val jarStartArgs: Output<String>? = null, val jarStartOptions: Output<String>? = null, val jdk: Output<String>? = null, val liveness: Output<String>? = null, val memory: Output<Int>? = null, val microRegistration: Output<String>? = null, val minReadyInstanceRatio: Output<Int>? = null, val minReadyInstances: Output<Int>? = null, val mountDesc: Output<String>? = null, val mountHost: Output<String>? = null, val namespaceId: Output<String>? = null, val nasId: Output<String>? = null, val ossAkId: Output<String>? = null, val ossAkSecret: Output<String>? = null, val ossMountDescs: Output<String>? = null, val packageType: Output<String>? = null, val packageUrl: Output<String>? = null, val packageVersion: Output<String>? = null, val phpArmsConfigLocation: Output<String>? = null, val phpConfig: Output<String>? = null, val phpConfigLocation: Output<String>? = null, val postStart: Output<String>? = null, val preStop: Output<String>? = null, val readiness: Output<String>? = null, val replicas: Output<Int>? = null, val securityGroupId: Output<String>? = null, val slsConfigs: Output<String>? = null, val status: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val terminationGracePeriodSeconds: Output<Int>? = null, val timezone: Output<String>? = null, val tomcatConfig: Output<String>? = null, val updateStrategy: Output<String>? = null, val versionId: Output<String>? = null, val vpcId: Output<String>? = null, val vswitchId: Output<String>? = null, val warStartOptions: Output<String>? = null, val webContainer: Output<String>? = null) : ConvertibleToJava<ApplicationArgs>

Provides a Serverless App Engine (SAE) Application resource. For information about Serverless App Engine (SAE) Application and how to use it, see What is Application.

NOTE: Available since v1.161.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.sae.Namespace;
import com.pulumi.alicloud.sae.NamespaceArgs;
import com.pulumi.alicloud.sae.Application;
import com.pulumi.alicloud.sae.ApplicationArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var defaultRandomInteger = new RandomInteger("defaultRandomInteger", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.4.0.0/24")
.vpcId(defaultNetwork.id())
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.vpcId(defaultNetwork.id())
.build());
var defaultNamespace = new Namespace("defaultNamespace", NamespaceArgs.builder()
.namespaceId(defaultRandomInteger.result().applyValue(result -> String.format("%s:example%s", defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()),result)))
.namespaceName(name)
.namespaceDescription(name)
.enableMicroRegistration(false)
.build());
var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()
.appDescription(name)
.appName(name)
.namespaceId(defaultNamespace.id())
.imageUrl(String.format("registry-vpc.%s.aliyuncs.com/sae-demo-image/consumer:1.0", defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id())))
.packageType("Image")
.securityGroupId(defaultSecurityGroup.id())
.vpcId(defaultNetwork.id())
.vswitchId(defaultSwitch.id())
.timezone("Asia/Beijing")
.replicas("5")
.cpu("500")
.memory("2048")
.build());
}
}

Import

Serverless App Engine (SAE) Application can be imported using the id, e.g.

$ pulumi import alicloud:sae/application:Application example <id>

Constructors

Link copied to clipboard
fun ApplicationArgs(acrAssumeRoleArn: Output<String>? = null, acrInstanceId: Output<String>? = null, appDescription: Output<String>? = null, appName: Output<String>? = null, autoConfig: Output<Boolean>? = null, autoEnableApplicationScalingRule: Output<Boolean>? = null, batchWaitTime: Output<Int>? = null, changeOrderDesc: Output<String>? = null, command: Output<String>? = null, commandArgs: Output<String>? = null, configMapMountDesc: Output<String>? = null, cpu: Output<Int>? = null, customHostAlias: Output<String>? = null, deploy: Output<Boolean>? = null, edasContainerVersion: Output<String>? = null, enableAhas: Output<String>? = null, enableGreyTagRoute: Output<Boolean>? = null, envs: Output<String>? = null, imageUrl: Output<String>? = null, jarStartArgs: Output<String>? = null, jarStartOptions: Output<String>? = null, jdk: Output<String>? = null, liveness: Output<String>? = null, memory: Output<Int>? = null, microRegistration: Output<String>? = null, minReadyInstanceRatio: Output<Int>? = null, minReadyInstances: Output<Int>? = null, mountDesc: Output<String>? = null, mountHost: Output<String>? = null, namespaceId: Output<String>? = null, nasId: Output<String>? = null, ossAkId: Output<String>? = null, ossAkSecret: Output<String>? = null, ossMountDescs: Output<String>? = null, packageType: Output<String>? = null, packageUrl: Output<String>? = null, packageVersion: Output<String>? = null, phpArmsConfigLocation: Output<String>? = null, phpConfig: Output<String>? = null, phpConfigLocation: Output<String>? = null, postStart: Output<String>? = null, preStop: Output<String>? = null, readiness: Output<String>? = null, replicas: Output<Int>? = null, securityGroupId: Output<String>? = null, slsConfigs: Output<String>? = null, status: Output<String>? = null, tags: Output<Map<String, Any>>? = null, terminationGracePeriodSeconds: Output<Int>? = null, timezone: Output<String>? = null, tomcatConfig: Output<String>? = null, updateStrategy: Output<String>? = null, versionId: Output<String>? = null, vpcId: Output<String>? = null, vswitchId: Output<String>? = null, warStartOptions: Output<String>? = null, webContainer: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ApplicationArgs

Properties

Link copied to clipboard
val acrAssumeRoleArn: Output<String>? = null

The ARN of the RAM role required when pulling images across accounts. Only necessary if the image_url is pointing to an ACR EE instance.

Link copied to clipboard
val acrInstanceId: Output<String>? = null

The ID of the ACR EE instance. Only necessary if the image_url is pointing to an ACR EE instance.

Link copied to clipboard
val appDescription: Output<String>? = null

Application description information. No more than 1024 characters.

Link copied to clipboard
val appName: Output<String>? = null

Application Name. Combinations of numbers, letters, and dashes (-) are allowed. It must start with a letter and the maximum length is 36 characters.

Link copied to clipboard
val autoConfig: Output<Boolean>? = null

The auto config. Valid values: false, true.

Link copied to clipboard

The auto enable application scaling rule. Valid values: false, true.

Link copied to clipboard
val batchWaitTime: Output<Int>? = null

The batch wait time.

Link copied to clipboard
val changeOrderDesc: Output<String>? = null

The change order desc.

Link copied to clipboard
val command: Output<String>? = null

Mirror start command. The command must be an executable object in the container. For example: sleep. Setting this command will cause the original startup command of the mirror to become invalid.

Link copied to clipboard
val commandArgs: Output<String>? = null

Mirror startup command parameters. The parameters required for the above start command. For example: 1d.

Link copied to clipboard
val configMapMountDesc: Output<String>? = null

ConfigMap mount description.

Link copied to clipboard
val cpu: Output<Int>? = null

The CPU required for each instance, in millicores, cannot be 0. Valid values: 1000, 16000, 2000, 32000, 4000, 500, 8000.

Link copied to clipboard
val customHostAlias: Output<String>? = null

Custom host mapping in the container. For example: {`hostName`:`samplehost`,`ip`:`127.0.0.1`}.

Link copied to clipboard
val deploy: Output<Boolean>? = null

The deploy. Valid values: false, true.

Link copied to clipboard
val edasContainerVersion: Output<String>? = null

The operating environment used by the Pandora application.

Link copied to clipboard
val enableAhas: Output<String>? = null

The enable ahas.

Link copied to clipboard
val enableGreyTagRoute: Output<Boolean>? = null

The enable grey tag route.

Link copied to clipboard
val envs: Output<String>? = null

Container environment variable parameters. For example,[{"name":"envtmp","value":"0"}]. The value description is as follows:

Link copied to clipboard
val imageUrl: Output<String>? = null

Mirror address. Only Image type applications can configure the mirror address.

Link copied to clipboard
val jarStartArgs: Output<String>? = null

The JAR package starts application parameters. Application default startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

Link copied to clipboard
val jarStartOptions: Output<String>? = null

The JAR package starts the application option. Application default startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

Link copied to clipboard
val jdk: Output<String>? = null

The JDK version that the deployment package depends on. Image type applications are not supported.

Link copied to clipboard
val liveness: Output<String>? = null

Container health check. Containers that fail the health check will be shut down and restored. Currently, only the method of issuing commands in the container is supported.

Link copied to clipboard
val memory: Output<Int>? = null

The memory required for each instance, in MB, cannot be 0. One-to-one correspondence with CPU. Valid values: 1024, 131072, 16384, 2048, 32768, 4096, 65536, 8192.

Link copied to clipboard
val microRegistration: Output<String>? = null

Select the Nacos registry. Valid values: 0, 1, 2.

Link copied to clipboard
val minReadyInstanceRatio: Output<Int>? = null

Minimum Survival Instance Percentage. NOTE: When min_ready_instances and min_ready_instance_ratio are passed at the same time, and the value of min_ready_instance_ratio is not -1, the min_ready_instance_ratio parameter shall prevail. Assuming that min_ready_instances is 5 and min_ready_instance_ratio is 50, 50 is used to calculate the minimum number of surviving instances.The value description is as follows:

Link copied to clipboard
val minReadyInstances: Output<Int>? = null

The Minimum Available Instance. On the Change Had Promised during the Available Number of Instances to Be.

Link copied to clipboard
val mountDesc: Output<String>? = null

Mount description.

Link copied to clipboard
val mountHost: Output<String>? = null

Mount point of NAS in application VPC.

Link copied to clipboard
val namespaceId: Output<String>? = null

SAE namespace ID. Only namespaces whose names are lowercase letters and dashes (-) are supported, and must start with a letter. The namespace can be obtained by calling the DescribeNamespaceList interface.

Link copied to clipboard
val nasId: Output<String>? = null

ID of the mounted NAS, Must be in the same region as the cluster. It must have an available mount point creation quota, or its mount point must be on a switch in the VPC. If it is not filled in and the mountDescs field is present, a NAS will be automatically purchased and mounted on the switch in the VPC by default.

Link copied to clipboard
val ossAkId: Output<String>? = null

OSS AccessKey ID.

Link copied to clipboard
val ossAkSecret: Output<String>? = null

OSS AccessKey Secret.

Link copied to clipboard
val ossMountDescs: Output<String>? = null

OSS mount description information.

Link copied to clipboard
val packageType: Output<String>? = null

Application package type. Support FatJar, War and Image. Valid values: FatJar, Image, War.

Link copied to clipboard
val packageUrl: Output<String>? = null

Deployment package address. Only FatJar or War type applications can configure the deployment package address.

Link copied to clipboard
val packageVersion: Output<String>? = null

The version number of the deployment package. Required when the Package Type is War and FatJar.

Link copied to clipboard
val phpArmsConfigLocation: Output<String>? = null

The PHP application monitors the mount path, and you need to ensure that the PHP server will load the configuration file of this path. You don't need to pay attention to the configuration content, SAE will automatically render the correct configuration file.

Link copied to clipboard
val phpConfig: Output<String>? = null

PHP configuration file content.

Link copied to clipboard
val phpConfigLocation: Output<String>? = null

PHP application startup configuration mount path, you need to ensure that the PHP server will start using this configuration file.

Link copied to clipboard
val postStart: Output<String>? = null

Execute the script after startup, the format is like: {exec:{command:`cat`,"/etc/group"}}.

Link copied to clipboard
val preStop: Output<String>? = null

Execute the script before stopping, the format is like: {exec:{command:`cat`,"/etc/group"}}.

Link copied to clipboard
val readiness: Output<String>? = null

Application startup status checks, containers that fail multiple health checks will be shut down and restarted. Containers that do not pass the health check will not receive SLB traffic. For example: {exec:{command:`sh`,"-c","cat /home/admin/start.sh"},initialDelaySeconds:30,periodSeconds:30,"timeoutSeconds ":2}. Valid values: command, initialDelaySeconds, periodSeconds, timeoutSeconds.

Link copied to clipboard
val replicas: Output<Int>? = null

Initial number of instances.

Link copied to clipboard
val securityGroupId: Output<String>? = null

Security group ID.

Link copied to clipboard
val slsConfigs: Output<String>? = null

SLS configuration.

Link copied to clipboard
val status: Output<String>? = null

The status of the resource. Valid values: RUNNING, STOPPED.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val terminationGracePeriodSeconds: Output<Int>? = null

Graceful offline timeout, the default is 30, the unit is seconds. The value range is 1~60. Valid values: 1,60.

Link copied to clipboard
val timezone: Output<String>? = null

Time zone, the default value is Asia/Shanghai.

Link copied to clipboard
val tomcatConfig: Output<String>? = null

Tomcat file configuration, set to "{}" means to delete the configuration: useDefaultConfig: Whether to use a custom configuration, if it is true, it means that the custom configuration is not used; if it is false, it means that the custom configuration is used. If you do not use custom configuration, the following parameter configuration will not take effect. contextInputType: Select the access path of the application. war: No need to fill in the custom path, the access path of the application is the WAR package name. root: No need to fill in the custom path, the access path of the application is /. custom: You need to fill in the custom path in the custom path below. contextPath: custom path, this parameter only needs to be configured when the contextInputType type is custom. httpPort: The port range is 1024~65535. Ports less than 1024 need Root permission to operate. Because the container is configured with Admin permissions, please fill in a port greater than 1024. If not configured, the default is 8080. maxThreads: Configure the number of connections in the connection pool, the default size is 400. uriEncoding: Tomcat encoding format, including UTF-8, ISO-8859-1, GBK and GB2312. If not set, the default is ISO-8859-1. useBodyEncoding: Whether to use BodyEncoding for URL. Valid values: contextInputType, contextPath, httpPort, maxThreads, uriEncoding, useBodyEncoding, useDefaultConfig.

Link copied to clipboard
val updateStrategy: Output<String>? = null

The update strategy.

Link copied to clipboard
val versionId: Output<String>? = null

Application version id.

Link copied to clipboard
val vpcId: Output<String>? = null

The vpc id.

Link copied to clipboard
val vswitchId: Output<String>? = null

The vswitch id.

Link copied to clipboard
val warStartOptions: Output<String>? = null

WAR package launch application option. Application default startup command: java $JAVA_OPTS $CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap "$@" start.

Link copied to clipboard
val webContainer: Output<String>? = null

The version of tomcat that the deployment package depends on. Image type applications are not supported.