awscdk

package module
v2.0.0-rc.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 8 Imported by: 264

README ¶

AWS Cloud Development Kit Library

experimental

The AWS CDK construct library provides APIs to define your CDK application and add CDK constructs to the application.

Usage

Upgrade from CDK 1.x

When upgrading from CDK 1.x, remove all dependencies to individual CDK packages from your dependencies file and follow the rest of the sections.

Installation

To use this package, you need to declare this package and the constructs package as dependencies.

According to the kind of project you are developing:

  • For projects that are CDK libraries, declare them both under the devDependencies and peerDependencies sections.
  • For CDK apps, declare them under the dependencies section only.
Use in your code
Classic import

You can use a classic import to get access to each service namespaces:

import { Stack, App, aws_s3 as s3 } from 'aws-cdk-lib';

const app = new App();
const stack = new Stack(app, 'TestStack');

new s3.Bucket(stack, 'TestBucket');
Barrel import

Alternatively, you can use "barrel" imports:

import { App, Stack } from 'aws-cdk-lib';
import { Bucket } from 'aws-cdk-lib/aws-s3';

const app = new App();
const stack = new Stack(app, 'TestStack');

new Bucket(stack, 'TestBucket');

Stacks and Stages

A Stack is the smallest physical unit of deployment, and maps directly onto a CloudFormation Stack. You define a Stack by defining a subclass of Stack -- let's call it MyStack -- and instantiating the constructs that make up your application in MyStack's constructor. You then instantiate this stack one or more times to define different instances of your application. For example, you can instantiate it once using few and cheap EC2 instances for testing, and once again using more and bigger EC2 instances for production.

When your application grows, you may decide that it makes more sense to split it out across multiple Stack classes. This can happen for a number of reasons:

  • You could be starting to reach the maximum number of resources allowed in a single stack (this is currently 500).
  • You could decide you want to separate out stateful resources and stateless resources into separate stacks, so that it becomes easy to tear down and recreate the stacks that don't have stateful resources.
  • There could be a single stack with resources (like a VPC) that are shared between multiple instances of other stacks containing your applications.

As soon as your conceptual application starts to encompass multiple stacks, it is convenient to wrap them in another construct that represents your logical application. You can then treat that new unit the same way you used to be able to treat a single stack: by instantiating it multiple times for different instances of your application.

You can define a custom subclass of Construct, holding one or more Stacks, to represent a single logical instance of your application.

As a final note: Stacks are not a unit of reuse. They describe physical deployment layouts, and as such are best left to application builders to organize their deployments with. If you want to vend a reusable construct, define it as a subclasses of Construct: the consumers of your construct will decide where to place it in their own stacks.

Nested Stacks

Nested stacks are stacks created as part of other stacks. You create a nested stack within another stack by using the NestedStack construct.

As your infrastructure grows, common patterns can emerge in which you declare the same components in multiple templates. You can separate out these common components and create dedicated templates for them. Then use the resource in your template to reference other templates, creating nested stacks.

For example, assume that you have a load balancer configuration that you use for most of your stacks. Instead of copying and pasting the same configurations into your templates, you can create a dedicated template for the load balancer. Then, you just use the resource to reference that template from within other templates.

The following example will define a single top-level stack that contains two nested stacks: each one with a single Amazon S3 bucket:

class MyNestedStack extends cfn.NestedStack {
  constructor(scope: Construct, id: string, props?: cfn.NestedStackProps) {
    super(scope, id, props);

    new s3.Bucket(this, 'NestedBucket');
  }
}

class MyParentStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    new MyNestedStack(this, 'Nested1');
    new MyNestedStack(this, 'Nested2');
  }
}

Resources references across nested/parent boundaries (even with multiple levels of nesting) will be wired by the AWS CDK through CloudFormation parameters and outputs. When a resource from a parent stack is referenced by a nested stack, a CloudFormation parameter will automatically be added to the nested stack and assigned from the parent; when a resource from a nested stack is referenced by a parent stack, a CloudFormation output will be automatically be added to the nested stack and referenced using Fn::GetAtt "Outputs.Xxx" from the parent.

Nested stacks also support the use of Docker image and file assets.

Accessing resources in a different stack

You can access resources in a different stack, as long as they are in the same account and AWS Region. The following example defines the stack stack1, which defines an Amazon S3 bucket. Then it defines a second stack, stack2, which takes the bucket from stack1 as a constructor property.

const prod = { account: '123456789012', region: 'us-east-1' };

const stack1 = new StackThatProvidesABucket(app, 'Stack1' , { env: prod });

// stack2 will take a property { bucket: IBucket }
const stack2 = new StackThatExpectsABucket(app, 'Stack2', {
  bucket: stack1.bucket,
  env: prod
});

If the AWS CDK determines that the resource is in the same account and Region, but in a different stack, it automatically synthesizes AWS CloudFormation Exports in the producing stack and an Fn::ImportValue in the consuming stack to transfer that information from one stack to the other.

Removing automatic cross-stack references

The automatic references created by CDK when you use resources across stacks are convenient, but may block your deployments if you want to remove the resources that are referenced in this way. You will see an error like:

Export Stack1:ExportsOutputFnGetAtt-****** cannot be deleted as it is in use by Stack1

Let's say there is a Bucket in the stack1, and the stack2 references its bucket.bucketName. You now want to remove the bucket and run into the error above.

It's not safe to remove stack1.bucket while stack2 is still using it, so unblocking yourself from this is a two-step process. This is how it works:

DEPLOYMENT 1: break the relationship

  • Make sure stack2 no longer references bucket.bucketName (maybe the consumer stack now uses its own bucket, or it writes to an AWS DynamoDB table, or maybe you just remove the Lambda Function altogether).
  • In the stack1 class, call this.exportValue(this.bucket.bucketName). This will make sure the CloudFormation Export continues to exist while the relationship between the two stacks is being broken.
  • Deploy (this will effectively only change the stack2, but it's safe to deploy both).

DEPLOYMENT 2: remove the resource

  • You are now free to remove the bucket resource from stack1.
  • Don't forget to remove the exportValue() call as well.
  • Deploy again (this time only the stack1 will be changed -- the bucket will be deleted).

Durations

To make specifications of time intervals unambiguous, a single class called Duration is used throughout the AWS Construct Library by all constructs that that take a time interval as a parameter (be it for a timeout, a rate, or something else).

An instance of Duration is constructed by using one of the static factory methods on it:

Duration.seconds(300)   // 5 minutes
Duration.minutes(5)     // 5 minutes
Duration.hours(1)       // 1 hour
Duration.days(7)        // 7 days
Duration.parse('PT5M')  // 5 minutes

Size (Digital Information Quantity)

To make specification of digital storage quantities unambiguous, a class called Size is available.

An instance of Size is initialized through one of its static factory methods:

Size.kibibytes(200) // 200 KiB
Size.mebibytes(5)   // 5 MiB
Size.gibibytes(40)  // 40 GiB
Size.tebibytes(200) // 200 TiB
Size.pebibytes(3)   // 3 PiB

Instances of Size created with one of the units can be converted into others. By default, conversion to a higher unit will fail if the conversion does not produce a whole number. This can be overridden by unsetting integral property.

Size.mebibytes(2).toKibibytes()                                             // yields 2048
Size.kibibytes(2050).toMebibytes({ rounding: SizeRoundingBehavior.FLOOR })  // yields 2

Secrets

To help avoid accidental storage of secrets as plain text, we use the SecretValue type to represent secrets. Any construct that takes a value that should be a secret (such as a password or an access key) will take a parameter of type SecretValue.

The best practice is to store secrets in AWS Secrets Manager and reference them using SecretValue.secretsManager:

const secret = SecretValue.secretsManager('secretId', {
  jsonField: 'password', // optional: key of a JSON field to retrieve (defaults to all content),
  versionId: 'id',       // optional: id of the version (default AWSCURRENT)
  versionStage: 'stage', // optional: version stage name (default AWSCURRENT)
});

Using AWS Secrets Manager is the recommended way to reference secrets in a CDK app. SecretValue also supports the following secret sources:

  • SecretValue.plainText(secret): stores the secret as plain text in your app and the resulting template (not recommended).
  • SecretValue.ssmSecure(param, version): refers to a secret stored as a SecureString in the SSM Parameter Store.
  • SecretValue.cfnParameter(param): refers to a secret passed through a CloudFormation parameter (must have NoEcho: true).
  • SecretValue.cfnDynamicReference(dynref): refers to a secret described by a CloudFormation dynamic reference (used by ssmSecure and secretsManager).

ARN manipulation

Sometimes you will need to put together or pick apart Amazon Resource Names (ARNs). The functions stack.formatArn() and stack.parseArn() exist for this purpose.

formatArn() can be used to build an ARN from components. It will automatically use the region and account of the stack you're calling it on:

// Builds "arn:<PARTITION>:lambda:<REGION>:<ACCOUNT>:function:MyFunction"
stack.formatArn({
  service: 'lambda',
  resource: 'function',
  sep: ':',
  resourceName: 'MyFunction'
});

parseArn() can be used to get a single component from an ARN. parseArn() will correctly deal with both literal ARNs and deploy-time values (tokens), but in case of a deploy-time value be aware that the result will be another deploy-time value which cannot be inspected in the CDK application.

// Extracts the function name out of an AWS Lambda Function ARN
const arnComponents = stack.parseArn(arn, ':');
const functionName = arnComponents.resourceName;

Note that depending on the service, the resource separator can be either : or /, and the resource name can be either the 6th or 7th component in the ARN. When using these functions, you will need to know the format of the ARN you are dealing with.

For an exhaustive list of ARN formats used in AWS, see AWS ARNs and Namespaces in the AWS General Reference.

Dependencies

Construct Dependencies

Sometimes AWS resources depend on other resources, and the creation of one resource must be completed before the next one can be started.

In general, CloudFormation will correctly infer the dependency relationship between resources based on the property values that are used. In the cases where it doesn't, the AWS Construct Library will add the dependency relationship for you.

If you need to add an ordering dependency that is not automatically inferred, you do so by adding a dependency relationship using constructA.node.addDependency(constructB). This will add a dependency relationship between all resources in the scope of constructA and all resources in the scope of constructB.

If you want a single object to represent a set of constructs that are not necessarily in the same scope, you can use a ConcreteDependable. The following creates a single object that represents a dependency on two constructs, constructB and constructC:

// Declare the dependable object
const bAndC = new ConcreteDependable();
bAndC.add(constructB);
bAndC.add(constructC);

// Take the dependency
constructA.node.addDependency(bAndC);
Stack Dependencies

Two different stack instances can have a dependency on one another. This happens when an resource from one stack is referenced in another stack. In that case, CDK records the cross-stack referencing of resources, automatically produces the right CloudFormation primitives, and adds a dependency between the two stacks. You can also manually add a dependency between two stacks by using the stackA.addDependency(stackB) method.

A stack dependency has the following implications:

  • Cyclic dependencies are not allowed, so if stackA is using resources from stackB, the reverse is not possible anymore.
  • Stacks with dependencies between them are treated specially by the CDK toolkit:
    • If stackA depends on stackB, running cdk deploy stackA will also automatically deploy stackB.
    • stackB's deployment will be performed before stackA's deployment.

Custom Resources

Custom Resources are CloudFormation resources that are implemented by arbitrary user code. They can do arbitrary lookups or modifications during a CloudFormation deployment.

To define a custom resource, use the CustomResource construct:

new CustomResource(this, 'MyMagicalResource', {
  resourceType: 'Custom::MyCustomResource', // must start with 'Custom::'

  // the resource properties
  properties: {
    Property1: 'foo',
    Property2: 'bar'
  },

  // the ARN of the provider (SNS/Lambda) which handles
  // CREATE, UPDATE or DELETE events for this resource type
  // see next section for details
  serviceToken: 'ARN'
});
Custom Resource Providers

Custom resources are backed by a custom resource provider which can be implemented in one of the following ways. The following table compares the various provider types (ordered from low-level to high-level):

Provider Compute Type Error Handling Submit to CloudFormation Max Timeout Language Footprint
sns.Topic Self-managed Manual Manual Unlimited Any Depends
lambda.Function AWS Lambda Manual Manual 15min Any Small
core.CustomResourceProvider Lambda Auto Auto 15min Node.js Small
custom-resources.Provider Lambda Auto Auto Unlimited Async Any Large

Legend:

  • Compute type: which type of compute can is used to execute the handler.
  • Error Handling: whether errors thrown by handler code are automatically trapped and a FAILED response is submitted to CloudFormation. If this is "Manual", developers must take care of trapping errors. Otherwise, events could cause stacks to hang.
  • Submit to CloudFormation: whether the framework takes care of submitting SUCCESS/FAILED responses to CloudFormation through the event's response URL.
  • Max Timeout: maximum allows/possible timeout.
  • Language: which programming languages can be used to implement handlers.
  • Footprint: how many resources are used by the provider framework itself.

A NOTE ABOUT SINGLETONS

When defining resources for a custom resource provider, you will likely want to define them as a stack singleton so that only a single instance of the provider is created in your stack and which is used by all custom resources of that type.

Here is a basic pattern for defining stack singletons in the CDK. The following examples ensures that only a single SNS topic is defined:

function getOrCreate(scope: Construct): sns.Topic {
  const stack = Stack.of(scope);
  const uniqueid = 'GloballyUniqueIdForSingleton'; // For example, a UUID from `uuidgen`
  return stack.node.tryFindChild(uniqueid) as sns.Topic  ?? new sns.Topic(stack, uniqueid);
}
Amazon SNS Topic

Every time a resource event occurs (CREATE/UPDATE/DELETE), an SNS notification is sent to the SNS topic. Users must process these notifications (e.g. through a fleet of worker hosts) and submit success/failure responses to the CloudFormation service.

Set serviceToken to topic.topicArn in order to use this provider:

const topic = new sns.Topic(this, 'MyProvider');

new CustomResource(this, 'MyResource', {
  serviceToken: topic.topicArn
});
AWS Lambda Function

An AWS lambda function is called directly by CloudFormation for all resource events. The handler must take care of explicitly submitting a success/failure response to the CloudFormation service and handle various error cases.

Set serviceToken to lambda.functionArn to use this provider:

const fn = new lambda.Function(this, 'MyProvider', functionProps);

new CustomResource(this, 'MyResource', {
  serviceToken: fn.functionArn,
});
The core.CustomResourceProvider class

The class @aws-cdk/core.CustomResourceProvider offers a basic low-level framework designed to implement simple and slim custom resource providers. It currently only supports Node.js-based user handlers, and it does not have support for asynchronous waiting (handler cannot exceed the 15min lambda timeout).

The provider has a built-in singleton method which uses the resource type as a stack-unique identifier and returns the service token:

const serviceToken = CustomResourceProvider.getOrCreate(this, 'Custom::MyCustomResourceType', {
  codeDirectory: `${__dirname}/my-handler`,
  runtime: CustomResourceProviderRuntime.NODEJS_12_X,
  description: "Lambda function created by the custom resource provider",
});

new CustomResource(this, 'MyResource', {
  resourceType: 'Custom::MyCustomResourceType',
  serviceToken: serviceToken
});

The directory (my-handler in the above example) must include an index.js file. It cannot import external dependencies or files outside this directory. It must export an async function named handler. This function accepts the CloudFormation resource event object and returns an object with the following structure:

exports.handler = async function(event) {
  const id = event.PhysicalResourceId; // only for "Update" and "Delete"
  const props = event.ResourceProperties;
  const oldProps = event.OldResourceProperties; // only for "Update"s

  switch (event.RequestType) {
    case "Create":
      // ...

    case "Update":
      // ...

      // if an error is thrown, a FAILED response will be submitted to CFN
      throw new Error('Failed!');

    case "Delete":
      // ...
  }

  return {
    // (optional) the value resolved from `resource.ref`
    // defaults to "event.PhysicalResourceId" or "event.RequestId"
    PhysicalResourceId: "REF",

    // (optional) calling `resource.getAtt("Att1")` on the custom resource in the CDK app
    // will return the value "BAR".
    Data: {
      Att1: "BAR",
      Att2: "BAZ"
    },

    // (optional) user-visible message
    Reason: "User-visible message",

    // (optional) hides values from the console
    NoEcho: true
  };
}

Here is an complete example of a custom resource that summarizes two numbers:

sum-handler/index.js:

exports.handler = async (e) => {
  return {
    Data: {
      Result: e.ResourceProperties.lhs + e.ResourceProperties.rhs,
    },
  };
};

sum.ts:

import {
  Construct,
  CustomResource,
  CustomResourceProvider,
  CustomResourceProviderRuntime,
  Token,
} from '@aws-cdk/core';

export interface SumProps {
  readonly lhs: number;
  readonly rhs: number;
}

export class Sum extends Construct {
  public readonly result: number;

  constructor(scope: Construct, id: string, props: SumProps) {
    super(scope, id);

    const resourceType = 'Custom::Sum';
    const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, {
      codeDirectory: `${__dirname}/sum-handler`,
      runtime: CustomResourceProviderRuntime.NODEJS_12_X,
    });

    const resource = new CustomResource(this, 'Resource', {
      resourceType: resourceType,
      serviceToken: serviceToken,
      properties: {
        lhs: props.lhs,
        rhs: props.rhs
      }
    });

    this.result = Token.asNumber(resource.getAtt('Result'));
  }
}

Usage will look like this:

const sum = new Sum(this, 'MySum', { lhs: 40, rhs: 2 });
new CfnOutput(this, 'Result', { value: Token.asString(sum.result) });

To access the ARN of the provider's AWS Lambda function role, use the getOrCreateProvider() built-in singleton method:

const provider = CustomResourceProvider.getOrCreateProvider(this, 'Custom::MyCustomResourceType', {
  codeDirectory: `${__dirname}/my-handler`,
  runtime: CustomResourceProviderRuntime.NODEJS_12_X,
});

const roleArn = provider.roleArn;

This role ARN can then be used in resource-based IAM policies.

The Custom Resource Provider Framework

The @aws-cdk/custom-resources module includes an advanced framework for implementing custom resource providers.

Handlers are implemented as AWS Lambda functions, which means that they can be implemented in any Lambda-supported runtime. Furthermore, this provider has an asynchronous mode, which means that users can provide an isComplete lambda function which is called periodically until the operation is complete. This allows implementing providers that can take up to two hours to stabilize.

Set serviceToken to provider.serviceToken to use this type of provider:

const provider = new customresources.Provider(this, 'MyProvider', {
  onEventHandler,
  isCompleteHandler, // optional async waiter
});

new CustomResource(this, 'MyResource', {
  serviceToken: provider.serviceToken
});

See the documentation for more details.

AWS CloudFormation features

A CDK stack synthesizes to an AWS CloudFormation Template. This section explains how this module allows users to access low-level CloudFormation features when needed.

Stack Outputs

CloudFormation stack outputs and exports are created using the CfnOutput class:

new CfnOutput(this, 'OutputName', {
  value: myBucket.bucketName,
  description: 'The name of an S3 bucket', // Optional
  exportName: 'TheAwesomeBucket', // Registers a CloudFormation export named "TheAwesomeBucket"
});
Parameters

CloudFormation templates support the use of Parameters to customize a template. They enable CloudFormation users to input custom values to a template each time a stack is created or updated. While the CDK design philosophy favors using build-time parameterization, users may need to use CloudFormation in a number of cases (for example, when migrating an existing stack to the AWS CDK).

Template parameters can be added to a stack by using the CfnParameter class:

new CfnParameter(this, 'MyParameter', {
  type: 'Number',
  default: 1337,
  // See the API reference for more configuration props
});

The value of parameters can then be obtained using one of the value methods. As parameters are only resolved at deployment time, the values obtained are placeholder tokens for the real value (Token.isUnresolved() would return true for those):

const param = new CfnParameter(this, 'ParameterName', { /* config */ });

// If the parameter is a String
param.valueAsString;

// If the parameter is a Number
param.valueAsNumber;

// If the parameter is a List
param.valueAsList;
Pseudo Parameters

CloudFormation supports a number of pseudo parameters, which resolve to useful values at deployment time. CloudFormation pseudo parameters can be obtained from static members of the Aws class.

It is generally recommended to access pseudo parameters from the scope's stack instead, which guarantees the values produced are qualifying the designated stack, which is essential in cases where resources are shared cross-stack:

// "this" is the current construct
const stack = Stack.of(this);

stack.account; // Returns the AWS::AccountId for this stack (or the literal value if known)
stack.region;  // Returns the AWS::Region for this stack (or the literal value if known)
stack.partition;
Resource Options

CloudFormation resources can also specify resource attributes. The CfnResource class allows accessing those through the cfnOptions property:

const rawBucket = new s3.CfnBucket(this, 'Bucket', { /* ... */ });
// -or-
const rawBucketAlt = myBucket.node.defaultChild as s3.CfnBucket;

// then
rawBucket.cfnOptions.condition = new CfnCondition(this, 'EnableBucket', { /* ... */ });
rawBucket.cfnOptions.metadata = {
  metadataKey: 'MetadataValue',
};

Resource dependencies (the DependsOn attribute) is modified using the cfnResource.addDependsOn method:

const resourceA = new CfnResource(this, 'ResourceA', resourceProps);
const resourceB = new CfnResource(this, 'ResourceB', resourceProps);

resourceB.addDependsOn(resourceA);
Intrinsic Functions and Condition Expressions

CloudFormation supports intrinsic functions. These functions can be accessed from the Fn class, which provides type-safe methods for each intrinsic function as well as condition expressions:

// To use Fn::Base64
Fn.base64('SGVsbG8gQ0RLIQo=');

// To compose condition expressions:
const environmentParameter = new CfnParameter(this, 'Environment');
Fn.conditionAnd(
  // The "Environment" CloudFormation template parameter evaluates to "Production"
  Fn.conditionEquals('Production', environmentParameter),
  // The AWS::Region pseudo-parameter value is NOT equal to "us-east-1"
  Fn.conditionNot(Fn.conditionEquals('us-east-1', Aws.REGION)),
);

When working with deploy-time values (those for which Token.isUnresolved returns true), idiomatic conditionals from the programming language cannot be used (the value will not be known until deployment time). When conditional logic needs to be expressed with un-resolved values, it is necessary to use CloudFormation conditions by means of the CfnCondition class:

const environmentParameter = new CfnParameter(this, 'Environment');
const isProd = new CfnCondition(this, 'IsProduction', {
  expression: Fn.conditionEquals('Production', environmentParameter),
});

// Configuration value that is a different string based on IsProduction
const stage = Fn.conditionIf(isProd.logicalId, 'Beta', 'Prod').toString();

// Make Bucket creation condition to IsProduction by accessing
// and overriding the CloudFormation resource
const bucket = new s3.Bucket(this, 'Bucket');
const cfnBucket = myBucket.node.defaultChild as s3.CfnBucket;
cfnBucket.cfnOptions.condition = isProd;
Mappings

CloudFormation mappings are created and queried using the CfnMappings class:

const regionTable = new CfnMapping(this, 'RegionTable', {
  mapping: {
    regionName: {
      'us-east-1': 'US East (N. Virginia)',
      'us-east-2': 'US East (Ohio)',
      // ...
    },
    // ...
  }
});

regionTable.findInMap('regionName', Aws.REGION);

This will yield the following template:

Mappings:
  RegionTable:
    regionName:
      us-east-1: US East (N. Virginia)
      us-east-2: US East (Ohio)

Mappings can also be synthesized "lazily"; lazy mappings will only render a "Mappings" section in the synthesized CloudFormation template if some findInMap call is unable to immediately return a concrete value due to one or both of the keys being unresolved tokens (some value only available at deploy-time).

For example, the following code will not produce anything in the "Mappings" section. The call to findInMap will be able to resolve the value during synthesis and simply return 'US East (Ohio)'.

const regionTable = new CfnMapping(this, 'RegionTable', {
  mapping: {
    regionName: {
      'us-east-1': 'US East (N. Virginia)',
      'us-east-2': 'US East (Ohio)',
    },
  },
  lazy: true,
});

regionTable.findInMap('regionName', 'us-east-2');

On the other hand, the following code will produce the "Mappings" section shown above, since the second-level key is an unresolved token. The call to findInMap will return a token that resolves to { Fn::FindInMap: [ 'RegionTable', 'regionName', { Ref: AWS::Region } ] }.

regionTable.findInMap('regionName', Aws.REGION);
Dynamic References

CloudFormation supports dynamically resolving values for SSM parameters (including secure strings) and Secrets Manager. Encoding such references is done using the CfnDynamicReference class:

new CfnDynamicReference(
  CfnDynamicReferenceService.SECRETS_MANAGER,
  'secret-id:secret-string:json-key:version-stage:version-id',
);
Template Options & Transform

CloudFormation templates support a number of options, including which Macros or Transforms to use when deploying the stack. Those can be configured using the stack.templateOptions property:

const stack = new Stack(app, 'StackName');

stack.templateOptions.description = 'This will appear in the AWS console';
stack.templateOptions.transforms = ['AWS::Serverless-2016-10-31'];
stack.templateOptions.metadata = {
  metadataKey: 'MetadataValue',
};
Emitting Raw Resources

The CfnResource class allows emitting arbitrary entries in the Resources section of the CloudFormation template.

new CfnResource(this, 'ResourceId', {
  type: 'AWS::S3::Bucket',
  properties: {
    BucketName: 'bucket-name'
  },
});

As for any other resource, the logical ID in the CloudFormation template will be generated by the AWS CDK, but the type and properties will be copied verbatim in the synthesized template.

Including raw CloudFormation template fragments

When migrating a CloudFormation stack to the AWS CDK, it can be useful to include fragments of an existing template verbatim in the synthesized template. This can be achieved using the CfnInclude class.

new CfnInclude(this, 'ID', {
  template: {
    Resources: {
      Bucket: {
        Type: 'AWS::S3::Bucket',
        Properties: {
          BucketName: 'my-shiny-bucket'
        }
      }
    }
  },
});
Termination Protection

You can prevent a stack from being accidentally deleted by enabling termination protection on the stack. If a user attempts to delete a stack with termination protection enabled, the deletion fails and the stack--including its status--remains unchanged. Enabling or disabling termination protection on a stack sets it for any nested stacks belonging to that stack as well. You can enable termination protection on a stack by setting the terminationProtection prop to true.

const stack = new Stack(app, 'StackName', {
  terminationProtection: true,
});

By default, termination protection is disabled.

CfnJson

CfnJson allows you to postpone the resolution of a JSON blob from deployment-time. This is useful in cases where the CloudFormation JSON template cannot express a certain value.

A common example is to use CfnJson in order to render a JSON map which needs to use intrinsic functions in keys. Since JSON map keys must be strings, it is impossible to use intrinsics in keys and CfnJson can help.

The following example defines an IAM role which can only be assumed by principals that are tagged with a specific tag.

const tagParam = new CfnParameter(this, 'TagName');

const stringEquals = new CfnJson(this, 'ConditionJson', {
  value: {
    [`aws:PrincipalTag/${tagParam.valueAsString}`]: true,
  },
});

const principal = new iam.AccountRootPrincipal().withConditions({
  StringEquals: stringEquals,
});

new iam.Role(this, 'MyRole', { assumedBy: principal });

