Skip to content

Latest commit

 

History

History
317 lines (190 loc) · 11.1 KB

File metadata and controls

317 lines (190 loc) · 11.1 KB

API Reference

Constructs

Archiver

Initializers

import { Archiver } from 'azure-devops-repository-archiver'

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

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { Archiver } from 'azure-devops-repository-archiver'

Archiver.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
bucket aws-cdk-lib.aws_s3.Bucket The S3 bucket used to store the git repositories archive.
kmsKey aws-cdk-lib.aws_kms.Key The KMS key used to encrypt the logs and the SNS topic.
logGroup aws-cdk-lib.aws_logs.LogGroup Log group used by the CodeBuild projects.
props ArchiverProperties No description.
topic aws-cdk-lib.aws_sns.Topic SNS topic to send configured bucket events to.

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

The tree node.


bucketRequired
public readonly bucket: Bucket;
  • Type: aws-cdk-lib.aws_s3.Bucket

The S3 bucket used to store the git repositories archive.


kmsKeyRequired
public readonly kmsKey: Key;
  • Type: aws-cdk-lib.aws_kms.Key

The KMS key used to encrypt the logs and the SNS topic.


logGroupRequired
public readonly logGroup: LogGroup;
  • Type: aws-cdk-lib.aws_logs.LogGroup

Log group used by the CodeBuild projects.


propsRequired
public readonly props: ArchiverProperties;

topicRequired
public readonly topic: Topic;
  • Type: aws-cdk-lib.aws_sns.Topic

SNS topic to send configured bucket events to.


Structs

ArchiverProperties

Initializer

import { ArchiverProperties } from 'azure-devops-repository-archiver'

const archiverProperties: ArchiverProperties = { ... }

Properties

Name Type Description
backupConfigurations BackupConfiguration[] Contains details on the git repositories to be backed up.
notificationEvents aws-cdk-lib.aws_s3.EventType[] S3 events that will trigger a message to the SNS topic.
retentionDays aws-cdk-lib.aws_logs.RetentionDays The number of days to keep the Cloudwatch logs.

backupConfigurationsRequired
public readonly backupConfigurations: BackupConfiguration[];

Contains details on the git repositories to be backed up.


notificationEventsOptional
public readonly notificationEvents: EventType[];
  • Type: aws-cdk-lib.aws_s3.EventType[]

S3 events that will trigger a message to the SNS topic.

For example "EventType.LIFECYCLE_EXPIRATION" or "EventType.OBJECT_CREATED".


retentionDaysOptional
public readonly retentionDays: RetentionDays;
  • Type: aws-cdk-lib.aws_logs.RetentionDays
  • Default: RetentionDays.ONE_MONTH

The number of days to keep the Cloudwatch logs.


BackupConfiguration

A backup configuration defining - the repositories to backup, and - the backup interval All repositories that are part of a backup configuration are belonging to the same Azure DevOps organization and project.

Initializer

import { BackupConfiguration } from 'azure-devops-repository-archiver'

const backupConfiguration: BackupConfiguration = { ... }

Properties

Name Type Description
organizationName string The name of the Azure DevOps organization.
projectName string The name of the Azure DevOps project.
repositoryNames string[] The names of the git repositories to backup.
secretArn string ARN of the secret containing the token for accessing the git repositories of the Azure DevOps organization.
schedule aws-cdk-lib.aws_events.Schedule The schedule allows to define the frequency of backups.

organizationNameRequired
public readonly organizationName: string;
  • Type: string

The name of the Azure DevOps organization.


projectNameRequired
public readonly projectName: string;
  • Type: string

The name of the Azure DevOps project.


repositoryNamesRequired
public readonly repositoryNames: string[];
  • Type: string[]

The names of the git repositories to backup.


secretArnRequired
public readonly secretArn: string;
  • Type: string

ARN of the secret containing the token for accessing the git repositories of the Azure DevOps organization.


scheduleOptional
public readonly schedule: Schedule;
  • Type: aws-cdk-lib.aws_events.Schedule
  • Default: Schedule.expression('cron(0 0 ? * 1 *)')

The schedule allows to define the frequency of backups.

If not defined, a weekly backup is configured.