Skip to content

Latest commit

 

History

History
4457 lines (2661 loc) · 140 KB

API.md

File metadata and controls

4457 lines (2661 loc) · 140 KB

cloudstructs

High-level constructs for AWS CDK

Installation

npm install cloudstructs or yarn add cloudstructs

Version >= 0.2.0 requires AWS CDK v2.

Constructs

  • CodeCommitMirror Mirror a repository to AWS CodeCommit on schedule

  • EcsServiceRoller Roll your ECS service tasks on schedule or with a rule

  • EmailReceiver Receive emails through SES, save them to S3 and invoke a Lambda function

  • SlackApp Deploy Slack apps from manifests

  • SlackEvents Send Slack events to Amazon EventBridge

  • SlackTextract Extract text from images posted to Slack using Amazon Textract. The extracted text is posted in a thread under the image and gets indexed!

  • SslServerTest Test a server/host for SSL/TLS on schedule and get notified when the overall rating is not satisfactory. Powered by Qualys SSL Labs.

  • StateMachineCustomResourceProvider Implement custom resources with AWS Step Functions state machines

  • StaticWebsite A CloudFront static website hosted on S3 with HTTPS redirect, SPA redirect, HTTP security headers and backend configuration saved to the bucket.

  • ToolkitCleaner Clean unused S3 and ECR assets from your CDK Toolkit.

  • UrlShortener Deploy an URL shortener API

API Reference

Constructs

CodeCommitMirror

Mirror a repository to AWS CodeCommit on schedule.

Initializers

import { CodeCommitMirror } from 'cloudstructs'

