NamespaceArgs

data class NamespaceArgs(val autoCreate: Output<Boolean>? = null, val defaultVisibility: Output<String>? = null, val name: Output<String>? = null) : ConvertibleToJava<NamespaceArgs>

This resource will help you to manager Container Registry namespaces, see What is Namespace.

NOTE: Available since v1.34.0. NOTE: You need to set your registry password in Container Registry console before use this resource.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cr.Namespace;
import com.pulumi.alicloud.cr.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("terraform-example");
var example = new Namespace("example", NamespaceArgs.builder()
.autoCreate(false)
.defaultVisibility("PUBLIC")
.build());
}
}

Import

Container Registry namespace can be imported using the namespace, e.g.

$ pulumi import alicloud:cr/namespace:Namespace default my-namespace

Constructors

Link copied to clipboard
fun NamespaceArgs(autoCreate: Output<Boolean>? = null, defaultVisibility: Output<String>? = null, name: Output<String>? = null)

Functions

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

Properties

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

Boolean, when it set to true, repositories are automatically created when pushing new images. If it set to false, you create repository for images before pushing.

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

PUBLIC or PRIVATE, default repository visibility in this namespace.

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

Name of Container Registry namespace.