Class RepositoryBase
- All Implemented Interfaces:
IEnvironmentAware,IResource,IRepository,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
Repository
Reused between imported repositories and owned repositories.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.ecr.IRepository
IRepository.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRepositoryBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedRepositoryBase(software.amazon.jsii.JsiiObjectRef objRef) protectedRepositoryBase(software.constructs.Construct scope, String id) protectedRepositoryBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionabstract AddToResourcePolicyResultaddToResourcePolicy(PolicyStatement statement) Add a policy statement to the repository's resource policy.The URI of this repository's registry:.abstract StringThe ARN of the repository.abstract StringThe name of the repository.The URI of this repository (represents the latest image):.grant(IGrantable grantee, String... actions) Grant the given principal identity permissions to perform the actions on this repository.grantPull(IGrantable grantee) Grant the given identity permissions to use the images in this repository.grantPullPush(IGrantable grantee) Grant the given identity permissions to pull and push images to this repository.grantPush(IGrantable grantee) Grant the given identity permissions to use the images in this repository.grantRead(IGrantable grantee) Grant the given identity permissions to read the images in this repository.Define a CloudWatch event that triggers when something happens to this repository.onCloudTrailEvent(String id, OnEventOptions options) Define a CloudWatch event that triggers when something happens to this repository.Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.onCloudTrailImagePushed(String id, OnCloudTrailImagePushedOptions options) Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.Defines a CloudWatch event rule which triggers for repository events.onEvent(String id, OnEventOptions options) Defines a CloudWatch event rule which triggers for repository events.Defines an AWS CloudWatch event rule that can trigger a target when an image scan is completed.onImageScanCompleted(String id, OnImageScanCompletedOptions options) Defines an AWS CloudWatch event rule that can trigger a target when an image scan is completed.Returns the URL of the repository.repositoryUriForDigest(String digest) Returns the URL of the repository.Returns the URL of the repository.Returns the URL of the repository.Returns the URL of the repository.repositoryUriForTagOrDigest(String tagOrDigest) Returns the URL of the repository.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
RepositoryBase
protected RepositoryBase(software.amazon.jsii.JsiiObjectRef objRef) -
RepositoryBase
protected RepositoryBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
RepositoryBase
@Stability(Stable) protected RepositoryBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
RepositoryBase
@Stability(Stable) protected RepositoryBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
addToResourcePolicy
@Stability(Stable) @NotNull public abstract AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Add a policy statement to the repository's resource policy.- Specified by:
addToResourcePolicyin interfaceIRepository- Parameters:
statement- This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) Grant the given principal identity permissions to perform the actions on this repository.- Specified by:
grantin interfaceIRepository- Parameters:
grantee- This parameter is required.actions- This parameter is required.
-
grantPull
Grant the given identity permissions to use the images in this repository.- Specified by:
grantPullin interfaceIRepository- Parameters:
grantee- This parameter is required.
-
grantPullPush
Grant the given identity permissions to pull and push images to this repository.- Specified by:
grantPullPushin interfaceIRepository- Parameters:
grantee- This parameter is required.
-
grantPush
Grant the given identity permissions to use the images in this repository.- Specified by:
grantPushin interfaceIRepository- Parameters:
grantee- This parameter is required.
-
grantRead
Grant the given identity permissions to read the images in this repository.- Specified by:
grantReadin interfaceIRepository- Parameters:
grantee- This parameter is required.
-
onCloudTrailEvent
@Stability(Stable) @NotNull public Rule onCloudTrailEvent(@NotNull String id, @Nullable OnEventOptions options) Define a CloudWatch event that triggers when something happens to this repository.Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
- Specified by:
onCloudTrailEventin interfaceIRepository- Parameters:
id- The id of the rule. This parameter is required.options- Options for adding the rule.
-
onCloudTrailEvent
Define a CloudWatch event that triggers when something happens to this repository.Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
- Specified by:
onCloudTrailEventin interfaceIRepository- Parameters:
id- The id of the rule. This parameter is required.
-
onCloudTrailImagePushed
@Stability(Stable) @NotNull public Rule onCloudTrailImagePushed(@NotNull String id, @Nullable OnCloudTrailImagePushedOptions options) Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
- Specified by:
onCloudTrailImagePushedin interfaceIRepository- Parameters:
id- The id of the rule. This parameter is required.options- Options for adding the rule.
-
onCloudTrailImagePushed
Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
- Specified by:
onCloudTrailImagePushedin interfaceIRepository- Parameters:
id- The id of the rule. This parameter is required.
-
onEvent
@Stability(Stable) @NotNull public Rule onEvent(@NotNull String id, @Nullable OnEventOptions options) Defines a CloudWatch event rule which triggers for repository events.Use
rule.addEventPattern(pattern)to specify a filter.- Specified by:
onEventin interfaceIRepository- Parameters:
id- This parameter is required.options-
-
onEvent
Defines a CloudWatch event rule which triggers for repository events.Use
rule.addEventPattern(pattern)to specify a filter.- Specified by:
onEventin interfaceIRepository- Parameters:
id- This parameter is required.
-
onImageScanCompleted
@Stability(Stable) @NotNull public Rule onImageScanCompleted(@NotNull String id, @Nullable OnImageScanCompletedOptions options) Defines an AWS CloudWatch event rule that can trigger a target when an image scan is completed.- Specified by:
onImageScanCompletedin interfaceIRepository- Parameters:
id- The id of the rule. This parameter is required.options- Options for adding the rule.
-
onImageScanCompleted
Defines an AWS CloudWatch event rule that can trigger a target when an image scan is completed.- Specified by:
onImageScanCompletedin interfaceIRepository- Parameters:
id- The id of the rule. This parameter is required.
-
repositoryUriForDigest
Returns the URL of the repository. Can be used indocker push/pull.ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]
- Specified by:
repositoryUriForDigestin interfaceIRepository- Parameters:
digest- Optional image digest.
-
repositoryUriForDigest
Returns the URL of the repository. Can be used indocker push/pull.ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]
- Specified by:
repositoryUriForDigestin interfaceIRepository
-
repositoryUriForTag
Returns the URL of the repository. Can be used indocker push/pull.ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]
- Specified by:
repositoryUriForTagin interfaceIRepository- Parameters:
tag- Optional image tag.
-
repositoryUriForTag
Returns the URL of the repository. Can be used indocker push/pull.ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]
- Specified by:
repositoryUriForTagin interfaceIRepository
-
repositoryUriForTagOrDigest
Returns the URL of the repository. Can be used indocker push/pull.ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]
- Specified by:
repositoryUriForTagOrDigestin interfaceIRepository- Parameters:
tagOrDigest- Optional image tag or digest (digests must start withsha256:).
-
repositoryUriForTagOrDigest
Returns the URL of the repository. Can be used indocker push/pull.ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]
- Specified by:
repositoryUriForTagOrDigestin interfaceIRepository
-
getRegistryUri
The URI of this repository's registry:.ACCOUNT.dkr.ecr.REGION.amazonaws.com
- Specified by:
getRegistryUriin interfaceIRepository
-
getRepositoryArn
The ARN of the repository.- Specified by:
getRepositoryArnin interfaceIRepository
-
getRepositoryName
The name of the repository.- Specified by:
getRepositoryNamein interfaceIRepository
-
getRepositoryUri
The URI of this repository (represents the latest image):.ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY
- Specified by:
getRepositoryUriin interfaceIRepository
-