AwsEcr
Service-level AWS ECR component.
Remarks
Naming:
- Root: type
${namespace}:aws:AwsEcr; capabilityecr; identity is the active plain-stringargs.repository.name,args.lifecyclePolicy.repository, orargs.repositoryPolicy.repository. Its target is${env}-${projectHash}-ecr-${sanitiseNamePart(identity)}. The repository identity is shared with its provider name; standalone policy identities are semantic external repository names. - The
repositorycapability createsaws:ecr/repository:Repository,aws:ecr/lifecyclePolicy:LifecyclePolicy, andaws:ecr/repositoryPolicy:RepositoryPolicyunderAwsEcr. Each uses the ordered tuple[args.repository.name]and target${env}-${projectHash}-${sanitiseNamePart(args.repository.name)}. It may also createpulumi:providers:awschildren with[args.repository.name, 'deploy']and[args.repository.name, 'org-lookup'], whose targets append those final discriminators. - The standalone lifecycle-policy and repository-policy capabilities respectively create
aws:ecr/lifecyclePolicy:LifecyclePolicyandaws:ecr/repositoryPolicy:RepositoryPolicywith tuples[args.lifecyclePolicy.repository]and[args.repositoryPolicy.repository]. - Exception: repository
nameuses${projectHash}-${lowerCasePurpose}fromargs.repository.name, validated as a lower-case camel-case purpose. The environment is surfaced as an image tag; ECR permits 256 characters, so no local maximum applies. Intentional. Standalone policyrepositoryvalues are semantic external identifiers forwarded unchanged. ECR validates these external repository names as 2–256 characters matching(?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*; slashes separate path components, and periods, underscores, and hyphens occur only between alphanumeric sequences.
Example
import { AwsEcr } from '@jobcloud/aws-ecr';
const repository = new AwsEcr({ repository: { name: 'applicationRepository' } });Constructors
new AwsEcr(
args: AwsEcrArgs,
options?: ComponentResourceOptions,
): AwsEcr
Parameters
args(AwsEcrArgs)options(ComponentResourceOptions, optional)
Returns
AwsEcr
Hierarchy
ComponentResourceAwsEcr
Properties
lifecyclePolicy: AwsEcrLifecyclePolicy
Optional standalone lifecycle policy capability created by this component.
repository: AwsEcrRepository
Optional repository capability created by this component.
repositoryPolicy: AwsEcrRepositoryPolicy
Optional standalone repository policy capability created by this component.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
Methods
getData(): Promise<any>
Inherited from getData
Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.
Returns
Promise<any>
getProvider(moduleMember: string): ProviderResource | undefined
Inherited from getProvider
Returns the provider for the given module member, if one exists.
Parameters
moduleMember(string)
Returns
ProviderResource | undefined
initialize(
args: Inputs,
opts?: ComponentResourceOptions,
name?: string,
type?: string,
): Promise<any>
Inherited from initialize
Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.
Parameters
args(Inputs)opts(ComponentResourceOptions, optional)name(string, optional)type(string, optional)
Returns
Promise<any>
registerOutputs(
outputs?: Inputs | Promise<Inputs> | Output<Inputs>,
): void
Inherited from registerOutputs
Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.
Parameters
outputs(Inputs | Promise<Inputs> | Output<Inputs>, optional)
Returns
void
Static Methods
isInstance(obj: any): obj is ComponentResource<any>
Inherited from isInstance
Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
Parameters
obj(any)
Returns
obj is ComponentResource<any>