All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.edas.K8sApplication Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** 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.alicloud.edas;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.edas.K8sApplicationArgs;
import com.pulumi.alicloud.edas.inputs.K8sApplicationState;
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;

/**
 * Create an EDAS k8s application.For information about EDAS K8s Application and how to use it, see [What is EDAS K8s Application](https://www.alibabacloud.com/help/en/edas/developer-reference/api-edas-2017-08-01-insertk8sapplication).
 * 
 * > **NOTE:** Available since v1.105.0.
 * 
 * ## Import
 * 
 * EDAS k8s application can be imported as below, e.g.
 * 
 * ```sh
 * $ pulumi import alicloud:edas/k8sApplication:K8sApplication new_k8s_application application_id
 * ```
 * 
 */
@ResourceType(type="alicloud:edas/k8sApplication:K8sApplication")
public class K8sApplication extends com.pulumi.resources.CustomResource {
    /**
     * The description of the application
     * 
     */
    @Export(name="applicationDescriotion", refs={String.class}, tree="[0]")
    private Output applicationDescriotion;

    /**
     * @return The description of the application
     * 
     */
    public Output> applicationDescriotion() {
        return Codegen.optional(this.applicationDescriotion);
    }
    /**
     * The name of the application you want to create. Must start with character,supports numbers, letters and dashes (-), supports up to 36 characters
     * 
     */
    @Export(name="applicationName", refs={String.class}, tree="[0]")
    private Output applicationName;

    /**
     * @return The name of the application you want to create. Must start with character,supports numbers, letters and dashes (-), supports up to 36 characters
     * 
     */
    public Output applicationName() {
        return this.applicationName;
    }
    /**
     * The ID of the alicloud container service kubernetes cluster that you want to import to. You can call the ListCluster operation to query.
     * 
     */
    @Export(name="clusterId", refs={String.class}, tree="[0]")
    private Output clusterId;

    /**
     * @return The ID of the alicloud container service kubernetes cluster that you want to import to. You can call the ListCluster operation to query.
     * 
     */
    public Output clusterId() {
        return this.clusterId;
    }
    /**
     * The set command, if set, will replace the startup command in the mirror when the mirror is started.
     * 
     */
    @Export(name="command", refs={String.class}, tree="[0]")
    private Output command;

    /**
     * @return The set command, if set, will replace the startup command in the mirror when the mirror is started.
     * 
     */
    public Output> command() {
        return Codegen.optional(this.command);
    }
    /**
     * Used in combination with the command, the parameter of the command is a JsonArray string in the format: `[{"argument":"-c"},{"argument":"test"}]`. Among them, -c and test are two parameters that need to be set.
     * 
     */
    @Export(name="commandArgs", refs={List.class,String.class}, tree="[0,1]")
    private Output> commandArgs;

    /**
     * @return Used in combination with the command, the parameter of the command is a JsonArray string in the format: `[{"argument":"-c"},{"argument":"test"}]`. Among them, -c and test are two parameters that need to be set.
     * 
     */
    public Output>> commandArgs() {
        return Codegen.optional(this.commandArgs);
    }
    /**
     * EDAS-Container version that the deployed package depends on. Image does not support this parameter.
     * 
     */
    @Export(name="edasContainerVersion", refs={String.class}, tree="[0]")
    private Output edasContainerVersion;

