1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cs
  5. getRegistryEnterpriseNamespaces
Alibaba Cloud v3.58.0 published on Wednesday, Jul 3, 2024 by Pulumi

alicloud.cs.getRegistryEnterpriseNamespaces

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.58.0 published on Wednesday, Jul 3, 2024 by Pulumi

    This data source provides a list Container Registry Enterprise Edition namespaces on Alibaba Cloud.

    NOTE: Available in v1.86.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    // Declare the data source
    const myNamespaces = alicloud.cs.getRegistryEnterpriseNamespaces({
        instanceId: "cri-xxx",
        nameRegex: "my-namespace",
        outputFile: "my-namespace-json",
    });
    export const output = myNamespaces.then(myNamespaces => myNamespaces.namespaces);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    # Declare the data source
    my_namespaces = alicloud.cs.get_registry_enterprise_namespaces(instance_id="cri-xxx",
        name_regex="my-namespace",
        output_file="my-namespace-json")
    pulumi.export("output", my_namespaces.namespaces)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Declare the data source
    		myNamespaces, err := cs.GetRegistryEnterpriseNamespaces(ctx, &cs.GetRegistryEnterpriseNamespacesArgs{
    			InstanceId: "cri-xxx",
    			NameRegex:  pulumi.StringRef("my-namespace"),
    			OutputFile: pulumi.StringRef("my-namespace-json"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("output", myNamespaces.Namespaces)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // Declare the data source
        var myNamespaces = AliCloud.CS.GetRegistryEnterpriseNamespaces.Invoke(new()
        {
            InstanceId = "cri-xxx",
            NameRegex = "my-namespace",
            OutputFile = "my-namespace-json",
        });
    
        return new Dictionary<string, object?>
        {
            ["output"] = myNamespaces.Apply(getRegistryEnterpriseNamespacesResult => getRegistryEnterpriseNamespacesResult.Namespaces),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cs.CsFunctions;
    import com.pulumi.alicloud.cs.inputs.GetRegistryEnterpriseNamespacesArgs;
    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) {
            // Declare the data source
            final var myNamespaces = CsFunctions.getRegistryEnterpriseNamespaces(GetRegistryEnterpriseNamespacesArgs.builder()
                .instanceId("cri-xxx")
                .nameRegex("my-namespace")
                .outputFile("my-namespace-json")
                .build());
    
            ctx.export("output", myNamespaces.applyValue(getRegistryEnterpriseNamespacesResult -> getRegistryEnterpriseNamespacesResult.namespaces()));
        }
    }
    
    variables:
      # Declare the data source
      myNamespaces:
        fn::invoke:
          Function: alicloud:cs:getRegistryEnterpriseNamespaces
          Arguments:
            instanceId: cri-xxx
            nameRegex: my-namespace
            outputFile: my-namespace-json
    outputs:
      output: ${myNamespaces.namespaces}
    

    Using getRegistryEnterpriseNamespaces

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRegistryEnterpriseNamespaces(args: GetRegistryEnterpriseNamespacesArgs, opts?: InvokeOptions): Promise<GetRegistryEnterpriseNamespacesResult>
    function getRegistryEnterpriseNamespacesOutput(args: GetRegistryEnterpriseNamespacesOutputArgs, opts?: InvokeOptions): Output<GetRegistryEnterpriseNamespacesResult>
    def get_registry_enterprise_namespaces(ids: Optional[Sequence[str]] = None,
                                           instance_id: Optional[str] = None,
                                           name_regex: Optional[str] = None,
                                           output_file: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetRegistryEnterpriseNamespacesResult
    def get_registry_enterprise_namespaces_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                           instance_id: Optional[pulumi.Input[str]] = None,
                                           name_regex: Optional[pulumi.Input[str]] = None,
                                           output_file: Optional[pulumi.Input[str]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetRegistryEnterpriseNamespacesResult]
    func GetRegistryEnterpriseNamespaces(ctx *Context, args *GetRegistryEnterpriseNamespacesArgs, opts ...InvokeOption) (*GetRegistryEnterpriseNamespacesResult, error)
    func GetRegistryEnterpriseNamespacesOutput(ctx *Context, args *GetRegistryEnterpriseNamespacesOutputArgs, opts ...InvokeOption) GetRegistryEnterpriseNamespacesResultOutput

    > Note: This function is named GetRegistryEnterpriseNamespaces in the Go SDK.

    public static class GetRegistryEnterpriseNamespaces 
    {
        public static Task<GetRegistryEnterpriseNamespacesResult> InvokeAsync(GetRegistryEnterpriseNamespacesArgs args, InvokeOptions? opts = null)
        public static Output<GetRegistryEnterpriseNamespacesResult> Invoke(GetRegistryEnterpriseNamespacesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRegistryEnterpriseNamespacesResult> getRegistryEnterpriseNamespaces(GetRegistryEnterpriseNamespacesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cs/getRegistryEnterpriseNamespaces:getRegistryEnterpriseNamespaces
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    ID of Container Registry Enterprise Edition instance.
    Ids List<string>
    A list of ids to filter results by namespace id. Each item formats as <instance_id>:<namespace_name>.
    NameRegex string
    A regex string to filter results by namespace name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    InstanceId string
    ID of Container Registry Enterprise Edition instance.
    Ids []string
    A list of ids to filter results by namespace id. Each item formats as <instance_id>:<namespace_name>.
    NameRegex string
    A regex string to filter results by namespace name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    instanceId String
    ID of Container Registry Enterprise Edition instance.
    ids List<String>
    A list of ids to filter results by namespace id. Each item formats as <instance_id>:<namespace_name>.
    nameRegex String
    A regex string to filter results by namespace name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    instanceId string
    ID of Container Registry Enterprise Edition instance.
    ids string[]
    A list of ids to filter results by namespace id. Each item formats as <instance_id>:<namespace_name>.
    nameRegex string
    A regex string to filter results by namespace name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    instance_id str
    ID of Container Registry Enterprise Edition instance.
    ids Sequence[str]
    A list of ids to filter results by namespace id. Each item formats as <instance_id>:<namespace_name>.
    name_regex str
    A regex string to filter results by namespace name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    instanceId String
    ID of Container Registry Enterprise Edition instance.
    ids List<String>
    A list of ids to filter results by namespace id. Each item formats as <instance_id>:<namespace_name>.
    nameRegex String
    A regex string to filter results by namespace name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getRegistryEnterpriseNamespaces Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of matched Container Registry Enterprise Edition namespaces. Each item formats as <instance_id>:<namespace_name>. Before 1.161.0, its element is a namespace uuid.
    InstanceId string
    ID of Container Registry Enterprise Edition instance.
    Names List<string>
    A list of namespace names.
    Namespaces List<Pulumi.AliCloud.CS.Outputs.GetRegistryEnterpriseNamespacesNamespace>
    A list of matched Container Registry Enterprise Edition namespaces. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of matched Container Registry Enterprise Edition namespaces. Each item formats as <instance_id>:<namespace_name>. Before 1.161.0, its element is a namespace uuid.
    InstanceId string
    ID of Container Registry Enterprise Edition instance.
    Names []string
    A list of namespace names.
    Namespaces []GetRegistryEnterpriseNamespacesNamespace
    A list of matched Container Registry Enterprise Edition namespaces. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of matched Container Registry Enterprise Edition namespaces. Each item formats as <instance_id>:<namespace_name>. Before 1.161.0, its element is a namespace uuid.
    instanceId String
    ID of Container Registry Enterprise Edition instance.
    names List<String>
    A list of namespace names.
    namespaces List<GetRegistryEnterpriseNamespacesNamespace>
    A list of matched Container Registry Enterprise Edition namespaces. Each element contains the following attributes:
    nameRegex String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of matched Container Registry Enterprise Edition namespaces. Each item formats as <instance_id>:<namespace_name>. Before 1.161.0, its element is a namespace uuid.
    instanceId string
    ID of Container Registry Enterprise Edition instance.
    names string[]
    A list of namespace names.
    namespaces GetRegistryEnterpriseNamespacesNamespace[]
    A list of matched Container Registry Enterprise Edition namespaces. Each element contains the following attributes:
    nameRegex string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of matched Container Registry Enterprise Edition namespaces. Each item formats as <instance_id>:<namespace_name>. Before 1.161.0, its element is a namespace uuid.
    instance_id str
    ID of Container Registry Enterprise Edition instance.
    names Sequence[str]
    A list of namespace names.
    namespaces Sequence[GetRegistryEnterpriseNamespacesNamespace]
    A list of matched Container Registry Enterprise Edition namespaces. Each element contains the following attributes:
    name_regex str
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of matched Container Registry Enterprise Edition namespaces. Each item formats as <instance_id>:<namespace_name>. Before 1.161.0, its element is a namespace uuid.
    instanceId String
    ID of Container Registry Enterprise Edition instance.
    names List<String>
    A list of namespace names.
    namespaces List<Property Map>
    A list of matched Container Registry Enterprise Edition namespaces. Each element contains the following attributes:
    nameRegex String
    outputFile String

    Supporting Types

    GetRegistryEnterpriseNamespacesNamespace

    AutoCreate bool
    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.
    DefaultVisibility string
    PUBLIC or PRIVATE, default repository visibility in this namespace.
    Id string
    ID of Container Registry Enterprise Edition namespace. It formats as <instance_id>:<namespace_name>. Before 1.161.0, it is a namespace uuid.
    InstanceId string
    ID of Container Registry Enterprise Edition instance.
    Name string
    Name of Container Registry Enterprise Edition namespace.
    NamespaceId string
    Container Registry Enterprise Edition namespace id. It is a uuid.
    NamespaceName string
    Name of Container Registry Enterprise Edition namespace.
    AutoCreate bool
    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.
    DefaultVisibility string
    PUBLIC or PRIVATE, default repository visibility in this namespace.
    Id string
    ID of Container Registry Enterprise Edition namespace. It formats as <instance_id>:<namespace_name>. Before 1.161.0, it is a namespace uuid.
    InstanceId string
    ID of Container Registry Enterprise Edition instance.
    Name string
    Name of Container Registry Enterprise Edition namespace.
    NamespaceId string
    Container Registry Enterprise Edition namespace id. It is a uuid.
    NamespaceName string
    Name of Container Registry Enterprise Edition namespace.
    autoCreate Boolean
    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.
    defaultVisibility String
    PUBLIC or PRIVATE, default repository visibility in this namespace.
    id String
    ID of Container Registry Enterprise Edition namespace. It formats as <instance_id>:<namespace_name>. Before 1.161.0, it is a namespace uuid.
    instanceId String
    ID of Container Registry Enterprise Edition instance.
    name String
    Name of Container Registry Enterprise Edition namespace.
    namespaceId String
    Container Registry Enterprise Edition namespace id. It is a uuid.
    namespaceName String
    Name of Container Registry Enterprise Edition namespace.
    autoCreate boolean
    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.
    defaultVisibility string
    PUBLIC or PRIVATE, default repository visibility in this namespace.
    id string
    ID of Container Registry Enterprise Edition namespace. It formats as <instance_id>:<namespace_name>. Before 1.161.0, it is a namespace uuid.
    instanceId string
    ID of Container Registry Enterprise Edition instance.
    name string
    Name of Container Registry Enterprise Edition namespace.
    namespaceId string
    Container Registry Enterprise Edition namespace id. It is a uuid.
    namespaceName string
    Name of Container Registry Enterprise Edition namespace.
    auto_create bool
    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.
    default_visibility str
    PUBLIC or PRIVATE, default repository visibility in this namespace.
    id str
    ID of Container Registry Enterprise Edition namespace. It formats as <instance_id>:<namespace_name>. Before 1.161.0, it is a namespace uuid.
    instance_id str
    ID of Container Registry Enterprise Edition instance.
    name str
    Name of Container Registry Enterprise Edition namespace.
    namespace_id str
    Container Registry Enterprise Edition namespace id. It is a uuid.
    namespace_name str
    Name of Container Registry Enterprise Edition namespace.
    autoCreate Boolean
    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.
    defaultVisibility String
    PUBLIC or PRIVATE, default repository visibility in this namespace.
    id String
    ID of Container Registry Enterprise Edition namespace. It formats as <instance_id>:<namespace_name>. Before 1.161.0, it is a namespace uuid.
    instanceId String
    ID of Container Registry Enterprise Edition instance.
    name String
    Name of Container Registry Enterprise Edition namespace.
    namespaceId String
    Container Registry Enterprise Edition namespace id. It is a uuid.
    namespaceName String
    Name of Container Registry Enterprise Edition namespace.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.58.0 published on Wednesday, Jul 3, 2024 by Pulumi