Explanation: since in this example we pass the tag name through a parameter, it can only be resolved during deployment. The resolved value can be represented in the template through a { "Ref": "TagName" }. However, since we want to use this value inside a aws:PrincipalTag/TAG-NAME IAM operator, we need it in the key of a StringEquals condition. JSON keys must be strings, so to circumvent this limitation, we use CfnJson to "delay" the rendition of this template section to deploy-time. This means that the value of StringEquals in the template will be { "Fn::GetAtt": [ "ConditionJson", "Value" ] }, and will only "expand" to the operator we synthesized during deployment.

Stack Resource Limit

When deploying to AWS CloudFormation, it needs to keep in check the amount of resources being added inside a Stack. Currently it's possible to check the limits in the AWS CloudFormation quotas page.

It's possible to synthesize the project with more Resources than the allowed (or even reduce the number of Resources).

Set the context key @aws-cdk/core:stackResourceLimit with the proper value, being 0 for disable the limit of resources.

Documentation ¶

Overview ¶

The AWS Cloud Development Kit library

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func App_IsApp ¶

func App_IsApp(obj interface{}) *bool

Checks if an object is an instance of the `App` class.

Returns: `true` if `obj` is an `App`. Experimental.

func App_IsConstruct ¶

func App_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func App_IsStage ¶

func App_IsStage(x interface{}) *bool

Test whether the given construct is a stage. Experimental.

func Arn_ExtractResourceName ¶

func Arn_ExtractResourceName(arn *string, resourceType *string) *string

Extract the full resource name from an ARN.

Necessary for resource names (paths) that may contain the separator, like `arn:aws:iam::111111111111:role/path/to/role/name`.

Only works if we statically know the expected `resourceType` beforehand, since we're going to use that to split the string on ':<resourceType>/' (and take the right-hand side).

We can't extract the 'resourceType' from the ARN at hand, because CloudFormation Expressions only allow literals in the 'separator' argument to `{ Fn::Split }`, and so it can't be `{ Fn::Select: [5, { Fn::Split: [':', ARN] }}`.

Only necessary for ARN formats for which the type-name separator is `/`. Experimental.

func Arn_Format ¶

func Arn_Format(components *ArnComponents, stack Stack) *string

Creates an ARN from components.

If `partition`, `region` or `account` are not specified, the stack's partition, region and account will be used.

If any component is the empty string, an empty string will be inserted into the generated ARN at the location that component corresponds to.

The ARN will be formatted as follows:

arn:{partition}:{service}:{region}:{account}:{resource}{sep}{resource-name}

The required ARN pieces that are omitted will be taken from the stack that the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope can be 'undefined'. Experimental.

func AssetStaging_BUNDLING_INPUT_DIR ¶

func AssetStaging_BUNDLING_INPUT_DIR() *string

func AssetStaging_BUNDLING_OUTPUT_DIR ¶

func AssetStaging_BUNDLING_OUTPUT_DIR() *string

func AssetStaging_ClearAssetHashCache ¶

func AssetStaging_ClearAssetHashCache()

Clears the asset hash cache. Experimental.

func AssetStaging_IsConstruct ¶

func AssetStaging_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func Aws_ACCOUNT_ID ¶

func Aws_ACCOUNT_ID() *string

func Aws_NOTIFICATION_ARNS ¶

func Aws_NOTIFICATION_ARNS() *[]*string

func Aws_NO_VALUE ¶

func Aws_NO_VALUE() *string

func Aws_PARTITION ¶

func Aws_PARTITION() *string

func Aws_REGION ¶

func Aws_REGION() *string

func Aws_STACK_ID ¶

func Aws_STACK_ID() *string

func Aws_STACK_NAME ¶

func Aws_STACK_NAME() *string

func Aws_URL_SUFFIX ¶

func Aws_URL_SUFFIX() *string

func BootstraplessSynthesizer_DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER ¶

func BootstraplessSynthesizer_DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER() *string

func BootstraplessSynthesizer_DEFAULT_CLOUDFORMATION_ROLE_ARN ¶

func BootstraplessSynthesizer_DEFAULT_CLOUDFORMATION_ROLE_ARN() *string

func BootstraplessSynthesizer_DEFAULT_DEPLOY_ROLE_ARN ¶

func BootstraplessSynthesizer_DEFAULT_DEPLOY_ROLE_ARN() *string

func BootstraplessSynthesizer_DEFAULT_FILE_ASSETS_BUCKET_NAME ¶

func BootstraplessSynthesizer_DEFAULT_FILE_ASSETS_BUCKET_NAME() *string

func BootstraplessSynthesizer_DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME ¶

func BootstraplessSynthesizer_DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME() *string

func BootstraplessSynthesizer_DEFAULT_FILE_ASSET_PREFIX ¶

func BootstraplessSynthesizer_DEFAULT_FILE_ASSET_PREFIX() *string

func BootstraplessSynthesizer_DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN ¶

func BootstraplessSynthesizer_DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN() *string

func BootstraplessSynthesizer_DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME ¶

func BootstraplessSynthesizer_DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME() *string

func BootstraplessSynthesizer_DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN ¶

func BootstraplessSynthesizer_DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN() *string

func BootstraplessSynthesizer_DEFAULT_LOOKUP_ROLE_ARN ¶

func BootstraplessSynthesizer_DEFAULT_LOOKUP_ROLE_ARN() *string

func BootstraplessSynthesizer_DEFAULT_QUALIFIER ¶

func BootstraplessSynthesizer_DEFAULT_QUALIFIER() *string

func CfnCodeDeployBlueGreenHook_IsCfnElement ¶

func CfnCodeDeployBlueGreenHook_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnCodeDeployBlueGreenHook_IsConstruct ¶

func CfnCodeDeployBlueGreenHook_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnCondition_IsCfnElement ¶

func CfnCondition_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnCondition_IsConstruct ¶

func CfnCondition_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnCustomResource_CFN_RESOURCE_TYPE_NAME ¶

func CfnCustomResource_CFN_RESOURCE_TYPE_NAME() *string

func CfnCustomResource_IsCfnElement ¶

func CfnCustomResource_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnCustomResource_IsCfnResource ¶

func CfnCustomResource_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnCustomResource_IsConstruct ¶

func CfnCustomResource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnElement_IsCfnElement ¶

func CfnElement_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnElement_IsConstruct ¶

func CfnElement_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnHook_IsCfnElement ¶

func CfnHook_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnHook_IsConstruct ¶

func CfnHook_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnJson_IsConstruct ¶

func CfnJson_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnMacro_CFN_RESOURCE_TYPE_NAME ¶

func CfnMacro_CFN_RESOURCE_TYPE_NAME() *string

func CfnMacro_IsCfnElement ¶

func CfnMacro_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnMacro_IsCfnResource ¶

func CfnMacro_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnMacro_IsConstruct ¶

func CfnMacro_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnMapping_IsCfnElement ¶

func CfnMapping_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnMapping_IsConstruct ¶

func CfnMapping_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnModuleDefaultVersion_CFN_RESOURCE_TYPE_NAME ¶

func CfnModuleDefaultVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnModuleDefaultVersion_IsCfnElement ¶

func CfnModuleDefaultVersion_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnModuleDefaultVersion_IsCfnResource ¶

func CfnModuleDefaultVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnModuleDefaultVersion_IsConstruct ¶

func CfnModuleDefaultVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnModuleVersion_CFN_RESOURCE_TYPE_NAME ¶

func CfnModuleVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnModuleVersion_IsCfnElement ¶

func CfnModuleVersion_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnModuleVersion_IsCfnResource ¶

func CfnModuleVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnModuleVersion_IsConstruct ¶

func CfnModuleVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnOutput_IsCfnElement ¶

func CfnOutput_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnOutput_IsConstruct ¶

func CfnOutput_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnParameter_IsCfnElement ¶

func CfnParameter_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnParameter_IsConstruct ¶

func CfnParameter_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnPublicTypeVersion_CFN_RESOURCE_TYPE_NAME ¶

func CfnPublicTypeVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnPublicTypeVersion_IsCfnElement ¶

func CfnPublicTypeVersion_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnPublicTypeVersion_IsCfnResource ¶

func CfnPublicTypeVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnPublicTypeVersion_IsConstruct ¶

func CfnPublicTypeVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnPublisher_CFN_RESOURCE_TYPE_NAME ¶

func CfnPublisher_CFN_RESOURCE_TYPE_NAME() *string

func CfnPublisher_IsCfnElement ¶

func CfnPublisher_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnPublisher_IsCfnResource ¶

func CfnPublisher_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnPublisher_IsConstruct ¶

func CfnPublisher_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnRefElement_IsCfnElement ¶

func CfnRefElement_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnRefElement_IsConstruct ¶

func CfnRefElement_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnResourceDefaultVersion_CFN_RESOURCE_TYPE_NAME ¶

func CfnResourceDefaultVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnResourceDefaultVersion_IsCfnElement ¶

func CfnResourceDefaultVersion_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnResourceDefaultVersion_IsCfnResource ¶

func CfnResourceDefaultVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnResourceDefaultVersion_IsConstruct ¶

func CfnResourceDefaultVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnResourceVersion_CFN_RESOURCE_TYPE_NAME ¶

func CfnResourceVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnResourceVersion_IsCfnElement ¶

func CfnResourceVersion_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnResourceVersion_IsCfnResource ¶

func CfnResourceVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnResourceVersion_IsConstruct ¶

func CfnResourceVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnResource_IsCfnElement ¶

func CfnResource_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnResource_IsCfnResource ¶

func CfnResource_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnResource_IsConstruct ¶

func CfnResource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnRule_IsCfnElement ¶

func CfnRule_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnRule_IsConstruct ¶

func CfnRule_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnStackSet_CFN_RESOURCE_TYPE_NAME ¶

func CfnStackSet_CFN_RESOURCE_TYPE_NAME() *string

func CfnStackSet_IsCfnElement ¶

func CfnStackSet_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnStackSet_IsCfnResource ¶

func CfnStackSet_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnStackSet_IsConstruct ¶

func CfnStackSet_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnStack_CFN_RESOURCE_TYPE_NAME ¶

func CfnStack_CFN_RESOURCE_TYPE_NAME() *string

func CfnStack_IsCfnElement ¶

func CfnStack_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnStack_IsCfnResource ¶

func CfnStack_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnStack_IsConstruct ¶

func CfnStack_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnTypeActivation_CFN_RESOURCE_TYPE_NAME ¶

func CfnTypeActivation_CFN_RESOURCE_TYPE_NAME() *string

func CfnTypeActivation_IsCfnElement ¶

func CfnTypeActivation_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnTypeActivation_IsCfnResource ¶

func CfnTypeActivation_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnTypeActivation_IsConstruct ¶

func CfnTypeActivation_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnWaitConditionHandle_CFN_RESOURCE_TYPE_NAME ¶

func CfnWaitConditionHandle_CFN_RESOURCE_TYPE_NAME() *string

func CfnWaitConditionHandle_IsCfnElement ¶

func CfnWaitConditionHandle_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnWaitConditionHandle_IsCfnResource ¶

func CfnWaitConditionHandle_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnWaitConditionHandle_IsConstruct ¶

func CfnWaitConditionHandle_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnWaitCondition_CFN_RESOURCE_TYPE_NAME ¶

func CfnWaitCondition_CFN_RESOURCE_TYPE_NAME() *string

func CfnWaitCondition_IsCfnElement ¶

func CfnWaitCondition_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnWaitCondition_IsCfnResource ¶

func CfnWaitCondition_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnWaitCondition_IsConstruct ¶

func CfnWaitCondition_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CustomResourceProvider_GetOrCreate ¶

func CustomResourceProvider_GetOrCreate(scope constructs.Construct, uniqueid *string, props *CustomResourceProviderProps) *string

Returns a stack-level singleton ARN (service token) for the custom resource provider.

Returns: the service token of the custom resource provider, which should be used when defining a `CustomResource`. Experimental.

func CustomResourceProvider_IsConstruct ¶

func CustomResourceProvider_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CustomResource_IsConstruct ¶

func CustomResource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CustomResource_IsResource ¶

func CustomResource_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func DefaultStackSynthesizer_DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER ¶

func DefaultStackSynthesizer_DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER() *string

func DefaultStackSynthesizer_DEFAULT_CLOUDFORMATION_ROLE_ARN ¶

func DefaultStackSynthesizer_DEFAULT_CLOUDFORMATION_ROLE_ARN() *string

func DefaultStackSynthesizer_DEFAULT_DEPLOY_ROLE_ARN ¶

func DefaultStackSynthesizer_DEFAULT_DEPLOY_ROLE_ARN() *string

func DefaultStackSynthesizer_DEFAULT_FILE_ASSETS_BUCKET_NAME ¶

func DefaultStackSynthesizer_DEFAULT_FILE_ASSETS_BUCKET_NAME() *string

func DefaultStackSynthesizer_DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME ¶

func DefaultStackSynthesizer_DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME() *string

func DefaultStackSynthesizer_DEFAULT_FILE_ASSET_PREFIX ¶

func DefaultStackSynthesizer_DEFAULT_FILE_ASSET_PREFIX() *string

func DefaultStackSynthesizer_DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN ¶

func DefaultStackSynthesizer_DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN() *string

func DefaultStackSynthesizer_DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME ¶

func DefaultStackSynthesizer_DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME() *string

func DefaultStackSynthesizer_DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN ¶

func DefaultStackSynthesizer_DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN() *string

func DefaultStackSynthesizer_DEFAULT_LOOKUP_ROLE_ARN ¶

func DefaultStackSynthesizer_DEFAULT_LOOKUP_ROLE_ARN() *string

func DefaultStackSynthesizer_DEFAULT_QUALIFIER ¶

func DefaultStackSynthesizer_DEFAULT_QUALIFIER() *string

func FileSystem_CopyDirectory ¶

func FileSystem_CopyDirectory(srcDir *string, destDir *string, options *CopyOptions, rootDir *string)

Copies an entire directory structure. Experimental.

func FileSystem_Fingerprint ¶

func FileSystem_Fingerprint(fileOrDirectory *string, options *FingerprintOptions) *string

Produces fingerprint based on the contents of a single file or an entire directory tree.

The fingerprint will also include: 1. An extra string if defined in `options.extra`. 2. The set of exclude patterns, if defined in `options.exclude` 3. The symlink follow mode value. Experimental.

func FileSystem_IsEmpty ¶

func FileSystem_IsEmpty(dir *string) *bool

Checks whether a directory is empty. Experimental.

func FileSystem_Mkdtemp ¶

func FileSystem_Mkdtemp(prefix *string) *string

Creates a unique temporary directory in the **system temp directory**. Experimental.

func FileSystem_Tmpdir ¶

func FileSystem_Tmpdir() *string

func Fn_Base64 ¶

func Fn_Base64(data *string) *string

The intrinsic function “Fn::Base64“ returns the Base64 representation of the input string.

This function is typically used to pass encoded data to Amazon EC2 instances by way of the UserData property.

Returns: a token represented as a string Experimental.

func Fn_Cidr ¶

func Fn_Cidr(ipBlock *string, count *float64, sizeMask *string) *[]*string

The intrinsic function “Fn::Cidr“ returns the specified Cidr address block.

Returns: a token represented as a string Experimental.

func Fn_FindInMap ¶

func Fn_FindInMap(mapName *string, topLevelKey *string, secondLevelKey *string) *string

The intrinsic function “Fn::FindInMap“ returns the value corresponding to keys in a two-level map that is declared in the Mappings section.

Returns: a token represented as a string Experimental.

func Fn_GetAzs ¶

func Fn_GetAzs(region *string) *[]*string

The intrinsic function “Fn::GetAZs“ returns an array that lists Availability Zones for a specified region.

Because customers have access to different Availability Zones, the intrinsic function “Fn::GetAZs“ enables template authors to write templates that adapt to the calling user's access. That way you don't have to hard-code a full list of Availability Zones for a specified region.

Returns: a token represented as a string array Experimental.

func Fn_ImportListValue ¶

func Fn_ImportListValue(sharedValueToImport *string, assumedLength *float64, delimiter *string) *[]*string

Like `Fn.importValue`, but import a list with a known length.

If you explicitly want a list with an unknown length, call `Fn.split(',', Fn.importValue(exportName))`. See the documentation of `Fn.split` to read more about the limitations of using lists of unknown length.

`Fn.importListValue(exportName, assumedLength)` is the same as `Fn.split(',', Fn.importValue(exportName), assumedLength)`, but easier to read and impossible to forget to pass `assumedLength`. Experimental.

func Fn_ImportValue ¶

func Fn_ImportValue(sharedValueToImport *string) *string

The intrinsic function “Fn::ImportValue“ returns the value of an output exported by another stack.

You typically use this function to create cross-stack references. In the following example template snippets, Stack A exports VPC security group values and Stack B imports them.

Returns: a token represented as a string Experimental.

func Fn_Join ¶

func Fn_Join(delimiter *string, listOfValues *[]*string) *string

The intrinsic function “Fn::Join“ appends a set of values into a single value, separated by the specified delimiter.

If a delimiter is the empty string, the set of values are concatenated with no delimiter.

Returns: a token represented as a string Experimental.

func Fn_ParseDomainName ¶

func Fn_ParseDomainName(url *string) *string

Given an url, parse the domain name. Experimental.

func Fn_Ref ¶

func Fn_Ref(logicalName *string) *string

The “Ref“ intrinsic function returns the value of the specified parameter or resource.

Note that it doesn't validate the logicalName, it mainly serves paremeter/resource reference defined in a “CfnInclude“ template. Experimental.

func Fn_RefAll ¶

func Fn_RefAll(parameterType *string) *[]*string

Returns all values for a specified parameter type.

Returns: a token represented as a string array Experimental.

func Fn_Select ¶

func Fn_Select(index *float64, array *[]*string) *string

The intrinsic function “Fn::Select“ returns a single object from a list of objects by index.

Returns: a token represented as a string Experimental.

func Fn_Split ¶

func Fn_Split(delimiter *string, source *string, assumedLength *float64) *[]*string

Split a string token into a token list of string values.

Specify the location of splits with a delimiter such as ',' (a comma). Renders to the `Fn::Split` intrinsic function.

Lists with unknown lengths (default) -------------------------------------

Since this function is used to work with deploy-time values, if `assumedLength` is not given the CDK cannot know the length of the resulting list at synthesis time. This brings the following restrictions:

  • You must use `Fn.select(i, list)` to pick elements out of the list (you must not use `list[i]`).
  • You cannot add elements to the list, remove elements from the list, combine two such lists together, or take a slice of the list.
  • You cannot pass the list to constructs that do any of the above.

The only valid operation with such a tokenized list is to pass it unmodified to a CloudFormation Resource construct.

Lists with assumed lengths --------------------------

Pass `assumedLength` if you know the length of the list that will be produced by splitting. The actual list length at deploy time may be *longer* than the number you pass, but not *shorter*.

The returned list will look like:

``` [Fn.select(0, split), Fn.select(1, split), Fn.select(2, split), ...] ```

The restrictions from the section "Lists with unknown lengths" will now be lifted, at the expense of having to know and fix the length of the list.

Returns: a token represented as a string array Experimental.

func Fn_Sub ¶

func Fn_Sub(body *string, variables *map[string]*string) *string

The intrinsic function “Fn::Sub“ substitutes variables in an input string with values that you specify.

In your templates, you can use this function to construct commands or outputs that include values that aren't available until you create or update a stack.

Returns: a token represented as a string Experimental.

func Fn_ValueOf ¶

func Fn_ValueOf(parameterOrLogicalId *string, attribute *string) *string

Returns an attribute value or list of values for a specific parameter and attribute.

Returns: a token represented as a string Experimental.

func Fn_ValueOfAll ¶

func Fn_ValueOfAll(parameterType *string, attribute *string) *[]*string

Returns a list of all attribute values for a given parameter type and attribute.

Returns: a token represented as a string array Experimental.

func Lazy_List ¶

func Lazy_List(producer IStableListProducer, options *LazyListValueOptions) *[]*string

Defer the one-time calculation of a list value to synthesis time.

Use this if you want to render a list to a template whose actual value depends on some state mutation that may happen after the construct has been created.

If you are simply looking to force a value to a `string[]` type and don't need the calculation to be deferred, use `Token.asList()` instead.

The inner function will only be invoked once, and the resolved value cannot depend on the Stack the Token is used in. Experimental.

func Lazy_Number ¶

func Lazy_Number(producer IStableNumberProducer) *float64

Defer the one-time calculation of a number value to synthesis time.

Use this if you want to render a number to a template whose actual value depends on some state mutation that may happen after the construct has been created.

If you are simply looking to force a value to a `number` type and don't need the calculation to be deferred, use `Token.asNumber()` instead.

The inner function will only be invoked once, and the resolved value cannot depend on the Stack the Token is used in. Experimental.

func Lazy_String ¶

func Lazy_String(producer IStableStringProducer, options *LazyStringValueOptions) *string

Defer the one-time calculation of a string value to synthesis time.

Use this if you want to render a string to a template whose actual value depends on some state mutation that may happen after the construct has been created.

If you are simply looking to force a value to a `string` type and don't need the calculation to be deferred, use `Token.asString()` instead.

The inner function will only be invoked once, and the resolved value cannot depend on the Stack the Token is used in. Experimental.

func Lazy_UncachedList ¶

func Lazy_UncachedList(producer IListProducer, options *LazyListValueOptions) *[]*string

Defer the calculation of a list value to synthesis time.

Use of this function is not recommended; unless you know you need it for sure, you probably don't. Use `Lazy.list()` instead.

The inner function may be invoked multiple times during synthesis. You should only use this method if the returned value depends on variables that may change during the Aspect application phase of synthesis, or if the value depends on the Stack the value is being used in. Both of these cases are rare, and only ever occur for AWS Construct Library authors. Experimental.

func Lazy_UncachedNumber ¶

func Lazy_UncachedNumber(producer INumberProducer) *float64

Defer the calculation of a number value to synthesis time.

Use of this function is not recommended; unless you know you need it for sure, you probably don't. Use `Lazy.number()` instead.

The inner function may be invoked multiple times during synthesis. You should only use this method if the returned value depends on variables that may change during the Aspect application phase of synthesis, or if the value depends on the Stack the value is being used in. Both of these cases are rare, and only ever occur for AWS Construct Library authors. Experimental.

func Lazy_UncachedString ¶

func Lazy_UncachedString(producer IStringProducer, options *LazyStringValueOptions) *string

Defer the calculation of a string value to synthesis time.

Use of this function is not recommended; unless you know you need it for sure, you probably don't. Use `Lazy.string()` instead.

The inner function may be invoked multiple times during synthesis. You should only use this method if the returned value depends on variables that may change during the Aspect application phase of synthesis, or if the value depends on the Stack the value is being used in. Both of these cases are rare, and only ever occur for AWS Construct Library authors. Experimental.

func Names_NodeUniqueId ¶

func Names_NodeUniqueId(node constructs.Node) *string

Returns a CloudFormation-compatible unique identifier for a construct based on its path.

The identifier includes a human readable portion rendered from the path components and a hash suffix.

TODO (v2): replace with API to use `constructs.Node`.

Returns: a unique id based on the construct path Experimental.

func Names_UniqueId ¶

func Names_UniqueId(construct constructs.Construct) *string

Returns a CloudFormation-compatible unique identifier for a construct based on its path.

The identifier includes a human readable portion rendered from the path components and a hash suffix.

Returns: a unique id based on the construct path Experimental.

func NestedStack_IsConstruct ¶

func NestedStack_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func NestedStack_IsNestedStack ¶

func NestedStack_IsNestedStack(x interface{}) *bool

Checks if `x` is an object of type `NestedStack`. Experimental.

func NestedStack_IsStack ¶

func NestedStack_IsStack(x interface{}) *bool

Return whether the given object is a Stack.

We do attribute detection since we can't reliably use 'instanceof'. Experimental.

func NewApp_Override ¶

func NewApp_Override(a App, props *AppProps)

Initializes a CDK application. Experimental.

func NewAssetStaging_Override ¶

func NewAssetStaging_Override(a AssetStaging, scope constructs.Construct, id *string, props *AssetStagingProps)

Experimental.

func NewBootstraplessSynthesizer_Override ¶

func NewBootstraplessSynthesizer_Override(b BootstraplessSynthesizer, props *BootstraplessSynthesizerProps)

Experimental.

func NewCfnCodeDeployBlueGreenHook_Override ¶

func NewCfnCodeDeployBlueGreenHook_Override(c CfnCodeDeployBlueGreenHook, scope constructs.Construct, id *string, props *CfnCodeDeployBlueGreenHookProps)

Creates a new CodeDeploy blue-green ECS Hook. Experimental.

func NewCfnCondition_Override ¶

func NewCfnCondition_Override(c CfnCondition, scope constructs.Construct, id *string, props *CfnConditionProps)

Build a new condition.

The condition must be constructed with a condition token, that the condition is based on. Experimental.

func NewCfnCustomResource_Override ¶

func NewCfnCustomResource_Override(c CfnCustomResource, scope constructs.Construct, id *string, props *CfnCustomResourceProps)

Create a new `AWS::CloudFormation::CustomResource`.

func NewCfnDynamicReference_Override ¶

func NewCfnDynamicReference_Override(c CfnDynamicReference, service CfnDynamicReferenceService, key *string)

Experimental.

func NewCfnElement_Override ¶

func NewCfnElement_Override(c CfnElement, scope constructs.Construct, id *string)

Creates an entity and binds it to a tree.

Note that the root of the tree must be a Stack object (not just any Root). Experimental.

func NewCfnHook_Override ¶

func NewCfnHook_Override(c CfnHook, scope constructs.Construct, id *string, props *CfnHookProps)

Creates a new Hook object. Experimental.

func NewCfnJson_Override ¶

func NewCfnJson_Override(c CfnJson, scope constructs.Construct, id *string, props *CfnJsonProps)

Experimental.

func NewCfnMacro_Override ¶

func NewCfnMacro_Override(c CfnMacro, scope constructs.Construct, id *string, props *CfnMacroProps)

Create a new `AWS::CloudFormation::Macro`.

func NewCfnMapping_Override ¶

func NewCfnMapping_Override(c CfnMapping, scope constructs.Construct, id *string, props *CfnMappingProps)

Experimental.

func NewCfnModuleDefaultVersion_Override ¶

func NewCfnModuleDefaultVersion_Override(c CfnModuleDefaultVersion, scope constructs.Construct, id *string, props *CfnModuleDefaultVersionProps)

Create a new `AWS::CloudFormation::ModuleDefaultVersion`.

func NewCfnModuleVersion_Override ¶

func NewCfnModuleVersion_Override(c CfnModuleVersion, scope constructs.Construct, id *string, props *CfnModuleVersionProps)

Create a new `AWS::CloudFormation::ModuleVersion`.

func NewCfnOutput_Override ¶

func NewCfnOutput_Override(c CfnOutput, scope constructs.Construct, id *string, props *CfnOutputProps)

Creates an CfnOutput value for this stack. Experimental.

func NewCfnParameter_Override ¶

func NewCfnParameter_Override(c CfnParameter, scope constructs.Construct, id *string, props *CfnParameterProps)

Creates a parameter construct.

Note that the name (logical ID) of the parameter will derive from it's `coname` and location within the stack. Therefore, it is recommended that parameters are defined at the stack level. Experimental.

func NewCfnPublicTypeVersion_Override ¶

func NewCfnPublicTypeVersion_Override(c CfnPublicTypeVersion, scope constructs.Construct, id *string, props *CfnPublicTypeVersionProps)

Create a new `AWS::CloudFormation::PublicTypeVersion`.

func NewCfnPublisher_Override ¶

