Show / Hide Table of Contents

Class RepositoryBase

Base class for ECR repository.

Inheritance
System.Object
Construct
Resource
RepositoryBase
Repository
Implements
IRepository
IResource
IConstruct
Constructs.IConstruct
IDependable
Inherited Members
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.ECR
Assembly: Amazon.CDK.AWS.ECR.dll
Syntax (csharp)
public abstract class RepositoryBase : Resource, IRepository, IResource, IConstruct, IConstruct, IDependable
Syntax (vb)
Public MustInherit Class RepositoryBase
    Inherits Resource
    Implements IRepository, IResource, IConstruct, IConstruct, IDependable
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.

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.

RepositoryUriForTag(String)

Returns the URL of the repository. Can be used in docker push/pull.

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

IAddToResourcePolicyResult

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

Grant

GrantPull(IGrantable)

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

public virtual Grant GrantPull(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

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

Grant

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

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.

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

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.

public virtual 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 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

Rule

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]

Implements

IRepository
IResource
IConstruct
Constructs.IConstruct
IDependable
Back to top Generated by DocFX