    /**
     * @return EDAS-Container version that the deployed package depends on. Image does not support this parameter.
     * 
     */
    public Output> edasContainerVersion() {
        return Codegen.optional(this.edasContainerVersion);
    }
    /**
     * Deployment environment variables, the format must conform to the JSON object array, such as: `{"name":"x","value":"y"},{"name":"x2","value":"y2"}`, If you want to cancel the configuration, you need to set an empty JSON array "" to indicate no configuration.
     * 
     */
    @Export(name="envs", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output> envs;

    /**
     * @return Deployment environment variables, the format must conform to the JSON object array, such as: `{"name":"x","value":"y"},{"name":"x2","value":"y2"}`, If you want to cancel the configuration, you need to set an empty JSON array "" to indicate no configuration.
     * 
     */
    public Output>> envs() {
        return Codegen.optional(this.envs);
    }
    /**
     * Mirror address. When the package_type is set to 'Image', this parameter item is required.
     * 
     */
    @Export(name="imageUrl", refs={String.class}, tree="[0]")
    private Output imageUrl;

    /**
     * @return Mirror address. When the package_type is set to 'Image', this parameter item is required.
     * 
     */
    public Output> imageUrl() {
        return Codegen.optional(this.imageUrl);
    }
    /**
     * Public network SLB ID. If not configured, EDAS will automatically purchase a new SLB for the user.
     * It has been deprecated, and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     * @deprecated
     * Field 'internet_slb_id' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it
     * 
     */
    @Deprecated /* Field 'internet_slb_id' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it */
    @Export(name="internetSlbId", refs={String.class}, tree="[0]")
    private Output internetSlbId;

    /**
     * @return Public network SLB ID. If not configured, EDAS will automatically purchase a new SLB for the user.
     * It has been deprecated, and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     */
    public Output> internetSlbId() {
        return Codegen.optional(this.internetSlbId);
    }
    /**
     * The public network SLB front-end port, range 1~65535. It has been deprecated and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     * @deprecated
     * Field 'internet_slb_port' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it
     * 
     */
    @Deprecated /* Field 'internet_slb_port' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it */
    @Export(name="internetSlbPort", refs={Integer.class}, tree="[0]")
    private Output internetSlbPort;

    /**
     * @return The public network SLB front-end port, range 1~65535. It has been deprecated and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     */
    public Output> internetSlbPort() {
        return Codegen.optional(this.internetSlbPort);
    }
    /**
     * The public network SLB protocol supports TCP, HTTP and HTTPS protocols. It has been deprecated, and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     * @deprecated
     * Field 'internet_slb_protocol' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it
     * 
     */
    @Deprecated /* Field 'internet_slb_protocol' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it */
    @Export(name="internetSlbProtocol", refs={String.class}, tree="[0]")
    private Output internetSlbProtocol;

    /**
     * @return The public network SLB protocol supports TCP, HTTP and HTTPS protocols. It has been deprecated, and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     */
    public Output> internetSlbProtocol() {
        return Codegen.optional(this.internetSlbProtocol);
    }
    /**
     * The private SLB back-end port, is also the service port of the application, ranging from 1 to 65535.
     * It has been deprecated, and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     * @deprecated
     * Field 'internet_target_port' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it
     * 
     */
    @Deprecated /* Field 'internet_target_port' has been deprecated, New Resource 'alicloud_edas_k8s_slb_attachment' replaces it */
    @Export(name="internetTargetPort", refs={Integer.class}, tree="[0]")
    private Output internetTargetPort;

    /**
     * @return The private SLB back-end port, is also the service port of the application, ranging from 1 to 65535.
     * It has been deprecated, and new resource 'alicloud_edas_k8s_slb_attachment' replaces it.
     * 
     */
    public Output> internetTargetPort() {
        return Codegen.optional(this.internetTargetPort);
    }
    /**
     * The JDK version that the deployed package depends on. The optional parameter values are Open JDK 7 and Open JDK 8. Image does not support this parameter.
     * 
     */
    @Export(name="jdk", refs={String.class}, tree="[0]")
    private Output jdk;

    /**
     * @return The JDK version that the deployed package depends on. The optional parameter values are Open JDK 7 and Open JDK 8. Image does not support this parameter.
     * 
     */
    public Output> jdk() {
        return Codegen.optional(this.jdk);
    }
    /**
     * The CPU quota of the application instance during application operation. Unit: Number of millcores, set to 0 means unlimited, similar to request_cpu.
     * 
     */
    @Export(name="limitMCpu", refs={Integer.class}, tree="[0]")
    private Output limitMCpu;

    /**
     * @return The CPU quota of the application instance during application operation. Unit: Number of millcores, set to 0 means unlimited, similar to request_cpu.
     * 
     */
    public Output> limitMCpu() {
        return Codegen.optional(this.limitMCpu);
    }
    /**
     * The memory limit of the application instance during application operation, unit: M.
     * 
     */
    @Export(name="limitMem", refs={Integer.class}, tree="[0]")
    private Output limitMem;

    /**
     * @return The memory limit of the application instance during application operation, unit: M.
     * 
     */
    public Output> limitMem() {
        return Codegen.optional(this.limitMem);
    }
    /**
     * Container survival status monitoring, format such as: `{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080} }`.
     * 
     */
    @Export(name="liveness", refs={String.class}, tree="[0]")
    private Output liveness;

    /**
     * @return Container survival status monitoring, format such as: `{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080} }`.
     * 
     */
    public Output> liveness() {
        return Codegen.optional(this.liveness);
    }
    /**
     * The configuration of the host file mounted to the container. For example: `[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt", "mountPath":"/app/storage"}]`. Among them, nodePath is the host path; mountPath is the path in the container; type is the mount type.
     * 
     */
    @Export(name="localVolume", refs={String.class}, tree="[0]")
    private Output localVolume;

    /**
     * @return The configuration of the host file mounted to the container. For example: `[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt", "mountPath":"/app/storage"}]`. Among them, nodePath is the host path; mountPath is the path in the container; type is the mount type.
     * 
     */
    public Output> localVolume() {
        return Codegen.optional(this.localVolume);
    }
    /**
     * The ID corresponding to the EDAS namespace, the non-default namespace must be filled in.
     * 
     */
    @Export(name="logicalRegionId", refs={String.class}, tree="[0]")
    private Output logicalRegionId;

    /**
     * @return The ID corresponding to the EDAS namespace, the non-default namespace must be filled in.
     * 
     */
    public Output> logicalRegionId() {
        return Codegen.optional(this.logicalRegionId);
    }
    /**
     * Mount configuration description, as a serialized JSON. For example: `[{"nasPath": "/k8s","mountPath": "/mnt"},{"nasPath": "/files","mountPath": "/app/files"}]`. Among them, nasPath refers to the file storage path; mountPath refers to the path mounted in the container.
     * 
     */
    @Export(name="mountDescs", refs={String.class}, tree="[0]")
    private Output mountDescs;

    /**
     * @return Mount configuration description, as a serialized JSON. For example: `[{"nasPath": "/k8s","mountPath": "/mnt"},{"nasPath": "/files","mountPath": "/app/files"}]`. Among them, nasPath refers to the file storage path; mountPath refers to the path mounted in the container.
     * 
     */
    public Output> mountDescs() {
        return Codegen.optional(this.mountDescs);
    }
    /**
     * The namespace of the K8s cluster, it will determine which K8s namespace your application is deployed in. The default is 'default'.
     * 
     */
    @Export(name="namespace", refs={String.class}, tree="[0]")
    private Output namespace;

    /**
     * @return The namespace of the K8s cluster, it will determine which K8s namespace your application is deployed in. The default is 'default'.
     * 
     */
    public Output> namespace() {
        return Codegen.optional(this.namespace);
    }
    /**
     * The 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 exists, a NAS will be automatically purchased and mounted on the switch in the VPC by default.
     * 
     */
    @Export(name="nasId", refs={String.class}, tree="[0]")
    private Output nasId;

    /**
     * @return The 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 exists, a NAS will be automatically purchased and mounted on the switch in the VPC by default.
     * 
     */
    public Output> nasId() {
        return Codegen.optional(this.nasId);
    }
    /**
     * Application package type. Optional parameter values include: FatJar, WAR and Image.
     * 
     */
    @Export(name="packageType", refs={String.class}, tree="[0]")
    private Output packageType;

    /**
     * @return Application package type. Optional parameter values include: FatJar, WAR and Image.
     * 
     */
    public Output> packageType() {
        return Codegen.optional(this.packageType);
    }
    /**
     * The url of the package to deploy.Applications deployed through FatJar or WAR packages need to configure it.
     * 
     */
    @Export(name="packageUrl", refs={String.class}, tree="[0]")
    private Output packageUrl;

    /**
     * @return The url of the package to deploy.Applications deployed through FatJar or WAR packages need to configure it.
     * 
     */
    public Output> packageUrl() {
        return Codegen.optional(this.packageUrl);
    }
    /**
     * The version number of the deployment package. WAR and FatJar types are required. Please customize its meaning.
     * 
     */
    @Export(name="packageVersion", refs={String.class}, tree="[0]")
    private Output packageVersion;

    /**
     * @return The version number of the deployment package. WAR and FatJar types are required. Please customize its meaning.
     * 
     */
    public Output packageVersion() {
        return this.packageVersion;
    }
    /**
     * Execute script after startup
     * 
     */
    @Export(name="postStart", refs={String.class}, tree="[0]")
    private Output postStart;

    /**
     * @return Execute script after startup
     * 
     */
    public Output> postStart() {
        return Codegen.optional(this.postStart);
    }
    /**
     * Execute script before stopping
     * 
     */
    @Export(name="preStop", refs={String.class}, tree="[0]")
    private Output preStop;

    /**
     * @return Execute script before stopping
     * 
     */
    public Output> preStop() {
        return Codegen.optional(this.preStop);
    }
    /**
     * Container service status check. If the check fails, the traffic passing through K8s Service will not be transferred to the container. The format is: `{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1, "httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"} ]}}`.
     * 
     */
    @Export(name="readiness", refs={String.class}, tree="[0]")
    private Output readiness;

    /**
     * @return Container service status check. If the check fails, the traffic passing through K8s Service will not be transferred to the container. The format is: `{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1, "httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"} ]}}`.
     * 
     */
    public Output> readiness() {
        return Codegen.optional(this.readiness);
    }
    /**
     * Number of application instances.
     * 
     */
    @Export(name="replicas", refs={Integer.class}, tree="[0]")
    private Output replicas;

    /**
     * @return Number of application instances.
     * 
     */
    public Output> replicas() {
        return Codegen.optional(this.replicas);
    }
    /**
     * When the application is created, the CPU quota of the application instance, unit: number of millcores, similar to request_cpu
     * 
     */
    @Export(name="requestsMCpu", refs={Integer.class}, tree="[0]")
    private Output requestsMCpu;

    /**
     * @return When the application is created, the CPU quota of the application instance, unit: number of millcores, similar to request_cpu
     * 
     */
    public Output> requestsMCpu() {
        return Codegen.optional(this.requestsMCpu);
    }
    /**
     * When the application is created, the memory limit of the application instance, unit: M. When set to 0, it means unlimited.
     * 
     */
    @Export(name="requestsMem", refs={Integer.class}, tree="[0]")
    private Output requestsMem;

    /**
     * @return When the application is created, the memory limit of the application instance, unit: M. When set to 0, it means unlimited.
     * 
     */
    public Output> requestsMem() {
        return Codegen.optional(this.requestsMem);
    }
    /**
     * The Tomcat version that the deployment package depends on. Applicable to Spring Cloud and Dubbo applications deployed through WAR packages. Image does not support this parameter.
     * 
     */
    @Export(name="webContainer", refs={String.class}, tree="[0]")
    private Output webContainer;

    /**
     * @return The Tomcat version that the deployment package depends on. Applicable to Spring Cloud and Dubbo applications deployed through WAR packages. Image does not support this parameter.
     * 
     */
    public Output> webContainer() {
        return Codegen.optional(this.webContainer);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public K8sApplication(java.lang.String name) {
        this(name, K8sApplicationArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public K8sApplication(java.lang.String name, K8sApplicationArgs 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 K8sApplication(java.lang.String name, K8sApplicationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("alicloud:edas/k8sApplication:K8sApplication", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
    }

    private K8sApplication(java.lang.String name, Output id, @Nullable K8sApplicationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("alicloud:edas/k8sApplication:K8sApplication", name, state, makeResourceOptions(options, id), false);
    }

    private static K8sApplicationArgs makeArgs(K8sApplicationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        return args == null ? K8sApplicationArgs.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())
            .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 state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static K8sApplication get(java.lang.String name, Output id, @Nullable K8sApplicationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new K8sApplication(name, id, state, options);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy