Class RepositoryBase
Base class for ECR repository.
Inherited Members
Namespace: Amazon.CDK.AWS.ECR
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class RepositoryBase : Resource, IRepository, IResource
Syntax (vb)
Public MustInherit Class RepositoryBase
Inherits Resource
Implements IRepository, IResource
Remarks
Reused between imported repositories and owned repositories.
Synopsis
Constructors
RepositoryBase(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
RepositoryBase(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
RepositoryBase(Construct, String, IResourceProps) |
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 use the images in this repository. |
GrantPullPush(IGrantable) | Grant the given identity permissions to pull and push images to this repository. |
GrantPush(IGrantable) | Grant the given identity permissions to use the images in this repository. |
GrantRead(IGrantable) | Grant the given identity permissions to read the images in 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 an image scan is completed. |
RepositoryUriForDigest(String) | Returns the URL of the repository. Can be used in |
RepositoryUriForTag(String) | Returns the URL of the repository. Can be used in |
RepositoryUriForTagOrDigest(String) | Returns the URL of the repository. Can be used in |
Constructors
RepositoryBase(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected RepositoryBase(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
RepositoryBase(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected RepositoryBase(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
RepositoryBase(Construct, String, IResourceProps)
protected RepositoryBase(Construct scope, string id, IResourceProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IResourceProps
Properties
RepositoryArn
The ARN of the repository.
public abstract string RepositoryArn { get; }
Property Value
System.String
RepositoryName
The name of the repository.
public abstract string RepositoryName { get; }
Property Value
System.String
RepositoryUri
The URI of this repository (represents the latest image):.
public virtual string RepositoryUri { get; }
Property Value
System.String
Remarks
ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY
Methods
AddToResourcePolicy(PolicyStatement)
Add a policy statement to the repository's resource policy.
public abstract IAddToResourcePolicyResult AddToResourcePolicy(PolicyStatement statement)
Parameters
- statement PolicyStatement
Returns
Grant(IGrantable, String[])
Grant the given principal identity permissions to perform the actions on this repository.
public virtual Grant Grant(IGrantable grantee, params string[] actions)
Parameters
- grantee IGrantable
- actions System.String[]
Returns
GrantPull(IGrantable)
Grant the given identity permissions to use the images in this repository.
public virtual Grant GrantPull(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
GrantPullPush(IGrantable)
Grant the given identity permissions to pull and push images to this repository.
public virtual Grant GrantPullPush(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
GrantPush(IGrantable)
Grant the given identity permissions to use the images in this repository.
public virtual Grant GrantPush(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
GrantRead(IGrantable)
Grant the given identity permissions to read the images in this repository.
public virtual Grant GrantRead(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
OnCloudTrailEvent(String, IOnEventOptions)
Define a CloudWatch event that triggers when something happens to this repository.
public virtual Rule OnCloudTrailEvent(string id, IOnEventOptions options = null)
Parameters
- id System.String
The id of the rule.
- options IOnEventOptions
Options for adding the rule.
Returns
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.
public virtual Rule OnCloudTrailImagePushed(string id, IOnCloudTrailImagePushedOptions options = null)
Parameters
- id System.String
The id of the rule.
- options IOnCloudTrailImagePushedOptions
Options for adding the rule.
Returns
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.
public virtual Rule OnEvent(string id, IOnEventOptions options = null)
Parameters
- id System.String
- options IOnEventOptions
Returns
Remarks
Use
rule.addEventPattern(pattern)
to specify a filter.
OnImageScanCompleted(String, IOnImageScanCompletedOptions)
Defines an AWS CloudWatch event rule that can trigger a target when an image scan is completed.
public virtual Rule OnImageScanCompleted(string id, IOnImageScanCompletedOptions options = null)
Parameters
- id System.String
The id of the rule.
- options IOnImageScanCompletedOptions
Options for adding the rule.
Returns
RepositoryUriForDigest(String)
Returns the URL of the repository. Can be used in docker push/pull
.
public virtual string RepositoryUriForDigest(string digest = null)
Parameters
- digest System.String
Optional image digest.
Returns
System.String
Remarks
ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]
RepositoryUriForTag(String)
Returns the URL of the repository. Can be used in docker push/pull
.
public virtual string RepositoryUriForTag(string tag = null)
Parameters
- tag System.String
Optional image tag.
Returns
System.String
Remarks
ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]
RepositoryUriForTagOrDigest(String)
Returns the URL of the repository. Can be used in docker push/pull
.
public virtual string RepositoryUriForTagOrDigest(string tagOrDigest = null)
Parameters
- tagOrDigest System.String
Optional image tag or digest (digests must start with
sha256:
).
Returns
System.String
Remarks
ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]