1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cr
  5. getRepos
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

alicloud.cr.getRepos

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

    This data source provides a list Container Registry repositories on Alibaba Cloud.

    NOTE: Available in v1.35.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    // Declare the data source
    const myRepos = alicloud.cr.getRepos({
        nameRegex: "my-repos",
        outputFile: "my-repo-json",
    });
    export const output = myRepos.then(myRepos => myRepos.repos);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    # Declare the data source
    my_repos = alicloud.cr.get_repos(name_regex="my-repos",
        output_file="my-repo-json")
    pulumi.export("output", my_repos.repos)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Declare the data source
    		myRepos, err := cr.GetRepos(ctx, &cr.GetReposArgs{
    			NameRegex:  pulumi.StringRef("my-repos"),
    			OutputFile: pulumi.StringRef("my-repo-json"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("output", myRepos.Repos)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // Declare the data source
        var myRepos = AliCloud.CR.GetRepos.Invoke(new()
        {
            NameRegex = "my-repos",
            OutputFile = "my-repo-json",
        });
    
        return new Dictionary<string, object?>
        {
            ["output"] = myRepos.Apply(getReposResult => getReposResult.Repos),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cr.CrFunctions;
    import com.pulumi.alicloud.cr.inputs.GetReposArgs;
    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 myRepos = CrFunctions.getRepos(GetReposArgs.builder()
                .nameRegex("my-repos")
                .outputFile("my-repo-json")
                .build());
    
            ctx.export("output", myRepos.applyValue(getReposResult -> getReposResult.repos()));
        }
    }
    
    variables:
      # Declare the data source
      myRepos:
        fn::invoke:
          Function: alicloud:cr:getRepos
          Arguments:
            nameRegex: my-repos
            outputFile: my-repo-json
    outputs:
      output: ${myRepos.repos}
    

    Using getRepos

    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 getRepos(args: GetReposArgs, opts?: InvokeOptions): Promise<GetReposResult>
    function getReposOutput(args: GetReposOutputArgs, opts?: InvokeOptions): Output<GetReposResult>
    def get_repos(enable_details: Optional[bool] = None,
                  name_regex: Optional[str] = None,
                  namespace: Optional[str] = None,
                  output_file: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetReposResult
    def get_repos_output(enable_details: Optional[pulumi.Input[bool]] = 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[GetReposResult]
    func GetRepos(ctx *Context, args *GetReposArgs, opts ...InvokeOption) (*GetReposResult, error)
    func GetReposOutput(ctx *Context, args *GetReposOutputArgs, opts ...InvokeOption) GetReposResultOutput

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

    public static class GetRepos 
    {
        public static Task<GetReposResult> InvokeAsync(GetReposArgs args, InvokeOptions? opts = null)
        public static Output<GetReposResult> Invoke(GetReposInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReposResult> getRepos(GetReposArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cr/getRepos:getRepos
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnableDetails bool
    Boolean, false by default, only repository attributes are exported. Set to true if domain list and tags belong to this repository are needed. See tags in attributes.
    NameRegex string
    A regex string to filter results by repository name.
    Namespace string
    Name of container registry namespace where the repositories are located in.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    EnableDetails bool
    Boolean, false by default, only repository attributes are exported. Set to true if domain list and tags belong to this repository are needed. See tags in attributes.
    NameRegex string
    A regex string to filter results by repository name.
    Namespace string
    Name of container registry namespace where the repositories are located in.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    enableDetails Boolean
    Boolean, false by default, only repository attributes are exported. Set to true if domain list and tags belong to this repository are needed. See tags in attributes.
    nameRegex String
    A regex string to filter results by repository name.
    namespace String
    Name of container registry namespace where the repositories are located in.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    enableDetails boolean
    Boolean, false by default, only repository attributes are exported. Set to true if domain list and tags belong to this repository are needed. See tags in attributes.
    nameRegex string
    A regex string to filter results by repository name.
    namespace string
    Name of container registry namespace where the repositories are located in.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    enable_details bool
    Boolean, false by default, only repository attributes are exported. Set to true if domain list and tags belong to this repository are needed. See tags in attributes.
    name_regex str
    A regex string to filter results by repository name.
    namespace str
    Name of container registry namespace where the repositories are located in.
    output_file str
    File name where to save data source results (after running pulumi preview).
    enableDetails Boolean
    Boolean, false by default, only repository attributes are exported. Set to true if domain list and tags belong to this repository are needed. See tags in attributes.
    nameRegex String
    A regex string to filter results by repository name.
    namespace String
    Name of container registry namespace where the repositories are located in.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getRepos 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 Repositories. Its element is set to names.
    Names List<string>
    A list of repository names.
    Repos List<Pulumi.AliCloud.CR.Outputs.GetReposRepo>
    A list of matched Container Registry Namespaces. Each element contains the following attributes:
    EnableDetails bool
    NameRegex string
    Namespace string
    Name of container registry namespace where repo is located.
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of matched Container Registry Repositories. Its element is set to names.
    Names []string
    A list of repository names.
    Repos []GetReposRepo
    A list of matched Container Registry Namespaces. Each element contains the following attributes:
    EnableDetails bool
    NameRegex string
    Namespace string
    Name of container registry namespace where repo is located.
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of matched Container Registry Repositories. Its element is set to names.
    names List<String>
    A list of repository names.
    repos List<GetReposRepo>
    A list of matched Container Registry Namespaces. Each element contains the following attributes:
    enableDetails Boolean
    nameRegex String
    namespace String
    Name of container registry namespace where repo is located.
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of matched Container Registry Repositories. Its element is set to names.
    names string[]
    A list of repository names.
    repos GetReposRepo[]
    A list of matched Container Registry Namespaces. Each element contains the following attributes:
    enableDetails boolean
    nameRegex string
    namespace string
    Name of container registry namespace where repo is located.
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of matched Container Registry Repositories. Its element is set to names.
    names Sequence[str]
    A list of repository names.
    repos Sequence[GetReposRepo]
    A list of matched Container Registry Namespaces. Each element contains the following attributes:
    enable_details bool
    name_regex str
    namespace str
    Name of container registry namespace where repo is located.
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of matched Container Registry Repositories. Its element is set to names.
    names List<String>
    A list of repository names.
    repos List<Property Map>
    A list of matched Container Registry Namespaces. Each element contains the following attributes:
    enableDetails Boolean
    nameRegex String
    namespace String
    Name of container registry namespace where repo is located.
    outputFile String

    Supporting Types

    GetReposRepo

    DomainList Pulumi.AliCloud.CR.Inputs.GetReposRepoDomainList
    The repository domain list.
    Name string
    Name of container registry namespace.
    Namespace string
    Name of container registry namespace where the repositories are located in.
    RepoType string
    PUBLIC or PRIVATE, repository's visibility.
    Summary string
    The repository general information.
    Tags List<Pulumi.AliCloud.CR.Inputs.GetReposRepoTag>
    A list of image tags belong to this repository. Each contains several attributes, see Block Tag.
    DomainList GetReposRepoDomainList
    The repository domain list.
    Name string
    Name of container registry namespace.
    Namespace string
    Name of container registry namespace where the repositories are located in.
    RepoType string
    PUBLIC or PRIVATE, repository's visibility.
    Summary string
    The repository general information.
    Tags []GetReposRepoTag
    A list of image tags belong to this repository. Each contains several attributes, see Block Tag.
    domainList GetReposRepoDomainList
    The repository domain list.
    name String
    Name of container registry namespace.
    namespace String
    Name of container registry namespace where the repositories are located in.
    repoType String
    PUBLIC or PRIVATE, repository's visibility.
    summary String
    The repository general information.
    tags List<GetReposRepoTag>
    A list of image tags belong to this repository. Each contains several attributes, see Block Tag.
    domainList GetReposRepoDomainList
    The repository domain list.
    name string
    Name of container registry namespace.
    namespace string
    Name of container registry namespace where the repositories are located in.
    repoType string
    PUBLIC or PRIVATE, repository's visibility.
    summary string
    The repository general information.
    tags GetReposRepoTag[]
    A list of image tags belong to this repository. Each contains several attributes, see Block Tag.
    domain_list GetReposRepoDomainList
    The repository domain list.
    name str
    Name of container registry namespace.
    namespace str
    Name of container registry namespace where the repositories are located in.
    repo_type str
    PUBLIC or PRIVATE, repository's visibility.
    summary str
    The repository general information.
    tags Sequence[GetReposRepoTag]
    A list of image tags belong to this repository. Each contains several attributes, see Block Tag.
    domainList Property Map
    The repository domain list.
    name String
    Name of container registry namespace.
    namespace String
    Name of container registry namespace where the repositories are located in.
    repoType String
    PUBLIC or PRIVATE, repository's visibility.
    summary String
    The repository general information.
    tags List<Property Map>
    A list of image tags belong to this repository. Each contains several attributes, see Block Tag.

    GetReposRepoDomainList

    Internal string
    Domain of internal endpoint, only in some regions.
    Public string
    Domain of public endpoint.
    Vpc string
    Domain of vpc endpoint.
    Internal string
    Domain of internal endpoint, only in some regions.
    Public string
    Domain of public endpoint.
    Vpc string
    Domain of vpc endpoint.
    internal String
    Domain of internal endpoint, only in some regions.
    public_ String
    Domain of public endpoint.
    vpc String
    Domain of vpc endpoint.
    internal string
    Domain of internal endpoint, only in some regions.
    public string
    Domain of public endpoint.
    vpc string
    Domain of vpc endpoint.
    internal str
    Domain of internal endpoint, only in some regions.
    public str
    Domain of public endpoint.
    vpc str
    Domain of vpc endpoint.
    internal String
    Domain of internal endpoint, only in some regions.
    public String
    Domain of public endpoint.
    vpc String
    Domain of vpc endpoint.

    GetReposRepoTag

    Digest string
    Digest of this image.
    ImageCreate int
    Create time of this image, unix time in nanoseconds.
    ImageId string
    Id of this image.
    ImageSize int
    Status of this image, in bytes.
    ImageUpdate int
    Last update time of this image, unix time in nanoseconds.
    Status string
    Status of this image.
    Tag string
    Tag of this image.
    Digest string
    Digest of this image.
    ImageCreate int
    Create time of this image, unix time in nanoseconds.
    ImageId string
    Id of this image.
    ImageSize int
    Status of this image, in bytes.
    ImageUpdate int
    Last update time of this image, unix time in nanoseconds.
    Status string
    Status of this image.
    Tag string
    Tag of this image.
    digest String
    Digest of this image.
    imageCreate Integer
    Create time of this image, unix time in nanoseconds.
    imageId String
    Id of this image.
    imageSize Integer
    Status of this image, in bytes.
    imageUpdate Integer
    Last update time of this image, unix time in nanoseconds.
    status String
    Status of this image.
    tag String
    Tag of this image.
    digest string
    Digest of this image.
    imageCreate number
    Create time of this image, unix time in nanoseconds.
    imageId string
    Id of this image.
    imageSize number
    Status of this image, in bytes.
    imageUpdate number
    Last update time of this image, unix time in nanoseconds.
    status string
    Status of this image.
    tag string
    Tag of this image.
    digest str
    Digest of this image.
    image_create int
    Create time of this image, unix time in nanoseconds.
    image_id str
    Id of this image.
    image_size int
    Status of this image, in bytes.
    image_update int
    Last update time of this image, unix time in nanoseconds.
    status str
    Status of this image.
    tag str
    Tag of this image.
    digest String
    Digest of this image.
    imageCreate Number
    Create time of this image, unix time in nanoseconds.
    imageId String
    Id of this image.
    imageSize Number
    Status of this image, in bytes.
    imageUpdate Number
    Last update time of this image, unix time in nanoseconds.
    status String
    Status of this image.
    tag String
    Tag of this 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
    Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi