Skip to content

Latest commit

 

History

History
1686 lines (1011 loc) · 63 KB

File metadata and controls

1686 lines (1011 loc) · 63 KB

API Reference

Constructs

Domain

A CodeArtifact domain.

Initializers

import { Domain } from '@renovosolutions/cdk-library-aws-codeartifact'

new Domain(scope: Construct, id: string, props: DomainProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props DomainProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
applyRemovalPolicy Apply the given removal policy to this resource.
addRepository Add a repository to this domain.
grantRead Grant read permissions to the given principal on this domain.
grantReadWrite Grant read and write permissions to the given principal on this domain.
grantWrite Grant write permissions to the given principal on this domain.

toString
public toString(): string

Returns a string representation of this construct.

applyRemovalPolicy
public applyRemovalPolicy(policy: RemovalPolicy): void

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

policyRequired
  • Type: aws-cdk-lib.RemovalPolicy

addRepository
public addRepository(id: string, props: RepositoryOptions): IRepository

Add a repository to this domain.

idRequired
  • Type: string

propsRequired

grantRead
public grantRead(principal: IGrantable): Grant

Grant read permissions to the given principal on this domain.

principalRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantReadWrite
public grantReadWrite(principal: IGrantable): Grant

Grant read and write permissions to the given principal on this domain.

principalRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantWrite
public grantWrite(principal: IGrantable): Grant

Grant write permissions to the given principal on this domain.

principalRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

Static Functions

Name Description
isConstruct Checks if x is a construct.
isOwnedResource Returns true if the construct was created by CDK, and false otherwise.
isResource Check whether the given construct is a Resource.
fromDomainArn Reference an existing domain by its ARN.
fromDomainAttributes Import an existing domain given its attributes.

isConstruct
import { Domain } from '@renovosolutions/cdk-library-aws-codeartifact'

Domain.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


isOwnedResource
import { Domain } from '@renovosolutions/cdk-library-aws-codeartifact'

Domain.isOwnedResource(construct: IConstruct)

Returns true if the construct was created by CDK, and false otherwise.

constructRequired
  • Type: constructs.IConstruct

isResource
import { Domain } from '@renovosolutions/cdk-library-aws-codeartifact'

Domain.isResource(construct: IConstruct)

Check whether the given construct is a Resource.

constructRequired
  • Type: constructs.IConstruct

fromDomainArn
import { Domain } from '@renovosolutions/cdk-library-aws-codeartifact'

Domain.fromDomainArn(scope: Construct, id: string, domainArn: string)

Reference an existing domain by its ARN.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

domainArnRequired
  • Type: string

fromDomainAttributes
import { Domain } from '@renovosolutions/cdk-library-aws-codeartifact'

Domain.fromDomainAttributes(scope: Construct, id: string, attrs: DomainAttributes)

Import an existing domain given its attributes.

Either domainArn or domainName is required.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

attrsRequired

Properties

Name Type Description
node constructs.Node The tree node.
env aws-cdk-lib.ResourceEnvironment The environment this resource belongs to.
stack aws-cdk-lib.Stack The stack in which this resource is defined.
cfnDomain aws-cdk-lib.aws_codeartifact.CfnDomain The underlying CfnDomain resource.
domainArn string The ARN of the domain.
domainName string The name of the domain.
domainEncryptionKey string The key used to encrypt the domain.
domainOwner string The account that owns the domain.
encryptionKey aws-cdk-lib.aws_kms.IKey The key used to encrypt the domain.
readActions string[] No description.
writeActions string[] No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


envRequired
public readonly env: ResourceEnvironment;
  • Type: aws-cdk-lib.ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The stack in which this resource is defined.


cfnDomainRequired
public readonly cfnDomain: CfnDomain;
  • Type: aws-cdk-lib.aws_codeartifact.CfnDomain

The underlying CfnDomain resource.


domainArnRequired
public readonly domainArn: string;
  • Type: string

The ARN of the domain.


domainNameRequired
public readonly domainName: string;
  • Type: string

The name of the domain.


domainEncryptionKeyOptional
public readonly domainEncryptionKey: string;
  • Type: string

The key used to encrypt the domain.


domainOwnerOptional
public readonly domainOwner: string;
  • Type: string

The account that owns the domain.


encryptionKeyOptional
public readonly encryptionKey: IKey;
  • Type: aws-cdk-lib.aws_kms.IKey

The key used to encrypt the domain.


readActionsRequired
public readonly readActions: string[];
  • Type: string[]

writeActionsRequired
public readonly writeActions: string[];
  • Type: string[]

Repository

A CodeArtifact domain.

Initializers

import { Repository } from '@renovosolutions/cdk-library-aws-codeartifact'

new Repository(scope: Construct, id: string, props: RepositoryProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props RepositoryProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
applyRemovalPolicy Apply the given removal policy to this resource.
grantRead Grant read permissions to the given principal on this repository.
grantReadWrite Grant read and write permissions to the given principal on this repository.
grantWrite Grant write permissions to the given principal on this respository.

toString
public toString(): string

Returns a string representation of this construct.

applyRemovalPolicy
public applyRemovalPolicy(policy: RemovalPolicy): void

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

policyRequired
  • Type: aws-cdk-lib.RemovalPolicy

grantRead
public grantRead(principal: IGrantable): Grant

Grant read permissions to the given principal on this repository.

principalRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantReadWrite
public grantReadWrite(principal: IGrantable): Grant

Grant read and write permissions to the given principal on this repository.

principalRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantWrite
public grantWrite(principal: IGrantable): Grant

Grant write permissions to the given principal on this respository.

principalRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

Static Functions

Name Description
isConstruct Checks if x is a construct.
isOwnedResource Returns true if the construct was created by CDK, and false otherwise.
isResource Check whether the given construct is a Resource.
fromRepositoryArn Reference an existing repository by its ARN.
fromRepositoryAttributes Reference an existing repository by its attributes.

isConstruct
import { Repository } from '@renovosolutions/cdk-library-aws-codeartifact'

Repository.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


isOwnedResource
import { Repository } from '@renovosolutions/cdk-library-aws-codeartifact'

Repository.isOwnedResource(construct: IConstruct)

Returns true if the construct was created by CDK, and false otherwise.

constructRequired
  • Type: constructs.IConstruct

isResource
import { Repository } from '@renovosolutions/cdk-library-aws-codeartifact'

Repository.isResource(construct: IConstruct)

Check whether the given construct is a Resource.

constructRequired
  • Type: constructs.IConstruct

fromRepositoryArn
import { Repository } from '@renovosolutions/cdk-library-aws-codeartifact'

Repository.fromRepositoryArn(scope: Construct, id: string, repositoryArn: string)

Reference an existing repository by its ARN.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

repositoryArnRequired
  • Type: string

fromRepositoryAttributes
import { Repository } from '@renovosolutions/cdk-library-aws-codeartifact'

Repository.fromRepositoryAttributes(scope: Construct, id: string, attrs: RepositoryAttributes)

Reference an existing repository by its attributes.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

attrsRequired

Properties

Name Type Description
node constructs.Node The tree node.
env aws-cdk-lib.ResourceEnvironment The environment this resource belongs to.
stack aws-cdk-lib.Stack The stack in which this resource is defined.
cfnRepository aws-cdk-lib.aws_codeartifact.CfnRepository The underlying CfnRepository.
domain IDomain The name of the repository domain.
repositoryArn string The ARN of the repository.
repositoryName string The name of the repository.
repositoryDomainName string The name of the domain that contains the repository.
repositoryDomainOwner string The account that owns the domain that contains the repository.
readActions string[] No description.
writeActions string[] No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


envRequired
public readonly env: ResourceEnvironment;
  • Type: aws-cdk-lib.ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The stack in which this resource is defined.


cfnRepositoryRequired
public readonly cfnRepository: CfnRepository;
  • Type: aws-cdk-lib.aws_codeartifact.CfnRepository

The underlying CfnRepository.


domainRequired
public readonly domain: IDomain;

The name of the repository domain.


repositoryArnRequired
public readonly repositoryArn: string;
  • Type: string

The ARN of the repository.


repositoryNameRequired
public readonly repositoryName: string;
  • Type: string

The name of the repository.


repositoryDomainNameOptional
public readonly repositoryDomainName: string;
  • Type: string

The name of the domain that contains the repository.


repositoryDomainOwnerOptional
public readonly repositoryDomainOwner: string;
  • Type: string

The account that owns the domain that contains the repository.


readActionsRequired
public readonly readActions: string[];
  • Type: string[]

writeActionsRequired
public readonly writeActions: string[];
  • Type: string[]

Structs

DomainAttributes

Attributes of a domain.

Initializer

import { DomainAttributes } from '@renovosolutions/cdk-library-aws-codeartifact'

const domainAttributes: DomainAttributes = { ... }

Properties

Name Type Description
domainArn string The ARN of the domain.
domainEncryptionKey string The key used to encrypt the domain.
domainName string The name of the domain.
domainOwner string The account that owns the domain.
encryptionKey aws-cdk-lib.aws_kms.IKey The key used to encrypt the domain.

domainArnOptional
public readonly domainArn: string;
  • Type: string

The ARN of the domain.


domainEncryptionKeyOptional
public readonly domainEncryptionKey: string;
  • Type: string

The key used to encrypt the domain.


domainNameOptional
public readonly domainName: string;
  • Type: string

The name of the domain.


domainOwnerOptional
public readonly domainOwner: string;
  • Type: string

The account that owns the domain.


encryptionKeyOptional
public readonly encryptionKey: IKey;
  • Type: aws-cdk-lib.aws_kms.IKey

The key used to encrypt the domain.


DomainProps

The properties for a new domain.

Initializer

import { DomainProps } from '@renovosolutions/cdk-library-aws-codeartifact'

const domainProps: DomainProps = { ... }

Properties

Name Type Description
name string A string that specifies the name of the requested domain.
encryptionKey aws-cdk-lib.aws_kms.IKey The key used to encrypt the domain.
permissionsPolicyDocument aws-cdk-lib.aws_iam.PolicyDocument The document that defines the resource policy that is set on a domain.

nameRequired
public readonly name: string;
  • Type: string

A string that specifies the name of the requested domain.


encryptionKeyOptional
public readonly encryptionKey: IKey;
  • Type: aws-cdk-lib.aws_kms.IKey
  • Default: An AWS managed key is created automatically.

The key used to encrypt the domain.


permissionsPolicyDocumentOptional
public readonly permissionsPolicyDocument: PolicyDocument;
  • Type: aws-cdk-lib.aws_iam.PolicyDocument
  • Default: No policy is set. The account will have full permissions to the domain.

The document that defines the resource policy that is set on a domain.


RepositoryAttributes

Attributes of a repository.

Initializer

import { RepositoryAttributes } from '@renovosolutions/cdk-library-aws-codeartifact'

const repositoryAttributes: RepositoryAttributes = { ... }

Properties

Name Type Description
domain IDomain The domain that contains the repository.
repositoryArn string The ARN of the repository.
repositoryDomainName string The name of the domain that contains the repository.
repositoryDomainOwner string The account that owns the domain that contains the repository.
repositoryName string The name of the repository.

domainOptional
public readonly domain: IDomain;

The domain that contains the repository.


repositoryArnOptional
public readonly repositoryArn: string;
  • Type: string

The ARN of the repository.


repositoryDomainNameOptional
public readonly repositoryDomainName: string;
  • Type: string

The name of the domain that contains the repository.


repositoryDomainOwnerOptional
public readonly repositoryDomainOwner: string;
  • Type: string

The account that owns the domain that contains the repository.


repositoryNameOptional
public readonly repositoryName: string;
  • Type: string

The name of the repository.


RepositoryOptions

The options for creating a new repository.

Initializer

import { RepositoryOptions } from '@renovosolutions/cdk-library-aws-codeartifact'

const repositoryOptions: RepositoryOptions = { ... }

Properties

Name Type Description
name string The name of the repository.
description string The description of the repository.
externalConnections ExternalConnection[] An array of external connections associated with the repository.
permissionsPolicyDocument aws-cdk-lib.aws_iam.PolicyDocument The document that defines the permissions policy for the repository.
upstreams IRepository[] An array of upstream repositories associated with the repository.

nameRequired
public readonly name: string;
  • Type: string

The name of the repository.


descriptionOptional
public readonly description: string;
  • Type: string

The description of the repository.


externalConnectionsOptional
public readonly externalConnections: ExternalConnection[];

An array of external connections associated with the repository.

https://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html


permissionsPolicyDocumentOptional
public readonly permissionsPolicyDocument: PolicyDocument;
  • Type: aws-cdk-lib.aws_iam.PolicyDocument

The document that defines the permissions policy for the repository.


upstreamsOptional
public readonly upstreams: IRepository[];

An array of upstream repositories associated with the repository.

https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html


RepositoryProps

The properties of a CodeArtifact Repository.

Initializer

import { RepositoryProps } from '@renovosolutions/cdk-library-aws-codeartifact'

const repositoryProps: RepositoryProps = { ... }

Properties

Name Type Description
name string The name of the repository.
description string The description of the repository.
externalConnections ExternalConnection[] An array of external connections associated with the repository.
permissionsPolicyDocument aws-cdk-lib.aws_iam.PolicyDocument The document that defines the permissions policy for the repository.
upstreams IRepository[] An array of upstream repositories associated with the repository.
domain IDomain The domain that the repository will be created in.

nameRequired
public readonly name: string;
  • Type: string

The name of the repository.


descriptionOptional
public readonly description: string;
  • Type: string

The description of the repository.


externalConnectionsOptional
public readonly externalConnections: ExternalConnection[];

An array of external connections associated with the repository.

https://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html


permissionsPolicyDocumentOptional
public readonly permissionsPolicyDocument: PolicyDocument;
  • Type: aws-cdk-lib.aws_iam.PolicyDocument

The document that defines the permissions policy for the repository.


upstreamsOptional
public readonly upstreams: IRepository[];

An array of upstream repositories associated with the repository.

https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html


domainRequired
public readonly domain: IDomain;

The domain that the repository will be created in.


Protocols

IDomain

Methods

Name Description
addRepository Add a repository to this domain.
grantRead Grant read permissions to the given principal on this domain.
grantReadWrite Grant read and write permissions to the given principal on this domain.
grantWrite Grant write permissions to the given principal on this domain.

addRepository
public addRepository(id: string, props: RepositoryOptions): IRepository

Add a repository to this domain.

idRequired
  • Type: string

propsRequired

grantRead
public grantRead(grantee: IGrantable): Grant

Grant read permissions to the given principal on this domain.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantReadWrite
public grantReadWrite(grantee: IGrantable): Grant

Grant read and write permissions to the given principal on this domain.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantWrite
public grantWrite(grantee: IGrantable): Grant

Grant write permissions to the given principal on this domain.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

Properties

Name Type Description
node constructs.Node The tree node.
env aws-cdk-lib.ResourceEnvironment The environment this resource belongs to.
stack aws-cdk-lib.Stack The stack in which this resource is defined.
domainArn string The ARN of the domain.
domainName string The name of the domain.
domainEncryptionKey string The key used to encrypt the domain.
domainOwner string The account that owns the domain.
encryptionKey aws-cdk-lib.aws_kms.IKey The key used to encrypt the domain.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


envRequired
public readonly env: ResourceEnvironment;
  • Type: aws-cdk-lib.ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The stack in which this resource is defined.


domainArnRequired
public readonly domainArn: string;
  • Type: string

The ARN of the domain.


domainNameRequired
public readonly domainName: string;
  • Type: string

The name of the domain.


domainEncryptionKeyOptional
public readonly domainEncryptionKey: string;
  • Type: string

The key used to encrypt the domain.


domainOwnerOptional
public readonly domainOwner: string;
  • Type: string

The account that owns the domain.


encryptionKeyOptional
public readonly encryptionKey: IKey;
  • Type: aws-cdk-lib.aws_kms.IKey

The key used to encrypt the domain.


IRepository

This interface represents a CodeArtifact Repository resource.

Methods

Name Description
grantRead Grant read permissions to the given principal on this repository.
grantReadWrite Grant read and write permissions to the given principal on this repository.
grantWrite Grant write permissions to the given principal on this respository.

grantRead
public grantRead(grantee: IGrantable): Grant

Grant read permissions to the given principal on this repository.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantReadWrite
public grantReadWrite(grantee: IGrantable): Grant

Grant read and write permissions to the given principal on this repository.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

grantWrite
public grantWrite(grantee: IGrantable): Grant

Grant write permissions to the given principal on this respository.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

Properties

Name Type Description
node constructs.Node The tree node.
env aws-cdk-lib.ResourceEnvironment The environment this resource belongs to.
stack aws-cdk-lib.Stack The stack in which this resource is defined.
domain IDomain The domain that contains the repository.
repositoryArn string The ARN of the repository.
repositoryName string The name of the repository.
repositoryDomainName string The name of the domain that contains the repository.
repositoryDomainOwner string The account that owns the domain that contains the repository.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


envRequired
public readonly env: ResourceEnvironment;
  • Type: aws-cdk-lib.ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The stack in which this resource is defined.


domainRequired
public readonly domain: IDomain;

The domain that contains the repository.


repositoryArnRequired
public readonly repositoryArn: string;
  • Type: string

The ARN of the repository.


repositoryNameRequired
public readonly repositoryName: string;
  • Type: string

The name of the repository.


repositoryDomainNameOptional
public readonly repositoryDomainName: string;
  • Type: string

The name of the domain that contains the repository.


repositoryDomainOwnerOptional
public readonly repositoryDomainOwner: string;
  • Type: string

The account that owns the domain that contains the repository.


Enums

ExternalConnection

CodeArtifact supports an external connection to the following public repositories.

https://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html#supported-public-repositories

Members

Name Description
NPM npm public registry.
DOTNET_NUGETORG NuGet Gallery.
PYTHON_PYPI Python Package Index.
MAVEN_CENTRAL Maven Central.
MAVEN_GOOGLEANDROID Google Android repository.
MAVEN_GRADLEPLUGINS Gradle plugins repository.
MAVEN_COMMONSWARE CommonsWare Android repository.

NPM

npm public registry.


DOTNET_NUGETORG

NuGet Gallery.


PYTHON_PYPI

Python Package Index.


MAVEN_CENTRAL

Maven Central.


MAVEN_GOOGLEANDROID

Google Android repository.


MAVEN_GRADLEPLUGINS

Gradle plugins repository.


MAVEN_COMMONSWARE

CommonsWare Android repository.