We recommend new projects start with resources from the AWS provider.
aws-native.ecr.getRepository
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::ECR::Repository resource specifies an Amazon Elastic Container Registry (Amazon ECR) repository, where users can push and pull Docker images, Open Container Initiative (OCI) images, and OCI compatible artifacts. For more information, see Amazon ECR private repositories in the Amazon ECR User Guide.
Using getRepository
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 getRepository(args: GetRepositoryArgs, opts?: InvokeOptions): Promise<GetRepositoryResult>
function getRepositoryOutput(args: GetRepositoryOutputArgs, opts?: InvokeOptions): Output<GetRepositoryResult>def get_repository(repository_name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetRepositoryResult
def get_repository_output(repository_name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryResult]func LookupRepository(ctx *Context, args *LookupRepositoryArgs, opts ...InvokeOption) (*LookupRepositoryResult, error)
func LookupRepositoryOutput(ctx *Context, args *LookupRepositoryOutputArgs, opts ...InvokeOption) LookupRepositoryResultOutput> Note: This function is named LookupRepository in the Go SDK.
public static class GetRepository 
{
    public static Task<GetRepositoryResult> InvokeAsync(GetRepositoryArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryResult> Invoke(GetRepositoryInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoryResult> getRepository(GetRepositoryArgs args, InvokeOptions options)
public static Output<GetRepositoryResult> getRepository(GetRepositoryArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:ecr:getRepository
  arguments:
    # arguments dictionaryThe following arguments are supported:
- RepositoryName string
- The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app). If you don't specify a name, CFNlong generates a unique physical ID and uses that ID for the repository name. For more information, see Name type. The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- RepositoryName string
- The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app). If you don't specify a name, CFNlong generates a unique physical ID and uses that ID for the repository name. For more information, see Name type. The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- repositoryName String
- The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app). If you don't specify a name, CFNlong generates a unique physical ID and uses that ID for the repository name. For more information, see Name type. The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- repositoryName string
- The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app). If you don't specify a name, CFNlong generates a unique physical ID and uses that ID for the repository name. For more information, see Name type. The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- repository_name str
- The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app). If you don't specify a name, CFNlong generates a unique physical ID and uses that ID for the repository name. For more information, see Name type. The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- repositoryName String
- The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app). If you don't specify a name, CFNlong generates a unique physical ID and uses that ID for the repository name. For more information, see Name type. The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
getRepository Result
The following output properties are available:
- Arn string
- Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::Repositoryresource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*.
- ImageScanning Pulumi.Configuration Aws Native. Ecr. Outputs. Repository Image Scanning Configuration 
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- ImageTag Pulumi.Mutability Aws Native. Ecr. Repository Image Tag Mutability 
- The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLEwill be used which will allow image tags to be overwritten. IfIMMUTABLEis specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
- LifecyclePolicy Pulumi.Aws Native. Ecr. Outputs. Repository Lifecycle Policy 
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template.
- RepositoryPolicy objectText 
- The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide. - Search the CloudFormation User Guide for - AWS::ECR::Repositoryfor more information about the expected schema for this property.
- RepositoryUri string
- Returns the URI for the specified AWS::ECR::Repositoryresource. For example,*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository.
- 
List<Pulumi.Aws Native. Outputs. Tag> 
- An array of key-value pairs to apply to this resource.
- Arn string
- Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::Repositoryresource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*.
- ImageScanning RepositoryConfiguration Image Scanning Configuration 
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- ImageTag RepositoryMutability Image Tag Mutability 
- The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLEwill be used which will allow image tags to be overwritten. IfIMMUTABLEis specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
- LifecyclePolicy RepositoryLifecycle Policy 
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template.
- RepositoryPolicy interface{}Text 
- The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide. - Search the CloudFormation User Guide for - AWS::ECR::Repositoryfor more information about the expected schema for this property.
- RepositoryUri string
- Returns the URI for the specified AWS::ECR::Repositoryresource. For example,*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository.
- Tag
- An array of key-value pairs to apply to this resource.
- arn String
- Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::Repositoryresource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*.
- imageScanning RepositoryConfiguration Image Scanning Configuration 
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- imageTag RepositoryMutability Image Tag Mutability 
- The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLEwill be used which will allow image tags to be overwritten. IfIMMUTABLEis specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
- lifecyclePolicy RepositoryLifecycle Policy 
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template.
- repositoryPolicy ObjectText 
- The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide. - Search the CloudFormation User Guide for - AWS::ECR::Repositoryfor more information about the expected schema for this property.
- repositoryUri String
- Returns the URI for the specified AWS::ECR::Repositoryresource. For example,*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository.
- List<Tag>
- An array of key-value pairs to apply to this resource.
- arn string
- Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::Repositoryresource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*.
- imageScanning RepositoryConfiguration Image Scanning Configuration 
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- imageTag RepositoryMutability Image Tag Mutability 
- The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLEwill be used which will allow image tags to be overwritten. IfIMMUTABLEis specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
- lifecyclePolicy RepositoryLifecycle Policy 
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template.
- repositoryPolicy anyText 
- The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide. - Search the CloudFormation User Guide for - AWS::ECR::Repositoryfor more information about the expected schema for this property.
- repositoryUri string
- Returns the URI for the specified AWS::ECR::Repositoryresource. For example,*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository.
- Tag[]
- An array of key-value pairs to apply to this resource.
- arn str
- Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::Repositoryresource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*.
- image_scanning_ Repositoryconfiguration Image Scanning Configuration 
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- image_tag_ Repositorymutability Image Tag Mutability 
- The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLEwill be used which will allow image tags to be overwritten. IfIMMUTABLEis specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
- lifecycle_policy RepositoryLifecycle Policy 
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template.
- repository_policy_ Anytext 
- The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide. - Search the CloudFormation User Guide for - AWS::ECR::Repositoryfor more information about the expected schema for this property.
- repository_uri str
- Returns the URI for the specified AWS::ECR::Repositoryresource. For example,*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository.
- Sequence[root_Tag]
- An array of key-value pairs to apply to this resource.
- arn String
- Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::Repositoryresource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*.
- imageScanning Property MapConfiguration 
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- imageTag "MUTABLE" | "IMMUTABLE"Mutability 
- The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLEwill be used which will allow image tags to be overwritten. IfIMMUTABLEis specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
- lifecyclePolicy Property Map
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template.
- repositoryPolicy AnyText 
- The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide. - Search the CloudFormation User Guide for - AWS::ECR::Repositoryfor more information about the expected schema for this property.
- repositoryUri String
- Returns the URI for the specified AWS::ECR::Repositoryresource. For example,*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository.
- List<Property Map>
- An array of key-value pairs to apply to this resource.
Supporting Types
RepositoryImageScanningConfiguration   
- ScanOn boolPush 
- The setting that determines whether images are scanned after being pushed to a repository. If set to true, images will be scanned after being pushed. If this parameter is not specified, it will default tofalseand images will not be scanned unless a scan is manually started.
- ScanOn boolPush 
- The setting that determines whether images are scanned after being pushed to a repository. If set to true, images will be scanned after being pushed. If this parameter is not specified, it will default tofalseand images will not be scanned unless a scan is manually started.
- scanOn BooleanPush 
- The setting that determines whether images are scanned after being pushed to a repository. If set to true, images will be scanned after being pushed. If this parameter is not specified, it will default tofalseand images will not be scanned unless a scan is manually started.
- scanOn booleanPush 
- The setting that determines whether images are scanned after being pushed to a repository. If set to true, images will be scanned after being pushed. If this parameter is not specified, it will default tofalseand images will not be scanned unless a scan is manually started.
- scan_on_ boolpush 
- The setting that determines whether images are scanned after being pushed to a repository. If set to true, images will be scanned after being pushed. If this parameter is not specified, it will default tofalseand images will not be scanned unless a scan is manually started.
- scanOn BooleanPush 
- The setting that determines whether images are scanned after being pushed to a repository. If set to true, images will be scanned after being pushed. If this parameter is not specified, it will default tofalseand images will not be scanned unless a scan is manually started.
RepositoryImageTagMutability   
RepositoryLifecyclePolicy  
- LifecyclePolicy stringText 
- The JSON repository policy text to apply to the repository.
- RegistryId string
- The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- LifecyclePolicy stringText 
- The JSON repository policy text to apply to the repository.
- RegistryId string
- The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- lifecyclePolicy StringText 
- The JSON repository policy text to apply to the repository.
- registryId String
- The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- lifecyclePolicy stringText 
- The JSON repository policy text to apply to the repository.
- registryId string
- The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- lifecycle_policy_ strtext 
- The JSON repository policy text to apply to the repository.
- registry_id str
- The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- lifecyclePolicy StringText 
- The JSON repository policy text to apply to the repository.
- registryId String
- The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.