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
LookupRepositoryin the Go SDK.
public static class GetRepository {
public static Task<GetRepositoryResult> InvokeAsync(GetRepositoryArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
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
- Registry
Id string The registry ID where the repository was created.
- Repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).- 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
- Registry
Id string The registry ID where the repository was created.
- Repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).- 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
- registry
Id string The registry ID where the repository was created.
- repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).- {[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).- 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
awsTerraform Provider.