func NewCfnPublisher_Override(c CfnPublisher, scope constructs.Construct, id *string, props *CfnPublisherProps)

Create a new `AWS::CloudFormation::Publisher`.

func NewCfnRefElement_Override ¶

func NewCfnRefElement_Override(c CfnRefElement, scope constructs.Construct, id *string)

Creates an entity and binds it to a tree.

Note that the root of the tree must be a Stack object (not just any Root). Experimental.

func NewCfnResourceDefaultVersion_Override ¶

func NewCfnResourceDefaultVersion_Override(c CfnResourceDefaultVersion, scope constructs.Construct, id *string, props *CfnResourceDefaultVersionProps)

Create a new `AWS::CloudFormation::ResourceDefaultVersion`.

func NewCfnResourceVersion_Override ¶

func NewCfnResourceVersion_Override(c CfnResourceVersion, scope constructs.Construct, id *string, props *CfnResourceVersionProps)

Create a new `AWS::CloudFormation::ResourceVersion`.

func NewCfnResource_Override ¶

func NewCfnResource_Override(c CfnResource, scope constructs.Construct, id *string, props *CfnResourceProps)

Creates a resource construct. Experimental.

func NewCfnRule_Override ¶

func NewCfnRule_Override(c CfnRule, scope constructs.Construct, id *string, props *CfnRuleProps)

Creates and adds a rule. Experimental.

func NewCfnStackSet_Override ¶

func NewCfnStackSet_Override(c CfnStackSet, scope constructs.Construct, id *string, props *CfnStackSetProps)

Create a new `AWS::CloudFormation::StackSet`.

func NewCfnStack_Override ¶

func NewCfnStack_Override(c CfnStack, scope constructs.Construct, id *string, props *CfnStackProps)

Create a new `AWS::CloudFormation::Stack`.

func NewCfnTypeActivation_Override ¶

func NewCfnTypeActivation_Override(c CfnTypeActivation, scope constructs.Construct, id *string, props *CfnTypeActivationProps)

Create a new `AWS::CloudFormation::TypeActivation`.

func NewCfnWaitConditionHandle_Override ¶

func NewCfnWaitConditionHandle_Override(c CfnWaitConditionHandle, scope constructs.Construct, id *string)

Create a new `AWS::CloudFormation::WaitConditionHandle`.

func NewCfnWaitCondition_Override ¶

func NewCfnWaitCondition_Override(c CfnWaitCondition, scope constructs.Construct, id *string, props *CfnWaitConditionProps)

Create a new `AWS::CloudFormation::WaitCondition`.

func NewCustomResourceProvider_Override ¶

func NewCustomResourceProvider_Override(c CustomResourceProvider, scope constructs.Construct, id *string, props *CustomResourceProviderProps)

Experimental.

func NewCustomResource_Override ¶

func NewCustomResource_Override(c CustomResource, scope constructs.Construct, id *string, props *CustomResourceProps)

Experimental.

func NewDefaultStackSynthesizer_Override ¶

func NewDefaultStackSynthesizer_Override(d DefaultStackSynthesizer, props *DefaultStackSynthesizerProps)

Experimental.

func NewDefaultTokenResolver_Override ¶

func NewDefaultTokenResolver_Override(d DefaultTokenResolver, concat IFragmentConcatenator)

Experimental.

func NewDockerIgnoreStrategy_Override ¶

func NewDockerIgnoreStrategy_Override(d DockerIgnoreStrategy, absoluteRootPath *string, patterns *[]*string)

Experimental.

func NewDockerImage_Override ¶

func NewDockerImage_Override(d DockerImage, image *string, _imageHash *string)

Experimental.

func NewFileSystem_Override ¶

func NewFileSystem_Override(f FileSystem)

Experimental.

func NewGitIgnoreStrategy_Override ¶

func NewGitIgnoreStrategy_Override(g GitIgnoreStrategy, absoluteRootPath *string, patterns *[]*string)

Experimental.

func NewGlobIgnoreStrategy_Override ¶

func NewGlobIgnoreStrategy_Override(g GlobIgnoreStrategy, absoluteRootPath *string, patterns *[]*string)

Experimental.

func NewIgnoreStrategy_Override ¶

func NewIgnoreStrategy_Override(i IgnoreStrategy)

Experimental.

func NewIntrinsic_Override ¶

func NewIntrinsic_Override(i Intrinsic, value interface{}, options *IntrinsicProps)

Experimental.

func NewLegacyStackSynthesizer_Override ¶

func NewLegacyStackSynthesizer_Override(l LegacyStackSynthesizer)

Experimental.

func NewNestedStackSynthesizer_Override ¶

func NewNestedStackSynthesizer_Override(n NestedStackSynthesizer, parentDeployment IStackSynthesizer)

Experimental.

func NewNestedStack_Override ¶

func NewNestedStack_Override(n NestedStack, scope constructs.Construct, id *string, props *NestedStackProps)

Experimental.

func NewReference_Override ¶

func NewReference_Override(r Reference, value interface{}, target constructs.IConstruct, displayName *string)

Experimental.

func NewRemoveTag_Override ¶

func NewRemoveTag_Override(r RemoveTag, key *string, props *TagProps)

Experimental.

func NewResource_Override ¶

func NewResource_Override(r Resource, scope constructs.Construct, id *string, props *ResourceProps)

Experimental.

func NewScopedAws_Override ¶

func NewScopedAws_Override(s ScopedAws, scope constructs.Construct)

Experimental.

func NewSecretValue_Override ¶

func NewSecretValue_Override(s SecretValue, value interface{}, options *IntrinsicProps)

Experimental.

func NewStackSynthesizer_Override ¶

func NewStackSynthesizer_Override(s StackSynthesizer)

Experimental.

func NewStack_Override ¶

func NewStack_Override(s Stack, scope constructs.Construct, id *string, props *StackProps)

Creates a new stack. Experimental.

func NewStage_Override ¶

func NewStage_Override(s Stage, scope constructs.Construct, id *string, props *StageProps)

Experimental.

func NewStringConcat_Override ¶

func NewStringConcat_Override(s StringConcat)

Experimental.

func NewTagManager_Override ¶

func NewTagManager_Override(t TagManager, tagType TagType, resourceTypeName *string, tagStructure interface{}, options *TagManagerOptions)

Experimental.

func NewTag_Override ¶

func NewTag_Override(t Tag, key *string, value *string, props *TagProps)

Experimental.

func NewTokenizedStringFragments_Override ¶

func NewTokenizedStringFragments_Override(t TokenizedStringFragments)

Experimental.

func NewTreeInspector_Override ¶

func NewTreeInspector_Override(t TreeInspector)

Experimental.

func NewValidationResult_Override ¶

func NewValidationResult_Override(v ValidationResult, errorMessage *string, results ValidationResults)

Experimental.

func NewValidationResults_Override ¶

func NewValidationResults_Override(v ValidationResults, results *[]ValidationResult)

Experimental.

func PhysicalName_GENERATE_IF_NEEDED ¶

func PhysicalName_GENERATE_IF_NEEDED() *string

func Reference_IsReference ¶

func Reference_IsReference(x interface{}) *bool

Check whether this is actually a Reference. Experimental.

func Resource_IsConstruct ¶

func Resource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func Resource_IsResource ¶

func Resource_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Stack_IsConstruct ¶

func Stack_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func Stack_IsStack ¶

func Stack_IsStack(x interface{}) *bool

Return whether the given object is a Stack.

We do attribute detection since we can't reliably use 'instanceof'. Experimental.

func Stage_IsConstruct ¶

func Stage_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func Stage_IsStage ¶

func Stage_IsStage(x interface{}) *bool

Test whether the given construct is a stage. Experimental.

func TagManager_IsTaggable ¶

func TagManager_IsTaggable(construct interface{}) *bool

Check whether the given construct is Taggable. Experimental.

func Token_AsList ¶

func Token_AsList(value interface{}, options *EncodingOptions) *[]*string

Return a reversible list representation of this token. Experimental.

func Token_AsNumber ¶

func Token_AsNumber(value interface{}) *float64

Return a reversible number representation of this token. Experimental.

func Token_AsString ¶

func Token_AsString(value interface{}, options *EncodingOptions) *string

Return a reversible string representation of this token.

If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.

Strings with quoted Tokens in them can be restored back into complex values with the Tokens restored by calling `resolve()` on the string. Experimental.

func Token_IsUnresolved ¶

func Token_IsUnresolved(obj interface{}) *bool

Returns true if obj represents an unresolved value.

One of these must be true:

- `obj` is an IResolvable - `obj` is a string containing at least one encoded `IResolvable` - `obj` is either an encoded number or list

This does NOT recurse into lists or objects to see if they containing resolvables. Experimental.

func Tokenization_IsResolvable ¶

func Tokenization_IsResolvable(obj interface{}) *bool

Return whether the given object is an IResolvable object.

This is different from Token.isUnresolved() which will also check for encoded Tokens, whereas this method will only do a type check on the given object. Experimental.

func Tokenization_Resolve ¶

func Tokenization_Resolve(obj interface{}, options *ResolveOptions) interface{}

Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays.

Values can only be primitives, arrays or tokens. Other objects (i.e. with methods) will be rejected. Experimental.

func Tokenization_StringifyNumber ¶

func Tokenization_StringifyNumber(x *float64) *string

Stringify a number directly or lazily if it's a Token.

If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is. Experimental.

Types ¶

type Annotations ¶

type Annotations interface {
	AddDeprecation(api *string, message *string)
	AddError(message *string)
	AddInfo(message *string)
	AddWarning(message *string)
}

Includes API for attaching annotations such as warning messages to constructs. Experimental.

func Annotations_Of ¶

func Annotations_Of(scope constructs.IConstruct) Annotations

Returns the annotations API for a construct scope. Experimental.

type App ¶

type App interface {
	Stage
	Account() *string
	ArtifactId() *string
	AssetOutdir() *string
	Node() constructs.Node
	Outdir() *string
	ParentStage() Stage
	Region() *string
	StageName() *string
	Synth(options *StageSynthesisOptions) cxapi.CloudAssembly
	ToString() *string
}

A construct which represents an entire CDK app. This construct is normally the root of the construct tree.

You would normally define an `App` instance in your program's entrypoint, then define constructs where the app is used as the parent scope.

After all the child constructs are defined within the app, you should call `app.synth()` which will emit a "cloud assembly" from this app into the directory specified by `outdir`. Cloud assemblies includes artifacts such as CloudFormation templates and assets that are needed to deploy this app into the AWS cloud. See: https://docs.aws.amazon.com/cdk/latest/guide/apps.html

Experimental.

func NewApp ¶

func NewApp(props *AppProps) App

Initializes a CDK application. Experimental.

type AppProps ¶

type AppProps struct {
	// Include runtime versioning information in the Stacks of this app.
	// Experimental.
	AnalyticsReporting *bool `json:"analyticsReporting"`
	// Automatically call `synth()` before the program exits.
	//
	// If you set this, you don't have to call `synth()` explicitly. Note that
	// this feature is only available for certain programming languages, and
	// calling `synth()` is still recommended.
	// Experimental.
	AutoSynth *bool `json:"autoSynth"`
	// Additional context values for the application.
	//
	// Context set by the CLI or the `context` key in `cdk.json` has precedence.
	//
	// Context can be read from any construct using `node.getContext(key)`.
	// Experimental.
	Context *map[string]interface{} `json:"context"`
	// The output directory into which to emit synthesized artifacts.
	// Experimental.
	Outdir *string `json:"outdir"`
	// Include construct creation stack trace in the `aws:cdk:trace` metadata key of all constructs.
	// Experimental.
	StackTraces *bool `json:"stackTraces"`
	// Include construct tree metadata as part of the Cloud Assembly.
	// Experimental.
	TreeMetadata *bool `json:"treeMetadata"`
}

Initialization props for apps. Experimental.

type Arn ¶

type Arn interface {
}

Experimental.

type ArnComponents ¶

type ArnComponents struct {
	// Resource type (e.g. "table", "autoScalingGroup", "certificate"). For some resource types, e.g. S3 buckets, this field defines the bucket name.
	// Experimental.
	Resource *string `json:"resource"`
	// The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline').
	// Experimental.
	Service *string `json:"service"`
	// The ID of the AWS account that owns the resource, without the hyphens.
	//
	// For example, 123456789012. Note that the ARNs for some resources don't
	// require an account number, so this component might be omitted.
	// Experimental.
	Account *string `json:"account"`
	// The specific ARN format to use for this ARN value.
	// Experimental.
	ArnFormat ArnFormat `json:"arnFormat"`
	// The partition that the resource is in.
	//
	// For standard AWS regions, the
	// partition is aws. If you have resources in other partitions, the
	// partition is aws-partitionname. For example, the partition for resources
	// in the China (Beijing) region is aws-cn.
	// Experimental.
	Partition *string `json:"partition"`
	// The region the resource resides in.
	//
	// Note that the ARNs for some resources
	// do not require a region, so this component might be omitted.
	// Experimental.
	Region *string `json:"region"`
	// Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as “"*"“. This is service-dependent.
	// Experimental.
	ResourceName *string `json:"resourceName"`
}

Experimental.

func Arn_Split ¶

func Arn_Split(arn *string, arnFormat ArnFormat) *ArnComponents

Splits the provided ARN into its components.

Works both if 'arn' is a string like 'arn:aws:s3:::bucket', and a Token representing a dynamic CloudFormation expression (in which case the returned components will also be dynamic CloudFormation expressions, encoded as Tokens). Experimental.

type ArnFormat ¶

type ArnFormat string

An enum representing the various ARN formats that different services use. Experimental.

const (
	ArnFormat_NO_RESOURCE_NAME                   ArnFormat = "NO_RESOURCE_NAME"
	ArnFormat_COLON_RESOURCE_NAME                ArnFormat = "COLON_RESOURCE_NAME"
	ArnFormat_SLASH_RESOURCE_NAME                ArnFormat = "SLASH_RESOURCE_NAME"
	ArnFormat_SLASH_RESOURCE_SLASH_RESOURCE_NAME ArnFormat = "SLASH_RESOURCE_SLASH_RESOURCE_NAME"
)

type Aspects ¶

type Aspects interface {
	All() *[]IAspect
	Add(aspect IAspect)
}

Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis. Experimental.

func Aspects_Of ¶

func Aspects_Of(scope constructs.IConstruct) Aspects

Returns the `Aspects` object associated with a construct scope. Experimental.

type AssetHashType ¶

type AssetHashType string

The type of asset hash.

NOTE: the hash is used in order to identify a specific revision of the asset, and used for optimizing and caching deployment activities related to this asset such as packaging, uploading to Amazon S3, etc. Experimental.

const (
	AssetHashType_SOURCE AssetHashType = "SOURCE"
	AssetHashType_BUNDLE AssetHashType = "BUNDLE"
	AssetHashType_OUTPUT AssetHashType = "OUTPUT"
	AssetHashType_CUSTOM AssetHashType = "CUSTOM"
)

type AssetOptions ¶

type AssetOptions struct {
	// Specify a custom hash for this asset.
	//
	// If `assetHashType` is set it must
	// be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will
	// be SHA256 hashed and encoded as hex. The resulting hash will be the asset
	// hash.
	//
	// NOTE: the hash is used in order to identify a specific revision of the asset, and
	// used for optimizing and caching deployment activities related to this asset such as
	// packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will
	// need to make sure it is updated every time the asset changes, or otherwise it is
	// possible that some deployments will not be invalidated.
	// Experimental.
	AssetHash *string `json:"assetHash"`
	// Specifies the type of hash to calculate for this asset.
	//
	// If `assetHash` is configured, this option must be `undefined` or
	// `AssetHashType.CUSTOM`.
	// Experimental.
	AssetHashType AssetHashType `json:"assetHashType"`
	// Bundle the asset by executing a command in a Docker container or a custom bundling provider.
	//
	// The asset path will be mounted at `/asset-input`. The Docker
	// container is responsible for putting content at `/asset-output`.
	// The content at `/asset-output` will be zipped and used as the
	// final asset.
	// Experimental.
	Bundling *BundlingOptions `json:"bundling"`
}

Asset hash options. Experimental.

type AssetStaging ¶

type AssetStaging interface {
	constructs.Construct
	AbsoluteStagedPath() *string
	AssetHash() *string
	IsArchive() *bool
	Node() constructs.Node
	Packaging() FileAssetPackaging
	SourcePath() *string
	RelativeStagedPath(stack Stack) *string
	ToString() *string
}

Stages a file or directory from a location on the file system into a staging directory.

