NamespaceArgs

data class NamespaceArgs(val enableMicroRegistration: Output<Boolean>? = null, val namespaceDescription: Output<String>? = null, val namespaceId: Output<String>? = null, val namespaceName: Output<String>? = null, val namespaceShortId: Output<String>? = null) : ConvertibleToJava<NamespaceArgs>

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

NOTE: Available since v1.129.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.sae.Namespace;
import com.pulumi.alicloud.sae.NamespaceArgs;
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());
var example = new Namespace("example", 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());
}
}

Import

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

$ pulumi import alicloud:sae/namespace:Namespace example <namespace_id>

Constructors

Link copied to clipboard
fun NamespaceArgs(enableMicroRegistration: Output<Boolean>? = null, namespaceDescription: Output<String>? = null, namespaceId: Output<String>? = null, namespaceName: Output<String>? = null, namespaceShortId: Output<String>? = null)

Functions

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

Properties

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

Specifies whether to enable the SAE built-in registry. If you do not use the built-in registry, you can set enable_micro_registration to false to accelerate the creation of the namespace. Default value: true. Valid values:

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

The Description of Namespace.

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

The ID of the Namespace. It can contain 2 to 32 lowercase characters. The value is in format {RegionId}:{namespace}.

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

The Name of Namespace.

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

The short ID of the Namespace. You do not need to specify a region ID. The value of namespace_short_id can be up to 20 characters in length and can contain only lowercase letters and digits.