Skip to content

Latest commit

 

History

History
296 lines (188 loc) · 19.9 KB

File metadata and controls

296 lines (188 loc) · 19.9 KB

API Reference

Classes

Name Description
BackupBucket No description
FullRegionS3CodeCommitBackup No description
S3CodeCommitBackup No description

Structs

Name Description
BackupBucketProps No description
FullRegionS3CodeCommitBackupProps No description
S3CodeCommitBackupProps No description

class BackupBucket

Implements: IConstruct, IConstruct, IConstruct, IDependable, IResource, IConstruct, IDependable, IConstruct, IBucket, IConstruct, IDependable, IConstruct, IResource Extends: Bucket

Initializer

new BackupBucket(scope: Construct, id: string, props?: BackupBucketProps)
  • scope (Construct) No description
  • id (string) No description
  • props (BackupBucketProps) No description
    • accessControl (BucketAccessControl) Specifies a canned ACL that grants predefined permissions to the bucket. Default: BucketAccessControl.PRIVATE
    • blockPublicAccess (BlockPublicAccess) The block public access configuration of this bucket. Default: false New buckets and objects don't allow public access, but users can modify bucket policies or object permissions to allow public access.
    • bucketName (string) Physical name of this bucket. Default: Assigned by CloudFormation (recommended).
    • cors (Array<CorsRule>) The CORS configuration of this bucket. Default: No CORS configuration.
    • encryption (BucketEncryption) The kind of server-side encryption to apply to this bucket. Default: Kms if encryptionKey is specified, or Unencrypted otherwise.
    • encryptionKey (IKey) External KMS key to use for bucket encryption. Default: If encryption is set to "Kms" and this property is undefined, a new KMS key will be created and associated with this bucket.
    • inventories (Array<Inventory>) The inventory configuration of the bucket. Default: No inventory configuration
    • lifecycleRules (Array<LifecycleRule>) Rules that define how Amazon S3 manages objects during their lifetime. Default: No lifecycle rules.
    • metrics (Array<BucketMetrics>) The metrics configuration of this bucket. Default: No metrics configuration.
    • objectOwnership (ObjectOwnership) The objectOwnership of the bucket. Default: No ObjectOwnership configuration, uploading account will own the object.
    • publicReadAccess (boolean) Grants public read access to all objects in the bucket. Default: false
    • removalPolicy (RemovalPolicy) Policy to apply when the bucket is removed from this stack. Default: The bucket will be orphaned.
    • serverAccessLogsBucket (IBucket) Destination bucket for the server access logs. Default: If "serverAccessLogsPrefix" undefined - access logs disabled, otherwise - log to current bucket.
    • serverAccessLogsPrefix (string) Optional log file prefix to use for the bucket's access logs. Default: No log file prefix
    • versioned (boolean) Whether this bucket should have versioning turned on or not. Default: false
    • websiteErrorDocument (string) The name of the error document (e.g. "404.html") for the website. websiteIndexDocument must also be set if this is set. Default: No error document.
    • websiteIndexDocument (string) The name of the index document (e.g. "index.html") for the website. Enables static website hosting for this bucket. Default: No index document.
    • websiteRedirect (RedirectTarget) Specifies the redirect behavior of all requests to a website endpoint of a bucket. Default: No redirection.
    • websiteRoutingRules (Array<RoutingRule>) Rules that define when a redirect is applied and the redirect behavior. Default: No redirection rules.
    • retentionPeriod (Duration) No description Optional

