Namespace

class Namespace : KotlinCustomResource

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>

Properties

Link copied to clipboard

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 id: Output<String>
Link copied to clipboard

The Description of Namespace.

Link copied to clipboard
val namespaceId: Output<String>

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>

The Name of Namespace.

Link copied to clipboard

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.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>