This is controlled by the context key 'aws:cdk:asset-staging' and enabled by the CLI by default in order to ensure that when the CDK app exists, all assets are available for deployment. Otherwise, if an app references assets in temporary locations, those will not be available when it exists (see https://github.com/aws/aws-cdk/issues/1716).

The `stagedPath` property is a stringified token that represents the location of the file or directory after staging. It will be resolved only during the "prepare" stage and may be either the original path or the staged path depending on the context setting.

The file/directory are staged based on their content hash (fingerprint). This means that only if content was changed, copy will happen. Experimental.

func NewAssetStaging ¶

func NewAssetStaging(scope constructs.Construct, id *string, props *AssetStagingProps) AssetStaging

Experimental.

type AssetStagingProps ¶

type AssetStagingProps struct {
	// Glob patterns to exclude from the copy.
	// Experimental.
	Exclude *[]*string `json:"exclude"`
	// A strategy for how to handle symlinks.
	// Experimental.
	Follow SymlinkFollowMode `json:"follow"`
	// The ignore behavior to use for exclude patterns.
	// Experimental.
	IgnoreMode IgnoreMode `json:"ignoreMode"`
	// Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
	// Experimental.
	ExtraHash *string `json:"extraHash"`
	// Specify a custom hash for this asset.
	//
	// If `assetHashType` is set it must
	// be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will
	// be SHA256 hashed and encoded as hex. The resulting hash will be the asset
	// hash.
	//
	// NOTE: the hash is used in order to identify a specific revision of the asset, and
	// used for optimizing and caching deployment activities related to this asset such as
	// packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will
	// need to make sure it is updated every time the asset changes, or otherwise it is
	// possible that some deployments will not be invalidated.
	// Experimental.
	AssetHash *string `json:"assetHash"`
	// Specifies the type of hash to calculate for this asset.
	//
	// If `assetHash` is configured, this option must be `undefined` or
	// `AssetHashType.CUSTOM`.
	// Experimental.
	AssetHashType AssetHashType `json:"assetHashType"`
	// Bundle the asset by executing a command in a Docker container or a custom bundling provider.
	//
	// The asset path will be mounted at `/asset-input`. The Docker
	// container is responsible for putting content at `/asset-output`.
	// The content at `/asset-output` will be zipped and used as the
	// final asset.
	// Experimental.
	Bundling *BundlingOptions `json:"bundling"`
	// The source file or directory to copy from.
	// Experimental.
	SourcePath *string `json:"sourcePath"`
}

Initialization properties for `AssetStaging`. Experimental.

type Aws ¶

type Aws interface {
}

Accessor for pseudo parameters.

Since pseudo parameters need to be anchored to a stack somewhere in the construct tree, this class takes an scope parameter; the pseudo parameter values can be obtained as properties from an scoped object. Experimental.

type BootstraplessSynthesizer ¶

type BootstraplessSynthesizer interface {
	DefaultStackSynthesizer
	CloudFormationExecutionRoleArn() *string
	DeployRoleArn() *string
	Stack() Stack
	AddDockerImageAsset(_asset *DockerImageAssetSource) *DockerImageAssetLocation
	AddFileAsset(_asset *FileAssetSource) *FileAssetLocation
	Bind(stack Stack)
	EmitStackArtifact(stack Stack, session ISynthesisSession, options *SynthesizeStackArtifactOptions)
	Synthesize(session ISynthesisSession)
	SynthesizeStackTemplate(stack Stack, session ISynthesisSession)
}

A special synthesizer that behaves similarly to DefaultStackSynthesizer, but doesn't require bootstrapping the environment it operates in.

Because of that, stacks using it cannot have assets inside of them. Used by the CodePipeline construct for the support stacks needed for cross-region replication S3 buckets. Experimental.

func NewBootstraplessSynthesizer ¶

func NewBootstraplessSynthesizer(props *BootstraplessSynthesizerProps) BootstraplessSynthesizer

Experimental.

type BootstraplessSynthesizerProps ¶

type BootstraplessSynthesizerProps struct {
	// The CFN execution Role ARN to use.
	// Experimental.
	CloudFormationExecutionRoleArn *string `json:"cloudFormationExecutionRoleArn"`
	// The deploy Role ARN to use.
	// Experimental.
	DeployRoleArn *string `json:"deployRoleArn"`
}

Construction properties of {@link BootstraplessSynthesizer}. Experimental.

type BundlingOptions ¶

type BundlingOptions struct {
	// The Docker image where the command will run.
	// Experimental.
	Image DockerImage `json:"image"`
	// The command to run in the Docker container.
	//
	// TODO: EXAMPLE
	//
	// See: https://docs.docker.com/engine/reference/run/
	//
	// Experimental.
	Command *[]*string `json:"command"`
	// The entrypoint to run in the Docker container.
	//
	// TODO: EXAMPLE
	//
	// See: https://docs.docker.com/engine/reference/builder/#entrypoint
	//
	// Experimental.
	Entrypoint *[]*string `json:"entrypoint"`
	// The environment variables to pass to the Docker container.
	// Experimental.
	Environment *map[string]*string `json:"environment"`
	// Local bundling provider.
	//
	// The provider implements a method `tryBundle()` which should return `true`
	// if local bundling was performed. If `false` is returned, docker bundling
	// will be done.
	// Experimental.
	Local ILocalBundling `json:"local"`
	// The type of output that this bundling operation is producing.
	// Experimental.
	OutputType BundlingOutput `json:"outputType"`
	// [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
	// Experimental.
	SecurityOpt *string `json:"securityOpt"`
	// The user to use when running the Docker container.
	//
	// user | user:group | uid | uid:gid | user:gid | uid:group
	// See: https://docs.docker.com/engine/reference/run/#user
	//
	// Experimental.
	User *string `json:"user"`
	// Additional Docker volumes to mount.
	// Experimental.
	Volumes *[]*DockerVolume `json:"volumes"`
	// Working directory inside the Docker container.
	// Experimental.
	WorkingDirectory *string `json:"workingDirectory"`
}

Bundling options. Experimental.

type BundlingOutput ¶

type BundlingOutput string

The type of output that a bundling operation is producing. Experimental.

const (
	BundlingOutput_ARCHIVED      BundlingOutput = "ARCHIVED"
	BundlingOutput_NOT_ARCHIVED  BundlingOutput = "NOT_ARCHIVED"
	BundlingOutput_AUTO_DISCOVER BundlingOutput = "AUTO_DISCOVER"
)

type CfnAutoScalingReplacingUpdate ¶

type CfnAutoScalingReplacingUpdate struct {
	// Experimental.
	WillReplace *bool `json:"willReplace"`
}

Specifies whether an Auto Scaling group and the instances it contains are replaced during an update.

During replacement, AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation can roll back to the old Auto Scaling group and delete the new Auto Scaling group.

While AWS CloudFormation creates the new group, it doesn't detach or attach any instances. After successfully creating the new Auto Scaling group, AWS CloudFormation deletes the old Auto Scaling group during the cleanup process.

When you set the WillReplace parameter, remember to specify a matching CreationPolicy. If the minimum number of instances (specified by the MinSuccessfulInstancesPercent property) don't signal success within the Timeout period (specified in the CreationPolicy policy), the replacement update fails and AWS CloudFormation rolls back to the old Auto Scaling group. Experimental.

type CfnAutoScalingRollingUpdate ¶

type CfnAutoScalingRollingUpdate struct {
	// Specifies the maximum number of instances that AWS CloudFormation updates.
	// Experimental.
	MaxBatchSize *float64 `json:"maxBatchSize"`
	// Specifies the minimum number of instances that must be in service within the Auto Scaling group while AWS CloudFormation updates old instances.
	// Experimental.
	MinInstancesInService *float64 `json:"minInstancesInService"`
	// Specifies the percentage of instances in an Auto Scaling rolling update that must signal success for an update to succeed.
	//
	// You can specify a value from 0 to 100. AWS CloudFormation rounds to the nearest tenth of a percent. For example, if you
	// update five instances with a minimum successful percentage of 50, three instances must signal success.
	//
	// If an instance doesn't send a signal within the time specified in the PauseTime property, AWS CloudFormation assumes
	// that the instance wasn't updated.
	//
	// If you specify this property, you must also enable the WaitOnResourceSignals and PauseTime properties.
	// Experimental.
	MinSuccessfulInstancesPercent *float64 `json:"minSuccessfulInstancesPercent"`
	// The amount of time that AWS CloudFormation pauses after making a change to a batch of instances to give those instances time to start software applications.
	//
	// For example, you might need to specify PauseTime when scaling up the number of
	// instances in an Auto Scaling group.
	//
	// If you enable the WaitOnResourceSignals property, PauseTime is the amount of time that AWS CloudFormation should wait
	// for the Auto Scaling group to receive the required number of valid signals from added or replaced instances. If the
	// PauseTime is exceeded before the Auto Scaling group receives the required number of signals, the update fails. For best
	// results, specify a time period that gives your applications sufficient time to get started. If the update needs to be
	// rolled back, a short PauseTime can cause the rollback to fail.
	//
	// Specify PauseTime in the ISO8601 duration format (in the format PT#H#M#S, where each # is the number of hours, minutes,
	// and seconds, respectively). The maximum PauseTime is one hour (PT1H).
	// Experimental.
	PauseTime *string `json:"pauseTime"`
	// Specifies the Auto Scaling processes to suspend during a stack update.
	//
	// Suspending processes prevents Auto Scaling from
	// interfering with a stack update. For example, you can suspend alarming so that Auto Scaling doesn't execute scaling
	// policies associated with an alarm. For valid values, see the ScalingProcesses.member.N parameter for the SuspendProcesses
	// action in the Auto Scaling API Reference.
	// Experimental.
	SuspendProcesses *[]*string `json:"suspendProcesses"`
	// Specifies whether the Auto Scaling group waits on signals from new instances during an update.
	//
	// Use this property to
	// ensure that instances have completed installing and configuring applications before the Auto Scaling group update proceeds.
	// AWS CloudFormation suspends the update of an Auto Scaling group after new EC2 instances are launched into the group.
	// AWS CloudFormation must receive a signal from each new instance within the specified PauseTime before continuing the update.
	// To signal the Auto Scaling group, use the cfn-signal helper script or SignalResource API.
	//
	// To have instances wait for an Elastic Load Balancing health check before they signal success, add a health-check
	// verification by using the cfn-init helper script. For an example, see the verify_instance_health command in the Auto Scaling
	// rolling updates sample template.
	// Experimental.
	WaitOnResourceSignals *bool `json:"waitOnResourceSignals"`
}

To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy.

Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling group in batches or all at once. Experimental.

type CfnAutoScalingScheduledAction ¶

type CfnAutoScalingScheduledAction struct {
	// Experimental.
	IgnoreUnmodifiedGroupSizeProperties *bool `json:"ignoreUnmodifiedGroupSizeProperties"`
}

With scheduled actions, the group size properties of an Auto Scaling group can change at any time.

When you update a stack with an Auto Scaling group and scheduled action, AWS CloudFormation always sets the group size property values of your Auto Scaling group to the values that are defined in the AWS::AutoScaling::AutoScalingGroup resource of your template, even if a scheduled action is in effect.

If you do not want AWS CloudFormation to change any of the group size property values when you have a scheduled action in effect, use the AutoScalingScheduledAction update policy to prevent AWS CloudFormation from changing the MinSize, MaxSize, or DesiredCapacity properties unless you have modified these values in your template.\ Experimental.

type CfnCapabilities ¶

type CfnCapabilities string

Capabilities that affect whether CloudFormation is allowed to change IAM resources. Experimental.

const (
	CfnCapabilities_NONE          CfnCapabilities = "NONE"
	CfnCapabilities_ANONYMOUS_IAM CfnCapabilities = "ANONYMOUS_IAM"
	CfnCapabilities_NAMED_IAM     CfnCapabilities = "NAMED_IAM"
	CfnCapabilities_AUTO_EXPAND   CfnCapabilities = "AUTO_EXPAND"
)

type CfnCodeDeployBlueGreenAdditionalOptions ¶

type CfnCodeDeployBlueGreenAdditionalOptions struct {
	// Specifies time to wait, in minutes, before terminating the blue resources.
	// Experimental.
	TerminationWaitTimeInMinutes *float64 `json:"terminationWaitTimeInMinutes"`
}

Additional options for the blue/green deployment.

The type of the {@link CfnCodeDeployBlueGreenHookProps.additionalOptions} property. Experimental.

type CfnCodeDeployBlueGreenApplication ¶

type CfnCodeDeployBlueGreenApplication struct {
	// The detailed attributes of the deployed target.
	// Experimental.
	EcsAttributes *CfnCodeDeployBlueGreenEcsAttributes `json:"ecsAttributes"`
	// The target that is being deployed.
	// Experimental.
	Target *CfnCodeDeployBlueGreenApplicationTarget `json:"target"`
}

The application actually being deployed.

Type of the {@link CfnCodeDeployBlueGreenHookProps.applications} property. Experimental.

type CfnCodeDeployBlueGreenApplicationTarget ¶

type CfnCodeDeployBlueGreenApplicationTarget struct {
	// The logical id of the target resource.
	// Experimental.
	LogicalId *string `json:"logicalId"`
	// The resource type of the target being deployed.
	//
	// Right now, the only allowed value is 'AWS::ECS::Service'.
	// Experimental.
	Type *string `json:"type"`
}

Type of the {@link CfnCodeDeployBlueGreenApplication.target} property. Experimental.

type CfnCodeDeployBlueGreenEcsAttributes ¶

type CfnCodeDeployBlueGreenEcsAttributes struct {
	// The logical IDs of the blue and green, respectively, AWS::ECS::TaskDefinition task definitions.
	// Experimental.
	TaskDefinitions *[]*string `json:"taskDefinitions"`
	// The logical IDs of the blue and green, respectively, AWS::ECS::TaskSet task sets.
	// Experimental.
	TaskSets *[]*string `json:"taskSets"`
	// The traffic routing configuration.
	// Experimental.
	TrafficRouting *CfnTrafficRouting `json:"trafficRouting"`
}

The attributes of the ECS Service being deployed.

Type of the {@link CfnCodeDeployBlueGreenApplication.ecsAttributes} property. Experimental.

type CfnCodeDeployBlueGreenHook ¶

type CfnCodeDeployBlueGreenHook interface {
	CfnHook
	AdditionalOptions() *CfnCodeDeployBlueGreenAdditionalOptions
	SetAdditionalOptions(val *CfnCodeDeployBlueGreenAdditionalOptions)
	Applications() *[]*CfnCodeDeployBlueGreenApplication
	SetApplications(val *[]*CfnCodeDeployBlueGreenApplication)
	CreationStack() *[]*string
	LifecycleEventHooks() *CfnCodeDeployBlueGreenLifecycleEventHooks
	SetLifecycleEventHooks(val *CfnCodeDeployBlueGreenLifecycleEventHooks)
	LogicalId() *string
	Node() constructs.Node
	ServiceRole() *string
	SetServiceRole(val *string)
	Stack() Stack
	TrafficRoutingConfig() *CfnTrafficRoutingConfig
	SetTrafficRoutingConfig(val *CfnTrafficRoutingConfig)
	Type() *string
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(_props *map[string]interface{}) *map[string]interface{}
	ToString() *string
}

A CloudFormation Hook for CodeDeploy blue-green ECS deployments. See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html#blue-green-template-reference

Experimental.

func NewCfnCodeDeployBlueGreenHook ¶

func NewCfnCodeDeployBlueGreenHook(scope constructs.Construct, id *string, props *CfnCodeDeployBlueGreenHookProps) CfnCodeDeployBlueGreenHook

Creates a new CodeDeploy blue-green ECS Hook. Experimental.

type CfnCodeDeployBlueGreenHookProps ¶

type CfnCodeDeployBlueGreenHookProps struct {
	// Properties of the Amazon ECS applications being deployed.
	// Experimental.
	Applications *[]*CfnCodeDeployBlueGreenApplication `json:"applications"`
	// The IAM Role for CloudFormation to use to perform blue-green deployments.
	// Experimental.
	ServiceRole *string `json:"serviceRole"`
	// Additional options for the blue/green deployment.
	// Experimental.
	AdditionalOptions *CfnCodeDeployBlueGreenAdditionalOptions `json:"additionalOptions"`
	// Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
	//
	// You can use the same function or a different one for deployment lifecycle events.
	// Following completion of the validation tests,
	// the Lambda {@link CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic}
	// function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
	// Experimental.
	LifecycleEventHooks *CfnCodeDeployBlueGreenLifecycleEventHooks `json:"lifecycleEventHooks"`
	// Traffic routing configuration settings.
	// Experimental.
	TrafficRoutingConfig *CfnTrafficRoutingConfig `json:"trafficRoutingConfig"`
}

Construction properties of {@link CfnCodeDeployBlueGreenHook}. Experimental.

type CfnCodeDeployBlueGreenLifecycleEventHooks ¶

type CfnCodeDeployBlueGreenLifecycleEventHooks struct {
	// Function to use to run tasks after the test listener serves traffic to the replacement task set.
	// Experimental.
	AfterAllowTestTraffic *string `json:"afterAllowTestTraffic"`
	// Function to use to run tasks after the second target group serves traffic to the replacement task set.
	// Experimental.
	AfterAllowTraffic *string `json:"afterAllowTraffic"`
	// Function to use to run tasks after the replacement task set is created and one of the target groups is associated with it.
	// Experimental.
	AfterInstall *string `json:"afterInstall"`
	// Function to use to run tasks after the second target group is associated with the replacement task set, but before traffic is shifted to the replacement task set.
	// Experimental.
	BeforeAllowTraffic *string `json:"beforeAllowTraffic"`
	// Function to use to run tasks before the replacement task set is created.
	// Experimental.
	BeforeInstall *string `json:"beforeInstall"`
}

Lifecycle events for blue-green deployments.

The type of the {@link CfnCodeDeployBlueGreenHookProps.lifecycleEventHooks} property. Experimental.

type CfnCodeDeployLambdaAliasUpdate ¶

type CfnCodeDeployLambdaAliasUpdate struct {
	// The name of the AWS CodeDeploy application.
	// Experimental.
	ApplicationName *string `json:"applicationName"`
	// The name of the AWS CodeDeploy deployment group.
	//
	// This is where the traffic-shifting policy is set.
	// Experimental.
	DeploymentGroupName *string `json:"deploymentGroupName"`
	// The name of the Lambda function to run after traffic routing completes.
	// Experimental.
	AfterAllowTrafficHook *string `json:"afterAllowTrafficHook"`
	// The name of the Lambda function to run before traffic routing starts.
	// Experimental.
	BeforeAllowTrafficHook *string `json:"beforeAllowTrafficHook"`
}

To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy. Experimental.

type CfnCondition ¶

type CfnCondition interface {
	CfnElement
	ICfnConditionExpression
	IResolvable
	CreationStack() *[]*string
	Expression() ICfnConditionExpression
	SetExpression(val ICfnConditionExpression)
	LogicalId() *string
	Node() constructs.Node
	Stack() Stack
	OverrideLogicalId(newLogicalId *string)
	Resolve(_context IResolveContext) interface{}
	ToString() *string
}

Represents a CloudFormation condition, for resources which must be conditionally created and the determination must be made at deploy time. Experimental.

func NewCfnCondition ¶

func NewCfnCondition(scope constructs.Construct, id *string, props *CfnConditionProps) CfnCondition

Build a new condition.

The condition must be constructed with a condition token, that the condition is based on. Experimental.

type CfnConditionProps ¶

type CfnConditionProps struct {
	// The expression that the condition will evaluate.
	// Experimental.
	Expression ICfnConditionExpression `json:"expression"`
}

Experimental.

type CfnCreationPolicy ¶

type CfnCreationPolicy struct {
	// For an Auto Scaling group replacement update, specifies how many instances must signal success for the update to succeed.
	// Experimental.
	AutoScalingCreationPolicy *CfnResourceAutoScalingCreationPolicy `json:"autoScalingCreationPolicy"`
	// When AWS CloudFormation creates the associated resource, configures the number of required success signals and the length of time that AWS CloudFormation waits for those signals.
	// Experimental.
	ResourceSignal *CfnResourceSignal `json:"resourceSignal"`
}

Associate the CreationPolicy attribute with a resource to prevent its status from reaching create complete until AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded.

To signal a resource, you can use the cfn-signal helper script or SignalResource API. AWS CloudFormation publishes valid signals to the stack events so that you track the number of signals sent.

The creation policy is invoked only when AWS CloudFormation creates the associated resource. Currently, the only AWS CloudFormation resources that support creation policies are AWS::AutoScaling::AutoScalingGroup, AWS::EC2::Instance, and AWS::CloudFormation::WaitCondition.

Use the CreationPolicy attribute when you want to wait on resource configuration actions before stack creation proceeds. For example, if you install and configure software applications on an EC2 instance, you might want those applications to be running before proceeding. In such cases, you can add a CreationPolicy attribute to the instance, and then send a success signal to the instance after the applications are installed and configured. For a detailed example, see Deploying Applications on Amazon EC2 with AWS CloudFormation. Experimental.

type CfnCustomResource ¶

type CfnCustomResource interface {
	CfnResource
	IInspectable
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	ServiceToken() *string
	SetServiceToken(val *string)
	Stack() Stack
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::CustomResource`.

func NewCfnCustomResource ¶

func NewCfnCustomResource(scope constructs.Construct, id *string, props *CfnCustomResourceProps) CfnCustomResource

Create a new `AWS::CloudFormation::CustomResource`.

type CfnCustomResourceProps ¶

type CfnCustomResourceProps struct {
	// `AWS::CloudFormation::CustomResource.ServiceToken`.
	ServiceToken *string `json:"serviceToken"`
}

Properties for defining a `AWS::CloudFormation::CustomResource`.

type CfnDeletionPolicy ¶

type CfnDeletionPolicy string

With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted.

You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. Note that this capability also applies to update operations that lead to resources being removed. Experimental.

const (
	CfnDeletionPolicy_DELETE   CfnDeletionPolicy = "DELETE"
	CfnDeletionPolicy_RETAIN   CfnDeletionPolicy = "RETAIN"
	CfnDeletionPolicy_SNAPSHOT CfnDeletionPolicy = "SNAPSHOT"
)

type CfnDynamicReference ¶

type CfnDynamicReference interface {
	Intrinsic
	CreationStack() *[]*string
	NewError(message *string) interface{}
	Resolve(_context IResolveContext) interface{}
	ToJSON() interface{}
	ToString() *string
}

References a dynamically retrieved value.

This is a Construct so that subclasses will (eventually) be able to attach metadata to themselves without having to change call signatures. See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html

Experimental.

func NewCfnDynamicReference ¶

func NewCfnDynamicReference(service CfnDynamicReferenceService, key *string) CfnDynamicReference

Experimental.

type CfnDynamicReferenceProps ¶

type CfnDynamicReferenceProps struct {
	// The reference key of the dynamic reference.
	// Experimental.
	ReferenceKey *string `json:"referenceKey"`
	// The service to retrieve the dynamic reference from.
	// Experimental.
	Service CfnDynamicReferenceService `json:"service"`
}

Properties for a Dynamic Reference. Experimental.

type CfnDynamicReferenceService ¶

type CfnDynamicReferenceService string

The service to retrieve the dynamic reference from. Experimental.

const (
	CfnDynamicReferenceService_SSM             CfnDynamicReferenceService = "SSM"
	CfnDynamicReferenceService_SSM_SECURE      CfnDynamicReferenceService = "SSM_SECURE"
	CfnDynamicReferenceService_SECRETS_MANAGER CfnDynamicReferenceService = "SECRETS_MANAGER"
)

type CfnElement ¶

type CfnElement interface {
	constructs.Construct
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Stack() Stack
	OverrideLogicalId(newLogicalId *string)
	ToString() *string
}

An element of a CloudFormation stack. Experimental.

type CfnHook ¶

type CfnHook interface {
	CfnElement
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Stack() Stack
	Type() *string
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ToString() *string
}

Represents a CloudFormation resource. Experimental.

func NewCfnHook ¶

func NewCfnHook(scope constructs.Construct, id *string, props *CfnHookProps) CfnHook

Creates a new Hook object. Experimental.

type CfnHookProps ¶

type CfnHookProps struct {
	// The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
	// Experimental.
	Type *string `json:"type"`
	// The properties of the hook.
	// Experimental.
	Properties *map[string]interface{} `json:"properties"`
}

Construction properties of {@link CfnHook}. Experimental.

type CfnJson ¶

type CfnJson interface {
	constructs.Construct
	IResolvable
	CreationStack() *[]*string
	Node() constructs.Node
	Value() Reference
	Resolve(_arg IResolveContext) interface{}
	ToJSON() *string
	ToString() *string
}

Captures a synthesis-time JSON object a CloudFormation reference which resolves during deployment to the resolved values of the JSON object.

The main use case for this is to overcome a limitation in CloudFormation that does not allow using intrinsic functions as dictionary keys (because dictionary keys in JSON must be strings). Specifically this is common in IAM conditions such as `StringEquals: { lhs: "rhs" }` where you want "lhs" to be a reference.

This object is resolvable, so it can be used as a value.

This construct is backed by a custom resource. Experimental.

func NewCfnJson ¶

func NewCfnJson(scope constructs.Construct, id *string, props *CfnJsonProps) CfnJson

Experimental.

type CfnJsonProps ¶

type CfnJsonProps struct {
	// The value to resolve.
	//
	// Can be any JavaScript object, including tokens and
	// references in keys or values.
	// Experimental.
	Value interface{} `json:"value"`
}

Experimental.

type CfnMacro ¶

type CfnMacro interface {
	CfnResource
	IInspectable
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	Description() *string
	SetDescription(val *string)
	FunctionName() *string
	SetFunctionName(val *string)
	LogGroupName() *string
	SetLogGroupName(val *string)
	LogicalId() *string
	LogRoleArn() *string
	SetLogRoleArn(val *string)
	Name() *string
	SetName(val *string)
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::Macro`.

func NewCfnMacro ¶

func NewCfnMacro(scope constructs.Construct, id *string, props *CfnMacroProps) CfnMacro

Create a new `AWS::CloudFormation::Macro`.

type CfnMacroProps ¶

type CfnMacroProps struct {
	// `AWS::CloudFormation::Macro.FunctionName`.
	FunctionName *string `json:"functionName"`
	// `AWS::CloudFormation::Macro.Name`.
	Name *string `json:"name"`
	// `AWS::CloudFormation::Macro.Description`.
	Description *string `json:"description"`
	// `AWS::CloudFormation::Macro.LogGroupName`.
	LogGroupName *string `json:"logGroupName"`
	// `AWS::CloudFormation::Macro.LogRoleARN`.
	LogRoleArn *string `json:"logRoleArn"`
}

Properties for defining a `AWS::CloudFormation::Macro`.

type CfnMapping ¶

type CfnMapping interface {
	CfnRefElement
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	FindInMap(key1 *string, key2 *string) *string
	OverrideLogicalId(newLogicalId *string)
	SetValue(key1 *string, key2 *string, value interface{})
	ToString() *string
}

Represents a CloudFormation mapping. Experimental.

func NewCfnMapping ¶

func NewCfnMapping(scope constructs.Construct, id *string, props *CfnMappingProps) CfnMapping

Experimental.

type CfnMappingProps ¶

type CfnMappingProps struct {
	// Experimental.
	Lazy *bool `json:"lazy"`
	// Mapping of key to a set of corresponding set of named values.
	//
	// The key identifies a map of name-value pairs and must be unique within the mapping.
	//
	// For example, if you want to set values based on a region, you can create a mapping
	// that uses the region name as a key and contains the values you want to specify for
	// each specific region.
	// Experimental.
	Mapping *map[string]*map[string]interface{} `json:"mapping"`
}

Experimental.

type CfnModuleDefaultVersion ¶

type CfnModuleDefaultVersion interface {
	CfnResource
	IInspectable
	Arn() *string
	SetArn(val *string)
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	ModuleName() *string
	SetModuleName(val *string)
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	UpdatedProperites() *map[string]interface{}
	VersionId() *string
	SetVersionId(val *string)
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::ModuleDefaultVersion`.

func NewCfnModuleDefaultVersion ¶

func NewCfnModuleDefaultVersion(scope constructs.Construct, id *string, props *CfnModuleDefaultVersionProps) CfnModuleDefaultVersion

Create a new `AWS::CloudFormation::ModuleDefaultVersion`.

type CfnModuleDefaultVersionProps ¶

type CfnModuleDefaultVersionProps struct {
	// `AWS::CloudFormation::ModuleDefaultVersion.Arn`.
	Arn *string `json:"arn"`
	// `AWS::CloudFormation::ModuleDefaultVersion.ModuleName`.
	ModuleName *string `json:"moduleName"`
	// `AWS::CloudFormation::ModuleDefaultVersion.VersionId`.
	VersionId *string `json:"versionId"`
}

Properties for defining a `AWS::CloudFormation::ModuleDefaultVersion`.

type CfnModuleVersion ¶

type CfnModuleVersion interface {
	CfnResource
	IInspectable
	AttrArn() *string
	AttrDescription() *string
	AttrDocumentationUrl() *string
	AttrIsDefaultVersion() IResolvable
	AttrSchema() *string
	AttrTimeCreated() *string
	AttrVersionId() *string
	AttrVisibility() *string
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	ModuleName() *string
	SetModuleName(val *string)
	ModulePackage() *string
	SetModulePackage(val *string)
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::ModuleVersion`.

func NewCfnModuleVersion ¶

func NewCfnModuleVersion(scope constructs.Construct, id *string, props *CfnModuleVersionProps) CfnModuleVersion

Create a new `AWS::CloudFormation::ModuleVersion`.

type CfnModuleVersionProps ¶

type CfnModuleVersionProps struct {
	// `AWS::CloudFormation::ModuleVersion.ModuleName`.
	ModuleName *string `json:"moduleName"`
	// `AWS::CloudFormation::ModuleVersion.ModulePackage`.
	ModulePackage *string `json:"modulePackage"`
}

Properties for defining a `AWS::CloudFormation::ModuleVersion`.

type CfnOutput ¶

type CfnOutput interface {
	CfnElement
	Condition() CfnCondition
	SetCondition(val CfnCondition)
	CreationStack() *[]*string
	Description() *string
	SetDescription(val *string)
	ExportName() *string
	SetExportName(val *string)
	ImportValue() *string
	LogicalId() *string
	Node() constructs.Node
	Stack() Stack
	Value() interface{}
	SetValue(val interface{})
	OverrideLogicalId(newLogicalId *string)
	ToString() *string
}

Experimental.

func NewCfnOutput ¶

func NewCfnOutput(scope constructs.Construct, id *string, props *CfnOutputProps) CfnOutput

Creates an CfnOutput value for this stack. Experimental.

type CfnOutputProps ¶

type CfnOutputProps struct {
	// The value of the property returned by the aws cloudformation describe-stacks command.
	//
	// The value of an output can include literals, parameter references, pseudo-parameters,
	// a mapping value, or intrinsic functions.
	// Experimental.
	Value *string `json:"value"`
	// A condition to associate with this output value.
	//
	// If the condition evaluates
	// to `false`, this output value will not be included in the stack.
	// Experimental.
	Condition CfnCondition `json:"condition"`
	// A String type that describes the output value.
	//
	// The description can be a maximum of 4 K in length.
	// Experimental.
	Description *string `json:"description"`
	// The name used to export the value of this output across stacks.
	//
	// To import the value from another stack, use `Fn.importValue(exportName)`.
	// Experimental.
	ExportName *string `json:"exportName"`
}

Experimental.

type CfnParameter ¶

type CfnParameter interface {
	CfnElement
	AllowedPattern() *string
	SetAllowedPattern(val *string)
	AllowedValues() *[]*string
	SetAllowedValues(val *[]*string)
	ConstraintDescription() *string
	SetConstraintDescription(val *string)
	CreationStack() *[]*string
	Default() interface{}
	SetDefault(val interface{})
	Description() *string
	SetDescription(val *string)
	LogicalId() *string
	MaxLength() *float64
	SetMaxLength(val *float64)
	MaxValue() *float64
	SetMaxValue(val *float64)
	MinLength() *float64
	SetMinLength(val *float64)
	MinValue() *float64
	SetMinValue(val *float64)
	Node() constructs.Node
	NoEcho() *bool
	SetNoEcho(val *bool)
	Stack() Stack
	Type() *string
	SetType(val *string)
	Value() IResolvable
	ValueAsList() *[]*string
	ValueAsNumber() *float64
	ValueAsString() *string
	OverrideLogicalId(newLogicalId *string)
	Resolve(_context IResolveContext) interface{}
	ToString() *string
}

A CloudFormation parameter.

Use the optional Parameters section to customize your templates. Parameters enable you to input custom values to your template each time you create or update a stack. Experimental.

func NewCfnParameter ¶

func NewCfnParameter(scope constructs.Construct, id *string, props *CfnParameterProps) CfnParameter

Creates a parameter construct.

Note that the name (logical ID) of the parameter will derive from it's `coname` and location within the stack. Therefore, it is recommended that parameters are defined at the stack level. Experimental.

type CfnParameterProps ¶

type CfnParameterProps struct {
	// A regular expression that represents the patterns to allow for String types.
	// Experimental.
	AllowedPattern *string `json:"allowedPattern"`
	// An array containing the list of values allowed for the parameter.
	// Experimental.
	AllowedValues *[]*string `json:"allowedValues"`
	// A string that explains a constraint when the constraint is violated.
	//
	// For example, without a constraint description, a parameter that has an allowed
	// pattern of [A-Za-z0-9]+ displays the following error message when the user specifies
	// an invalid value:
	// Experimental.
	ConstraintDescription *string `json:"constraintDescription"`
	// A value of the appropriate type for the template to use if no value is specified when a stack is created.
	//
	// If you define constraints for the parameter, you must specify
	// a value that adheres to those constraints.
	// Experimental.
	Default interface{} `json:"default"`
	// A string of up to 4000 characters that describes the parameter.
	// Experimental.
	Description *string `json:"description"`
	// An integer value that determines the largest number of characters you want to allow for String types.
	// Experimental.
	MaxLength *float64 `json:"maxLength"`
	// A numeric value that determines the largest numeric value you want to allow for Number types.
	// Experimental.
	MaxValue *float64 `json:"maxValue"`
	// An integer value that determines the smallest number of characters you want to allow for String types.
	// Experimental.
	MinLength *float64 `json:"minLength"`
	// A numeric value that determines the smallest numeric value you want to allow for Number types.
	// Experimental.
	MinValue *float64 `json:"minValue"`
	// Whether to mask the parameter value when anyone makes a call that describes the stack.
	//
	// If you set the value to “true“, the parameter value is masked with asterisks (“*****“).
	// Experimental.
	NoEcho *bool `json:"noEcho"`
	// The data type for the parameter (DataType).
	// Experimental.
	Type *string `json:"type"`
}

Experimental.

type CfnPublicTypeVersion ¶

type CfnPublicTypeVersion interface {
	CfnResource
	IInspectable
	Arn() *string
	SetArn(val *string)
	AttrPublicTypeArn() *string
	AttrPublisherId() *string
	AttrTypeVersionArn() *string
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogDeliveryBucket() *string
	SetLogDeliveryBucket(val *string)
	LogicalId() *string
	Node() constructs.Node
	PublicVersionNumber() *string
	SetPublicVersionNumber(val *string)
	Ref() *string
	Stack() Stack
	Type() *string
	SetType(val *string)
	TypeName() *string
	SetTypeName(val *string)
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::PublicTypeVersion`.

func NewCfnPublicTypeVersion ¶

func NewCfnPublicTypeVersion(scope constructs.Construct, id *string, props *CfnPublicTypeVersionProps) CfnPublicTypeVersion

Create a new `AWS::CloudFormation::PublicTypeVersion`.

type CfnPublicTypeVersionProps ¶

type CfnPublicTypeVersionProps struct {
	// `AWS::CloudFormation::PublicTypeVersion.Arn`.
	Arn *string `json:"arn"`
	// `AWS::CloudFormation::PublicTypeVersion.LogDeliveryBucket`.
	LogDeliveryBucket *string `json:"logDeliveryBucket"`
	// `AWS::CloudFormation::PublicTypeVersion.PublicVersionNumber`.
	PublicVersionNumber *string `json:"publicVersionNumber"`
	// `AWS::CloudFormation::PublicTypeVersion.Type`.
	Type *string `json:"type"`
	// `AWS::CloudFormation::PublicTypeVersion.TypeName`.
	TypeName *string `json:"typeName"`
}

Properties for defining a `AWS::CloudFormation::PublicTypeVersion`.

type CfnPublisher ¶

type CfnPublisher interface {
	CfnResource
	IInspectable
	AcceptTermsAndConditions() interface{}
	SetAcceptTermsAndConditions(val interface{})
	AttrIdentityProvider() *string
	AttrPublisherId() *string
	AttrPublisherProfile() *string
	AttrPublisherStatus() *string
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	ConnectionArn() *string
	SetConnectionArn(val *string)
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::Publisher`.

func NewCfnPublisher ¶

func NewCfnPublisher(scope constructs.Construct, id *string, props *CfnPublisherProps) CfnPublisher

Create a new `AWS::CloudFormation::Publisher`.

type CfnPublisherProps ¶

type CfnPublisherProps struct {
	// `AWS::CloudFormation::Publisher.AcceptTermsAndConditions`.
	AcceptTermsAndConditions interface{} `json:"acceptTermsAndConditions"`
	// `AWS::CloudFormation::Publisher.ConnectionArn`.
	ConnectionArn *string `json:"connectionArn"`
}

Properties for defining a `AWS::CloudFormation::Publisher`.

type CfnRefElement ¶

type CfnRefElement interface {
	CfnElement
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	OverrideLogicalId(newLogicalId *string)
	ToString() *string
}

Base class for referenceable CloudFormation constructs which are not Resources.

These constructs are things like Conditions and Parameters, can be referenced by taking the `.ref` attribute.

Resource constructs do not inherit from CfnRefElement because they have their own, more specific types returned from the .ref attribute. Also, some resources aren't referenceable at all (such as BucketPolicies or GatewayAttachments). Experimental.

type CfnResource ¶

type CfnResource interface {
	CfnRefElement
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

Represents a CloudFormation resource. Experimental.

func NewCfnResource ¶

func NewCfnResource(scope constructs.Construct, id *string, props *CfnResourceProps) CfnResource

Creates a resource construct. Experimental.

type CfnResourceAutoScalingCreationPolicy ¶

type CfnResourceAutoScalingCreationPolicy struct {
	// Specifies the percentage of instances in an Auto Scaling replacement update that must signal success for the update to succeed.
	//
	// You can specify a value from 0 to 100. AWS CloudFormation rounds to the nearest tenth of a percent.
	// For example, if you update five instances with a minimum successful percentage of 50, three instances must signal success.
	// If an instance doesn't send a signal within the time specified by the Timeout property, AWS CloudFormation assumes that the
	// instance wasn't created.
	// Experimental.
	MinSuccessfulInstancesPercent *float64 `json:"minSuccessfulInstancesPercent"`
}

For an Auto Scaling group replacement update, specifies how many instances must signal success for the update to succeed. Experimental.

type CfnResourceDefaultVersion ¶

type CfnResourceDefaultVersion interface {
	CfnResource
	IInspectable
	AttrArn() *string
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	TypeName() *string
	SetTypeName(val *string)
	TypeVersionArn() *string
	SetTypeVersionArn(val *string)
	UpdatedProperites() *map[string]interface{}
	VersionId() *string
	SetVersionId(val *string)
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::ResourceDefaultVersion`.

func NewCfnResourceDefaultVersion ¶

func NewCfnResourceDefaultVersion(scope constructs.Construct, id *string, props *CfnResourceDefaultVersionProps) CfnResourceDefaultVersion

Create a new `AWS::CloudFormation::ResourceDefaultVersion`.

type CfnResourceDefaultVersionProps ¶

type CfnResourceDefaultVersionProps struct {
	// `AWS::CloudFormation::ResourceDefaultVersion.TypeName`.
	TypeName *string `json:"typeName"`
	// `AWS::CloudFormation::ResourceDefaultVersion.TypeVersionArn`.
	TypeVersionArn *string `json:"typeVersionArn"`
	// `AWS::CloudFormation::ResourceDefaultVersion.VersionId`.
	VersionId *string `json:"versionId"`
}

Properties for defining a `AWS::CloudFormation::ResourceDefaultVersion`.

type CfnResourceProps ¶

type CfnResourceProps struct {
	// CloudFormation resource type (e.g. `AWS::S3::Bucket`).
	// Experimental.
	Type *string `json:"type"`
	// Resource properties.
	// Experimental.
	Properties *map[string]interface{} `json:"properties"`
}

Experimental.

type CfnResourceSignal ¶

type CfnResourceSignal struct {
	// The number of success signals AWS CloudFormation must receive before it sets the resource status as CREATE_COMPLETE.
	//
	// If the resource receives a failure signal or doesn't receive the specified number of signals before the timeout period
	// expires, the resource creation fails and AWS CloudFormation rolls the stack back.
	// Experimental.
	Count *float64 `json:"count"`
	// The length of time that AWS CloudFormation waits for the number of signals that was specified in the Count property.
	//
	// The timeout period starts after AWS CloudFormation starts creating the resource, and the timeout expires no sooner
	// than the time you specify but can occur shortly thereafter. The maximum time that you can specify is 12 hours.
	// Experimental.
	Timeout *string `json:"timeout"`
}

When AWS CloudFormation creates the associated resource, configures the number of required success signals and the length of time that AWS CloudFormation waits for those signals. Experimental.

type CfnResourceVersion ¶

type CfnResourceVersion interface {
	CfnResource
	IInspectable
	AttrArn() *string
	AttrIsDefaultVersion() IResolvable
	AttrProvisioningType() *string
	AttrTypeArn() *string
	AttrVersionId() *string
	AttrVisibility() *string
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	ExecutionRoleArn() *string
	SetExecutionRoleArn(val *string)
	LoggingConfig() interface{}
	SetLoggingConfig(val interface{})
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	SchemaHandlerPackage() *string
	SetSchemaHandlerPackage(val *string)
	Stack() Stack
	TypeName() *string
	SetTypeName(val *string)
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::ResourceVersion`.

func NewCfnResourceVersion ¶

func NewCfnResourceVersion(scope constructs.Construct, id *string, props *CfnResourceVersionProps) CfnResourceVersion

Create a new `AWS::CloudFormation::ResourceVersion`.

type CfnResourceVersionProps ¶

type CfnResourceVersionProps struct {
	// `AWS::CloudFormation::ResourceVersion.SchemaHandlerPackage`.
	SchemaHandlerPackage *string `json:"schemaHandlerPackage"`
	// `AWS::CloudFormation::ResourceVersion.TypeName`.
	TypeName *string `json:"typeName"`
	// `AWS::CloudFormation::ResourceVersion.ExecutionRoleArn`.
	ExecutionRoleArn *string `json:"executionRoleArn"`
	// `AWS::CloudFormation::ResourceVersion.LoggingConfig`.
	LoggingConfig interface{} `json:"loggingConfig"`
}

Properties for defining a `AWS::CloudFormation::ResourceVersion`.

type CfnResourceVersion_LoggingConfigProperty ¶

type CfnResourceVersion_LoggingConfigProperty struct {
	// `CfnResourceVersion.LoggingConfigProperty.LogGroupName`.
	LogGroupName *string `json:"logGroupName"`
	// `CfnResourceVersion.LoggingConfigProperty.LogRoleArn`.
	LogRoleArn *string `json:"logRoleArn"`
}

type CfnRule ¶

type CfnRule interface {
	CfnRefElement
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	AddAssertion(condition ICfnConditionExpression, description *string)
	OverrideLogicalId(newLogicalId *string)
	ToString() *string
}

The Rules that define template constraints in an AWS Service Catalog portfolio describe when end users can use the template and which values they can specify for parameters that are declared in the AWS CloudFormation template used to create the product they are attempting to use.

Rules are useful for preventing end users from inadvertently specifying an incorrect value. For example, you can add a rule to verify whether end users specified a valid subnet in a given VPC or used m1.small instance types for test environments. AWS CloudFormation uses rules to validate parameter values before it creates the resources for the product.

A rule can include a RuleCondition property and must include an Assertions property. For each rule, you can define only one rule condition; you can define one or more asserts within the Assertions property. You define a rule condition and assertions by using rule-specific intrinsic functions. Experimental.

func NewCfnRule ¶

func NewCfnRule(scope constructs.Construct, id *string, props *CfnRuleProps) CfnRule

Creates and adds a rule. Experimental.

type CfnRuleAssertion ¶

type CfnRuleAssertion struct {
	// The assertion.
	// Experimental.
	Assert ICfnConditionExpression `json:"assert"`
	// The assertion description.
	// Experimental.
	AssertDescription *string `json:"assertDescription"`
}

A rule assertion. Experimental.

type CfnRuleProps ¶

type CfnRuleProps struct {
	// Assertions which define the rule.
	// Experimental.
	Assertions *[]*CfnRuleAssertion `json:"assertions"`
	// If the rule condition evaluates to false, the rule doesn't take effect.
	//
	// If the function in the rule condition evaluates to true, expressions in each assert are evaluated and applied.
	// Experimental.
	RuleCondition ICfnConditionExpression `json:"ruleCondition"`
}

A rule can include a RuleCondition property and must include an Assertions property.

For each rule, you can define only one rule condition; you can define one or more asserts within the Assertions property. You define a rule condition and assertions by using rule-specific intrinsic functions.

You can use the following rule-specific intrinsic functions to define rule conditions and assertions:

Fn::And
Fn::Contains
Fn::EachMemberEquals
Fn::EachMemberIn
Fn::Equals
Fn::If
Fn::Not
Fn::Or
Fn::RefAll
Fn::ValueOf
Fn::ValueOfAll

https://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html Experimental.

type CfnStack ¶

type CfnStack interface {
	CfnResource
	IInspectable
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	NotificationArns() *[]*string
	SetNotificationArns(val *[]*string)
	Parameters() interface{}
	SetParameters(val interface{})
	Ref() *string
	Stack() Stack
	Tags() TagManager
	TemplateUrl() *string
	SetTemplateUrl(val *string)
	TimeoutInMinutes() *float64
	SetTimeoutInMinutes(val *float64)
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::Stack`.

func NewCfnStack ¶

func NewCfnStack(scope constructs.Construct, id *string, props *CfnStackProps) CfnStack

Create a new `AWS::CloudFormation::Stack`.

type CfnStackProps ¶

type CfnStackProps struct {
	// `AWS::CloudFormation::Stack.TemplateURL`.
	TemplateUrl *string `json:"templateUrl"`
	// `AWS::CloudFormation::Stack.NotificationARNs`.
	NotificationArns *[]*string `json:"notificationArns"`
	// `AWS::CloudFormation::Stack.Parameters`.
	Parameters interface{} `json:"parameters"`
	// `AWS::CloudFormation::Stack.Tags`.
	Tags *[]*CfnTag `json:"tags"`
	// `AWS::CloudFormation::Stack.TimeoutInMinutes`.
	TimeoutInMinutes *float64 `json:"timeoutInMinutes"`
}

Properties for defining a `AWS::CloudFormation::Stack`.

type CfnStackSet ¶

type CfnStackSet interface {
	CfnResource
	IInspectable
	AdministrationRoleArn() *string
	SetAdministrationRoleArn(val *string)
	AttrStackSetId() *string
	AutoDeployment() interface{}
	SetAutoDeployment(val interface{})
	CallAs() *string
	SetCallAs(val *string)
	Capabilities() *[]*string
	SetCapabilities(val *[]*string)
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	Description() *string
	SetDescription(val *string)
	ExecutionRoleName() *string
	SetExecutionRoleName(val *string)
	LogicalId() *string
	Node() constructs.Node
	OperationPreferences() interface{}
	SetOperationPreferences(val interface{})
	Parameters() interface{}
	SetParameters(val interface{})
	PermissionModel() *string
	SetPermissionModel(val *string)
	Ref() *string
	Stack() Stack
	StackInstancesGroup() interface{}
	SetStackInstancesGroup(val interface{})
	StackSetName() *string
	SetStackSetName(val *string)
	Tags() TagManager
	TemplateBody() *string
	SetTemplateBody(val *string)
	TemplateUrl() *string
	SetTemplateUrl(val *string)
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::StackSet`.

func NewCfnStackSet ¶

func NewCfnStackSet(scope constructs.Construct, id *string, props *CfnStackSetProps) CfnStackSet

Create a new `AWS::CloudFormation::StackSet`.

type CfnStackSetProps ¶

type CfnStackSetProps struct {
	// `AWS::CloudFormation::StackSet.PermissionModel`.
	PermissionModel *string `json:"permissionModel"`
	// `AWS::CloudFormation::StackSet.StackSetName`.
	StackSetName *string `json:"stackSetName"`
	// `AWS::CloudFormation::StackSet.AdministrationRoleARN`.
	AdministrationRoleArn *string `json:"administrationRoleArn"`
	// `AWS::CloudFormation::StackSet.AutoDeployment`.
	AutoDeployment interface{} `json:"autoDeployment"`
	// `AWS::CloudFormation::StackSet.CallAs`.
	CallAs *string `json:"callAs"`
	// `AWS::CloudFormation::StackSet.Capabilities`.
	Capabilities *[]*string `json:"capabilities"`
	// `AWS::CloudFormation::StackSet.Description`.
	Description *string `json:"description"`
	// `AWS::CloudFormation::StackSet.ExecutionRoleName`.
	ExecutionRoleName *string `json:"executionRoleName"`
	// `AWS::CloudFormation::StackSet.OperationPreferences`.
	OperationPreferences interface{} `json:"operationPreferences"`
	// `AWS::CloudFormation::StackSet.Parameters`.
	Parameters interface{} `json:"parameters"`
	// `AWS::CloudFormation::StackSet.StackInstancesGroup`.
	StackInstancesGroup interface{} `json:"stackInstancesGroup"`
	// `AWS::CloudFormation::StackSet.Tags`.
	Tags *[]*CfnTag `json:"tags"`
	// `AWS::CloudFormation::StackSet.TemplateBody`.
	TemplateBody *string `json:"templateBody"`
	// `AWS::CloudFormation::StackSet.TemplateURL`.
	TemplateUrl *string `json:"templateUrl"`
}

Properties for defining a `AWS::CloudFormation::StackSet`.

type CfnStackSet_AutoDeploymentProperty ¶

type CfnStackSet_AutoDeploymentProperty struct {
	// `CfnStackSet.AutoDeploymentProperty.Enabled`.
	Enabled interface{} `json:"enabled"`
	// `CfnStackSet.AutoDeploymentProperty.RetainStacksOnAccountRemoval`.
	RetainStacksOnAccountRemoval interface{} `json:"retainStacksOnAccountRemoval"`
}

type CfnStackSet_DeploymentTargetsProperty ¶

type CfnStackSet_DeploymentTargetsProperty struct {
	// `CfnStackSet.DeploymentTargetsProperty.Accounts`.
	Accounts *[]*string `json:"accounts"`
	// `CfnStackSet.DeploymentTargetsProperty.OrganizationalUnitIds`.
	OrganizationalUnitIds *[]*string `json:"organizationalUnitIds"`
}

type CfnStackSet_OperationPreferencesProperty ¶

type CfnStackSet_OperationPreferencesProperty struct {
	// `CfnStackSet.OperationPreferencesProperty.FailureToleranceCount`.
	FailureToleranceCount *float64 `json:"failureToleranceCount"`
	// `CfnStackSet.OperationPreferencesProperty.FailureTolerancePercentage`.
	FailureTolerancePercentage *float64 `json:"failureTolerancePercentage"`
	// `CfnStackSet.OperationPreferencesProperty.MaxConcurrentCount`.
	MaxConcurrentCount *float64 `json:"maxConcurrentCount"`
	// `CfnStackSet.OperationPreferencesProperty.MaxConcurrentPercentage`.
	MaxConcurrentPercentage *float64 `json:"maxConcurrentPercentage"`
	// `CfnStackSet.OperationPreferencesProperty.RegionConcurrencyType`.
	RegionConcurrencyType *string `json:"regionConcurrencyType"`
	// `CfnStackSet.OperationPreferencesProperty.RegionOrder`.
	RegionOrder *[]*string `json:"regionOrder"`
}

type CfnStackSet_ParameterProperty ¶

type CfnStackSet_ParameterProperty struct {
	// `CfnStackSet.ParameterProperty.ParameterKey`.
	ParameterKey *string `json:"parameterKey"`
	// `CfnStackSet.ParameterProperty.ParameterValue`.
	ParameterValue *string `json:"parameterValue"`
}

type CfnStackSet_StackInstancesProperty ¶

type CfnStackSet_StackInstancesProperty struct {
	// `CfnStackSet.StackInstancesProperty.DeploymentTargets`.
	DeploymentTargets interface{} `json:"deploymentTargets"`
	// `CfnStackSet.StackInstancesProperty.Regions`.
	Regions *[]*string `json:"regions"`
	// `CfnStackSet.StackInstancesProperty.ParameterOverrides`.
	ParameterOverrides interface{} `json:"parameterOverrides"`
}

type CfnTag ¶

type CfnTag struct {
	// Experimental.
	Key *string `json:"key"`
	// Experimental.
	Value *string `json:"value"`
}

Experimental.

type CfnTrafficRoute ¶

type CfnTrafficRoute struct {
	// The logical id of the target resource.
	// Experimental.
	LogicalId *string `json:"logicalId"`
	// The resource type of the route.
	//
	// Today, the only allowed value is 'AWS::ElasticLoadBalancingV2::Listener'.
	// Experimental.
	Type *string `json:"type"`
}

A traffic route, representing where the traffic is being directed to. Experimental.

type CfnTrafficRouting ¶

type CfnTrafficRouting struct {
	// The listener to be used by your load balancer to direct traffic to your target groups.
	// Experimental.
	ProdTrafficRoute *CfnTrafficRoute `json:"prodTrafficRoute"`
	// The logical IDs of the blue and green, respectively, AWS::ElasticLoadBalancingV2::TargetGroup target groups.
	// Experimental.
	TargetGroups *[]*string `json:"targetGroups"`
	// The listener to be used by your load balancer to direct traffic to your target groups.
	// Experimental.
	TestTrafficRoute *CfnTrafficRoute `json:"testTrafficRoute"`
}

Type of the {@link CfnCodeDeployBlueGreenEcsAttributes.trafficRouting} property. Experimental.

type CfnTrafficRoutingConfig ¶

type CfnTrafficRoutingConfig struct {
	// The type of traffic shifting used by the blue-green deployment configuration.
	// Experimental.
	Type CfnTrafficRoutingType `json:"type"`
	// The configuration for traffic routing when {@link type} is {@link CfnTrafficRoutingType.TIME_BASED_CANARY}.
	// Experimental.
	TimeBasedCanary *CfnTrafficRoutingTimeBasedCanary `json:"timeBasedCanary"`
	// The configuration for traffic routing when {@link type} is {@link CfnTrafficRoutingType.TIME_BASED_LINEAR}.
	// Experimental.
	TimeBasedLinear *CfnTrafficRoutingTimeBasedLinear `json:"timeBasedLinear"`
}

Traffic routing configuration settings.

The type of the {@link CfnCodeDeployBlueGreenHookProps.trafficRoutingConfig} property. Experimental.

type CfnTrafficRoutingTimeBasedCanary ¶

type CfnTrafficRoutingTimeBasedCanary struct {
	// The number of minutes between the first and second traffic shifts of a time-based canary deployment.
	// Experimental.
	BakeTimeMins *float64 `json:"bakeTimeMins"`
	// The percentage of traffic to shift in the first increment of a time-based canary deployment.
	//
	// The step percentage must be 14% or greater.
	// Experimental.
	StepPercentage *float64 `json:"stepPercentage"`
}

The traffic routing configuration if {@link CfnTrafficRoutingConfig.type} is {@link CfnTrafficRoutingType.TIME_BASED_CANARY}. Experimental.

type CfnTrafficRoutingTimeBasedLinear ¶

type CfnTrafficRoutingTimeBasedLinear struct {
	// The number of minutes between the first and second traffic shifts of a time-based linear deployment.
	// Experimental.
	BakeTimeMins *float64 `json:"bakeTimeMins"`
	// The percentage of traffic that is shifted at the start of each increment of a time-based linear deployment.
	//
	// The step percentage must be 14% or greater.
	// Experimental.
	StepPercentage *float64 `json:"stepPercentage"`
}

The traffic routing configuration if {@link CfnTrafficRoutingConfig.type} is {@link CfnTrafficRoutingType.TIME_BASED_LINEAR}. Experimental.

type CfnTrafficRoutingType ¶

type CfnTrafficRoutingType string

The possible types of traffic shifting for the blue-green deployment configuration.

The type of the {@link CfnTrafficRoutingConfig.type} property. Experimental.

const (
	CfnTrafficRoutingType_ALL_AT_ONCE       CfnTrafficRoutingType = "ALL_AT_ONCE"
	CfnTrafficRoutingType_TIME_BASED_CANARY CfnTrafficRoutingType = "TIME_BASED_CANARY"
	CfnTrafficRoutingType_TIME_BASED_LINEAR CfnTrafficRoutingType = "TIME_BASED_LINEAR"
)

type CfnTypeActivation ¶

type CfnTypeActivation interface {
	CfnResource
	IInspectable
	AttrArn() *string
	AutoUpdate() interface{}
	SetAutoUpdate(val interface{})
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	ExecutionRoleArn() *string
	SetExecutionRoleArn(val *string)
	LoggingConfig() interface{}
	SetLoggingConfig(val interface{})
	LogicalId() *string
	MajorVersion() *string
	SetMajorVersion(val *string)
	Node() constructs.Node
	PublicTypeArn() *string
	SetPublicTypeArn(val *string)
	PublisherId() *string
	SetPublisherId(val *string)
	Ref() *string
	Stack() Stack
	Type() *string
	SetType(val *string)
	TypeName() *string
	SetTypeName(val *string)
	TypeNameAlias() *string
	SetTypeNameAlias(val *string)
	UpdatedProperites() *map[string]interface{}
	VersionBump() *string
	SetVersionBump(val *string)
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::TypeActivation`.

func NewCfnTypeActivation ¶

func NewCfnTypeActivation(scope constructs.Construct, id *string, props *CfnTypeActivationProps) CfnTypeActivation

Create a new `AWS::CloudFormation::TypeActivation`.

type CfnTypeActivationProps ¶

type CfnTypeActivationProps struct {
	// `AWS::CloudFormation::TypeActivation.AutoUpdate`.
	AutoUpdate interface{} `json:"autoUpdate"`
	// `AWS::CloudFormation::TypeActivation.ExecutionRoleArn`.
	ExecutionRoleArn *string `json:"executionRoleArn"`
	// `AWS::CloudFormation::TypeActivation.LoggingConfig`.
	LoggingConfig interface{} `json:"loggingConfig"`
	// `AWS::CloudFormation::TypeActivation.MajorVersion`.
	MajorVersion *string `json:"majorVersion"`
	// `AWS::CloudFormation::TypeActivation.PublicTypeArn`.
	PublicTypeArn *string `json:"publicTypeArn"`
	// `AWS::CloudFormation::TypeActivation.PublisherId`.
	PublisherId *string `json:"publisherId"`
	// `AWS::CloudFormation::TypeActivation.Type`.
	Type *string `json:"type"`
	// `AWS::CloudFormation::TypeActivation.TypeName`.
	TypeName *string `json:"typeName"`
	// `AWS::CloudFormation::TypeActivation.TypeNameAlias`.
	TypeNameAlias *string `json:"typeNameAlias"`
	// `AWS::CloudFormation::TypeActivation.VersionBump`.
	VersionBump *string `json:"versionBump"`
}

Properties for defining a `AWS::CloudFormation::TypeActivation`.

type CfnTypeActivation_LoggingConfigProperty ¶

type CfnTypeActivation_LoggingConfigProperty struct {
	// `CfnTypeActivation.LoggingConfigProperty.LogGroupName`.
	LogGroupName *string `json:"logGroupName"`
	// `CfnTypeActivation.LoggingConfigProperty.LogRoleArn`.
	LogRoleArn *string `json:"logRoleArn"`
}

type CfnUpdatePolicy ¶

type CfnUpdatePolicy struct {
	// Specifies whether an Auto Scaling group and the instances it contains are replaced during an update.
	//
	// During replacement,
	// AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation
	// can roll back to the old Auto Scaling group and delete the new Auto Scaling group.
	// Experimental.
	AutoScalingReplacingUpdate *CfnAutoScalingReplacingUpdate `json:"autoScalingReplacingUpdate"`
	// To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy.
	//
	// Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling
	// group in batches or all at once.
	// Experimental.
	AutoScalingRollingUpdate *CfnAutoScalingRollingUpdate `json:"autoScalingRollingUpdate"`
	// To specify how AWS CloudFormation handles updates for the MinSize, MaxSize, and DesiredCapacity properties when the AWS::AutoScaling::AutoScalingGroup resource has an associated scheduled action, use the AutoScalingScheduledAction policy.
	// Experimental.
	AutoScalingScheduledAction *CfnAutoScalingScheduledAction `json:"autoScalingScheduledAction"`
	// To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.
	// Experimental.
	CodeDeployLambdaAliasUpdate *CfnCodeDeployLambdaAliasUpdate `json:"codeDeployLambdaAliasUpdate"`
	// To upgrade an Amazon ES domain to a new version of Elasticsearch rather than replacing the entire AWS::Elasticsearch::Domain resource, use the EnableVersionUpgrade update policy.
	// Experimental.
	EnableVersionUpgrade *bool `json:"enableVersionUpgrade"`
	// To modify a replication group's shards by adding or removing shards, rather than replacing the entire AWS::ElastiCache::ReplicationGroup resource, use the UseOnlineResharding update policy.
	// Experimental.
	UseOnlineResharding *bool `json:"useOnlineResharding"`
}

Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.

AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. Experimental.

type CfnWaitCondition ¶

type CfnWaitCondition interface {
	CfnResource
	IInspectable
	AttrData() IResolvable
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	Count() *float64
	SetCount(val *float64)
	CreationStack() *[]*string
	Handle() *string
	SetHandle(val *string)
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	Timeout() *string
	SetTimeout(val *string)
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::WaitCondition`.

func NewCfnWaitCondition ¶

func NewCfnWaitCondition(scope constructs.Construct, id *string, props *CfnWaitConditionProps) CfnWaitCondition

Create a new `AWS::CloudFormation::WaitCondition`.

type CfnWaitConditionHandle ¶

type CfnWaitConditionHandle interface {
	CfnResource
	IInspectable
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	Ref() *string
	Stack() Stack
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	GetAtt(attributeName *string) Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::CloudFormation::WaitConditionHandle`.

func NewCfnWaitConditionHandle ¶

func NewCfnWaitConditionHandle(scope constructs.Construct, id *string) CfnWaitConditionHandle

Create a new `AWS::CloudFormation::WaitConditionHandle`.

type CfnWaitConditionProps ¶

type CfnWaitConditionProps struct {
	// `AWS::CloudFormation::WaitCondition.Count`.
	Count *float64 `json:"count"`
	// `AWS::CloudFormation::WaitCondition.Handle`.
	Handle *string `json:"handle"`
	// `AWS::CloudFormation::WaitCondition.Timeout`.
	Timeout *string `json:"timeout"`
}

Properties for defining a `AWS::CloudFormation::WaitCondition`.

type ContextProvider ¶

type ContextProvider interface {
}

Base class for the model side of context providers.

Instances of this class communicate with context provider plugins in the 'cdk toolkit' via context variables (input), outputting specialized queries for more context variables (output).

ContextProvider needs access to a Construct to hook into the context mechanism. Experimental.

type CopyOptions ¶

type CopyOptions struct {
	// Glob patterns to exclude from the copy.
	// Experimental.
	Exclude *[]*string `json:"exclude"`
	// A strategy for how to handle symlinks.
	// Experimental.
	Follow SymlinkFollowMode `json:"follow"`
	// The ignore behavior to use for exclude patterns.
	// Experimental.
	IgnoreMode IgnoreMode `json:"ignoreMode"`
}

Options applied when copying directories. Experimental.

type CustomResource ¶

type CustomResource interface {
	Resource
	Env() *ResourceEnvironment
	Node() constructs.Node
	PhysicalName() *string
	Ref() *string
	Stack() Stack
	ApplyRemovalPolicy(policy RemovalPolicy)
	GeneratePhysicalName() *string
	GetAtt(attributeName *string) Reference
	GetAttString(attributeName *string) *string
	GetResourceArnAttribute(arnAttr *string, arnComponents *ArnComponents) *string
	GetResourceNameAttribute(nameAttr *string) *string
	ToString() *string
}

Custom resource that is implemented using a Lambda.

As a custom resource author, you should be publishing a subclass of this class that hides the choice of provider, and accepts a strongly-typed properties object with the properties your provider accepts. Experimental.

func NewCustomResource ¶

func NewCustomResource(scope constructs.Construct, id *string, props *CustomResourceProps) CustomResource

Experimental.

type CustomResourceProps ¶

type CustomResourceProps struct {
	// The ARN of the provider which implements this custom resource type.
	//
	// You can implement a provider by listening to raw AWS CloudFormation events
	// and specify the ARN of an SNS topic (`topic.topicArn`) or the ARN of an AWS
	// Lambda function (`lambda.functionArn`) or use the CDK's custom [resource
	// provider framework] which makes it easier to implement robust providers.
	//
	// [resource provider framework]:
	// https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html
	//
	// Provider framework:
	//
	// “`ts
	// // use the provider framework from aws-cdk/custom-resources:
	// const provider = new customresources.Provider(this, 'ResourceProvider', {
	//    onEventHandler,
	//    isCompleteHandler, // optional
	// });
	//
	// new CustomResource(this, 'MyResource', {
	//    serviceToken: provider.serviceToken,
	// });
	// “`
	//
	// AWS Lambda function:
	//
	// “`ts
	// // invoke an AWS Lambda function when a lifecycle event occurs:
	// new CustomResource(this, 'MyResource', {
	//    serviceToken: myFunction.functionArn,
	// });
	// “`
	//
	// SNS topic:
	//
	// “`ts
	// // publish lifecycle events to an SNS topic:
	// new CustomResource(this, 'MyResource', {
	//    serviceToken: myTopic.topicArn,
	// });
	// “`
	// Experimental.
	ServiceToken *string `json:"serviceToken"`
	// Convert all property keys to pascal case.
	// Experimental.
	PascalCaseProperties *bool `json:"pascalCaseProperties"`
	// Properties to pass to the Lambda.
	// Experimental.
	Properties *map[string]interface{} `json:"properties"`
	// The policy to apply when this resource is removed from the application.
	// Experimental.
	RemovalPolicy RemovalPolicy `json:"removalPolicy"`
	// For custom resources, you can specify AWS::CloudFormation::CustomResource (the default) as the resource type, or you can specify your own resource type name.
	//
	// For example, you can use "Custom::MyCustomResourceTypeName".
	//
	// Custom resource type names must begin with "Custom::" and can include
	// alphanumeric characters and the following characters: _@-. You can specify
	// a custom resource type name up to a maximum length of 60 characters. You
	// cannot change the type during an update.
	//
	// Using your own resource type names helps you quickly differentiate the
	// types of custom resources in your stack. For example, if you had two custom
	// resources that conduct two different ping tests, you could name their type
	// as Custom::PingTester to make them easily identifiable as ping testers
	// (instead of using AWS::CloudFormation::CustomResource).
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html#aws-cfn-resource-type-name
	//
	// Experimental.
	ResourceType *string `json:"resourceType"`
}

Properties to provide a Lambda-backed custom resource. Experimental.

type CustomResourceProvider ¶

type CustomResourceProvider interface {
	constructs.Construct
	Node() constructs.Node
	RoleArn() *string
	ServiceToken() *string
	ToString() *string
}

An AWS-Lambda backed custom resource provider. Experimental.

func CustomResourceProvider_GetOrCreateProvider ¶

func CustomResourceProvider_GetOrCreateProvider(scope constructs.Construct, uniqueid *string, props *CustomResourceProviderProps) CustomResourceProvider

Returns a stack-level singleton for the custom resource provider.

Returns: the service token of the custom resource provider, which should be used when defining a `CustomResource`. Experimental.

func NewCustomResourceProvider ¶

func NewCustomResourceProvider(scope constructs.Construct, id *string, props *CustomResourceProviderProps) CustomResourceProvider

Experimental.

type CustomResourceProviderProps ¶

type CustomResourceProviderProps struct {
	// A local file system directory with the provider's code.
	//
	// The code will be
	// bundled into a zip asset and wired to the provider's AWS Lambda function.
	// Experimental.
	CodeDirectory *string `json:"codeDirectory"`
	// The AWS Lambda runtime and version to use for the provider.
	// Experimental.
	Runtime CustomResourceProviderRuntime `json:"runtime"`
	// A description of the function.
	// Experimental.
	Description *string `json:"description"`
	// Key-value pairs that are passed to Lambda as Environment.
	// Experimental.
	Environment *map[string]*string `json:"environment"`
	// The amount of memory that your function has access to.
	//
	// Increasing the
	// function's memory also increases its CPU allocation.
	// Experimental.
	MemorySize Size `json:"memorySize"`
	// A set of IAM policy statements to include in the inline policy of the provider's lambda function.
	//
	// TODO: EXAMPLE
	//
	// Experimental.
	PolicyStatements *[]interface{} `json:"policyStatements"`
	// AWS Lambda timeout for the provider.
	// Experimental.
	Timeout Duration `json:"timeout"`
}

Initialization properties for `CustomResourceProvider`. Experimental.

type CustomResourceProviderRuntime ¶

type CustomResourceProviderRuntime string

The lambda runtime to use for the resource provider.

This also indicates which language is used for the handler. Experimental.

const (
	CustomResourceProviderRuntime_NODEJS_12   CustomResourceProviderRuntime = "NODEJS_12"
	CustomResourceProviderRuntime_NODEJS_14_X CustomResourceProviderRuntime = "NODEJS_14_X"
)

type DefaultStackSynthesizer ¶

type DefaultStackSynthesizer interface {
	StackSynthesizer
	CloudFormationExecutionRoleArn() *string
	DeployRoleArn() *string
	Stack() Stack
	AddDockerImageAsset(asset *DockerImageAssetSource) *DockerImageAssetLocation
	AddFileAsset(asset *FileAssetSource) *FileAssetLocation
	Bind(stack Stack)
	EmitStackArtifact(stack Stack, session ISynthesisSession, options *SynthesizeStackArtifactOptions)
	Synthesize(session ISynthesisSession)
	SynthesizeStackTemplate(stack Stack, session ISynthesisSession)
}

Uses conventionally named roles and reify asset storage locations.

This synthesizer is the only StackSynthesizer that generates an asset manifest, and is required to deploy CDK applications using the `@aws-cdk/app-delivery` CI/CD library.

Requires the environment to have been bootstrapped with Bootstrap Stack V2. Experimental.

func NewDefaultStackSynthesizer ¶

func NewDefaultStackSynthesizer(props *DefaultStackSynthesizerProps) DefaultStackSynthesizer

Experimental.

type DefaultStackSynthesizerProps ¶

type DefaultStackSynthesizerProps struct {
	// Bootstrap stack version SSM parameter.
	//
	// The placeholder `${Qualifier}` will be replaced with the value of qualifier.
	// Experimental.
	BootstrapStackVersionSsmParameter *string `json:"bootstrapStackVersionSsmParameter"`
	// bucketPrefix to use while storing S3 Assets.
	// Experimental.
	BucketPrefix *string `json:"bucketPrefix"`
	// The role CloudFormation will assume when deploying the Stack.
	//
	// You must supply this if you have given a non-standard name to the execution role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Experimental.
	CloudFormationExecutionRole *string `json:"cloudFormationExecutionRole"`
	// The role to assume to initiate a deployment in this environment.
	//
	// You must supply this if you have given a non-standard name to the publishing role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Experimental.
	DeployRoleArn *string `json:"deployRoleArn"`
	// External ID to use when assuming role for cloudformation deployments.
	// Experimental.
	DeployRoleExternalId *string `json:"deployRoleExternalId"`
	// External ID to use when assuming role for file asset publishing.
	// Experimental.
	FileAssetPublishingExternalId *string `json:"fileAssetPublishingExternalId"`
	// The role to use to publish file assets to the S3 bucket in this environment.
	//
	// You must supply this if you have given a non-standard name to the publishing role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Experimental.
	FileAssetPublishingRoleArn *string `json:"fileAssetPublishingRoleArn"`
	// Name of the S3 bucket to hold file assets.
	//
	// You must supply this if you have given a non-standard name to the staging bucket.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Experimental.
	FileAssetsBucketName *string `json:"fileAssetsBucketName"`
	// Whether to add a Rule to the stack template verifying the bootstrap stack version.
	//
	// This generally should be left set to `true`, unless you explicitly
	// want to be able to deploy to an unbootstrapped environment.
	// Experimental.
	GenerateBootstrapVersionRule *bool `json:"generateBootstrapVersionRule"`
	// External ID to use when assuming role for image asset publishing.
	// Experimental.
	ImageAssetPublishingExternalId *string `json:"imageAssetPublishingExternalId"`
	// The role to use to publish image assets to the ECR repository in this environment.
	//
	// You must supply this if you have given a non-standard name to the publishing role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Experimental.
	ImageAssetPublishingRoleArn *string `json:"imageAssetPublishingRoleArn"`
	// Name of the ECR repository to hold Docker Image assets.
	//
	// You must supply this if you have given a non-standard name to the ECR repository.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Experimental.
	ImageAssetsRepositoryName *string `json:"imageAssetsRepositoryName"`
	// The role to use to look up values from the target AWS account during synthesis.
	// Experimental.
	LookupRoleArn *string `json:"lookupRoleArn"`
	// Qualifier to disambiguate multiple environments in the same account.
	//
	// You can use this and leave the other naming properties empty if you have deployed
	// the bootstrap environment with standard names but only differnet qualifiers.
	// Experimental.
	Qualifier *string `json:"qualifier"`
}

Configuration properties for DefaultStackSynthesizer. Experimental.

type DefaultTokenResolver ¶

type DefaultTokenResolver interface {
	ITokenResolver
	ResolveList(xs *[]*string, context IResolveContext) interface{}
	ResolveString(fragments TokenizedStringFragments, context IResolveContext) interface{}
	ResolveToken(t IResolvable, context IResolveContext, postProcessor IPostProcessor) interface{}
}

Default resolver implementation. Experimental.

func NewDefaultTokenResolver ¶

func NewDefaultTokenResolver(concat IFragmentConcatenator) DefaultTokenResolver

Experimental.

type DockerBuildOptions ¶

type DockerBuildOptions struct {
	// Build args.
	// Experimental.
	BuildArgs *map[string]*string `json:"buildArgs"`
	// Name of the Dockerfile, must relative to the docker build path.
	// Experimental.
	File *string `json:"file"`
	// Set platform if server is multi-platform capable.
	//
	// _Requires Docker Engine API v1.38+_.
	//
	// TODO: EXAMPLE
	//
	// Experimental.
	Platform *string `json:"platform"`
}

Docker build options. Experimental.

type DockerIgnoreStrategy ¶

type DockerIgnoreStrategy interface {
	IgnoreStrategy
	Add(pattern *string)
	Ignores(absoluteFilePath *string) *bool
}

Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file). Experimental.

func DockerIgnoreStrategy_Docker ¶

func DockerIgnoreStrategy_Docker(absoluteRootPath *string, patterns *[]*string) DockerIgnoreStrategy

Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file).

Returns: `DockerIgnorePattern` associated with the given patterns. Experimental.

func GitIgnoreStrategy_Docker ¶

func GitIgnoreStrategy_Docker(absoluteRootPath *string, patterns *[]*string) DockerIgnoreStrategy

Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file).

Returns: `DockerIgnorePattern` associated with the given patterns. Experimental.

func GlobIgnoreStrategy_Docker ¶

func GlobIgnoreStrategy_Docker(absoluteRootPath *string, patterns *[]*string) DockerIgnoreStrategy

Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file).

Returns: `DockerIgnorePattern` associated with the given patterns. Experimental.

func IgnoreStrategy_Docker ¶

func IgnoreStrategy_Docker(absoluteRootPath *string, patterns *[]*string) DockerIgnoreStrategy

Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file).

Returns: `DockerIgnorePattern` associated with the given patterns. Experimental.

func NewDockerIgnoreStrategy ¶

func NewDockerIgnoreStrategy(absoluteRootPath *string, patterns *[]*string) DockerIgnoreStrategy

Experimental.

type DockerImage ¶

type DockerImage interface {
	Image() *string
	Cp(imagePath *string, outputPath *string) *string
	Run(options *DockerRunOptions)
	ToJSON() *string
}

A Docker image. Experimental.

func DockerImage_FromBuild ¶

func DockerImage_FromBuild(path *string, options *DockerBuildOptions) DockerImage

Builds a Docker image. Experimental.

func DockerImage_FromRegistry ¶

func DockerImage_FromRegistry(image *string) DockerImage

Reference an image on DockerHub or another online registry. Experimental.

func NewDockerImage ¶

func NewDockerImage(image *string, _imageHash *string) DockerImage

Experimental.

type DockerImageAssetLocation ¶

type DockerImageAssetLocation struct {
	// The URI of the image in Amazon ECR.
	// Experimental.
	ImageUri *string `json:"imageUri"`
	// The name of the ECR repository.
	// Experimental.
	RepositoryName *string `json:"repositoryName"`
}

The location of the published docker image.

This is where the image can be consumed at runtime. Experimental.

type DockerImageAssetSource ¶

type DockerImageAssetSource struct {
	// The hash of the contents of the docker build context.
	//
	// This hash is used
	// throughout the system to identify this image and avoid duplicate work
	// in case the source did not change.
	//
	// NOTE: this means that if you wish to update your docker image, you
	// must make a modification to the source (e.g. add some metadata to your Dockerfile).
	// Experimental.
	SourceHash *string `json:"sourceHash"`
	// The directory where the Dockerfile is stored, must be relative to the cloud assembly root.
	// Experimental.
	DirectoryName *string `json:"directoryName"`
	// Build args to pass to the `docker build` command.
	//
	// Since Docker build arguments are resolved before deployment, keys and
	// values cannot refer to unresolved tokens (such as `lambda.functionArn` or
	// `queue.queueUrl`).
	//
	// Only allowed when `directoryName` is specified.
	// Experimental.
	DockerBuildArgs *map[string]*string `json:"dockerBuildArgs"`
	// Docker target to build to.
	//
	// Only allowed when `directoryName` is specified.
	// Experimental.
	DockerBuildTarget *string `json:"dockerBuildTarget"`
	// Path to the Dockerfile (relative to the directory).
	//
	// Only allowed when `directoryName` is specified.
	// Experimental.
	DockerFile *string `json:"dockerFile"`
	// An external command that will produce the packaged asset.
	//
	// The command should produce the name of a local Docker image on `stdout`.
	// Experimental.
	Executable *[]*string `json:"executable"`
}

Experimental.

type DockerRunOptions ¶

type DockerRunOptions struct {
	// The command to run in the container.
	// Experimental.
	Command *[]*string `json:"command"`
	// The entrypoint to run in the container.
	// Experimental.
	Entrypoint *[]*string `json:"entrypoint"`
	// The environment variables to pass to the container.
	// Experimental.
	Environment *map[string]*string `json:"environment"`
	// [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
	// Experimental.
	SecurityOpt *string `json:"securityOpt"`
	// The user to use when running the container.
	// Experimental.
	User *string `json:"user"`
	// Docker volumes to mount.
	// Experimental.
	Volumes *[]*DockerVolume `json:"volumes"`
	// Working directory inside the container.
	// Experimental.
	WorkingDirectory *string `json:"workingDirectory"`
}

Docker run options. Experimental.

type DockerVolume ¶

type DockerVolume struct {
	// The path where the file or directory is mounted in the container.
	// Experimental.
	ContainerPath *string `json:"containerPath"`
	// The path to the file or directory on the host machine.
	// Experimental.
	HostPath *string `json:"hostPath"`
	// Mount consistency.
	//
	// Only applicable for macOS
	// See: https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos
	//
	// Experimental.
	Consistency DockerVolumeConsistency `json:"consistency"`
}

A Docker volume. Experimental.

type DockerVolumeConsistency ¶

type DockerVolumeConsistency string

Supported Docker volume consistency types.

Only valid on macOS due to the way file storage works on Mac Experimental.

const (
	DockerVolumeConsistency_CONSISTENT DockerVolumeConsistency = "CONSISTENT"
	DockerVolumeConsistency_DELEGATED  DockerVolumeConsistency = "DELEGATED"
	DockerVolumeConsistency_CACHED     DockerVolumeConsistency = "CACHED"
)

type Duration ¶

type Duration interface {
	FormatTokenToNumber() *string
	IsUnresolved() *bool
	Plus(rhs Duration) Duration
	ToDays(opts *TimeConversionOptions) *float64
	ToHours(opts *TimeConversionOptions) *float64
	ToHumanString() *string
	ToIsoString() *string
	ToMilliseconds(opts *TimeConversionOptions) *float64
	ToMinutes(opts *TimeConversionOptions) *float64
	ToSeconds(opts *TimeConversionOptions) *float64
	ToString() *string
	UnitLabel() *string
}

Represents a length of time.

The amount can be specified either as a literal value (e.g: `10`) which cannot be negative, or as an unresolved number token.

When the amount is passed as a token, unit conversion is not possible. Experimental.

func Duration_Days ¶

func Duration_Days(amount *float64) Duration

Create a Duration representing an amount of days.

Returns: a new `Duration` representing `amount` Days. Experimental.

func Duration_Hours ¶

func Duration_Hours(amount *float64) Duration

Create a Duration representing an amount of hours.

Returns: a new `Duration` representing `amount` Hours. Experimental.

func Duration_Millis ¶

func Duration_Millis(amount *float64) Duration

Create a Duration representing an amount of milliseconds.

Returns: a new `Duration` representing `amount` ms. Experimental.

func Duration_Minutes ¶

func Duration_Minutes(amount *float64) Duration

Create a Duration representing an amount of minutes.

Returns: a new `Duration` representing `amount` Minutes. Experimental.

func Duration_Parse ¶

func Duration_Parse(duration *string) Duration

Parse a period formatted according to the ISO 8601 standard.

Returns: the parsed `Duration`. See: https://www.iso.org/fr/standard/70907.html

Experimental.

func Duration_Seconds ¶

func Duration_Seconds(amount *float64) Duration

Create a Duration representing an amount of seconds.

Returns: a new `Duration` representing `amount` Seconds. Experimental.

type EncodingOptions ¶

type EncodingOptions struct {
	// A hint for the Token's purpose when stringifying it.
	// Experimental.
	DisplayHint *string `json:"displayHint"`
}

Properties to string encodings. Experimental.

type Environment ¶

type Environment struct {
	// The AWS account ID for this environment.
	//
	// This can be either a concrete value such as `585191031104` or `Aws.accountId` which
	// indicates that account ID will only be determined during deployment (it
	// will resolve to the CloudFormation intrinsic `{"Ref":"AWS::AccountId"}`).
	// Note that certain features, such as cross-stack references and
	// environmental context providers require concerete region information and
	// will cause this stack to emit synthesis errors.
	// Experimental.
	Account *string `json:"account"`
	// The AWS region for this environment.
	//
	// This can be either a concrete value such as `eu-west-2` or `Aws.region`
	// which indicates that account ID will only be determined during deployment
	// (it will resolve to the CloudFormation intrinsic `{"Ref":"AWS::Region"}`).
	// Note that certain features, such as cross-stack references and
	// environmental context providers require concerete region information and
	// will cause this stack to emit synthesis errors.
	// Experimental.
	Region *string `json:"region"`
}

The deployment environment for a stack. Experimental.

type Expiration ¶

type Expiration interface {
	Date() *time.Time
	IsAfter(t Duration) *bool
	IsBefore(t Duration) *bool
	ToEpoch() *float64
}

Represents a date of expiration.

The amount can be specified either as a Date object, timestamp, Duration or string. Experimental.

func Expiration_After ¶

func Expiration_After(t Duration) Expiration

Expire once the specified duration has passed since deployment time. Experimental.

func Expiration_AtDate ¶

func Expiration_AtDate(d *time.Time) Expiration

Expire at the specified date. Experimental.

func Expiration_AtTimestamp ¶

func Expiration_AtTimestamp(t *float64) Expiration

Expire at the specified timestamp. Experimental.

func Expiration_FromString ¶

func Expiration_FromString(s *string) Expiration

Expire at specified date, represented as a string. Experimental.

type ExportValueOptions ¶

type ExportValueOptions struct {
	// The name of the export to create.
	// Experimental.
	Name *string `json:"name"`
}

Options for the `stack.exportValue()` method. Experimental.

type FeatureFlags ¶

type FeatureFlags interface {
	IsEnabled(featureFlag *string) *bool
}

Features that are implemented behind a flag in order to preserve backwards compatibility for existing apps.

The list of flags are available in the `@aws-cdk/cx-api` module.

The state of the flag for this application is stored as a CDK context variable. Experimental.

func FeatureFlags_Of ¶

func FeatureFlags_Of(scope constructs.Construct) FeatureFlags

Inspect feature flags on the construct node's context. Experimental.

type FileAssetLocation ¶

type FileAssetLocation struct {
	// The name of the Amazon S3 bucket.
	// Experimental.
	BucketName *string `json:"bucketName"`
	// The HTTP URL of this asset on Amazon S3.
	//
	// TODO: EXAMPLE
	//
	// Experimental.
	HttpUrl *string `json:"httpUrl"`
	// The Amazon S3 object key.
	// Experimental.
	ObjectKey *string `json:"objectKey"`
	// The S3 URL of this asset on Amazon S3.
	//
	// TODO: EXAMPLE
	//
	// Experimental.
	S3ObjectUrl *string `json:"s3ObjectUrl"`
}

The location of the published file asset.

This is where the asset can be consumed at runtime. Experimental.

type FileAssetPackaging ¶

type FileAssetPackaging string

Packaging modes for file assets. Experimental.

const (
	FileAssetPackaging_ZIP_DIRECTORY FileAssetPackaging = "ZIP_DIRECTORY"
	FileAssetPackaging_FILE          FileAssetPackaging = "FILE"
)

type FileAssetSource ¶

type FileAssetSource struct {
	// A hash on the content source.
	//
	// This hash is used to uniquely identify this
	// asset throughout the system. If this value doesn't change, the asset will
	// not be rebuilt or republished.
	// Experimental.
	SourceHash *string `json:"sourceHash"`
	// An external command that will produce the packaged asset.
	//
	// The command should produce the location of a ZIP file on `stdout`.
	// Experimental.
	Executable *[]*string `json:"executable"`
	// The path, relative to the root of the cloud assembly, in which this asset source resides.
	//
	// This can be a path to a file or a directory, depending on the
	// packaging type.
	// Experimental.
	FileName *string `json:"fileName"`
	// Which type of packaging to perform.
	// Experimental.
	Packaging FileAssetPackaging `json:"packaging"`
}

Represents the source for a file asset. Experimental.

type FileCopyOptions ¶

type FileCopyOptions struct {
	// Glob patterns to exclude from the copy.
	// Experimental.
	Exclude *[]*string `json:"exclude"`
	// A strategy for how to handle symlinks.
	// Experimental.
	FollowSymlinks SymlinkFollowMode `json:"followSymlinks"`
	// The ignore behavior to use for exclude patterns.
	// Experimental.
	IgnoreMode IgnoreMode `json:"ignoreMode"`
}

Options applied when copying directories into the staging location. Experimental.

type FileFingerprintOptions ¶

type FileFingerprintOptions struct {
	// Glob patterns to exclude from the copy.
	// Experimental.
	Exclude *[]*string `json:"exclude"`
	// A strategy for how to handle symlinks.
	// Experimental.
	FollowSymlinks SymlinkFollowMode `json:"followSymlinks"`
	// The ignore behavior to use for exclude patterns.
	// Experimental.
	IgnoreMode IgnoreMode `json:"ignoreMode"`
	// Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
	// Experimental.
	ExtraHash *string `json:"extraHash"`
}

Options related to calculating source hash. Experimental.

type FileSystem ¶

type FileSystem interface {
}

File system utilities. Experimental.

func NewFileSystem ¶

func NewFileSystem() FileSystem

Experimental.

type FingerprintOptions ¶

type FingerprintOptions struct {
	// Glob patterns to exclude from the copy.
	// Experimental.
	Exclude *[]*string `json:"exclude"`
	// A strategy for how to handle symlinks.
	// Experimental.
	Follow SymlinkFollowMode `json:"follow"`
	// The ignore behavior to use for exclude patterns.
	// Experimental.
	IgnoreMode IgnoreMode `json:"ignoreMode"`
	// Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
	// Experimental.
	ExtraHash *string `json:"extraHash"`
}

Options related to calculating source hash. Experimental.

type Fn ¶

type Fn interface {
}

CloudFormation intrinsic functions.

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html Experimental.

type GetContextKeyOptions ¶

type GetContextKeyOptions struct {
	// The context provider to query.
	// Experimental.
	Provider *string `json:"provider"`
	// Provider-specific properties.
	// Experimental.
	Props *map[string]interface{} `json:"props"`
}

Experimental.

type GetContextKeyResult ¶

type GetContextKeyResult struct {
	// Experimental.
	Key *string `json:"key"`
	// Experimental.
	Props *map[string]interface{} `json:"props"`
}

Experimental.

func ContextProvider_GetKey ¶

func ContextProvider_GetKey(scope constructs.Construct, options *GetContextKeyOptions) *GetContextKeyResult

Returns: the context key or undefined if a key cannot be rendered (due to tokens used in any of the props) Experimental.

type GetContextValueOptions ¶

type GetContextValueOptions struct {
	// The context provider to query.
	// Experimental.
	Provider *string `json:"provider"`
	// Provider-specific properties.
	// Experimental.
	Props *map[string]interface{} `json:"props"`
	// The value to return if the context value was not found and a missing context is reported.
	//
	// This should be a dummy value that should preferably
	// fail during deployment since it represents an invalid state.
	// Experimental.
	DummyValue interface{} `json:"dummyValue"`
}

Experimental.

type GetContextValueResult ¶

type GetContextValueResult struct {
	// Experimental.
	Value interface{} `json:"value"`
}

Experimental.

func ContextProvider_GetValue ¶

func ContextProvider_GetValue(scope constructs.Construct, options *GetContextValueOptions) *GetContextValueResult

Experimental.

type GitIgnoreStrategy ¶

type GitIgnoreStrategy interface {
	IgnoreStrategy
	Add(pattern *string)
	Ignores(absoluteFilePath *string) *bool
}

Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore). Experimental.

func DockerIgnoreStrategy_Git ¶

func DockerIgnoreStrategy_Git(absoluteRootPath *string, patterns *[]*string) GitIgnoreStrategy

Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore).

Returns: `GitIgnorePattern` associated with the given patterns. Experimental.

func GitIgnoreStrategy_Git ¶

func GitIgnoreStrategy_Git(absoluteRootPath *string, patterns *[]*string) GitIgnoreStrategy

Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore).

