Show / Hide Table of Contents

Interface IRepository

Represents an ECR repository.

Inherited Members
IResource.ApplyRemovalPolicy(RemovalPolicy)
IResource.Env
IResource.Stack
IConstruct.Node
Namespace: Amazon.CDK.AWS.ECR
Assembly: Amazon.CDK.AWS.ECR.dll
Syntax (csharp)
public interface IRepository : IResource, IConstruct, IDependable
Syntax (vb)
Public Interface IRepository
    Inherits IResource, IConstruct, IConstruct, IDependable

Synopsis

Properties

RepositoryArn

The ARN of the repository.

RepositoryName

The name of the repository.

RepositoryUri

The URI of this repository (represents the latest image):.

Methods

AddToResourcePolicy(PolicyStatement)

Add a policy statement to the repository's resource policy.

Grant(IGrantable, String[])

Grant the given principal identity permissions to perform the actions on this repository.

GrantPull(IGrantable)

Grant the given identity permissions to pull images in this repository.

GrantPullPush(IGrantable)

Grant the given identity permissions to pull and push images to this repository.

OnCloudTrailEvent(String, IOnEventOptions)

Define a CloudWatch event that triggers when something happens to this repository.

OnCloudTrailImagePushed(String, IOnCloudTrailImagePushedOptions)

Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.

OnEvent(String, IOnEventOptions)

Defines a CloudWatch event rule which triggers for repository events.

OnImageScanCompleted(String, IOnImageScanCompletedOptions)

Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.

RepositoryUriForDigest(String)

Returns the URI of the repository for a certain digest. Can be used in docker push/pull.

RepositoryUriForTag(String)

Returns the URI of the repository for a certain tag. Can be used in docker push/pull.

RepositoryUriForTagOrDigest(String)

Returns the URI of the repository for a certain tag or digest, inferring based on the syntax of the tag.

Properties

RepositoryArn

The ARN of the repository.

string RepositoryArn { get; }
Property Value

System.String

Remarks

Attribute: true

RepositoryName

The name of the repository.

string RepositoryName { get; }
Property Value

System.String

Remarks

Attribute: true

RepositoryUri

The URI of this repository (represents the latest image):.

string RepositoryUri { get; }
Property Value

System.String

Remarks

ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY

Attribute: true

Methods

AddToResourcePolicy(PolicyStatement)

Add a policy statement to the repository's resource policy.

IAddToResourcePolicyResult AddToResourcePolicy(PolicyStatement statement)
Parameters
statement PolicyStatement
Returns

IAddToResourcePolicyResult

Grant(IGrantable, String[])

Grant the given principal identity permissions to perform the actions on this repository.

Grant Grant(IGrantable grantee, params string[] actions)
Parameters
grantee IGrantable
actions System.String[]
Returns

Grant

GrantPull(IGrantable)

Grant the given identity permissions to pull images in this repository.

Grant GrantPull(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

GrantPullPush(IGrantable)

Grant the given identity permissions to pull and push images to this repository.

Grant GrantPullPush(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

OnCloudTrailEvent(String, IOnEventOptions)

Define a CloudWatch event that triggers when something happens to this repository.

Rule OnCloudTrailEvent(string id, IOnEventOptions options = null)
Parameters
id System.String

The id of the rule.

options IOnEventOptions

Options for adding the rule.

Returns

Rule

Remarks

Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.

OnCloudTrailImagePushed(String, IOnCloudTrailImagePushedOptions)

Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.

Rule OnCloudTrailImagePushed(string id, IOnCloudTrailImagePushedOptions options = null)
Parameters
id System.String

The id of the rule.

options IOnCloudTrailImagePushedOptions

Options for adding the rule.

Returns

Rule

Remarks

Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.

OnEvent(String, IOnEventOptions)

Defines a CloudWatch event rule which triggers for repository events.

Rule OnEvent(string id, IOnEventOptions options = null)
Parameters
id System.String
options IOnEventOptions
Returns

Rule

Remarks

Use rule.addEventPattern(pattern) to specify a filter.

OnImageScanCompleted(String, IOnImageScanCompletedOptions)

Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.

Rule OnImageScanCompleted(string id, IOnImageScanCompletedOptions options = null)
Parameters
id System.String

The id of the rule.

options IOnImageScanCompletedOptions

Options for adding the rule.

Returns

Rule

RepositoryUriForDigest(String)

Returns the URI of the repository for a certain digest. Can be used in docker push/pull.

string RepositoryUriForDigest(string digest = null)
Parameters
digest System.String

Image digest to use (tools usually default to the image with the "latest" tag if omitted).

Returns

System.String

Remarks

ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]

RepositoryUriForTag(String)

Returns the URI of the repository for a certain tag. Can be used in docker push/pull.

string RepositoryUriForTag(string tag = null)
Parameters
tag System.String

Image tag to use (tools usually default to "latest" if omitted).

Returns

System.String

Remarks

ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]

RepositoryUriForTagOrDigest(String)

Returns the URI of the repository for a certain tag or digest, inferring based on the syntax of the tag.

string RepositoryUriForTagOrDigest(string tagOrDigest = null)
Parameters
tagOrDigest System.String

Image tag or digest to use (tools usually default to the image with the "latest" tag if omitted).

Returns

System.String

Remarks

Can be used in docker push/pull.

ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]
ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]
Back to top Generated by DocFX