class FullRegionS3CodeCommitBackup

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new FullRegionS3CodeCommitBackup(scope: Construct, id: string, props: FullRegionS3CodeCommitBackupProps)
  • scope (Construct) No description
  • id (string) No description
  • props (FullRegionS3CodeCommitBackupProps) No description
    • backupBucket (Bucket) Bucket for storing the backups.
    • schedule (Schedule) Schedule for backups.
    • computeType (ComputeType) The type of compute to use for backup the repositories. Default: taken from {@link #buildImage#defaultComputeType}
    • repositoryNames (Array) The names of the repositories in the region to be backed up. Default: All repositories in the region

Methods

onBackupFailed(id, options?)

Defines an event rule which triggers when a backup fails.

onBackupFailed(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

onBackupStarted(id, options?)

Defines an event rule which triggers when a backup starts.

onBackupStarted(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

onBackupSucceeded(id, options?)

Defines an event rule which triggers when a backup complets successfully.

onBackupSucceeded(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

class S3CodeCommitBackup

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new S3CodeCommitBackup(scope: Construct, id: string, props: S3CodeCommitBackupProps)
  • scope (Construct) No description
  • id (string) No description
  • props (S3CodeCommitBackupProps) No description
    • backupBucket (Bucket) Bucket for storing the backups.
    • repository (IRepository) Repository to be backed up.
    • schedule (Schedule) Schedule for backups.
    • computeType (ComputeType) The type of compute to use for backup the repositories. Default: taken from {@link #buildImage#defaultComputeType}

Methods

onBackupFailed(id, options?)

Defines an event rule which triggers when a backup fails.

onBackupFailed(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

onBackupStarted(id, options?)

Defines an event rule which triggers when a backup starts.

onBackupStarted(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

onBackupSucceeded(id, options?)

Defines an event rule which triggers when a backup complets successfully.

onBackupSucceeded(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

struct BackupBucketProps

Name Type Description
accessControl? BucketAccessControl Specifies a canned ACL that grants predefined permissions to the bucket.
Default: BucketAccessControl.PRIVATE
blockPublicAccess? BlockPublicAccess The block public access configuration of this bucket.
Default: false New buckets and objects don't allow public access, but users can modify bucket policies or object permissions to allow public access.
bucketName? string Physical name of this bucket.
Default: Assigned by CloudFormation (recommended).
cors? Array<CorsRule> The CORS configuration of this bucket.
Default: No CORS configuration.
encryption? BucketEncryption The kind of server-side encryption to apply to this bucket.
Default: Kms if encryptionKey is specified, or Unencrypted otherwise.
encryptionKey? IKey External KMS key to use for bucket encryption.
Default: If encryption is set to "Kms" and this property is undefined, a new KMS key will be created and associated with this bucket.
inventories? Array<Inventory> The inventory configuration of the bucket.
Default: No inventory configuration
lifecycleRules? Array<LifecycleRule> Rules that define how Amazon S3 manages objects during their lifetime.
Default: No lifecycle rules.
metrics? Array<BucketMetrics> The metrics configuration of this bucket.
Default: No metrics configuration.
objectOwnership? ObjectOwnership The objectOwnership of the bucket.
Default: No ObjectOwnership configuration, uploading account will own the object.
publicReadAccess? boolean Grants public read access to all objects in the bucket.
Default: false
removalPolicy? RemovalPolicy Policy to apply when the bucket is removed from this stack.
Default: The bucket will be orphaned.
retentionPeriod? Duration Optional
serverAccessLogsBucket? IBucket Destination bucket for the server access logs.
Default: If "serverAccessLogsPrefix" undefined - access logs disabled, otherwise - log to current bucket.
serverAccessLogsPrefix? string Optional log file prefix to use for the bucket's access logs.
Default: No log file prefix
versioned? boolean Whether this bucket should have versioning turned on or not.
Default: false
websiteErrorDocument? string The name of the error document (e.g. "404.html") for the website. websiteIndexDocument must also be set if this is set.
Default: No error document.
websiteIndexDocument? string The name of the index document (e.g. "index.html") for the website. Enables static website hosting for this bucket.
Default: No index document.
websiteRedirect? RedirectTarget Specifies the redirect behavior of all requests to a website endpoint of a bucket.
Default: No redirection.
websiteRoutingRules? Array<RoutingRule> Rules that define when a redirect is applied and the redirect behavior.
Default: No redirection rules.

struct FullRegionS3CodeCommitBackupProps

Name Type Description
backupBucket Bucket Bucket for storing the backups.
schedule Schedule Schedule for backups.
computeType? ComputeType The type of compute to use for backup the repositories.
Default: taken from {@link #buildImage#defaultComputeType}
repositoryNames? Array The names of the repositories in the region to be backed up.
Default: All repositories in the region

struct S3CodeCommitBackupProps

Name Type Description
backupBucket Bucket Bucket for storing the backups.
repository IRepository Repository to be backed up.
schedule Schedule Schedule for backups.
computeType? ComputeType The type of compute to use for backup the repositories.
Default: taken from {@link #buildImage#defaultComputeType}