GetRepository

The ECR Repository data source allows the ARN, Repository URI and Registry ID to be retrieved for an ECR repository.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var service = Output.Create(Aws.Ecr.GetRepository.InvokeAsync(new Aws.Ecr.GetRepositoryArgs
        {
            Name = "ecr-repository",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecr"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ecr.LookupRepository(ctx, &ecr.LookupRepositoryArgs{
            Name: "ecr-repository",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

service = aws.ecr.get_repository(name="ecr-repository")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const service = pulumi.output(aws.ecr.getRepository({
    name: "ecr-repository",
}, { async: true }));

Using GetRepository

function getRepository(args: GetRepositoryArgs, opts?: InvokeOptions): Promise<GetRepositoryResult>
function  get_repository(name=None, tags=None, opts=None)
func LookupRepository(ctx *Context, args *LookupRepositoryArgs, opts ...InvokeOption) (*LookupRepositoryResult, error)

Note: This function is named LookupRepository in the Go SDK.

public static class GetRepository {
    public static Task<GetRepositoryResult> InvokeAsync(GetRepositoryArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the ECR Repository.

Tags Dictionary<string, string>

A map of tags assigned to the resource.

Name string

The name of the ECR Repository.

Tags map[string]string

A map of tags assigned to the resource.

name string

The name of the ECR Repository.

tags {[key: string]: string}

A map of tags assigned to the resource.

name str

The name of the ECR Repository.

tags Dict[str, str]

A map of tags assigned to the resource.

GetRepository Result

The following output properties are available:

Arn string

Full ARN of the repository.

Id string

The provider-assigned unique ID for this managed resource.

Name string
RegistryId string

The registry ID where the repository was created.

RepositoryUrl string

The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).

Tags Dictionary<string, string>

A map of tags assigned to the resource.

Arn string

Full ARN of the repository.

Id string

The provider-assigned unique ID for this managed resource.

Name string
RegistryId string

The registry ID where the repository was created.

RepositoryUrl string

The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).

Tags map[string]string

A map of tags assigned to the resource.

arn string

Full ARN of the repository.

id string

The provider-assigned unique ID for this managed resource.

name string
registryId string

The registry ID where the repository was created.

repositoryUrl string

The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).

tags {[key: string]: string}

A map of tags assigned to the resource.

arn str

Full ARN of the repository.

id str

The provider-assigned unique ID for this managed resource.

name str
registry_id str

The registry ID where the repository was created.

repository_url str

The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).

tags Dict[str, str]

A map of tags assigned to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.