1. Packages
  2. AWS
  3. API Docs
  4. ecr
  5. getRepositories
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ecr.getRepositories

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for providing information on AWS ECR (Elastic Container Registry) Repositories.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ecr.getRepositories({});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ecr.get_repositories()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecr.GetRepositories(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Ecr.GetRepositories.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecr.EcrFunctions;
    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 example = EcrFunctions.getRepositories();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:ecr:getRepositories
          Arguments: {}
    

    Using getRepositories

    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 getRepositories(opts?: InvokeOptions): Promise<GetRepositoriesResult>
    function getRepositoriesOutput(opts?: InvokeOptions): Output<GetRepositoriesResult>
    def get_repositories(opts: Optional[InvokeOptions] = None) -> GetRepositoriesResult
    def get_repositories_output(opts: Optional[InvokeOptions] = None) -> Output[GetRepositoriesResult]
    func GetRepositories(ctx *Context, opts ...InvokeOption) (*GetRepositoriesResult, error)
    func GetRepositoriesOutput(ctx *Context, opts ...InvokeOption) GetRepositoriesResultOutput

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

    public static class GetRepositories 
    {
        public static Task<GetRepositoriesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetRepositoriesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRepositoriesResult> getRepositories(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ecr/getRepositories:getRepositories
      arguments:
        # arguments dictionary

    getRepositories Result

    The following output properties are available:

    Id string
    AWS Region.
    Names List<string>
    A list if AWS Elastic Container Registries for the region.
    Id string
    AWS Region.
    Names []string
    A list if AWS Elastic Container Registries for the region.
    id String
    AWS Region.
    names List<String>
    A list if AWS Elastic Container Registries for the region.
    id string
    AWS Region.
    names string[]
    A list if AWS Elastic Container Registries for the region.
    id str
    AWS Region.
    names Sequence[str]
    A list if AWS Elastic Container Registries for the region.
    id String
    AWS Region.
    names List<String>
    A list if AWS Elastic Container Registries for the region.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi