AWS Native is in preview. AWS Classic is fully supported.
aws-native.ecr.getRepository
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:ecr:getRepository
arguments:
# arguments dictionary
The following arguments are supported:
- Repository
Name 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 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 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 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.
- repository
Name 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::Repository
resource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*
. - Image
Scanning 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.
- Image
Tag 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
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten. - Lifecycle
Policy Pulumi.Aws Native. Ecr. Outputs. Repository Lifecycle Policy - Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template.
- Repository
Policy 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::Repository
for more information about the expected schema for this property.- Repository
Uri string - Returns the URI for the specified
AWS::ECR::Repository
resource. 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::Repository
resource. 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
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is 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 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::Repository
for more information about the expected schema for this property.- Repository
Uri string - Returns the URI for the specified
AWS::ECR::Repository
resource. 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::Repository
resource. 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
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is 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 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::Repository
for more information about the expected schema for this property.- repository
Uri String - Returns the URI for the specified
AWS::ECR::Repository
resource. 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::Repository
resource. 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
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is 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::Repository
for more information about the expected schema for this property.- repository
Uri string - Returns the URI for the specified
AWS::ECR::Repository
resource. 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::Repository
resource. 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
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is 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::Repository
for more information about the expected schema for this property.- repository_
uri str - Returns the URI for the specified
AWS::ECR::Repository
resource. 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::Repository
resource. For example,arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*
. - image
Scanning Property MapConfiguration - The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- image
Tag "MUTABLE" | "IMMUTABLE"Mutability - The tag mutability setting for the repository. If this parameter is omitted, the default setting of
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten. - lifecycle
Policy Property Map - 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::Repository
for more information about the expected schema for this property.- repository
Uri String - Returns the URI for the specified
AWS::ECR::Repository
resource. 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
- 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 tofalse
and 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 tofalse
and images will not be scanned unless a scan is manually started.
- scan
On 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 tofalse
and images will not be scanned unless a scan is manually started.
- scan
On 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 tofalse
and 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 tofalse
and images will not be scanned unless a scan is manually started.
- scan
On 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 tofalse
and images will not be scanned unless a scan is manually started.
RepositoryImageTagMutability
RepositoryLifecyclePolicy
- Lifecycle
Policy stringText - The JSON repository policy text to apply to the repository.
- Registry
Id 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 stringText - The JSON repository policy text to apply to the repository.
- Registry
Id 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 StringText - The JSON repository policy text to apply to the repository.
- registry
Id 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 stringText - The JSON repository policy text to apply to the repository.
- registry
Id 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.
- lifecycle
Policy StringText - The JSON repository policy text to apply to the repository.
- registry
Id 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
AWS Native is in preview. AWS Classic is fully supported.