Returns: `GitIgnorePattern` associated with the given patterns. Experimental.

func GlobIgnoreStrategy_Git ¶

func GlobIgnoreStrategy_Git(absoluteRootPath *string, patterns *[]*string) GitIgnoreStrategy

Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore).

Returns: `GitIgnorePattern` associated with the given patterns. Experimental.

func IgnoreStrategy_Git ¶

func IgnoreStrategy_Git(absoluteRootPath *string, patterns *[]*string) GitIgnoreStrategy

Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore).

Returns: `GitIgnorePattern` associated with the given patterns. Experimental.

func NewGitIgnoreStrategy ¶

func NewGitIgnoreStrategy(absoluteRootPath *string, patterns *[]*string) GitIgnoreStrategy

Experimental.

type GlobIgnoreStrategy ¶

type GlobIgnoreStrategy interface {
	IgnoreStrategy
	Add(pattern *string)
	Ignores(absoluteFilePath *string) *bool
}

Ignores file paths based on simple glob patterns. Experimental.

func DockerIgnoreStrategy_Glob ¶

func DockerIgnoreStrategy_Glob(absoluteRootPath *string, patterns *[]*string) GlobIgnoreStrategy

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns. Experimental.

func GitIgnoreStrategy_Glob ¶

func GitIgnoreStrategy_Glob(absoluteRootPath *string, patterns *[]*string) GlobIgnoreStrategy

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns. Experimental.

