1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cs
  5. getRegistryEnterpriseRepos
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi

    This data source provides the Container Registry Enterprise Edition Repositories of the current Alibaba Cloud user.

    NOTE: Available since v1.87.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = alicloud.cs.getRegistryEnterpriseInstances({
        nameRegex: "default-nodeleting",
    });
    const defaultRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("default", {
        instanceId: _default.then(_default => _default.ids?.[0]),
        name: name,
        autoCreate: true,
        defaultVisibility: "PRIVATE",
    });
    const defaultRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("default", {
        instanceId: defaultRegistryEnterpriseNamespace.instanceId,
        namespace: defaultRegistryEnterpriseNamespace.name,
        name: name,
        repoType: "PRIVATE",
        summary: name,
    });
    const ids = alicloud.cs.getRegistryEnterpriseReposOutput({
        ids: [defaultRegistryEnterpriseRepo.repoId],
        instanceId: defaultRegistryEnterpriseRepo.instanceId,
    });
    export const crEeReposId0 = ids.apply(ids => ids.repos?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.cs.get_registry_enterprise_instances(name_regex="default-nodeleting")
    default_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("default",
        instance_id=default.ids[0],
        name=name,
        auto_create=True,
        default_visibility="PRIVATE")
    default_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("default",
        instance_id=default_registry_enterprise_namespace.instance_id,
        namespace=default_registry_enterprise_namespace.name,
        name=name,
        repo_type="PRIVATE",
        summary=name)
    ids = alicloud.cs.get_registry_enterprise_repos_output(ids=[default_registry_enterprise_repo.repo_id],
        instance_id=default_registry_enterprise_repo.instance_id)
    pulumi.export("crEeReposId0", ids.repos[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := cs.GetRegistryEnterpriseInstances(ctx, &cs.GetRegistryEnterpriseInstancesArgs{
    			NameRegex: pulumi.StringRef("default-nodeleting"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "default", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        pulumi.String(_default.Ids[0]),
    			Name:              pulumi.String(name),
    			AutoCreate:        pulumi.Bool(true),
    			DefaultVisibility: pulumi.String("PRIVATE"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "default", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: defaultRegistryEnterpriseNamespace.InstanceId,
    			Namespace:  defaultRegistryEnterpriseNamespace.Name,
    			Name:       pulumi.String(name),
    			RepoType:   pulumi.String("PRIVATE"),
    			Summary:    pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		ids := cs.GetRegistryEnterpriseReposOutput(ctx, cs.GetRegistryEnterpriseReposOutputArgs{
    			Ids: pulumi.StringArray{
    				defaultRegistryEnterpriseRepo.RepoId,
    			},
    			InstanceId: defaultRegistryEnterpriseRepo.InstanceId,
    		}, nil)
    		ctx.Export("crEeReposId0", ids.ApplyT(func(ids cs.GetRegistryEnterpriseReposResult) (*string, error) {
    			return &ids.Repos[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.CS.GetRegistryEnterpriseInstances.Invoke(new()
        {
            NameRegex = "default-nodeleting",
        });
    
        var defaultRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("default", new()
        {
            InstanceId = @default.Apply(@default => @default.Apply(getRegistryEnterpriseInstancesResult => getRegistryEnterpriseInstancesResult.Ids[0])),
            Name = name,
            AutoCreate = true,
            DefaultVisibility = "PRIVATE",
        });
    
        var defaultRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("default", new()
        {
            InstanceId = defaultRegistryEnterpriseNamespace.InstanceId,
            Namespace = defaultRegistryEnterpriseNamespace.Name,
            Name = name,
            RepoType = "PRIVATE",
            Summary = name,
        });
    
        var ids = AliCloud.CS.GetRegistryEnterpriseRepos.Invoke(new()
        {
            Ids = new[]
            {
                defaultRegistryEnterpriseRepo.RepoId,
            },
            InstanceId = defaultRegistryEnterpriseRepo.InstanceId,
        });
    
        return new Dictionary<string, object?>
        {
            ["crEeReposId0"] = ids.Apply(getRegistryEnterpriseReposResult => getRegistryEnterpriseReposResult.Repos[0]?.Id),
        };
    });
    
    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.GetRegistryEnterpriseInstancesArgs;
    import com.pulumi.alicloud.cs.RegistryEnterpriseNamespace;
    import com.pulumi.alicloud.cs.RegistryEnterpriseNamespaceArgs;
    import com.pulumi.alicloud.cs.RegistryEnterpriseRepo;
    import com.pulumi.alicloud.cs.RegistryEnterpriseRepoArgs;
    import com.pulumi.alicloud.cs.inputs.GetRegistryEnterpriseReposArgs;
    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");
            final var default = CsFunctions.getRegistryEnterpriseInstances(GetRegistryEnterpriseInstancesArgs.builder()
                .nameRegex("default-nodeleting")
                .build());
    
            var defaultRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("defaultRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
                .instanceId(default_.ids()[0])
                .name(name)
                .autoCreate(true)
                .defaultVisibility("PRIVATE")
                .build());
    
            var defaultRegistryEnterpriseRepo = new RegistryEnterpriseRepo("defaultRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()
                .instanceId(defaultRegistryEnterpriseNamespace.instanceId())
                .namespace(defaultRegistryEnterpriseNamespace.name())
                .name(name)
                .repoType("PRIVATE")
                .summary(name)
                .build());
    
            final var ids = CsFunctions.getRegistryEnterpriseRepos(GetRegistryEnterpriseReposArgs.builder()
                .ids(defaultRegistryEnterpriseRepo.repoId())
                .instanceId(defaultRegistryEnterpriseRepo.instanceId())
                .build());
    
            ctx.export("crEeReposId0", ids.applyValue(_ids -> _ids.repos()[0].id()));
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: default
        properties:
          instanceId: ${default.ids[0]}
          name: ${name}
          autoCreate: true
          defaultVisibility: PRIVATE
      defaultRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: default
        properties:
          instanceId: ${defaultRegistryEnterpriseNamespace.instanceId}
          namespace: ${defaultRegistryEnterpriseNamespace.name}
          name: ${name}
          repoType: PRIVATE
          summary: ${name}
    variables:
      default:
        fn::invoke:
          function: alicloud:cs:getRegistryEnterpriseInstances
          arguments:
            nameRegex: default-nodeleting
      ids:
        fn::invoke:
          function: alicloud:cs:getRegistryEnterpriseRepos
          arguments:
            ids:
              - ${defaultRegistryEnterpriseRepo.repoId}
            instanceId: ${defaultRegistryEnterpriseRepo.instanceId}
    outputs:
      crEeReposId0: ${ids.repos[0].id}
    

    Using getRegistryEnterpriseRepos

    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 getRegistryEnterpriseRepos(args: GetRegistryEnterpriseReposArgs, opts?: InvokeOptions): Promise<GetRegistryEnterpriseReposResult>
    function getRegistryEnterpriseReposOutput(args: GetRegistryEnterpriseReposOutputArgs, opts?: InvokeOptions): Output<GetRegistryEnterpriseReposResult>
    def get_registry_enterprise_repos(enable_details: Optional[bool] = None,
                                      ids: Optional[Sequence[str]] = None,
                                      instance_id: Optional[str] = None,
                                      name_regex: Optional[str] = None,
                                      namespace: Optional[str] = None,
                                      output_file: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetRegistryEnterpriseReposResult
    def get_registry_enterprise_repos_output(enable_details: Optional[pulumi.Input[bool]] = None,
                                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                      instance_id: Optional[pulumi.Input[str]] = None,
                                      name_regex: Optional[pulumi.Input[str]] = None,
                                      namespace: Optional[pulumi.Input[str]] = None,
                                      output_file: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetRegistryEnterpriseReposResult]
    func GetRegistryEnterpriseRepos(ctx *Context, args *GetRegistryEnterpriseReposArgs, opts ...InvokeOption) (*GetRegistryEnterpriseReposResult, error)
    func GetRegistryEnterpriseReposOutput(ctx *Context, args *GetRegistryEnterpriseReposOutputArgs, opts ...InvokeOption) GetRegistryEnterpriseReposResultOutput

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

    public static class GetRegistryEnterpriseRepos 
    {
        public static Task<GetRegistryEnterpriseReposResult> InvokeAsync(GetRegistryEnterpriseReposArgs args, InvokeOptions? opts = null)
        public static Output<GetRegistryEnterpriseReposResult> Invoke(GetRegistryEnterpriseReposInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRegistryEnterpriseReposResult> getRegistryEnterpriseRepos(GetRegistryEnterpriseReposArgs args, InvokeOptions options)
    public static Output<GetRegistryEnterpriseReposResult> getRegistryEnterpriseRepos(GetRegistryEnterpriseReposArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:cs/getRegistryEnterpriseRepos:getRegistryEnterpriseRepos
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The ID of the Container Registry instance.
    EnableDetails bool
    Whether to query the detailed list of resource attributes. Default value: false.
    Ids List<string>
    A list of Repository IDs.
    NameRegex string
    A regex string to filter results by Repository name.
    Namespace string
    The name of the namespace to which the Repository belongs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    InstanceId string
    The ID of the Container Registry instance.
    EnableDetails bool
    Whether to query the detailed list of resource attributes. Default value: false.
    Ids []string
    A list of Repository IDs.
    NameRegex string
    A regex string to filter results by Repository name.
    Namespace string
    The name of the namespace to which the Repository belongs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    instanceId String
    The ID of the Container Registry instance.
    enableDetails Boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids List<String>
    A list of Repository IDs.
    nameRegex String
    A regex string to filter results by Repository name.
    namespace String
    The name of the namespace to which the Repository belongs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    instanceId string
    The ID of the Container Registry instance.
    enableDetails boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids string[]
    A list of Repository IDs.
    nameRegex string
    A regex string to filter results by Repository name.
    namespace string
    The name of the namespace to which the Repository belongs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    instance_id str
    The ID of the Container Registry instance.
    enable_details bool
    Whether to query the detailed list of resource attributes. Default value: false.
    ids Sequence[str]
    A list of Repository IDs.
    name_regex str
    A regex string to filter results by Repository name.
    namespace str
    The name of the namespace to which the Repository belongs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    instanceId String
    The ID of the Container Registry instance.
    enableDetails Boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids List<String>
    A list of Repository IDs.
    nameRegex String
    A regex string to filter results by Repository name.
    namespace String
    The name of the namespace to which the Repository belongs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getRegistryEnterpriseRepos Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    InstanceId string
    The ID of the Container Registry instance to which the Repository belongs.
    Names List<string>
    A list of Repository names.
    Repos List<Pulumi.AliCloud.CS.Outputs.GetRegistryEnterpriseReposRepo>
    A list of Repositories. Each element contains the following attributes:
    EnableDetails bool
    NameRegex string
    Namespace string
    The name of the namespace to which the Repository belongs.
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    InstanceId string
    The ID of the Container Registry instance to which the Repository belongs.
    Names []string
    A list of Repository names.
    Repos []GetRegistryEnterpriseReposRepo
    A list of Repositories. Each element contains the following attributes:
    EnableDetails bool
    NameRegex string
    Namespace string
    The name of the namespace to which the Repository belongs.
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    The ID of the Container Registry instance to which the Repository belongs.
    names List<String>
    A list of Repository names.
    repos List<GetRegistryEnterpriseReposRepo>
    A list of Repositories. Each element contains the following attributes:
    enableDetails Boolean
    nameRegex String
    namespace String
    The name of the namespace to which the Repository belongs.
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instanceId string
    The ID of the Container Registry instance to which the Repository belongs.
    names string[]
    A list of Repository names.
    repos GetRegistryEnterpriseReposRepo[]
    A list of Repositories. Each element contains the following attributes:
    enableDetails boolean
    nameRegex string
    namespace string
    The name of the namespace to which the Repository belongs.
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instance_id str
    The ID of the Container Registry instance to which the Repository belongs.
    names Sequence[str]
    A list of Repository names.
    repos Sequence[GetRegistryEnterpriseReposRepo]
    A list of Repositories. Each element contains the following attributes:
    enable_details bool
    name_regex str
    namespace str
    The name of the namespace to which the Repository belongs.
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    The ID of the Container Registry instance to which the Repository belongs.
    names List<String>
    A list of Repository names.
    repos List<Property Map>
    A list of Repositories. Each element contains the following attributes:
    enableDetails Boolean
    nameRegex String
    namespace String
    The name of the namespace to which the Repository belongs.
    outputFile String

    Supporting Types

    GetRegistryEnterpriseReposRepo

    Id string
    The ID of the Repository.
    InstanceId string
    The ID of the Container Registry instance.
    Name string
    The name of the Repository.
    Namespace string
    The name of the namespace to which the Repository belongs.
    RepoType string
    The type of the Repository.
    Summary string
    The summary of the Repository.
    Tags List<Pulumi.AliCloud.CS.Inputs.GetRegistryEnterpriseReposRepoTag>
    A list of image tags belong to this Repository. Note: tags takes effect only if enable_details is set to true.
    Id string
    The ID of the Repository.
    InstanceId string
    The ID of the Container Registry instance.
    Name string
    The name of the Repository.
    Namespace string
    The name of the namespace to which the Repository belongs.
    RepoType string
    The type of the Repository.
    Summary string
    The summary of the Repository.
    Tags []GetRegistryEnterpriseReposRepoTag
    A list of image tags belong to this Repository. Note: tags takes effect only if enable_details is set to true.
    id String
    The ID of the Repository.
    instanceId String
    The ID of the Container Registry instance.
    name String
    The name of the Repository.
    namespace String
    The name of the namespace to which the Repository belongs.
    repoType String
    The type of the Repository.
    summary String
    The summary of the Repository.
    tags List<GetRegistryEnterpriseReposRepoTag>
    A list of image tags belong to this Repository. Note: tags takes effect only if enable_details is set to true.
    id string
    The ID of the Repository.
    instanceId string
    The ID of the Container Registry instance.
    name string
    The name of the Repository.
    namespace string
    The name of the namespace to which the Repository belongs.
    repoType string
    The type of the Repository.
    summary string
    The summary of the Repository.
    tags GetRegistryEnterpriseReposRepoTag[]
    A list of image tags belong to this Repository. Note: tags takes effect only if enable_details is set to true.
    id str
    The ID of the Repository.
    instance_id str
    The ID of the Container Registry instance.
    name str
    The name of the Repository.
    namespace str
    The name of the namespace to which the Repository belongs.
    repo_type str
    The type of the Repository.
    summary str
    The summary of the Repository.
    tags Sequence[GetRegistryEnterpriseReposRepoTag]
    A list of image tags belong to this Repository. Note: tags takes effect only if enable_details is set to true.
    id String
    The ID of the Repository.
    instanceId String
    The ID of the Container Registry instance.
    name String
    The name of the Repository.
    namespace String
    The name of the namespace to which the Repository belongs.
    repoType String
    The type of the Repository.
    summary String
    The summary of the Repository.
    tags List<Property Map>
    A list of image tags belong to this Repository. Note: tags takes effect only if enable_details is set to true.

    GetRegistryEnterpriseReposRepoTag

    Digest string
    The digest of the image.
    ImageCreate string
    The time when the image was created.
    ImageId string
    The ID of the image.
    ImageSize int
    The size of the image.
    ImageUpdate string
    The time when the image was last updated.
    Status string
    The status of the image.
    Tag string
    The tag of the image.
    Digest string
    The digest of the image.
    ImageCreate string
    The time when the image was created.
    ImageId string
    The ID of the image.
    ImageSize int
    The size of the image.
    ImageUpdate string
    The time when the image was last updated.
    Status string
    The status of the image.
    Tag string
    The tag of the image.
    digest String
    The digest of the image.
    imageCreate String
    The time when the image was created.
    imageId String
    The ID of the image.
    imageSize Integer
    The size of the image.
    imageUpdate String
    The time when the image was last updated.
    status String
    The status of the image.
    tag String
    The tag of the image.
    digest string
    The digest of the image.
    imageCreate string
    The time when the image was created.
    imageId string
    The ID of the image.
    imageSize number
    The size of the image.
    imageUpdate string
    The time when the image was last updated.
    status string
    The status of the image.
    tag string
    The tag of the image.
    digest str
    The digest of the image.
    image_create str
    The time when the image was created.
    image_id str
    The ID of the image.
    image_size int
    The size of the image.
    image_update str
    The time when the image was last updated.
    status str
    The status of the image.
    tag str
    The tag of the image.
    digest String
    The digest of the image.
    imageCreate String
    The time when the image was created.
    imageId String
    The ID of the image.
    imageSize Number
    The size of the image.
    imageUpdate String
    The time when the image was last updated.
    status String
    The status of the image.
    tag String
    The tag of the image.

    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
    Viewing docs for Alibaba Cloud v3.97.0
    published on Saturday, Mar 14, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.