new CodeCommitMirror(scope: Construct, id: string, props: CodeCommitMirrorProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props CodeCommitMirrorProps 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 { CodeCommitMirror } from 'cloudstructs'

CodeCommitMirror.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

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

The tree node.


DmarcReporter

Creates a DMARC record in Route 53 and invokes a Lambda function to process incoming reports.

Initializers

import { DmarcReporter } from 'cloudstructs'

new DmarcReporter(scope: Construct, id: string, props: DmarcReporterProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props DmarcReporterProps 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 { DmarcReporter } from 'cloudstructs'

DmarcReporter.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

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

The tree node.


EcsServiceRoller

Roll your ECS service tasks on schedule or with a rule.

Initializers

import { EcsServiceRoller } from 'cloudstructs'

new EcsServiceRoller(scope: Construct, id: string, props: EcsServiceRollerProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props EcsServiceRollerProps 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 { EcsServiceRoller } from 'cloudstructs'

EcsServiceRoller.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

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

The tree node.


EmailReceiver

Receive emails through SES, save them to S3 and invokes a Lambda function.

Initializers

import { EmailReceiver } from 'cloudstructs'

new EmailReceiver(scope: Construct, id: string, props: EmailReceiverProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props EmailReceiverProps 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 { EmailReceiver } from 'cloudstructs'

EmailReceiver.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

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

The tree node.


SamlIdentityProvider

Create a SAML identity provider.

Initializers

import { SamlIdentityProvider } from 'cloudstructs'

new SamlIdentityProvider(scope: Construct, id: string, props: SamlIdentityProviderProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SamlIdentityProviderProps 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 { SamlIdentityProvider } from 'cloudstructs'

SamlIdentityProvider.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
samlIdentityProviderArn string The ARN of the SAML identity provider.

nodeRequired
  • Deprecated: use SamlProvider from aws-cdk-lib/aws-iam
public readonly node: Node;
  • Type: constructs.Node

The tree node.


samlIdentityProviderArnRequired
  • Deprecated: use SamlProvider from aws-cdk-lib/aws-iam
public readonly samlIdentityProviderArn: string;
  • Type: string

The ARN of the SAML identity provider.


SlackApp

A Slack application deployed with a manifest.

https://api.slack.com/reference/manifests

Initializers

import { SlackApp } from 'cloudstructs'

new SlackApp(scope: Construct, id: string, props: SlackAppProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SlackAppProps 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 { SlackApp } from 'cloudstructs'

SlackApp.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
appId string The ID of the application.
clientId string A dynamic reference to the client ID of the app.
clientSecret string A dynamic reference to the client secret of the app.
credentials aws-cdk-lib.aws_secretsmanager.ISecret An AWS Secrets Manager secret containing the credentials of the application.
signingSecret string A dynamic reference to the signing secret of the app.
verificationToken string A dynamic reference to the verification token of the app.

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

The tree node.


appIdRequired
public readonly appId: string;
  • Type: string

The ID of the application.


clientIdRequired
public readonly clientId: string;
  • Type: string

A dynamic reference to the client ID of the app.


clientSecretRequired
public readonly clientSecret: string;
  • Type: string

A dynamic reference to the client secret of the app.


credentialsRequired
public readonly credentials: ISecret;
  • Type: aws-cdk-lib.aws_secretsmanager.ISecret

An AWS Secrets Manager secret containing the credentials of the application.

{
  "appId": "...",
  "clientId": "...",
  "clientSecret": "...",
  "verificationToken": "...",
  "signingSecret": "..."
}

signingSecretRequired
public readonly signingSecret: string;
  • Type: string

A dynamic reference to the signing secret of the app.


verificationTokenRequired
public readonly verificationToken: string;
  • Type: string

A dynamic reference to the verification token of the app.


SlackEvents

Send Slack events to Amazon EventBridge.

Initializers

import { SlackEvents } from 'cloudstructs'

new SlackEvents(scope: Construct, id: string, props: SlackEventsProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SlackEventsProps 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 { SlackEvents } from 'cloudstructs'

SlackEvents.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
eventBus aws-cdk-lib.aws_events.EventBus The custom event bus where Slack events are sent.

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

The tree node.


eventBusOptional
public readonly eventBus: EventBus;
  • Type: aws-cdk-lib.aws_events.EventBus

The custom event bus where Slack events are sent.


SlackTextract

Extract text from images posted to Slack using Amazon Textract.

Initializers

import { SlackTextract } from 'cloudstructs'

new SlackTextract(scope: Construct, id: string, props: SlackTextractProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SlackTextractProps 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 { SlackTextract } from 'cloudstructs'

SlackTextract.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

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

The tree node.


SslServerTest

Perform SSL server test for a hostname.

Initializers

import { SslServerTest } from 'cloudstructs'

new SslServerTest(scope: Construct, id: string, props: SslServerTestProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SslServerTestProps 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 { SslServerTest } from 'cloudstructs'

SslServerTest.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
alarmTopic aws-cdk-lib.aws_sns.ITopic The topic to which the SSL test results are sent when the grade is below the minimum grade.

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

The tree node.


alarmTopicRequired
public readonly alarmTopic: ITopic;
  • Type: aws-cdk-lib.aws_sns.ITopic

The topic to which the SSL test results are sent when the grade is below the minimum grade.


StateMachineCustomResourceProvider

A state machine custom resource provider.

Initializers

import { StateMachineCustomResourceProvider } from 'cloudstructs'

new StateMachineCustomResourceProvider(scope: Construct, id: string, props: StateMachineCustomResourceProviderProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props StateMachineCustomResourceProviderProps 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 { StateMachineCustomResourceProvider } from 'cloudstructs'

StateMachineCustomResourceProvider.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
serviceToken string The service token.

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

The tree node.


serviceTokenRequired
public readonly serviceToken: string;
  • Type: string

The service token.


StaticWebsite

A CloudFront static website hosted on S3.

Initializers

import { StaticWebsite } from 'cloudstructs'

new StaticWebsite(scope: Construct, id: string, props: StaticWebsiteProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props StaticWebsiteProps 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 { StaticWebsite } from 'cloudstructs'

StaticWebsite.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
defaultSecurityHeadersBehavior aws-cdk-lib.aws_cloudfront.ResponseSecurityHeadersBehavior Best practice security headers used as default.
bucket aws-cdk-lib.aws_s3.Bucket The S3 bucket of this static website.
distribution aws-cdk-lib.aws_cloudfront.Distribution The CloudFront distribution of this static website.

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

The tree node.


defaultSecurityHeadersBehaviorRequired
public readonly defaultSecurityHeadersBehavior: ResponseSecurityHeadersBehavior;
  • Type: aws-cdk-lib.aws_cloudfront.ResponseSecurityHeadersBehavior

Best practice security headers used as default.


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

The S3 bucket of this static website.


distributionRequired
public readonly distribution: Distribution;
  • Type: aws-cdk-lib.aws_cloudfront.Distribution

The CloudFront distribution of this static website.


ToolkitCleaner

Clean unused S3 and ECR assets from your CDK Toolkit.

Initializers

import { ToolkitCleaner } from 'cloudstructs'

new ToolkitCleaner(scope: Construct, id: string, props?: ToolkitCleanerProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props ToolkitCleanerProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional

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 { ToolkitCleaner } from 'cloudstructs'

ToolkitCleaner.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

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

The tree node.


UrlShortener

URL shortener.

Initializers

import { UrlShortener } from 'cloudstructs'

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

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
grantInvoke Grant access to invoke the URL shortener if protected by IAM authorization.

toString
public toString(): string

Returns a string representation of this construct.

grantInvoke
public grantInvoke(grantee: IGrantable): Grant

Grant access to invoke the URL shortener if protected by IAM authorization.

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

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { UrlShortener } from 'cloudstructs'

UrlShortener.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
api aws-cdk-lib.aws_apigateway.RestApi The underlying API Gateway REST API.
apiEndpoint string The endpoint of the URL shortener API.

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

The tree node.


apiRequired
public readonly api: RestApi;
  • Type: aws-cdk-lib.aws_apigateway.RestApi

The underlying API Gateway REST API.


apiEndpointRequired
public readonly apiEndpoint: string;
  • Type: string

The endpoint of the URL shortener API.


Structs

CodeCommitMirrorProps

Properties for a CodeCommitMirror.

Initializer

import { CodeCommitMirrorProps } from 'cloudstructs'

const codeCommitMirrorProps: CodeCommitMirrorProps = { ... }

Properties

Name Type Description
cluster aws-cdk-lib.aws_ecs.ICluster The ECS cluster where to run the mirroring operation.
repository CodeCommitMirrorSourceRepository The source repository.
schedule aws-cdk-lib.aws_events.Schedule The schedule for the mirroring operation.
subnetSelection aws-cdk-lib.aws_ec2.SubnetSelection Where to run the mirroring Fargate tasks.

clusterRequired
public readonly cluster: ICluster;
  • Type: aws-cdk-lib.aws_ecs.ICluster

The ECS cluster where to run the mirroring operation.


repositoryRequired
public readonly repository: CodeCommitMirrorSourceRepository;

The source repository.


scheduleOptional
public readonly schedule: Schedule;
  • Type: aws-cdk-lib.aws_events.Schedule
  • Default: everyday at midnight

The schedule for the mirroring operation.


subnetSelectionOptional
public readonly subnetSelection: SubnetSelection;
  • Type: aws-cdk-lib.aws_ec2.SubnetSelection
  • Default: public subnets

Where to run the mirroring Fargate tasks.


DmarcReporterProps

Properties for a DmarcReporter.

Initializer

import { DmarcReporterProps } from 'cloudstructs'

const dmarcReporterProps: DmarcReporterProps = { ... }

Properties

Name Type Description
dmarcPolicy DmarcPolicy The DMARC policy to apply to messages that fail DMARC compliance.
function aws-cdk-lib.aws_lambda.IFunction A Lambda function to invoke after the message is saved to S3.
hostedZone aws-cdk-lib.aws_route53.IHostedZone The Route 53 hosted zone to create the DMARC record in.
receiptRuleSet aws-cdk-lib.aws_ses.IReceiptRuleSet The SES receipt rule set where a receipt rule will be added.
additionalEmailAddresses string[] Additional email addresses to send DMARC reports to.
afterRule aws-cdk-lib.aws_ses.IReceiptRule An existing rule after which the new rule will be placed in the rule set.
dmarcDkimAlignment DmarcAlignment The alignment mode to use for DKIM signatures.
dmarcPercentage number The percentage of messages that should be checked for DMARC compliance.
dmarcSpfAlignment DmarcAlignment The alignment mode to use for SPF signatures.
dmarcSubdomainPolicy DmarcPolicy The DMARC policy to apply to messages that fail DMARC compliance for subdomains.
emailAddress string The email address to send DMARC reports to.

dmarcPolicyRequired
public readonly dmarcPolicy: DmarcPolicy;

The DMARC policy to apply to messages that fail DMARC compliance.

This can be one of the following values:

  • none: Do not apply any special handling to messages that fail DMARC compliance.
  • quarantine: Quarantine messages that fail DMARC compliance.
  • reject: Reject messages that fail DMARC compliance.

functionRequired
public readonly function: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

A Lambda function to invoke after the message is saved to S3.

The Lambda function will be invoked with a SESMessage as event.


hostedZoneRequired
public readonly hostedZone: IHostedZone;
  • Type: aws-cdk-lib.aws_route53.IHostedZone

The Route 53 hosted zone to create the DMARC record in.


receiptRuleSetRequired
public readonly receiptRuleSet: IReceiptRuleSet;
  • Type: aws-cdk-lib.aws_ses.IReceiptRuleSet

The SES receipt rule set where a receipt rule will be added.


additionalEmailAddressesOptional
public readonly additionalEmailAddresses: string[];
  • Type: string[]

Additional email addresses to send DMARC reports to.


afterRuleOptional
public readonly afterRule: IReceiptRule;
  • Type: aws-cdk-lib.aws_ses.IReceiptRule
  • Default: The new rule is inserted at the beginning of the rule list.

An existing rule after which the new rule will be placed in the rule set.


dmarcDkimAlignmentOptional
public readonly dmarcDkimAlignment: DmarcAlignment;

The alignment mode to use for DKIM signatures.

This can be one of the following values:

  • relaxed: Use relaxed alignment mode.
  • strict: Use strict alignment mode.

dmarcPercentageOptional
public readonly dmarcPercentage: number;
  • Type: number
  • Default: 100

The percentage of messages that should be checked for DMARC compliance.

This is a value between 0 and 100.


dmarcSpfAlignmentOptional
public readonly dmarcSpfAlignment: DmarcAlignment;

The alignment mode to use for SPF signatures.

This can be one of the following values:

  • relaxed: Use relaxed alignment mode.
  • strict: Use strict alignment mode.

dmarcSubdomainPolicyOptional
public readonly dmarcSubdomainPolicy: DmarcPolicy;
  • Type: DmarcPolicy
  • Default: inherited from dmarcPolicy

The DMARC policy to apply to messages that fail DMARC compliance for subdomains.

This can be one of the following values:

  • none: Do not apply any special handling to messages that fail DMARC compliance.
  • quarantine: Quarantine messages that fail DMARC compliance.
  • reject: Reject messages that fail DMARC compliance.

emailAddressOptional
public readonly emailAddress: string;
  • Type: string
  • Default: dmarc-reports@${hostedZone.zoneName}

The email address to send DMARC reports to.

This email address must be verified in SES.


EcsServiceRollerProps

Properties for a EcsServiceRoller.

Initializer

import { EcsServiceRollerProps } from 'cloudstructs'

const ecsServiceRollerProps: EcsServiceRollerProps = { ... }

Properties

Name Type Description
cluster aws-cdk-lib.aws_ecs.ICluster The ECS cluster where the services run.
service aws-cdk-lib.aws_ecs.IService The ECS service for which tasks should be rolled.
trigger RollTrigger The rule or schedule that should trigger a roll.

clusterRequired
public readonly cluster: ICluster;
  • Type: aws-cdk-lib.aws_ecs.ICluster

The ECS cluster where the services run.


serviceRequired
public readonly service: IService;
  • Type: aws-cdk-lib.aws_ecs.IService

The ECS service for which tasks should be rolled.


triggerOptional
public readonly trigger: RollTrigger;

The rule or schedule that should trigger a roll.


EmailReceiverProps

Properties for an EmailReceiver.

Initializer

import { EmailReceiverProps } from 'cloudstructs'

const emailReceiverProps: EmailReceiverProps = { ... }

Properties

Name Type Description
function aws-cdk-lib.aws_lambda.IFunction A Lambda function to invoke after the message is saved to S3.
receiptRuleSet aws-cdk-lib.aws_ses.IReceiptRuleSet The SES receipt rule set where a receipt rule will be added.
recipients string[] The recipients for which emails should be received.
afterRule aws-cdk-lib.aws_ses.IReceiptRule An existing rule after which the new rule will be placed in the rule set.
enabled boolean Whether the receiver is active.
sourceWhitelist string A regular expression to whitelist source email addresses.

functionRequired
public readonly function: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

A Lambda function to invoke after the message is saved to S3.

The Lambda function will be invoked with a SESMessage as event.


receiptRuleSetRequired
public readonly receiptRuleSet: IReceiptRuleSet;
  • Type: aws-cdk-lib.aws_ses.IReceiptRuleSet

The SES receipt rule set where a receipt rule will be added.


recipientsRequired
public readonly recipients: string[];
  • Type: string[]

The recipients for which emails should be received.


afterRuleOptional
public readonly afterRule: IReceiptRule;
  • Type: aws-cdk-lib.aws_ses.IReceiptRule
  • Default: The new rule is inserted at the beginning of the rule list.

An existing rule after which the new rule will be placed in the rule set.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean
  • Default: true

Whether the receiver is active.


sourceWhitelistOptional
public readonly sourceWhitelist: string;
  • Type: string
  • Default: no whitelisting of source email addresses

A regular expression to whitelist source email addresses.


SamlIdentityProviderProps

Properties for a SamlProvider.

Initializer

import { SamlIdentityProviderProps } from 'cloudstructs'

const samlIdentityProviderProps: SamlIdentityProviderProps = { ... }

Properties

Name Type Description
metadataDocument string An XML document generated by an identity provider (IdP) that supports SAML 2.0.
name string A name for the SAML identity provider.

metadataDocumentRequired
  • Deprecated: use SamlProviderProps from aws-cdk-lib/aws-iam
public readonly metadataDocument: string;
  • Type: string

An XML document generated by an identity provider (IdP) that supports SAML 2.0.

The document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization's IdP.


nameOptional
  • Deprecated: use SamlProviderProps from aws-cdk-lib/aws-iam
public readonly name: string;
  • Type: string
  • Default: derived for the node's unique id

A name for the SAML identity provider.


SlackAppManifestAppHome

App Home configuration.

https://api.slack.com/surfaces/tabs

Initializer

import { SlackAppManifestAppHome } from 'cloudstructs'

const slackAppManifestAppHome: SlackAppManifestAppHome = { ... }

Properties

Name Type Description
homeTab boolean Wether the Home tab is enabled.
messagesTab boolean Wether the Messages is enabled.
messagesTabReadOnly boolean Whether the users can send messages to your app in the Messages tab of your App Home.

homeTabOptional
public readonly homeTab: boolean;
  • Type: boolean
  • Default: false

Wether the Home tab is enabled.


messagesTabOptional
public readonly messagesTab: boolean;
  • Type: boolean
  • Default: false

Wether the Messages is enabled.


messagesTabReadOnlyOptional
public readonly messagesTabReadOnly: boolean;
  • Type: boolean
  • Default: false

Whether the users can send messages to your app in the Messages tab of your App Home.


SlackAppManifestEventSubscriptions

Events API configuration for the app.

https://api.slack.com/events-api

Initializer

import { SlackAppManifestEventSubscriptions } from 'cloudstructs'

const slackAppManifestEventSubscriptions: SlackAppManifestEventSubscriptions = { ... }

Properties

Name Type Description
requestUrl string The full https URL that acts as the Events API request URL.
botEvents string[] Event types you want the app to subscribe to.
userEvents string[] Event types you want the app to subscribe to on behalf of authorized users.

requestUrlRequired
public readonly requestUrl: string;
  • Type: string

The full https URL that acts as the Events API request URL.

https://api.slack.com/events-api#the-events-api__subscribing-to-event-types__events-api-request-urls


botEventsOptional
public readonly botEvents: string[];
  • Type: string[]

Event types you want the app to subscribe to.

A maximum of 100 event types can be used

https://api.slack.com/events


userEventsOptional
public readonly userEvents: string[];
  • Type: string[]

Event types you want the app to subscribe to on behalf of authorized users.

A maximum of 100 event types can be used.


SlackAppManifestInteractivity

Interactivity configuration for the app.

https://api.slack.com/interactivity/handling#setup

Initializer

import { SlackAppManifestInteractivity } from 'cloudstructs'

const slackAppManifestInteractivity: SlackAppManifestInteractivity = { ... }

Properties

Name Type Description
enabled boolean Whether or not interactivity features are enabled.
messageMenuOptionsUrl string The full https URL that acts as th interactive Options Load URL.
requestUrl string The full https URL that acts as the interactive Request URL.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean
  • Default: true

Whether or not interactivity features are enabled.


messageMenuOptionsUrlOptional
public readonly messageMenuOptionsUrl: string;
  • Type: string

The full https URL that acts as th interactive Options Load URL.


requestUrlOptional
public readonly requestUrl: string;
  • Type: string

The full https URL that acts as the interactive Request URL.


SlackAppManifestOauthConfig

OAuth configuration for the app.

Initializer

import { SlackAppManifestOauthConfig } from 'cloudstructs'

const slackAppManifestOauthConfig: SlackAppManifestOauthConfig = { ... }

Properties

Name Type Description
botScopes string[] Bot scopes to request upon app installation.
redirectUrls string[] OAuth redirect URLs.
userScopes string[] User scopes to request upon app installation.

botScopesOptional
public readonly botScopes: string[];
  • Type: string[]

Bot scopes to request upon app installation.

A maximum of 255 scopes can be included.

https://api.slack.com/scopes


redirectUrlsOptional
public readonly redirectUrls: string[];
  • Type: string[]

OAuth redirect URLs.

A maximum of 1000 redirect URLs can be included.

https://api.slack.com/authentication/oauth-v2#redirect_urls


userScopesOptional
public readonly userScopes: string[];
  • Type: string[]

User scopes to request upon app installation.

A maximum of 255 scopes can be included.

https://api.slack.com/scopes


SlackAppManifestProps

Properties for a Slack app manifest.

https://api.slack.com/reference/manifests

Initializer

import { SlackAppManifestProps } from 'cloudstructs'

const slackAppManifestProps: SlackAppManifestProps = { ... }

Properties

Name Type Description
name string The name of the app.
allowedIpAddressRanges string[] An array of IP addresses that conform to the Allowed IP Ranges feature.
appHome SlackAppManifestAppHome App Home configuration.
backgroundColor string A hex color value that specifies the background color used on hovercards that display information about your app.
botUser SlackkAppManifestBotUser Bot user configuration.
description string A short description of the app for display to users.
eventSubscriptions SlackAppManifestEventSubscriptions Events API configuration for the app.
interactivity SlackAppManifestInteractivity Interactivity configuration for the app.
longDescription string A longer version of the description of the app.
majorVersion number The major version of the manifest schema to target.
minorVersion number The minor version of the manifest schema to target.
oauthConfig SlackAppManifestOauthConfig OAuth configuration for the app.
orgDeploy boolean Whether org-wide deploy is enabled.
shortcuts SlackAppManifestShortcut[] Shortcuts configuration.
slashCommands SlackAppManifestSlashCommand[] Slash commands configuration.
socketMode boolean Whether Socket Mode is enabled.
unfurlDomains string[] Valid unfurl domains to register.
workflowSteps SlackAppManifestWorkflowStep[] Workflow steps.

nameRequired
public readonly name: string;
  • Type: string

The name of the app.

Maximum length is 35 characters.


allowedIpAddressRangesOptional
public readonly allowedIpAddressRanges: string[];
  • Type: string[]

An array of IP addresses that conform to the Allowed IP Ranges feature.

https://api.slack.com/authentication/best-practices#ip_allowlisting


appHomeOptional
public readonly appHome: SlackAppManifestAppHome;

App Home configuration.

https://api.slack.com/surfaces/tabs


backgroundColorOptional
public readonly backgroundColor: string;
  • Type: string

A hex color value that specifies the background color used on hovercards that display information about your app.

Can be 3-digit (#000) or 6-digit (#000000) hex values with or without #


botUserOptional
public readonly botUser: SlackkAppManifestBotUser;

Bot user configuration.

https://api.slack.com/bot-users


descriptionOptional
public readonly description: string;
  • Type: string
  • Default: no short description

A short description of the app for display to users.

Maximum length is 140 characters.


eventSubscriptionsOptional
public readonly eventSubscriptions: SlackAppManifestEventSubscriptions;

Events API configuration for the app.

https://api.slack.com/events-api


interactivityOptional
public readonly interactivity: SlackAppManifestInteractivity;

Interactivity configuration for the app.


longDescriptionOptional
public readonly longDescription: string;
  • Type: string

A longer version of the description of the app.

Maximum length is 4000 characters.


majorVersionOptional
public readonly majorVersion: number;
  • Type: number
  • Default: do not target a specific major version

The major version of the manifest schema to target.


minorVersionOptional
public readonly minorVersion: number;
  • Type: number
  • Default: do not target a specific minor version

The minor version of the manifest schema to target.


oauthConfigOptional
public readonly oauthConfig: SlackAppManifestOauthConfig;

OAuth configuration for the app.


orgDeployOptional
public readonly orgDeploy: boolean;
  • Type: boolean
  • Default: false

Whether org-wide deploy is enabled.

https://api.slack.com/enterprise/apps


shortcutsOptional
public readonly shortcuts: SlackAppManifestShortcut[];

Shortcuts configuration.

A maximum of 5 shortcuts can be included.

https://api.slack.com/interactivity/shortcuts


slashCommandsOptional
public readonly slashCommands: SlackAppManifestSlashCommand[];

Slash commands configuration.

A maximum of 5 slash commands can be included.

https://api.slack.com/interactivity/slash-commands


socketModeOptional
public readonly socketMode: boolean;
  • Type: boolean
  • Default: false

Whether Socket Mode is enabled.

https://api.slack.com/apis/connections/socket


unfurlDomainsOptional
public readonly unfurlDomains: string[];
  • Type: string[]

Valid unfurl domains to register.

A maximum of 5 unfurl domains can be included.

https://api.slack.com/reference/messaging/link-unfurling#configuring_domains


workflowStepsOptional
public readonly workflowSteps: SlackAppManifestWorkflowStep[];

Workflow steps.

A maximum of 10 workflow steps can be included.

https://api.slack.com/workflows/steps


SlackAppManifestSettings

Settings section of the app config pages.

Initializer

import { SlackAppManifestSettings } from 'cloudstructs'

const slackAppManifestSettings: SlackAppManifestSettings = { ... }

Properties

Name Type Description
allowedIpAddressRanges string[] An array of IP addresses that conform to the Allowed IP Ranges feature.
eventSubscriptions SlackAppManifestEventSubscriptions Events API configuration for the app.
interactivity SlackAppManifestInteractivity Interactivity configuration for the app.
orgDeploy boolean Whether org-wide deploy is enabled.
socketMode boolean Whether Socket Mode is enabled.

allowedIpAddressRangesOptional
public readonly allowedIpAddressRanges: string[];
  • Type: string[]

An array of IP addresses that conform to the Allowed IP Ranges feature.

https://api.slack.com/authentication/best-practices#ip_allowlisting


eventSubscriptionsOptional
public readonly eventSubscriptions: SlackAppManifestEventSubscriptions;

Events API configuration for the app.

https://api.slack.com/events-api


interactivityOptional
public readonly interactivity: SlackAppManifestInteractivity;

Interactivity configuration for the app.


orgDeployOptional
public readonly orgDeploy: boolean;
  • Type: boolean
  • Default: false

Whether org-wide deploy is enabled.

https://api.slack.com/enterprise/apps


socketModeOptional
public readonly socketMode: boolean;
  • Type: boolean
  • Default: false

Whether Socket Mode is enabled.

https://api.slack.com/apis/connections/socket


SlackAppManifestShortcut

Shortcut configuration.

https://api.slack.com/interactivity/shortcuts

Initializer

import { SlackAppManifestShortcut } from 'cloudstructs'

const slackAppManifestShortcut: SlackAppManifestShortcut = { ... }

Properties

Name Type Description
callbackId string The callback ID of the shortcut.
description string A short description of the shortcut.
name string The name of the shortcut.
type SlackAppManifestShortcutType The type of shortcut.

callbackIdRequired
public readonly callbackId: string;
  • Type: string

The callback ID of the shortcut.

Maximum length is 255 characters.


descriptionRequired
public readonly description: string;
  • Type: string

A short description of the shortcut.

Maximum length is 150 characters


nameRequired
public readonly name: string;
  • Type: string

The name of the shortcut.


typeRequired
public readonly type: SlackAppManifestShortcutType;

The type of shortcut.

https://api.slack.com/interactivity/shortcuts


SlackAppManifestSlashCommand

Slash command configuration.

https://api.slack.com/interactivity/slash-commands

Initializer

import { SlackAppManifestSlashCommand } from 'cloudstructs'

const slackAppManifestSlashCommand: SlackAppManifestSlashCommand = { ... }

Properties

Name Type Description
command string The actual slash command.
description string The description of the slash command.
shouldEscape boolean Whether channels, users, and links typed with the slash command should be escaped.
url string The full https URL that acts as the slash command's request URL.
usageHint string The short usage hint about the slash command for users.

commandRequired
public readonly command: string;
  • Type: string

The actual slash command.

Maximum length is 32 characters


descriptionRequired
public readonly description: string;
  • Type: string

The description of the slash command.

Maximum length is 2000 characters.


shouldEscapeOptional
public readonly shouldEscape: boolean;
  • Type: boolean
  • Default: false

Whether channels, users, and links typed with the slash command should be escaped.


urlOptional
public readonly url: string;
  • Type: string

The full https URL that acts as the slash command's request URL.

https://api.slack.com/interactivity/slash-commands#creating_commands


usageHintOptional
public readonly usageHint: string;
  • Type: string

The short usage hint about the slash command for users.

Maximum length is 1000 characters.


SlackAppManifestWorkflowStep

Workflow step.

https://api.slack.com/workflows/steps

Initializer

import { SlackAppManifestWorkflowStep } from 'cloudstructs'

const slackAppManifestWorkflowStep: SlackAppManifestWorkflowStep = { ... }

Properties

Name Type Description
callbackId string The callback ID of the workflow step.
name string The name of the workflow step.

callbackIdRequired
public readonly callbackId: string;
  • Type: string

The callback ID of the workflow step.

Maximum length of 50 characters.


nameRequired
public readonly name: string;
  • Type: string

The name of the workflow step.

Maximum length of 50 characters.


SlackAppProps

Properties for a SlackApp.

Initializer

import { SlackAppProps } from 'cloudstructs'

const slackAppProps: SlackAppProps = { ... }

Properties

Name Type Description
configurationTokenSecret aws-cdk-lib.aws_secretsmanager.ISecret An AWS Secrets Manager secret containing the app configuration token.
manifest SlackAppManifestDefinition The definition of the app manifest.
credentialsSecret aws-cdk-lib.aws_secretsmanager.ISecret The AWS Secrets Manager secret where to store the app credentials.

configurationTokenSecretRequired
public readonly configurationTokenSecret: ISecret;
  • Type: aws-cdk-lib.aws_secretsmanager.ISecret

An AWS Secrets Manager secret containing the app configuration token.

Must use the following JSON format:

{
  "refreshToken": "<token>"
}

manifestRequired
public readonly manifest: SlackAppManifestDefinition;

The definition of the app manifest.

https://api.slack.com/reference/manifests


credentialsSecretOptional
public readonly credentialsSecret: ISecret;
  • Type: aws-cdk-lib.aws_secretsmanager.ISecret
  • Default: a new secret is created

The AWS Secrets Manager secret where to store the app credentials.


SlackEventsProps

Properties for a SlackEvents.

Initializer

import { SlackEventsProps } from 'cloudstructs'

const slackEventsProps: SlackEventsProps = { ... }

Properties

Name Type Description
signingSecret aws-cdk-lib.SecretValue The signing secret of the Slack app.
apiName string A name for the API Gateway resource.
customEventBus boolean Whether to use a custom event bus.

signingSecretRequired
public readonly signingSecret: SecretValue;
  • Type: aws-cdk-lib.SecretValue

The signing secret of the Slack app.


apiNameOptional
public readonly apiName: string;
  • Type: string
  • Default: SlackEventsApi

A name for the API Gateway resource.


customEventBusOptional
public readonly customEventBus: boolean;
  • Type: boolean
  • Default: false

Whether to use a custom event bus.


SlackkAppManifestBotUser

Bot user configuration.

https://api.slack.com/bot-users

Initializer

import { SlackkAppManifestBotUser } from 'cloudstructs'

const slackkAppManifestBotUser: SlackkAppManifestBotUser = { ... }

Properties

Name Type Description
displayName string The display name of the bot user.
alwaysOnline boolean Whether the bot user will always appear to be online.

displayNameRequired
public readonly displayName: string;
  • Type: string

The display name of the bot user.

Maximum length is 80 characters.


alwaysOnlineOptional
public readonly alwaysOnline: boolean;
  • Type: boolean
  • Default: false

Whether the bot user will always appear to be online.


SlackTextractProps

Properties for a SlackTextract.

Initializer

import { SlackTextractProps } from 'cloudstructs'

const slackTextractProps: SlackTextractProps = { ... }

Properties

Name Type Description
appId string The application id of the Slack app.
botToken aws-cdk-lib.SecretValue The bot token of the Slack app.
signingSecret aws-cdk-lib.SecretValue The signing secret of the Slack app.

appIdRequired
public readonly appId: string;
  • Type: string

The application id of the Slack app.


botTokenRequired
public readonly botToken: SecretValue;
  • Type: aws-cdk-lib.SecretValue

The bot token of the Slack app.

The following scopes are required: chat:write and files:read


signingSecretRequired
public readonly signingSecret: SecretValue;
  • Type: aws-cdk-lib.SecretValue

The signing secret of the Slack app.


SslServerTestProps

Properties for a SslServerTest.

Initializer

import { SslServerTestProps } from 'cloudstructs'

const sslServerTestProps: SslServerTestProps = { ... }

Properties

Name Type Description
host string The hostname to test.
alarmTopic aws-cdk-lib.aws_sns.ITopic The topic to which the results must be sent when the grade is below the minimum grade.
minimumGrade SslServerTestGrade Minimum grade for the test. The grade is calculated using the worst grade of all endpoints.
schedule aws-cdk-lib.aws_events.Schedule The schedule for the test.

hostRequired
public readonly host: string;
  • Type: string

The hostname to test.


alarmTopicOptional
public readonly alarmTopic: ITopic;
  • Type: aws-cdk-lib.aws_sns.ITopic
  • Default: a new topic is created

The topic to which the results must be sent when the grade is below the minimum grade.


minimumGradeOptional
public readonly minimumGrade: SslServerTestGrade;

Minimum grade for the test. The grade is calculated using the worst grade of all endpoints.

Used to send the results to an alarm SNS topic.


scheduleOptional
public readonly schedule: Schedule;
  • Type: aws-cdk-lib.aws_events.Schedule
  • Default: every day

The schedule for the test.


StateMachineCustomResourceProviderProps

Properties for a StateMachineCustomResourceProvider.

Initializer

import { StateMachineCustomResourceProviderProps } from 'cloudstructs'

const stateMachineCustomResourceProviderProps: StateMachineCustomResourceProviderProps = { ... }

Properties

Name Type Description
stateMachine IStateMachine The state machine.
timeout aws-cdk-lib.Duration Timeout.

stateMachineRequired
public readonly stateMachine: IStateMachine;

The state machine.


timeoutOptional
public readonly timeout: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: Duration.minutes(30)

Timeout.


StaticWebsiteProps

Properties for a StaticWebsite.

Initializer

import { StaticWebsiteProps } from 'cloudstructs'

const staticWebsiteProps: StaticWebsiteProps = { ... }

Properties

Name Type Description
domainName string The domain name for this static website.
hostedZone aws-cdk-lib.aws_route53.IHostedZone The hosted zone where records should be added.
backendConfiguration any A backend configuration that will be saved as config.json in the S3 bucket of the static website.
cachePolicy aws-cdk-lib.aws_cloudfront.ICachePolicy Cache policy for the default behavior.
edgeLambdas aws-cdk-lib.aws_cloudfront.EdgeLambda[] The Lambda@Edge functions to invoke before serving the contents.
redirects string[] A list of domain names that should redirect to domainName.
responseHeadersPolicy aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicy Response headers policy for the default behavior.

domainNameRequired
public readonly domainName: string;
  • Type: string

The domain name for this static website.


Example

www.my-static-website.com
hostedZoneRequired
public readonly hostedZone: IHostedZone;
  • Type: aws-cdk-lib.aws_route53.IHostedZone

The hosted zone where records should be added.


backendConfigurationOptional
public readonly backendConfiguration: any;
  • Type: any

A backend configuration that will be saved as config.json in the S3 bucket of the static website.

The frontend can query this config by doing fetch('/config.json').


Example

{ userPoolId: '1234', apiEndoint: 'https://www.my-api.com/api' }
cachePolicyOptional
public readonly cachePolicy: ICachePolicy;
  • Type: aws-cdk-lib.aws_cloudfront.ICachePolicy
  • Default: CachePolicy.CACHING_OPTIMIZED

Cache policy for the default behavior.


edgeLambdasOptional
public readonly edgeLambdas: EdgeLambda[];
  • Type: aws-cdk-lib.aws_cloudfront.EdgeLambda[]
  • Default: an origin request function that redirects all requests for a path to /index.html

The Lambda@Edge functions to invoke before serving the contents.


redirectsOptional
public readonly redirects: string[];
  • Type: string[]
  • Default: the domain name of the hosted zone

A list of domain names that should redirect to domainName.


responseHeadersPolicyOptional
public readonly responseHeadersPolicy: ResponseHeadersPolicy;
  • Type: aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicy
  • Default: a new policy is created with best practice security headers

Response headers policy for the default behavior.


ToolkitCleanerProps

Properties for a ToolkitCleaner.

Initializer

import { ToolkitCleanerProps } from 'cloudstructs'

const toolkitCleanerProps: ToolkitCleanerProps = { ... }

Properties

Name Type Description
dryRun boolean Only output number of assets and total size that would be deleted but without actually deleting assets.
retainAssetsNewerThan aws-cdk-lib.Duration Retain unused assets that were created recently.
schedule aws-cdk-lib.aws_events.Schedule The schedule for the cleaner.
scheduleEnabled boolean Whether to clean on schedule.

dryRunOptional
public readonly dryRun: boolean;
  • Type: boolean

Only output number of assets and total size that would be deleted but without actually deleting assets.


retainAssetsNewerThanOptional
public readonly retainAssetsNewerThan: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: all unused assets are removed

Retain unused assets that were created recently.


scheduleOptional
public readonly schedule: Schedule;
  • Type: aws-cdk-lib.aws_events.Schedule
  • Default: every day

The schedule for the cleaner.


scheduleEnabledOptional
public readonly scheduleEnabled: boolean;
  • Type: boolean
  • Default: true

Whether to clean on schedule.

If you'd like to run the cleanup manually via the console, set to false.


UrlShortenerProps

Properties for a UrlShortener.

Initializer

import { UrlShortenerProps } from 'cloudstructs'

const urlShortenerProps: UrlShortenerProps = { ... }

Properties

Name Type Description
hostedZone aws-cdk-lib.aws_route53.IHostedZone The hosted zone for the short URLs domain.
apiGatewayAuthorizer aws-cdk-lib.aws_apigateway.IAuthorizer Authorizer for API gateway.
apiGatewayEndpoint aws-cdk-lib.aws_ec2.IInterfaceVpcEndpoint An interface VPC endpoint for API gateway.
bucketName string A name for the bucket saving the redirects.
corsAllowOrigins string[] Allowed origins for CORS.
expiration aws-cdk-lib.Duration Expiration for short urls.
iamAuthorization boolean Whether to use IAM authorization.
recordName string The record name to use in the hosted zone.

hostedZoneRequired
public readonly hostedZone: IHostedZone;
  • Type: aws-cdk-lib.aws_route53.IHostedZone

The hosted zone for the short URLs domain.


apiGatewayAuthorizerOptional
public readonly apiGatewayAuthorizer: IAuthorizer;
  • Type: aws-cdk-lib.aws_apigateway.IAuthorizer
  • Default: do not use an authorizer for the API

Authorizer for API gateway.


apiGatewayEndpointOptional
public readonly apiGatewayEndpoint: IInterfaceVpcEndpoint;
  • Type: aws-cdk-lib.aws_ec2.IInterfaceVpcEndpoint
  • Default: API is public

An interface VPC endpoint for API gateway.

Specifying this property will make the API private.

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html


bucketNameOptional
public readonly bucketName: string;
  • Type: string
  • Default: derived from short link domain name

A name for the bucket saving the redirects.


corsAllowOriginsOptional
public readonly corsAllowOrigins: string[];
  • Type: string[]
  • Default: CORS is not enabled

Allowed origins for CORS.


expirationOptional
public readonly expiration: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: cdk.Duration.days(365)

Expiration for short urls.


iamAuthorizationOptional
public readonly iamAuthorization: boolean;
  • Type: boolean
  • Default: do not use IAM authorization

Whether to use IAM authorization.


recordNameOptional
public readonly recordName: string;
  • Type: string
  • Default: zone root

The record name to use in the hosted zone.


Classes

CodeCommitMirrorSourceRepository

A source repository for AWS CodeCommit mirroring.

Initializers

import { CodeCommitMirrorSourceRepository } from 'cloudstructs'

new CodeCommitMirrorSourceRepository()
Name Type Description

Static Functions

Name Description
gitHub Public GitHub repository.
private Private repository with HTTPS clone URL stored in a AWS Secrets Manager secret or a AWS Systems Manager secure string parameter.

gitHub
import { CodeCommitMirrorSourceRepository } from 'cloudstructs'

CodeCommitMirrorSourceRepository.gitHub(owner: string, name: string)

Public GitHub repository.

ownerRequired
  • Type: string

nameRequired
  • Type: string

private
import { CodeCommitMirrorSourceRepository } from 'cloudstructs'

CodeCommitMirrorSourceRepository.private(name: string, url: Secret)

Private repository with HTTPS clone URL stored in a AWS Secrets Manager secret or a AWS Systems Manager secure string parameter.

nameRequired
  • Type: string

the repository name.


urlRequired
  • Type: aws-cdk-lib.aws_ecs.Secret

the secret containing the HTTPS clone URL.


Properties

Name Type Description
name string The name of the repository.
plainTextUrl string The HTTPS clone URL in plain text, used for a public repository.
secretUrl aws-cdk-lib.aws_ecs.Secret The HTTPS clone URL if the repository is private.

nameRequired
public readonly name: string;
  • Type: string

The name of the repository.


plainTextUrlOptional
public readonly plainTextUrl: string;
  • Type: string

The HTTPS clone URL in plain text, used for a public repository.


secretUrlOptional
public readonly secretUrl: Secret;
  • Type: aws-cdk-lib.aws_ecs.Secret

The HTTPS clone URL if the repository is private.

The secret should contain the username and/or token.


Example

`https://TOKEN@github.com/owner/name`
`https://USERNAME:TOKEN@bitbucket.org/owner/name.git`

RollTrigger

The rule or schedule that should trigger a roll.

Initializers

import { RollTrigger } from 'cloudstructs'

new RollTrigger()
Name Type Description

Static Functions

Name Description
fromRule Rule that should trigger a roll.
fromSchedule Schedule that should trigger a roll.

fromRule
import { RollTrigger } from 'cloudstructs'

RollTrigger.fromRule(rule: Rule)

Rule that should trigger a roll.

ruleRequired
  • Type: aws-cdk-lib.aws_events.Rule

fromSchedule
import { RollTrigger } from 'cloudstructs'

RollTrigger.fromSchedule(schedule: Schedule)

Schedule that should trigger a roll.

scheduleRequired
  • Type: aws-cdk-lib.aws_events.Schedule

Properties

Name Type Description
rule aws-cdk-lib.aws_events.Rule Roll rule.
schedule aws-cdk-lib.aws_events.Schedule Roll schedule.

ruleOptional
public readonly rule: Rule;
  • Type: aws-cdk-lib.aws_events.Rule
  • Default: roll everyday at midnight

Roll rule.


scheduleOptional
public readonly schedule: Schedule;
  • Type: aws-cdk-lib.aws_events.Schedule
  • Default: roll everyday at midnight

Roll schedule.


SamlFederatedPrincipal

Principal entity that represents a SAML federated identity provider.

Initializers

import { SamlFederatedPrincipal } from 'cloudstructs'

new SamlFederatedPrincipal(identityProvider: SamlIdentityProvider)
Name Type Description
identityProvider SamlIdentityProvider No description.

identityProviderRequired

Methods

Name Description
addToAssumeRolePolicy Add the principal to the AssumeRolePolicyDocument.
addToPolicy Add to the policy of this principal.
addToPrincipalPolicy Add to the policy of this principal.
dedupeString Return whether or not this principal is equal to the given principal.
toJSON JSON-ify the principal.
toString Returns a string representation of an object.
withConditions Returns a new PrincipalWithConditions using this principal as the base, with the passed conditions added.
withSessionTags Returns a new principal using this principal as the base, with session tags enabled.

addToAssumeRolePolicy
public addToAssumeRolePolicy(document: PolicyDocument): void

Add the principal to the AssumeRolePolicyDocument.

Add the statements to the AssumeRolePolicyDocument necessary to give this principal permissions to assume the given role.

documentRequired
  • Type: aws-cdk-lib.aws_iam.PolicyDocument

addToPolicy
public addToPolicy(statement: PolicyStatement): boolean

Add to the policy of this principal.

statementRequired
  • Type: aws-cdk-lib.aws_iam.PolicyStatement

addToPrincipalPolicy
public addToPrincipalPolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult

Add to the policy of this principal.

_statementRequired
  • Type: aws-cdk-lib.aws_iam.PolicyStatement

dedupeString
public dedupeString(): string

Return whether or not this principal is equal to the given principal.

toJSON
public toJSON(): {[ key: string ]: string[]}

JSON-ify the principal.

Used when JSON.stringify() is called

toString
public toString(): string

Returns a string representation of an object.

withConditions
public withConditions(conditions: {[ key: string ]: any}): PrincipalBase

Returns a new PrincipalWithConditions using this principal as the base, with the passed conditions added.

When there is a value for the same operator and key in both the principal and the conditions parameter, the value from the conditions parameter will be used.

conditionsRequired
  • Type: {[ key: string ]: any}

withSessionTags
public withSessionTags(): PrincipalBase

Returns a new principal using this principal as the base, with session tags enabled.

Properties

Name Type Description
assumeRoleAction string When this Principal is used in an AssumeRole policy, the action to use.
grantPrincipal aws-cdk-lib.aws_iam.IPrincipal The principal to grant permissions to.
policyFragment aws-cdk-lib.aws_iam.PrincipalPolicyFragment Return the policy fragment that identifies this principal in a Policy.
principalAccount string The AWS account ID of this principal.
conditions {[ key: string ]: any} The conditions under which the policy is in effect.
federated string federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).

assumeRoleActionRequired
  • Deprecated: use SamlPrincipal from aws-cdk-lib/aws-iam
public readonly assumeRoleAction: string;
  • Type: string

When this Principal is used in an AssumeRole policy, the action to use.


grantPrincipalRequired
  • Deprecated: use SamlPrincipal from aws-cdk-lib/aws-iam
public readonly grantPrincipal: IPrincipal;
  • Type: aws-cdk-lib.aws_iam.IPrincipal

The principal to grant permissions to.


policyFragmentRequired
  • Deprecated: use SamlPrincipal from aws-cdk-lib/aws-iam
public readonly policyFragment: PrincipalPolicyFragment;
  • Type: aws-cdk-lib.aws_iam.PrincipalPolicyFragment

Return the policy fragment that identifies this principal in a Policy.


principalAccountOptional
  • Deprecated: use SamlPrincipal from aws-cdk-lib/aws-iam
public readonly principalAccount: string;
  • Type: string

The AWS account ID of this principal.

Can be undefined when the account is not known (for example, for service principals). Can be a Token - in that case, it's assumed to be AWS::AccountId.


conditionsRequired
  • Deprecated: use SamlPrincipal from aws-cdk-lib/aws-iam
public readonly conditions: {[ key: string ]: any};
  • Type: {[ key: string ]: any}

The conditions under which the policy is in effect.

https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html


federatedRequired
  • Deprecated: use SamlPrincipal from aws-cdk-lib/aws-iam
public readonly federated: string;
  • Type: string

federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).


SlackAppManifest

A Slack app manifest.

https://api.slack.com/reference/manifests

Initializers

import { SlackAppManifest } from 'cloudstructs'

new SlackAppManifest(props: SlackAppManifestProps)
Name Type Description
props SlackAppManifestProps No description.

propsRequired

Methods

Name Description
render No description.

render
public render(construct: IConstruct): string
constructRequired
  • Type: constructs.IConstruct

SlackAppManifestDefinition

A Slack app manifest definition.

Initializers

import { SlackAppManifestDefinition } from 'cloudstructs'

new SlackAppManifestDefinition()
Name Type Description

Methods

Name Description
render Renders the JSON app manifest encoded as a string.

render
public render(construct: IConstruct): string

Renders the JSON app manifest encoded as a string.

constructRequired
  • Type: constructs.IConstruct

Static Functions

Name Description
fromFile Creates a Slack app manifest from a file containg a JSON app manifest.
fromManifest Creates a Slack app manifest by specifying properties.
fromString Create a Slack app manifest from a JSON app manifest encoded as a string.

fromFile
import { SlackAppManifestDefinition } from 'cloudstructs'

SlackAppManifestDefinition.fromFile(file: string)

Creates a Slack app manifest from a file containg a JSON app manifest.

fileRequired
  • Type: string

fromManifest
import { SlackAppManifestDefinition } from 'cloudstructs'

SlackAppManifestDefinition.fromManifest(props: SlackAppManifestProps)

Creates a Slack app manifest by specifying properties.

propsRequired

fromString
import { SlackAppManifestDefinition } from 'cloudstructs'

SlackAppManifestDefinition.fromString(manifest: string)

Create a Slack app manifest from a JSON app manifest encoded as a string.

manifestRequired
  • Type: string

Protocols

IStateMachine

A State Machine.

Properties

Name Type Description
stateMachineArn string The ARN of the state machine.

stateMachineArnRequired
public readonly stateMachineArn: string;
  • Type: string

The ARN of the state machine.


Enums

DmarcAlignment

The DMARC alignment mode.

Members

Name Description
RELAXED Relaxed alignment mode.
STRICT Strict alignment mode.

RELAXED

Relaxed alignment mode.


STRICT

Strict alignment mode.


DmarcPolicy

The DMARC policy to apply to messages that fail DMARC compliance.

Members

Name Description
NONE Do not apply any special handling to messages that fail DMARC compliance.
QUARANTINE Quarantine messages that fail DMARC compliance.
REJECT Reject messages that fail DMARC compliance.

NONE

Do not apply any special handling to messages that fail DMARC compliance.


QUARANTINE

Quarantine messages that fail DMARC compliance.

(usually by sending them to spam)


REJECT

Reject messages that fail DMARC compliance.

(usually by rejecting them outright)


SlackAppManifestShortcutType

Type of shortcuts.

https://api.slack.com/interactivity/shortcuts

Members

Name Description
MESSAGE Message shortcuts are shown to users in the context menus of messages within Slack.
GLOBAL Global shortcuts are available to users via the shortcuts button in the composer, and when using search in Slack.

MESSAGE

Message shortcuts are shown to users in the context menus of messages within Slack.

https://api.slack.com/interactivity/shortcuts/using#message_shortcuts


GLOBAL

Global shortcuts are available to users via the shortcuts button in the composer, and when using search in Slack.

https://api.slack.com/interactivity/shortcuts/using#global_shortcuts


SslServerTestGrade

SSL Server test grade.

Members

Name Description
A_PLUS No description.
A No description.
A_MINUS No description.
B No description.
C No description.
D No description.
E No description.
F No description.

A_PLUS

A

A_MINUS

B

C

D

E

F