func GlobIgnoreStrategy_Glob ¶

func GlobIgnoreStrategy_Glob(absoluteRootPath *string, patterns *[]*string) GlobIgnoreStrategy

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns. Experimental.

func IgnoreStrategy_Glob ¶

func IgnoreStrategy_Glob(absoluteRootPath *string, patterns *[]*string) GlobIgnoreStrategy

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns. Experimental.

func NewGlobIgnoreStrategy ¶

func NewGlobIgnoreStrategy(absoluteRootPath *string, patterns *[]*string) GlobIgnoreStrategy

Experimental.

type IAnyProducer ¶

type IAnyProducer interface {
	// Produce the value.
	// Experimental.
	Produce(context IResolveContext) interface{}
}

Interface for lazy untyped value producers. Experimental.

type IAspect ¶

type IAspect interface {
	// All aspects can visit an IConstruct.
	// Experimental.
	Visit(node constructs.IConstruct)
}

Represents an Aspect. Experimental.

type IAsset ¶

type IAsset interface {
	// A hash of this asset, which is available at construction time.
	//
	// As this is a plain string, it
	// can be used in construct IDs in order to enforce creation of a new resource when the content
	// hash has changed.
	// Experimental.
	AssetHash() *string
}

Common interface for all assets. Experimental.

type ICfnConditionExpression ¶

type ICfnConditionExpression interface {
	IResolvable
}

Represents a CloudFormation element that can be used within a Condition.

You can use intrinsic functions, such as “Fn.conditionIf“, “Fn.conditionEquals“, and “Fn.conditionNot“, to conditionally create stack resources. These conditions are evaluated based on input parameters that you declare when you create or update a stack. After you define all your conditions, you can associate them with resources or resource properties in the Resources and Outputs sections of a template.

You define all conditions in the Conditions section of a template except for “Fn.conditionIf“ conditions. You can use the “Fn.conditionIf“ condition in the metadata attribute, update policy attribute, and property values in the Resources section and Outputs sections of a template.

You might use conditions when you want to reuse a template that can create resources in different contexts, such as a test environment versus a production environment. In your template, you can add an EnvironmentType input parameter, which accepts either prod or test as inputs. For the production environment, you might include Amazon EC2 instances with certain capabilities; however, for the test environment, you want to use less capabilities to save costs. With conditions, you can define which resources are created and how they're configured for each environment type.

You can use `toString` when you wish to embed a condition expression in a property value that accepts a `string`. For example:

```ts

new sqs.Queue(this, 'MyQueue', {
   queueName: Fn.conditionIf('Condition', 'Hello', 'World').toString()
});

``` Experimental.

type ICfnResourceOptions ¶

type ICfnResourceOptions interface {
	// A condition to associate with this resource.
	//
	// This means that only if the condition evaluates to 'true' when the stack
	// is deployed, the resource will be included. This is provided to allow CDK projects to produce legacy templates, but noramlly
	// there is no need to use it in CDK projects.
	// Experimental.
	Condition() CfnCondition
	// A condition to associate with this resource.
	//
	// This means that only if the condition evaluates to 'true' when the stack
	// is deployed, the resource will be included. This is provided to allow CDK projects to produce legacy templates, but noramlly
	// there is no need to use it in CDK projects.
	// Experimental.
	SetCondition(c CfnCondition)
	// Associate the CreationPolicy attribute with a resource to prevent its status from reaching create complete until AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded.
	//
	// To signal a
	// resource, you can use the cfn-signal helper script or SignalResource API. AWS CloudFormation publishes valid signals
	// to the stack events so that you track the number of signals sent.
	// Experimental.
	CreationPolicy() *CfnCreationPolicy
	// Associate the CreationPolicy attribute with a resource to prevent its status from reaching create complete until AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded.
	//
	// To signal a
	// resource, you can use the cfn-signal helper script or SignalResource API. AWS CloudFormation publishes valid signals
	// to the stack events so that you track the number of signals sent.
	// Experimental.
	SetCreationPolicy(c *CfnCreationPolicy)
	// With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted.
	//
	// You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy
	// attribute, AWS CloudFormation deletes the resource by default. Note that this capability also applies to update operations
	// that lead to resources being removed.
	// Experimental.
	DeletionPolicy() CfnDeletionPolicy
	// With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted.
	//
	// You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy
	// attribute, AWS CloudFormation deletes the resource by default. Note that this capability also applies to update operations
	// that lead to resources being removed.
	// Experimental.
	SetDeletionPolicy(d CfnDeletionPolicy)
	// The description of this resource.
	//
	// Used for informational purposes only, is not processed in any way
	// (and stays with the CloudFormation template, is not passed to the underlying resource,
	// even if it does have a 'description' property).
	// Experimental.
	Description() *string
	// The description of this resource.
	//
	// Used for informational purposes only, is not processed in any way
	// (and stays with the CloudFormation template, is not passed to the underlying resource,
	// even if it does have a 'description' property).
	// Experimental.
	SetDescription(d *string)
	// Metadata associated with the CloudFormation resource.
	//
	// This is not the same as the construct metadata which can be added
	// using construct.addMetadata(), but would not appear in the CloudFormation template automatically.
	// Experimental.
	Metadata() *map[string]interface{}
	// Metadata associated with the CloudFormation resource.
	//
	// This is not the same as the construct metadata which can be added
	// using construct.addMetadata(), but would not appear in the CloudFormation template automatically.
	// Experimental.
	SetMetadata(m *map[string]interface{})
	// Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.
	//
	// AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a
	// scheduled action is associated with the Auto Scaling group.
	// Experimental.
	UpdatePolicy() *CfnUpdatePolicy
	// Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.
	//
	// AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a
	// scheduled action is associated with the Auto Scaling group.
	// Experimental.
	SetUpdatePolicy(u *CfnUpdatePolicy)
	// Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation.
	// Experimental.
	UpdateReplacePolicy() CfnDeletionPolicy
	// Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation.
	// Experimental.
	SetUpdateReplacePolicy(u CfnDeletionPolicy)
	// The version of this resource.
	//
	// Used only for custom CloudFormation resources.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html
	//
	// Experimental.
	Version() *string
	// The version of this resource.
	//
	// Used only for custom CloudFormation resources.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html
	//
	// Experimental.
	SetVersion(v *string)
}

Experimental.

type ICfnRuleConditionExpression ¶

type ICfnRuleConditionExpression interface {
	ICfnConditionExpression
	// This field is only needed to defeat TypeScript's structural typing.
	//
	// It is never used.
	// Experimental.
	Disambiguator() *bool
}

Interface to specify certain functions as Service Catalog rule-specifc.

These functions can only be used in “Rules“ section of template. Experimental.

func Fn_ConditionAnd ¶

func Fn_ConditionAnd(conditions ...ICfnConditionExpression) ICfnRuleConditionExpression

Returns true if all the specified conditions evaluate to true, or returns false if any one of the conditions evaluates to false.

“Fn::And“ acts as an AND operator. The minimum number of conditions that you can include is 1.

Returns: an FnCondition token Experimental.

func Fn_ConditionContains ¶

func Fn_ConditionContains(listOfStrings *[]*string, value *string) ICfnRuleConditionExpression

Returns true if a specified string matches at least one value in a list of strings.

Returns: an FnCondition token Experimental.

func Fn_ConditionEachMemberEquals ¶

func Fn_ConditionEachMemberEquals(listOfStrings *[]*string, value *string) ICfnRuleConditionExpression

Returns true if a specified string matches all values in a list.

Returns: an FnCondition token Experimental.

func Fn_ConditionEachMemberIn ¶

func Fn_ConditionEachMemberIn(stringsToCheck *[]*string, stringsToMatch *[]*string) ICfnRuleConditionExpression

Returns true if each member in a list of strings matches at least one value in a second list of strings.

Returns: an FnCondition token Experimental.

func Fn_ConditionEquals ¶

func Fn_ConditionEquals(lhs interface{}, rhs interface{}) ICfnRuleConditionExpression

Compares if two values are equal.

Returns true if the two values are equal or false if they aren't.

Returns: an FnCondition token Experimental.

func Fn_ConditionIf ¶

func Fn_ConditionIf(conditionId *string, valueIfTrue interface{}, valueIfFalse interface{}) ICfnRuleConditionExpression

Returns one value if the specified condition evaluates to true and another value if the specified condition evaluates to false.

Currently, AWS CloudFormation supports the “Fn::If“ intrinsic function in the metadata attribute, update policy attribute, and property values in the Resources section and Outputs sections of a template. You can use the AWS::NoValue pseudo parameter as a return value to remove the corresponding property.

Returns: an FnCondition token Experimental.

func Fn_ConditionNot ¶

func Fn_ConditionNot(condition ICfnConditionExpression) ICfnRuleConditionExpression

Returns true for a condition that evaluates to false or returns false for a condition that evaluates to true.

“Fn::Not“ acts as a NOT operator.

Returns: an FnCondition token Experimental.

func Fn_ConditionOr ¶

func Fn_ConditionOr(conditions ...ICfnConditionExpression) ICfnRuleConditionExpression

Returns true if any one of the specified conditions evaluate to true, or returns false if all of the conditions evaluates to false.

“Fn::Or“ acts as an OR operator. The minimum number of conditions that you can include is 1.

Returns: an FnCondition token Experimental.

type IFragmentConcatenator ¶

type IFragmentConcatenator interface {
	// Join the fragment on the left and on the right.
	// Experimental.
	Join(left interface{}, right interface{}) interface{}
}

Function used to concatenate symbols in the target document language.

Interface so it could potentially be exposed over jsii. Experimental.

type IInspectable ¶

type IInspectable interface {
	// Examines construct.
	// Experimental.
	Inspect(inspector TreeInspector)
}

Interface for examining a construct and exposing metadata. Experimental.

type IListProducer ¶

type IListProducer interface {
	// Produce the list value.
	// Experimental.
	Produce(context IResolveContext) *[]*string
}

Interface for lazy list producers. Experimental.

type ILocalBundling ¶

type ILocalBundling interface {
	// This method is called before attempting docker bundling to allow the bundler to be executed locally.
	//
	// If the local bundler exists, and bundling
	// was performed locally, return `true`. Otherwise, return `false`.
	// Experimental.
	TryBundle(outputDir *string, options *BundlingOptions) *bool
}

Local bundling. Experimental.

type INumberProducer ¶

type INumberProducer interface {
	// Produce the number value.
	// Experimental.
	Produce(context IResolveContext) *float64
}

Interface for lazy number producers. Experimental.

type IPostProcessor ¶

type IPostProcessor interface {
	// Process the completely resolved value, after full recursion/resolution has happened.
	// Experimental.
	PostProcess(input interface{}, context IResolveContext) interface{}
}

A Token that can post-process the complete resolved value, after resolve() has recursed over it. Experimental.

type IResolvable ¶

type IResolvable interface {
	// Produce the Token's value at resolution time.
	// Experimental.
	Resolve(context IResolveContext) interface{}
	// Return a string representation of this resolvable object.
	//
	// Returns a reversible string representation.
	// Experimental.
	ToString() *string
	// The creation stack of this resolvable which will be appended to errors thrown during resolution.
	//
	// This may return an array with a single informational element indicating how
	// to get this property populated, if it was skipped for performance reasons.
	// Experimental.
	CreationStack() *[]*string
}

Interface for values that can be resolvable later.

Tokens are special objects that participate in synthesis. Experimental.

func Fn_GetAtt ¶

func Fn_GetAtt(logicalNameOfResource *string, attributeName *string) IResolvable

The “Fn::GetAtt“ intrinsic function returns the value of an attribute from a resource in the template.

Returns: an IResolvable object Experimental.

func Fn_Transform ¶

func Fn_Transform(macroName *string, parameters *map[string]interface{}) IResolvable

Creates a token representing the “Fn::Transform“ expression.

Returns: a token representing the transform expression See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-transform.html

Experimental.

func Lazy_Any ¶

func Lazy_Any(producer IStableAnyProducer, options *LazyAnyValueOptions) IResolvable

Defer the one-time calculation of an arbitrarily typed value to synthesis time.

Use this if you want to render an object to a template whose actual value depends on some state mutation that may happen after the construct has been created.

The inner function will only be invoked one time and cannot depend on resolution context. Experimental.

func Lazy_UncachedAny ¶

func Lazy_UncachedAny(producer IAnyProducer, options *LazyAnyValueOptions) IResolvable

Defer the calculation of an untyped value to synthesis time.

Use of this function is not recommended; unless you know you need it for sure, you probably don't. Use `Lazy.any()` instead.

The inner function may be invoked multiple times during synthesis. You should only use this method if the returned value depends on variables that may change during the Aspect application phase of synthesis, or if the value depends on the Stack the value is being used in. Both of these cases are rare, and only ever occur for AWS Construct Library authors. Experimental.

func Token_AsAny ¶

func Token_AsAny(value interface{}) IResolvable

Return a resolvable representation of the given value. Experimental.

func Tokenization_Reverse ¶

func Tokenization_Reverse(x interface{}, options *ReverseOptions) IResolvable

Reverse any value into a Resolvable, if possible.

In case of a string, the string must not be a concatenation. Experimental.

func Tokenization_ReverseCompleteString ¶

func Tokenization_ReverseCompleteString(s *string) IResolvable

Un-encode a string which is either a complete encoded token, or doesn't contain tokens at all.

It's illegal for the string to be a concatenation of an encoded token and something else. Experimental.

func Tokenization_ReverseList ¶

func Tokenization_ReverseList(l *[]*string) IResolvable

Un-encode a Tokenized value from a list. Experimental.

func Tokenization_ReverseNumber ¶

func Tokenization_ReverseNumber(n *float64) IResolvable

Un-encode a Tokenized value from a number. Experimental.

type IResolveContext ¶

type IResolveContext interface {
	// Use this postprocessor after the entire token structure has been resolved.
	// Experimental.
	RegisterPostProcessor(postProcessor IPostProcessor)
	// Resolve an inner object.
	// Experimental.
	Resolve(x interface{}, options *ResolveChangeContextOptions) interface{}
	// True when we are still preparing, false if we're rendering the final output.
	// Experimental.
	Preparing() *bool
	// The scope from which resolution has been initiated.
	// Experimental.
	Scope() constructs.IConstruct
}

Current resolution context for tokens. Experimental.

type IResource ¶

type IResource interface {
	constructs.IConstruct
	// 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.
	// Experimental.
	Env() *ResourceEnvironment
	// The stack in which this resource is defined.
	// Experimental.
	Stack() Stack
}

Interface for the Resource construct. Experimental.

type IStableAnyProducer ¶

type IStableAnyProducer interface {
	// Produce the value.
	// Experimental.
	Produce() interface{}
}

Interface for (stable) lazy untyped value producers. Experimental.

type IStableListProducer ¶

type IStableListProducer interface {
	// Produce the list value.
	// Experimental.
	Produce() *[]*string
}

Interface for (stable) lazy list producers. Experimental.

type IStableNumberProducer ¶

type IStableNumberProducer interface {
	// Produce the number value.
	// Experimental.
	Produce() *float64
}

Interface for (stable) lazy number producers. Experimental.

type IStableStringProducer ¶

type IStableStringProducer interface {
	// Produce the string value.
	// Experimental.
	Produce() *string
}

Interface for (stable) lazy string producers. Experimental.

type IStackSynthesizer ¶

type IStackSynthesizer interface {
	// Register a Docker Image Asset.
	//
	// Returns the parameters that can be used to refer to the asset inside the template.
	// Experimental.
	AddDockerImageAsset(asset *DockerImageAssetSource) *DockerImageAssetLocation
	// Register a File Asset.
	//
	// Returns the parameters that can be used to refer to the asset inside the template.
	// Experimental.
	AddFileAsset(asset *FileAssetSource) *FileAssetLocation
	// Bind to the stack this environment is going to be used on.
	//
	// Must be called before any of the other methods are called.
	// Experimental.
	Bind(stack Stack)
	// Synthesize the associated stack to the session.
	// Experimental.
	Synthesize(session ISynthesisSession)
}

Encodes information how a certain Stack should be deployed. Experimental.

type IStringProducer ¶

type IStringProducer interface {
	// Produce the string value.
	// Experimental.
	Produce(context IResolveContext) *string
}

Interface for lazy string producers. Experimental.

type ISynthesisSession ¶

type ISynthesisSession interface {
	// Cloud assembly builder.
	// Experimental.
	Assembly() cxapi.CloudAssemblyBuilder
	// Cloud assembly builder.
	// Experimental.
	SetAssembly(a cxapi.CloudAssemblyBuilder)
	// The output directory for this synthesis session.
	// Experimental.
	Outdir() *string
	// The output directory for this synthesis session.
	// Experimental.
	SetOutdir(o *string)
	// Whether the stack should be validated after synthesis to check for error metadata.
	// Experimental.
	ValidateOnSynth() *bool
	// Whether the stack should be validated after synthesis to check for error metadata.
	// Experimental.
	SetValidateOnSynth(v *bool)
}

Represents a single session of synthesis.

Passed into `Construct.synthesize()` methods. Experimental.

type ITaggable ¶

type ITaggable interface {
	// TagManager to set, remove and format tags.
	// Experimental.
	Tags() TagManager
}

Interface to implement tags. Experimental.

type ITemplateOptions ¶

type ITemplateOptions interface {
	// Gets or sets the description of this stack.
	//
	// If provided, it will be included in the CloudFormation template's "Description" attribute.
	// Experimental.
	Description() *string
	// Gets or sets the description of this stack.
	//
	// If provided, it will be included in the CloudFormation template's "Description" attribute.
	// Experimental.
	SetDescription(d *string)
	// Metadata associated with the CloudFormation template.
	// Experimental.
	Metadata() *map[string]interface{}
	// Metadata associated with the CloudFormation template.
	// Experimental.
	SetMetadata(m *map[string]interface{})
	// Gets or sets the AWSTemplateFormatVersion field of the CloudFormation template.
	// Experimental.
	TemplateFormatVersion() *string
	// Gets or sets the AWSTemplateFormatVersion field of the CloudFormation template.
	// Experimental.
	SetTemplateFormatVersion(t *string)
	// Gets or sets the top-level template transform(s) for this stack (e.g. `["AWS::Serverless-2016-10-31"]`).
	// Experimental.
	Transforms() *[]*string
	// Gets or sets the top-level template transform(s) for this stack (e.g. `["AWS::Serverless-2016-10-31"]`).
	// Experimental.
	SetTransforms(t *[]*string)
}

CloudFormation template options for a stack. Experimental.

type ITokenMapper ¶

type ITokenMapper interface {
	// Replace a single token.
	// Experimental.
	MapToken(t IResolvable) interface{}
}

Interface to apply operation to tokens in a string.

Interface so it can be exported via jsii. Experimental.

type ITokenResolver ¶

type ITokenResolver interface {
	// Resolve a tokenized list.
	// Experimental.
	ResolveList(l *[]*string, context IResolveContext) interface{}
	// Resolve a string with at least one stringified token in it.
	//
	// (May use concatenation)
	// Experimental.
	ResolveString(s TokenizedStringFragments, context IResolveContext) interface{}
	// Resolve a single token.
	// Experimental.
	ResolveToken(t IResolvable, context IResolveContext, postProcessor IPostProcessor) interface{}
}

How to resolve tokens. Experimental.

type IgnoreMode ¶

type IgnoreMode string

Determines the ignore behavior to use. Experimental.

const (
	IgnoreMode_GLOB   IgnoreMode = "GLOB"
	IgnoreMode_GIT    IgnoreMode = "GIT"
	IgnoreMode_DOCKER IgnoreMode = "DOCKER"
)

type IgnoreStrategy ¶

type IgnoreStrategy interface {
	Add(pattern *string)
	Ignores(absoluteFilePath *string) *bool
}

Represents file path ignoring behavior. Experimental.

func DockerIgnoreStrategy_FromCopyOptions ¶

func DockerIgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions` Experimental.

func GitIgnoreStrategy_FromCopyOptions ¶

func GitIgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions` Experimental.

func GlobIgnoreStrategy_FromCopyOptions ¶

func GlobIgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions` Experimental.

func IgnoreStrategy_FromCopyOptions ¶

func IgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions` Experimental.

type Intrinsic ¶

type Intrinsic interface {
	IResolvable
	CreationStack() *[]*string
	NewError(message *string) interface{}
	Resolve(_context IResolveContext) interface{}
	ToJSON() interface{}
	ToString() *string
}

Token subclass that represents values intrinsic to the target document language.

WARNING: this class should not be externally exposed, but is currently visible because of a limitation of jsii (https://github.com/aws/jsii/issues/524).

This class will disappear in a future release and should not be used. Experimental.

func NewIntrinsic ¶

func NewIntrinsic(value interface{}, options *IntrinsicProps) Intrinsic

Experimental.

type IntrinsicProps ¶

type IntrinsicProps struct {
	// Capture the stack trace of where this token is created.
	// Experimental.
	StackTrace *bool `json:"stackTrace"`
}

Customization properties for an Intrinsic token. Experimental.

type Lazy ¶

type Lazy interface {
}

Lazily produce a value.

Can be used to return a string, list or numeric value whose actual value will only be calculated later, during synthesis. Experimental.

type LazyAnyValueOptions ¶

type LazyAnyValueOptions struct {
	// Use the given name as a display hint.
	// Experimental.
	DisplayHint *string `json:"displayHint"`
	// If the produced value is an array and it is empty, return 'undefined' instead.
	// Experimental.
	OmitEmptyArray *bool `json:"omitEmptyArray"`
}

Options for creating lazy untyped tokens. Experimental.

type LazyListValueOptions ¶

type LazyListValueOptions struct {
	// Use the given name as a display hint.
	// Experimental.
	DisplayHint *string `json:"displayHint"`
	// If the produced list is empty, return 'undefined' instead.
	// Experimental.
	OmitEmpty *bool `json:"omitEmpty"`
}

Options for creating a lazy list token. Experimental.

type LazyStringValueOptions ¶

type LazyStringValueOptions struct {
	// Use the given name as a display hint.
	// Experimental.
	DisplayHint *string `json:"displayHint"`
}

Options for creating a lazy string token. Experimental.

type LegacyStackSynthesizer ¶

type LegacyStackSynthesizer interface {
	StackSynthesizer
	AddDockerImageAsset(asset *DockerImageAssetSource) *DockerImageAssetLocation
	AddFileAsset(asset *FileAssetSource) *FileAssetLocation
	Bind(stack Stack)
	EmitStackArtifact(stack Stack, session ISynthesisSession, options *SynthesizeStackArtifactOptions)
	Synthesize(session ISynthesisSession)
	SynthesizeStackTemplate(stack Stack, session ISynthesisSession)
}

Use the original deployment environment.

This deployment environment is restricted in cross-environment deployments, CI/CD deployments, and will use up CloudFormation parameters in your template.

This is the only StackSynthesizer that supports customizing asset behavior by overriding `Stack.addFileAsset()` and `Stack.addDockerImageAsset()`. Experimental.

func NewLegacyStackSynthesizer ¶

func NewLegacyStackSynthesizer() LegacyStackSynthesizer

Experimental.

type Names ¶

type Names interface {
}

Functions for devising unique names for constructs.

For example, those can be used to allocate unique physical names for resources. Experimental.

type NestedStack ¶

type NestedStack interface {
	Stack
	Account() *string
	ArtifactId() *string
	AvailabilityZones() *[]*string
	Dependencies() *[]Stack
	Environment() *string
	Nested() *bool
	NestedStackParent() Stack
	NestedStackResource() CfnResource
	Node() constructs.Node
	NotificationArns() *[]*string
	Partition() *string
	Region() *string
	StackId() *string
	StackName() *string
	Synthesizer() IStackSynthesizer
	Tags() TagManager
	TemplateFile() *string
	TemplateOptions() ITemplateOptions
	TerminationProtection() *bool
	UrlSuffix() *string
	AddDependency(target Stack, reason *string)
	AddTransform(transform *string)
	AllocateLogicalId(cfnElement CfnElement) *string
	ExportValue(exportedValue interface{}, options *ExportValueOptions) *string
	FormatArn(components *ArnComponents) *string
	GetLogicalId(element CfnElement) *string
	RenameLogicalId(oldId *string, newId *string)
	ReportMissingContextKey(report *cloudassemblyschema.MissingContext)
	Resolve(obj interface{}) interface{}
	SetParameter(name *string, value *string)
	SplitArn(arn *string, arnFormat ArnFormat) *ArnComponents
	ToJsonString(obj interface{}, space *float64) *string
	ToString() *string
}

A CloudFormation nested stack.

When you apply template changes to update a top-level stack, CloudFormation updates the top-level stack and initiates an update to its nested stacks. CloudFormation updates the resources of modified nested stacks, but does not update the resources of unmodified nested stacks.

Furthermore, this stack will not be treated as an independent deployment artifact (won't be listed in "cdk list" or deployable through "cdk deploy"), but rather only synthesized as a template and uploaded as an asset to S3.

Cross references of resource attributes between the parent stack and the nested stack will automatically be translated to stack parameters and outputs. Experimental.

func NewNestedStack ¶

func NewNestedStack(scope constructs.Construct, id *string, props *NestedStackProps) NestedStack

Experimental.

type NestedStackProps ¶

type NestedStackProps struct {
	// The Simple Notification Service (SNS) topics to publish stack related events.
	// Experimental.
	NotificationArns *[]*string `json:"notificationArns"`
	// The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.
	//
	// Each parameter has a name corresponding
	// to a parameter defined in the embedded template and a value representing
	// the value that you want to set for the parameter.
	//
	// The nested stack construct will automatically synthesize parameters in order
	// to bind references from the parent stack(s) into the nested stack.
	// Experimental.
	Parameters *map[string]*string `json:"parameters"`
	// Policy to apply when the nested stack is removed.
	//
	// The default is `Destroy`, because all Removal Policies of resources inside the
	// Nested Stack should already have been set correctly. You normally should
	// not need to set this value.
	// Experimental.
	RemovalPolicy RemovalPolicy `json:"removalPolicy"`
	// The length of time that CloudFormation waits for the nested stack to reach the CREATE_COMPLETE state.
	//
	// When CloudFormation detects that the nested stack has reached the
	// CREATE_COMPLETE state, it marks the nested stack resource as
	// CREATE_COMPLETE in the parent stack and resumes creating the parent stack.
	// If the timeout period expires before the nested stack reaches
	// CREATE_COMPLETE, CloudFormation marks the nested stack as failed and rolls
	// back both the nested stack and parent stack.
	// Experimental.
	Timeout Duration `json:"timeout"`
}

Initialization props for the `NestedStack` construct. Experimental.

type NestedStackSynthesizer ¶

type NestedStackSynthesizer interface {
	StackSynthesizer
	AddDockerImageAsset(asset *DockerImageAssetSource) *DockerImageAssetLocation
	AddFileAsset(asset *FileAssetSource) *FileAssetLocation
	Bind(stack Stack)
	EmitStackArtifact(stack Stack, session ISynthesisSession, options *SynthesizeStackArtifactOptions)
	Synthesize(session ISynthesisSession)
	SynthesizeStackTemplate(stack Stack, session ISynthesisSession)
}

Deployment environment for a nested stack.

Interoperates with the StackSynthesizer of the parent stack. Experimental.

func NewNestedStackSynthesizer ¶

func NewNestedStackSynthesizer(parentDeployment IStackSynthesizer) NestedStackSynthesizer

Experimental.

type PhysicalName ¶

type PhysicalName interface {
}

Includes special markers for automatic generation of physical names. Experimental.

type Reference ¶

type Reference interface {
	Intrinsic
	CreationStack() *[]*string
	DisplayName() *string
	Target() constructs.IConstruct
	NewError(message *string) interface{}
	Resolve(_context IResolveContext) interface{}
	ToJSON() interface{}
	ToString() *string
}

An intrinsic Token that represents a reference to a construct.

References are recorded. Experimental.

type RemovalPolicy ¶

type RemovalPolicy string

Possible values for a resource's Removal Policy.

The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:

  • The resource is removed from the template, so CloudFormation stops managing it;
  • A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it;
  • The stack is deleted, so CloudFormation stops managing all resources in it.

The Removal Policy applies to all above cases.

Many stateful resources in the AWS Construct Library will accept a `removalPolicy` as a property, typically defaulting it to `RETAIN`.

If the AWS Construct Library resource does not accept a `removalPolicy` argument, you can always configure it by using the escape hatch mechanism, as shown in the following example:

```ts const cfnBucket = bucket.node.findChild('Resource') as cdk.CfnResource; cfnBucket.applyRemovalPolicy(cdk.RemovalPolicy.DESTROY); ``` Experimental.

const (
	RemovalPolicy_DESTROY  RemovalPolicy = "DESTROY"
	RemovalPolicy_RETAIN   RemovalPolicy = "RETAIN"
	RemovalPolicy_SNAPSHOT RemovalPolicy = "SNAPSHOT"
)

type RemovalPolicyOptions ¶

type RemovalPolicyOptions struct {
	// Apply the same deletion policy to the resource's "UpdateReplacePolicy".
	// Experimental.
	ApplyToUpdateReplacePolicy *bool `json:"applyToUpdateReplacePolicy"`
	// The default policy to apply in case the removal policy is not defined.
	// Experimental.
	Default RemovalPolicy `json:"default"`
}

Experimental.

type RemoveTag ¶

type RemoveTag interface {
	IAspect
	Key() *string
	Props() *TagProps
	ApplyTag(resource ITaggable)
	Visit(construct constructs.IConstruct)
}

The RemoveTag Aspect will handle removing tags from this node and children. Experimental.

func NewRemoveTag ¶

func NewRemoveTag(key *string, props *TagProps) RemoveTag

Experimental.

type ResolveChangeContextOptions ¶

type ResolveChangeContextOptions struct {
	// Change the 'allowIntrinsicKeys' option.
	// Experimental.
	AllowIntrinsicKeys *bool `json:"allowIntrinsicKeys"`
}

Options that can be changed while doing a recursive resolve. Experimental.

type ResolveOptions ¶

type ResolveOptions struct {
	// The resolver to apply to any resolvable tokens found.
	// Experimental.
	Resolver ITokenResolver `json:"resolver"`
	// The scope from which resolution is performed.
	// Experimental.
	Scope constructs.IConstruct `json:"scope"`
	// Whether the resolution is being executed during the prepare phase or not.
	// Experimental.
	Preparing *bool `json:"preparing"`
	// Whether to remove undefined elements from arrays and objects when resolving.
	// Experimental.
	RemoveEmpty *bool `json:"removeEmpty"`
}

Options to the resolve() operation.

NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way. Experimental.

type Resource ¶

type Resource interface {
	constructs.Construct
	IResource
	Env() *ResourceEnvironment
	Node() constructs.Node
	PhysicalName() *string
	Stack() Stack
	ApplyRemovalPolicy(policy RemovalPolicy)
	GeneratePhysicalName() *string
	GetResourceArnAttribute(arnAttr *string, arnComponents *ArnComponents) *string
	GetResourceNameAttribute(nameAttr *string) *string
	ToString() *string
}

A construct which represents an AWS resource. Experimental.

type ResourceEnvironment ¶

type ResourceEnvironment struct {
	// The AWS account ID that this resource belongs to.
	//
	// Since this can be a Token
	// (for example, when the account is CloudFormation's AWS::AccountId intrinsic),
	// make sure to use Token.compareStrings()
	// instead of just comparing the values for equality.
	// Experimental.
	Account *string `json:"account"`
	// The AWS region that this resource belongs to.
	//
	// Since this can be a Token
	// (for example, when the region is CloudFormation's AWS::Region intrinsic),
	// make sure to use Token.compareStrings()
	// instead of just comparing the values for equality.
	// Experimental.
	Region *string `json:"region"`
}

Represents the environment a given resource lives in.

Used as the return value for the {@link IResource.env} property. Experimental.

type ResourceProps ¶

type ResourceProps struct {
	// The AWS account ID this resource belongs to.
	// Experimental.
	Account *string `json:"account"`
	// ARN to deduce region and account from.
	//
	// The ARN is parsed and the account and region are taken from the ARN.
	// This should be used for imported resources.
	//
	// Cannot be supplied together with either `account` or `region`.
	// Experimental.
	EnvironmentFromArn *string `json:"environmentFromArn"`
	// The value passed in by users to the physical name prop of the resource.
	//
	// - `undefined` implies that a physical name will be allocated by
	//    CloudFormation during deployment.
	// - a concrete value implies a specific physical name
	// - `PhysicalName.GENERATE_IF_NEEDED` is a marker that indicates that a physical will only be generated
	//    by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation.
	// Experimental.
	PhysicalName *string `json:"physicalName"`
	// The AWS region this resource belongs to.
	// Experimental.
	Region *string `json:"region"`
}

Construction properties for {@link Resource}. Experimental.

type ReverseOptions ¶

type ReverseOptions struct {
	// Fail if the given string is a concatenation.
	//
	// If `false`, just return `undefined`.
	// Experimental.
	FailConcat *bool `json:"failConcat"`
}

Options for the 'reverse()' operation. Experimental.

type ScopedAws ¶

type ScopedAws interface {
	AccountId() *string
	NotificationArns() *[]*string
	Partition() *string
	Region() *string
	StackId() *string
	StackName() *string
	UrlSuffix() *string
}

Accessor for scoped pseudo parameters.

These pseudo parameters are anchored to a stack somewhere in the construct tree, and their values will be exported automatically. Experimental.

func NewScopedAws ¶

func NewScopedAws(scope constructs.Construct) ScopedAws

Experimental.

type SecretValue ¶

type SecretValue interface {
	Intrinsic
	CreationStack() *[]*string
	NewError(message *string) interface{}
	Resolve(_context IResolveContext) interface{}
	ToJSON() interface{}
	ToString() *string
}

Work with secret values in the CDK.

Secret values in the CDK (such as those retrieved from SecretsManager) are represented as regular strings, just like other values that are only available at deployment time.

To help you avoid accidental mistakes which would lead to you putting your secret values directly into a CloudFormation template, constructs that take secret values will not allow you to pass in a literal secret value. They do so by calling `Secret.assertSafeSecret()`.

You can escape the check by calling `Secret.plainText()`, but doing so is highly discouraged. Experimental.

func NewSecretValue ¶

func NewSecretValue(value interface{}, options *IntrinsicProps) SecretValue

Experimental.

func SecretValue_CfnDynamicReference ¶

func SecretValue_CfnDynamicReference(ref CfnDynamicReference) SecretValue

Obtain the secret value through a CloudFormation dynamic reference.

If possible, use `SecretValue.ssmSecure` or `SecretValue.secretsManager` directly. Experimental.

func SecretValue_CfnParameter ¶

func SecretValue_CfnParameter(param CfnParameter) SecretValue

Obtain the secret value through a CloudFormation parameter.

Generally, this is not a recommended approach. AWS Secrets Manager is the recommended way to reference secrets. Experimental.

func SecretValue_PlainText ¶

func SecretValue_PlainText(secret *string) SecretValue

Construct a literal secret value for use with secret-aware constructs.

*Do not use this method for any secrets that you care about.*

The only reasonable use case for using this method is when you are testing. Experimental.

func SecretValue_SecretsManager ¶

func SecretValue_SecretsManager(secretId *string, options *SecretsManagerSecretOptions) SecretValue

Creates a `SecretValue` with a value which is dynamically loaded from AWS Secrets Manager. Experimental.

func SecretValue_SsmSecure ¶

func SecretValue_SsmSecure(parameterName *string, version *string) SecretValue

Use a secret value stored from a Systems Manager (SSM) parameter. Experimental.

type SecretsManagerSecretOptions ¶

type SecretsManagerSecretOptions struct {
	// The key of a JSON field to retrieve.
	//
	// This can only be used if the secret
	// stores a JSON object.
	// Experimental.
	JsonField *string `json:"jsonField"`
	// Specifies the unique identifier of the version of the secret you want to use.
	//
	// Can specify at most one of `versionId` and `versionStage`.
	// Experimental.
	VersionId *string `json:"versionId"`
	// Specifies the secret version that you want to retrieve by the staging label attached to the version.
	//
	// Can specify at most one of `versionId` and `versionStage`.
	// Experimental.
	VersionStage *string `json:"versionStage"`
}

Options for referencing a secret value from Secrets Manager. Experimental.

type Size ¶

type Size interface {
	ToGibibytes(opts *SizeConversionOptions) *float64
	ToKibibytes(opts *SizeConversionOptions) *float64
	ToMebibytes(opts *SizeConversionOptions) *float64
	ToPebibytes(opts *SizeConversionOptions) *float64
	ToTebibytes(opts *SizeConversionOptions) *float64
}

Represents the amount of digital storage.

The amount can be specified either as a literal value (e.g: `10`) which cannot be negative, or as an unresolved number token.

When the amount is passed as a token, unit conversion is not possible. Experimental.

func Size_Gibibytes ¶

func Size_Gibibytes(amount *float64) Size

Create a Storage representing an amount gibibytes.

1 GiB = 1024 MiB

Returns: a new `Size` instance Experimental.

func Size_Kibibytes ¶

func Size_Kibibytes(amount *float64) Size

Create a Storage representing an amount kibibytes.

1 KiB = 1024 bytes

Returns: a new `Size` instance Experimental.

func Size_Mebibytes ¶

func Size_Mebibytes(amount *float64) Size

Create a Storage representing an amount mebibytes.

1 MiB = 1024 KiB

Returns: a new `Size` instance Experimental.

func Size_Pebibytes ¶

func Size_Pebibytes(amount *float64) Size

Create a Storage representing an amount pebibytes.

1 PiB = 1024 TiB

Returns: a new `Size` instance Experimental.

func Size_Tebibytes ¶

func Size_Tebibytes(amount *float64) Size

Create a Storage representing an amount tebibytes.

1 TiB = 1024 GiB

Returns: a new `Size` instance Experimental.

type SizeConversionOptions ¶

type SizeConversionOptions struct {
	// How conversions should behave when it encounters a non-integer result.
	// Experimental.
	Rounding SizeRoundingBehavior `json:"rounding"`
}

Options for how to convert time to a different unit. Experimental.

type SizeRoundingBehavior ¶

type SizeRoundingBehavior string

Rounding behaviour when converting between units of `Size`. Experimental.

const (
	SizeRoundingBehavior_FAIL  SizeRoundingBehavior = "FAIL"
	SizeRoundingBehavior_FLOOR SizeRoundingBehavior = "FLOOR"
	SizeRoundingBehavior_NONE  SizeRoundingBehavior = "NONE"
)

type Stack ¶

type Stack interface {
	constructs.Construct
	ITaggable
	Account() *string
	ArtifactId() *string
	AvailabilityZones() *[]*string
	Dependencies() *[]Stack
	Environment() *string
	Nested() *bool
	NestedStackParent() Stack
	NestedStackResource() CfnResource
	Node() constructs.Node
	NotificationArns() *[]*string
	Partition() *string
	Region() *string
	StackId() *string
	StackName() *string
	Synthesizer() IStackSynthesizer
	Tags() TagManager
	TemplateFile() *string
	TemplateOptions() ITemplateOptions
	TerminationProtection() *bool
	UrlSuffix() *string
	AddDependency(target Stack, reason *string)
	AddTransform(transform *string)
	AllocateLogicalId(cfnElement CfnElement) *string
	ExportValue(exportedValue interface{}, options *ExportValueOptions) *string
	FormatArn(components *ArnComponents) *string
	GetLogicalId(element CfnElement) *string
	RenameLogicalId(oldId *string, newId *string)
	ReportMissingContextKey(report *cloudassemblyschema.MissingContext)
	Resolve(obj interface{}) interface{}
	SplitArn(arn *string, arnFormat ArnFormat) *ArnComponents
	ToJsonString(obj interface{}, space *float64) *string
	ToString() *string
}

A root construct which represents a single CloudFormation stack. Experimental.

func NestedStack_Of ¶

func NestedStack_Of(construct constructs.IConstruct) Stack

Looks up the first stack scope in which `construct` is defined.

Fails if there is no stack up the tree. Experimental.

func NewStack ¶

func NewStack(scope constructs.Construct, id *string, props *StackProps) Stack

Creates a new stack. Experimental.

func Stack_Of ¶

func Stack_Of(construct constructs.IConstruct) Stack

Looks up the first stack scope in which `construct` is defined.

Fails if there is no stack up the tree. Experimental.

type StackProps ¶

type StackProps struct {
	// Include runtime versioning information in this Stack.
	// Experimental.
	AnalyticsReporting *bool `json:"analyticsReporting"`
	// A description of the stack.
	// Experimental.
	Description *string `json:"description"`
	// The AWS environment (account/region) where this stack will be deployed.
	//
	// Set the `region`/`account` fields of `env` to either a concrete value to
	// select the indicated environment (recommended for production stacks), or to
	// the values of environment variables
	// `CDK_DEFAULT_REGION`/`CDK_DEFAULT_ACCOUNT` to let the target environment
	// depend on the AWS credentials/configuration that the CDK CLI is executed
	// under (recommended for development stacks).
	//
	// If the `Stack` is instantiated inside a `Stage`, any undefined
	// `region`/`account` fields from `env` will default to the same field on the
	// encompassing `Stage`, if configured there.
	//
	// If either `region` or `account` are not set nor inherited from `Stage`, the
	// Stack will be considered "*environment-agnostic*"". Environment-agnostic
	// stacks can be deployed to any environment but may not be able to take
	// advantage of all features of the CDK. For example, they will not be able to
	// use environmental context lookups such as `ec2.Vpc.fromLookup` and will not
	// automatically translate Service Principals to the right format based on the
	// environment's AWS partition, and other such enhancements.
	//
	// TODO: EXAMPLE
	//
	// Experimental.
	Env *Environment `json:"env"`
	// Name to deploy the stack with.
	// Experimental.
	StackName *string `json:"stackName"`
	// Synthesis method to use while deploying this stack.
	// Experimental.
	Synthesizer IStackSynthesizer `json:"synthesizer"`
	// Stack tags that will be applied to all the taggable resources and the stack itself.
	// Experimental.
	Tags *map[string]*string `json:"tags"`
	// Whether to enable termination protection for this stack.
	// Experimental.
	TerminationProtection *bool `json:"terminationProtection"`
}

Experimental.

type StackSynthesizer ¶

type StackSynthesizer interface {
	IStackSynthesizer
	AddDockerImageAsset(asset *DockerImageAssetSource) *DockerImageAssetLocation
	AddFileAsset(asset *FileAssetSource) *FileAssetLocation
	Bind(stack Stack)
	EmitStackArtifact(stack Stack, session ISynthesisSession, options *SynthesizeStackArtifactOptions)
	Synthesize(session ISynthesisSession)
	SynthesizeStackTemplate(stack Stack, session ISynthesisSession)
}

Base class for implementing an IStackSynthesizer.

This class needs to exist to provide public surface area for external implementations of stack synthesizers. The protected methods give access to functions that are otherwise @_internal to the framework and could not be accessed by external implementors. Experimental.

type Stage ¶

type Stage interface {
	constructs.Construct
	Account() *string
	ArtifactId() *string
	AssetOutdir() *string
	Node() constructs.Node
	Outdir() *string
	ParentStage() Stage
	Region() *string
	StageName() *string
	Synth(options *StageSynthesisOptions) cxapi.CloudAssembly
	ToString() *string
}

An abstract application modeling unit consisting of Stacks that should be deployed together.

Derive a subclass of `Stage` and use it to model a single instance of your application.

You can then instantiate your subclass multiple times to model multiple copies of your application which should be be deployed to different environments. Experimental.

func App_Of ¶

func App_Of(construct constructs.IConstruct) Stage

Return the stage this construct is contained with, if available.

If called on a nested stage, returns its parent. Experimental.

func NewStage ¶

func NewStage(scope constructs.Construct, id *string, props *StageProps) Stage

Experimental.

func Stage_Of ¶

func Stage_Of(construct constructs.IConstruct) Stage

Return the stage this construct is contained with, if available.

If called on a nested stage, returns its parent. Experimental.

type StageProps ¶

type StageProps struct {
	// Default AWS environment (account/region) for `Stack`s in this `Stage`.
	//
	// Stacks defined inside this `Stage` with either `region` or `account` missing
	// from its env will use the corresponding field given here.
	//
	// If either `region` or `account`is is not configured for `Stack` (either on
	// the `Stack` itself or on the containing `Stage`), the Stack will be
	// *environment-agnostic*.
	//
	// Environment-agnostic stacks can be deployed to any environment, may not be
	// able to take advantage of all features of the CDK. For example, they will
	// not be able to use environmental context lookups, will not automatically
	// translate Service Principals to the right format based on the environment's
	// AWS partition, and other such enhancements.
	//
	// TODO: EXAMPLE
	//
	// Experimental.
	Env *Environment `json:"env"`
	// The output directory into which to emit synthesized artifacts.
	//
	// Can only be specified if this stage is the root stage (the app). If this is
	// specified and this stage is nested within another stage, an error will be
	// thrown.
	// Experimental.
	Outdir *string `json:"outdir"`
}

Initialization props for a stage. Experimental.

type StageSynthesisOptions ¶

type StageSynthesisOptions struct {
	// Force a re-synth, even if the stage has already been synthesized.
	//
	// This is used by tests to allow for incremental verification of the output.
	// Do not use in production.
	// Experimental.
	Force *bool `json:"force"`
	// Should we skip construct validation.
	// Experimental.
	SkipValidation *bool `json:"skipValidation"`
	// Whether the stack should be validated after synthesis to check for error metadata.
	// Experimental.
	ValidateOnSynthesis *bool `json:"validateOnSynthesis"`
}

Options for assembly synthesis. Experimental.

type StringConcat ¶

type StringConcat interface {
	IFragmentConcatenator
	Join(left interface{}, right interface{}) interface{}
}

Converts all fragments to strings and concats those.

Drops 'undefined's. Experimental.

func NewStringConcat ¶

func NewStringConcat() StringConcat

Experimental.

type SymlinkFollowMode ¶

type SymlinkFollowMode string

Determines how symlinks are followed. Experimental.

const (
	SymlinkFollowMode_NEVER          SymlinkFollowMode = "NEVER"
	SymlinkFollowMode_ALWAYS         SymlinkFollowMode = "ALWAYS"
	SymlinkFollowMode_EXTERNAL       SymlinkFollowMode = "EXTERNAL"
	SymlinkFollowMode_BLOCK_EXTERNAL SymlinkFollowMode = "BLOCK_EXTERNAL"
)

type SynthesizeStackArtifactOptions ¶

type SynthesizeStackArtifactOptions struct {
	// Identifiers of additional dependencies.
	// Experimental.
	AdditionalDependencies *[]*string `json:"additionalDependencies"`
	// The role that needs to be assumed to deploy the stack.
	// Experimental.
	AssumeRoleArn *string `json:"assumeRoleArn"`
	// The externalID to use with the assumeRoleArn.
	// Experimental.
	AssumeRoleExternalId *string `json:"assumeRoleExternalId"`
	// SSM parameter where the bootstrap stack version number can be found.
	//
	// Only used if `requiresBootstrapStackVersion` is set.
	//
	// - If this value is not set, the bootstrap stack name must be known at
	//    deployment time so the stack version can be looked up from the stack
	//    outputs.
	// - If this value is set, the bootstrap stack can have any name because
	//    we won't need to look it up.
	// Experimental.
	BootstrapStackVersionSsmParameter *string `json:"bootstrapStackVersionSsmParameter"`
	// The role that is passed to CloudFormation to execute the change set.
	// Experimental.
	CloudFormationExecutionRoleArn *string `json:"cloudFormationExecutionRoleArn"`
	// Values for CloudFormation stack parameters that should be passed when the stack is deployed.
	// Experimental.
	Parameters *map[string]*string `json:"parameters"`
	// Version of bootstrap stack required to deploy this stack.
	// Experimental.
	RequiresBootstrapStackVersion *float64 `json:"requiresBootstrapStackVersion"`
	// If the stack template has already been included in the asset manifest, its asset URL.
	// Experimental.
	StackTemplateAssetObjectUrl *string `json:"stackTemplateAssetObjectUrl"`
}

Stack artifact options.

A subset of `cxschema.AwsCloudFormationStackProperties` of optional settings that need to be configurable by synthesizers, plus `additionalDependencies`. Experimental.

type Tag ¶

type Tag interface {
	IAspect
	Key() *string
	Props() *TagProps
	Value() *string
	ApplyTag(resource ITaggable)
	Visit(construct constructs.IConstruct)
}

The Tag Aspect will handle adding a tag to this node and cascading tags to children. Experimental.

func NewTag ¶

func NewTag(key *string, value *string, props *TagProps) Tag

Experimental.

type TagManager ¶

type TagManager interface {
	TagPropertyName() *string
	ApplyTagAspectHere(include *[]*string, exclude *[]*string) *bool
	HasTags() *bool
	RemoveTag(key *string, priority *float64)
	RenderTags() interface{}
	SetTag(key *string, value *string, priority *float64, applyToLaunchedInstances *bool)
	TagValues() *map[string]*string
}

TagManager facilitates a common implementation of tagging for Constructs. Experimental.

func NewTagManager ¶

func NewTagManager(tagType TagType, resourceTypeName *string, tagStructure interface{}, options *TagManagerOptions) TagManager

Experimental.

type TagManagerOptions ¶

type TagManagerOptions struct {
	// The name of the property in CloudFormation for these tags.
	//
	// Normally this is `tags`, but Cognito UserPool uses UserPoolTags
	// Experimental.
	TagPropertyName *string `json:"tagPropertyName"`
}

Options to configure TagManager behavior. Experimental.

type TagProps ¶

type TagProps struct {
	// Whether the tag should be applied to instances in an AutoScalingGroup.
	// Experimental.
	ApplyToLaunchedInstances *bool `json:"applyToLaunchedInstances"`
	// An array of Resource Types that will not receive this tag.
	//
	// An empty array will allow this tag to be applied to all resources. A
	// non-empty array will apply this tag only if the Resource type is not in
	// this array.
	// Experimental.
	ExcludeResourceTypes *[]*string `json:"excludeResourceTypes"`
	// An array of Resource Types that will receive this tag.
	//
	// An empty array will match any Resource. A non-empty array will apply this
	// tag only to Resource types that are included in this array.
	// Experimental.
	IncludeResourceTypes *[]*string `json:"includeResourceTypes"`
	// Priority of the tag operation.
	//
	// Higher or equal priority tags will take precedence.
	//
	// Setting priority will enable the user to control tags when they need to not
	// follow the default precedence pattern of last applied and closest to the
	// construct in the tree.
	// Experimental.
	Priority *float64 `json:"priority"`
}

Properties for a tag. Experimental.

type TagType ¶

type TagType string

Experimental.

const (
	TagType_STANDARD          TagType = "STANDARD"
	TagType_AUTOSCALING_GROUP TagType = "AUTOSCALING_GROUP"
	TagType_MAP               TagType = "MAP"
	TagType_KEY_VALUE         TagType = "KEY_VALUE"
	TagType_NOT_TAGGABLE      TagType = "NOT_TAGGABLE"
)

type Tags ¶

type Tags interface {
	Add(key *string, value *string, props *TagProps)
	Remove(key *string, props *TagProps)
}

Manages AWS tags for all resources within a construct scope. Experimental.

func Tags_Of ¶

func Tags_Of(scope constructs.IConstruct) Tags

Returns the tags API for this scope. Experimental.

type TimeConversionOptions ¶

type TimeConversionOptions struct {
	// If `true`, conversions into a larger time unit (e.g. `Seconds` to `Minutes`) will fail if the result is not an integer.
	// Experimental.
	Integral *bool `json:"integral"`
}

Options for how to convert time to a different unit. Experimental.

type Token ¶

type Token interface {
}

Represents a special or lazily-evaluated value.

Can be used to delay evaluation of a certain value in case, for example, that it requires some context or late-bound data. Can also be used to mark values that need special processing at document rendering time.

Tokens can be embedded into strings while retaining their original semantics. Experimental.

type TokenComparison ¶

type TokenComparison interface {
}

An enum-like class that represents the result of comparing two Tokens.

The return type of {@link Token.compareStrings}. Experimental.

func TokenComparison_BOTH_UNRESOLVED ¶

func TokenComparison_BOTH_UNRESOLVED() TokenComparison

func TokenComparison_DIFFERENT ¶

func TokenComparison_DIFFERENT() TokenComparison

func TokenComparison_ONE_UNRESOLVED ¶

func TokenComparison_ONE_UNRESOLVED() TokenComparison

func TokenComparison_SAME ¶

func TokenComparison_SAME() TokenComparison

func Token_CompareStrings ¶

func Token_CompareStrings(possibleToken1 *string, possibleToken2 *string) TokenComparison

Compare two strings that might contain Tokens with each other. Experimental.

type Tokenization ¶

type Tokenization interface {
}

Less oft-needed functions to manipulate Tokens. Experimental.

type TokenizedStringFragments ¶

type TokenizedStringFragments interface {
	FirstToken() IResolvable
	FirstValue() interface{}
	Length() *float64
	Tokens() *[]IResolvable
	AddIntrinsic(value interface{})
	AddLiteral(lit interface{})
	AddToken(token IResolvable)
	Join(concat IFragmentConcatenator) interface{}
	MapTokens(mapper ITokenMapper) TokenizedStringFragments
}

Fragments of a concatenated string containing stringified Tokens. Experimental.

func NewTokenizedStringFragments ¶

func NewTokenizedStringFragments() TokenizedStringFragments

Experimental.

func Tokenization_ReverseString ¶

func Tokenization_ReverseString(s *string) TokenizedStringFragments

Un-encode a string potentially containing encoded tokens. Experimental.

type TreeInspector ¶

type TreeInspector interface {
	Attributes() *map[string]interface{}
	AddAttribute(key *string, value interface{})
}

Inspector that maintains an attribute bag. Experimental.

func NewTreeInspector ¶

func NewTreeInspector() TreeInspector

Experimental.

type ValidationResult ¶

type ValidationResult interface {
	ErrorMessage() *string
	IsSuccess() *bool
	Results() ValidationResults
	AssertSuccess()
	ErrorTree() *string
	Prefix(message *string) ValidationResult
}

Representation of validation results.

Models a tree of validation errors so that we have as much information as possible about the failure that occurred. Experimental.

func NewValidationResult ¶

func NewValidationResult(errorMessage *string, results ValidationResults) ValidationResult

Experimental.

type ValidationResults ¶

type ValidationResults interface {
	IsSuccess() *bool
	Results() *[]ValidationResult
	SetResults(val *[]ValidationResult)
	Collect(result ValidationResult)
	ErrorTreeList() *string
	Wrap(message *string) ValidationResult
}

A collection of validation results. Experimental.

func NewValidationResults ¶

func NewValidationResults(results *[]ValidationResult) ValidationResults

Experimental.

Directories ¶

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL