awscdk

package module
Version: v2.99.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 95

README

AWS Cloud Development Kit Library

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 in NPM, declare them both under the devDependencies and peerDependencies sections. To make sure your library is compatible with the widest range of CDK versions: pick the minimum aws-cdk-lib version that your library requires; declare a range dependency with a caret on that version in peerDependencies, and declare a point version dependency on that version in devDependencies.

For example, let's say the minimum version your library needs is 2.38.0. Your package.json should look like this:

{
  "peerDependencies": {
    "aws-cdk-lib": "^2.38.0",
    "constructs": "^10.0.0"
  },
  "devDependencies": {
    /* Install the oldest version for testing so we don't accidentally use features from a newer version than we declare */
    "aws-cdk-lib": "2.38.0"
  }
}

For CDK apps, declare them under the dependencies section. Use a caret so you always get the latest version:

{
  "dependencies": {
    "aws-cdk-lib": "^2.38.0",
    "constructs": "^10.0.0"
  }
}
Use in your code
Classic import

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

import "github.com/aws/aws-cdk-go/awscdk"

app := awscdk.NewApp()
stack := awscdk.NewStack(app, jsii.String("TestStack"))

awscdk.Aws_s3.NewBucket(stack, jsii.String("TestBucket"))
Barrel import

Alternatively, you can use "barrel" imports:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

app := awscdk.NewApp()
stack := awscdk.NewStack(app, jsii.String("TestStack"))

awscdk.NewBucket(stack, jsii.String("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 Stage, 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.

Stack Synthesizers

Each Stack has a synthesizer, an object that determines how and where the Stack should be synthesized and deployed. The synthesizer controls aspects like:

  • How does the stack reference assets? (Either through CloudFormation parameters the CLI supplies, or because the Stack knows a predefined location where assets will be uploaded).
  • What roles are used to deploy the stack? These can be bootstrapped roles, roles created in some other way, or just the CLI's current credentials.

The following synthesizers are available:

  • DefaultStackSynthesizer: recommended. Uses predefined asset locations and roles created by the modern bootstrap template. Access control is done by controlling who can assume the deploy role. This is the default stack synthesizer in CDKv2.
  • LegacyStackSynthesizer: Uses CloudFormation parameters to communicate asset locations, and the CLI's current permissions to deploy stacks. This is the default stack synthesizer in CDKv1.
  • CliCredentialsStackSynthesizer: Uses predefined asset locations, and the CLI's current permissions.

Each of these synthesizers takes configuration arguments. To configure a stack with a synthesizer, pass it as one of its properties:

NewMyStack(app, jsii.String("MyStack"), &stackProps{
	Synthesizer: awscdk.NewDefaultStackSynthesizer(&DefaultStackSynthesizerProps{
		FileAssetsBucketName: jsii.String("my-orgs-asset-bucket"),
	}),
})

For more information on bootstrapping accounts and customizing synthesis, see Bootstrapping in the CDK Developer Guide.

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:

type myNestedStack struct {
	nestedStack
}

func newMyNestedStack(scope construct, id *string, props nestedStackProps) *myNestedStack {
	this := &myNestedStack{}
	cfn.NewNestedStack_Override(this, scope, id, props)

	s3.NewBucket(this, jsii.String("NestedBucket"))
	return this
}

type myParentStack struct {
	stack
}

func newMyParentStack(scope construct, id *string, props stackProps) *myParentStack {
	this := &myParentStack{}
	newStack_Override(this, scope, id, props)

	NewMyNestedStack(this, jsii.String("Nested1"))
	NewMyNestedStack(this, jsii.String("Nested2"))
	return this
}

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 (see next section for an exception). 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.

prod := map[string]*string{
	"account": jsii.String("123456789012"),
	"region": jsii.String("us-east-1"),
}

stack1 := NewStackThatProvidesABucket(app, jsii.String("Stack1"), &stackProps{
	Env: prod,
})

// stack2 will take a property { bucket: IBucket }
stack2 := NewStackThatExpectsABucket(app, jsii.String("Stack2"), &stackThatExpectsABucketProps{
	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.

Accessing resources in a different stack and region

This feature is currently experimental

You can enable the Stack property crossRegionReferences in order to access resources in a different stack and region. With this feature flag enabled it is possible to do something like creating a CloudFront distribution in us-east-2 and an ACM certificate in us-east-1.

stack1 := awscdk.Newstack(app, jsii.String("Stack1"), &stackProps{
	Env: &Environment{
		Region: jsii.String("us-east-1"),
	},
	CrossRegionReferences: jsii.Boolean(true),
})
cert := acm.NewCertificate(stack1, jsii.String("Cert"), &CertificateProps{
	DomainName: jsii.String("*.example.com"),
	Validation: acm.CertificateValidation_FromDns(route53.PublicHostedZone_FromHostedZoneId(stack1, jsii.String("Zone"), jsii.String("Z0329774B51CGXTDQV3X"))),
})

stack2 := awscdk.Newstack(app, jsii.String("Stack2"), &stackProps{
	Env: &Environment{
		Region: jsii.String("us-east-2"),
	},
	CrossRegionReferences: jsii.Boolean(true),
})
cloudfront.NewDistribution(stack2, jsii.String("Distribution"), &DistributionProps{
	DefaultBehavior: &BehaviorOptions{
		Origin: origins.NewHttpOrigin(jsii.String("example.com")),
	},
	DomainNames: []*string{
		jsii.String("dev.example.com"),
	},
	Certificate: cert,
})

When the AWS CDK determines that the resource is in a different stack and is in a different region, it will "export" the value by creating a custom resource in the producing stack which creates SSM Parameters in the consuming region for each exported value. The parameters will be created with the name '/cdk/exports/${consumingStackName}/${export-name}'. In order to "import" the exports into the consuming stack a SSM Dynamic reference is used to reference the SSM parameter which was created.

In order to mimic strong references, a Custom Resource is also created in the consuming stack which marks the SSM parameters as being "imported". When a parameter has been successfully imported, the producing stack cannot update the value.

See the adr for more details on this feature.

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:

awscdk.Duration_Seconds(jsii.Number(300)) // 5 minutes
awscdk.Duration_Minutes(jsii.Number(5)) // 5 minutes
awscdk.Duration_Hours(jsii.Number(1)) // 1 hour
awscdk.Duration_Days(jsii.Number(7)) // 7 days
awscdk.Duration_Parse(jsii.String("PT5M"))

Durations can be added or subtracted together:

awscdk.Duration_Minutes(jsii.Number(1)).Plus(awscdk.Duration_Seconds(jsii.Number(60))) // 2 minutes
awscdk.Duration_Minutes(jsii.Number(5)).Minus(awscdk.Duration_Seconds(jsii.Number(10)))

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:

awscdk.Size_Kibibytes(jsii.Number(200)) // 200 KiB
awscdk.Size_Mebibytes(jsii.Number(5)) // 5 MiB
awscdk.Size_Gibibytes(jsii.Number(40)) // 40 GiB
awscdk.Size_Tebibytes(jsii.Number(200)) // 200 TiB
awscdk.Size_Pebibytes(jsii.Number(3))

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.

awscdk.Size_Mebibytes(jsii.Number(2)).ToKibibytes() // yields 2048
awscdk.Size_Kibibytes(jsii.Number(2050)).ToMebibytes(&SizeConversionOptions{
	Rounding: awscdk.SizeRoundingBehavior_FLOOR,
})

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:

secret := awscdk.SecretValue_SecretsManager(jsii.String("secretId"), &SecretsManagerSecretOptions{
	JsonField: jsii.String("password"),
	 // optional: key of a JSON field to retrieve (defaults to all content),
	VersionId: jsii.String("id"),
	 // optional: id of the version (default AWSCURRENT)
	VersionStage: jsii.String("stage"),
})

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

  • SecretValue.unsafePlainText(secret): stores the secret as plain text in your app and the resulting template (not recommended).
  • SecretValue.secretsManager(secret): refers to a secret stored in Secrets Manager
  • SecretValue.ssmSecure(param, version): refers to a secret stored as a SecureString in the SSM Parameter Store. If you don't specify the exact version, AWS CloudFormation uses the latest version of the parameter.
  • 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).
  • SecretValue.resourceAttribute(attr): refers to a secret returned from a CloudFormation resource creation.

SecretValues should only be passed to constructs that accept properties of type SecretValue. These constructs are written to ensure your secrets will not be exposed where they shouldn't be. If you try to use a SecretValue in a different location, an error about unsafe secret usage will be thrown at synthesis time.

If you rotate the secret's value in Secrets Manager, you must also change at least one property on the resource where you are using the secret, to force CloudFormation to re-read the secret.

SecretValue.ssmSecure() is only supported for a limited set of resources. Click here for a list of supported resources and properties.

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:

var stack stack


// Builds "arn:<PARTITION>:lambda:<REGION>:<ACCOUNT>:function:MyFunction"
stack.FormatArn(&ArnComponents{
	Service: jsii.String("lambda"),
	Resource: jsii.String("function"),
	Sep: jsii.String(":"),
	ResourceName: jsii.String("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.

var stack stack


// Extracts the function name out of an AWS Lambda Function ARN
arnComponents := stack.ParseArn(arn, jsii.String(":"))
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 DependencyGroup. The following creates a single object that represents a dependency on two constructs, constructB and constructC:

// Declare the dependable object
bAndC := constructs.NewDependencyGroup()
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.
CfnResource Dependencies

To make declaring dependencies between CfnResource objects easier, you can declare dependencies from one CfnResource object on another by using the cfnResource1.addDependency(cfnResource2) method. This method will work for resources both within the same stack and across stacks as it detects the relative location of the two resources and adds the dependency either to the resource or between the relevant stacks, as appropriate. If more complex logic is in needed, you can similarly remove, replace, or view dependencies between CfnResource objects with the CfnResource removeDependency, replaceDependency, and obtainDependencies methods, respectively.

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.

Custom resources are backed by custom resource providers. Commonly, these are Lambda Functions that are deployed in the same deployment as the one that defines the custom resource itself, but they can also be backed by Lambda Functions deployed previously, or code responding to SNS Topic events running on EC2 instances in a completely different account. For more information on custom resource providers, see the next section.

Once you have a provider, each definition of a CustomResource construct represents one invocation. A single provider can be used for the implementation of arbitrarily many custom resource definitions. A single definition looks like this:

awscdk.NewCustomResource(this, jsii.String("MyMagicalResource"), &CustomResourceProps{
	ResourceType: jsii.String("Custom::MyCustomResource"),
	 // must start with 'Custom::'

	// the resource properties
	Properties: map[string]interface{}{
		"Property1": jsii.String("foo"),
		"Property2": jsii.String("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: jsii.String("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 AWS Lambda Auto Auto 15min Node.js Small
custom-resources.Provider AWS Lambda Auto Auto Unlimited Async Any Large

Legend:

  • Compute type: which type of compute can be 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:

func getOrCreate(scope *construct) topic {
	stack := awscdk.stack_Of(*scope)
	uniqueid := "GloballyUniqueIdForSingleton" // For example, a UUID from `uuidgen`
	existing := stack.Node.TryFindChild(uniqueid)
	if existing {
		return existing.(topic)
	}
	return sns.NewTopic(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.

You only need to use this type of provider if your custom resource cannot run on AWS Lambda, for reasons other than the 15 minute timeout. If you are considering using this type of provider because you want to write a custom resource provider that may need to wait for more than 15 minutes for the API calls to stabilize, have a look at the custom-resources module first.

Refer to the CloudFormation Custom Resource documentation for information on the contract your custom resource needs to adhere to.

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

topic := sns.NewTopic(this, jsii.String("MyProvider"))

awscdk.NewCustomResource(this, jsii.String("MyResource"), &CustomResourceProps{
	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.

We do not recommend you use this provider type. The CDK has wrappers around Lambda Functions that make them easier to work with.

If you do want to use this provider, refer to the CloudFormation Custom Resource documentation for information on the contract your custom resource needs to adhere to.

Set serviceToken to lambda.functionArn to use this provider:

fn := lambda.NewFunction(this, jsii.String("MyProvider"), functionProps)

awscdk.NewCustomResource(this, jsii.String("MyResource"), &CustomResourceProps{
	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, represents permissions as raw JSON blobs instead of iam.PolicyStatement objects, and it does not have support for asynchronous waiting (handler cannot exceed the 15min lambda timeout).

As an application builder, we do not recommend you use this provider type. This provider exists purely for custom resources that are part of the AWS Construct Library.

The custom-resources provider is more convenient to work with and more fully-featured.

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

serviceToken := awscdk.CustomResourceProvider_GetOrCreate(this, jsii.String("Custom::MyCustomResourceType"), &CustomResourceProviderProps{
	CodeDirectory: fmt.Sprintf("%v/my-handler", __dirname),
	Runtime: awscdk.CustomResourceProviderRuntime_NODEJS_18_X,
	Description: jsii.String("Lambda function created by the custom resource provider"),
})

awscdk.NewCustomResource(this, jsii.String("MyResource"), &CustomResourceProps{
	ResourceType: jsii.String("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 "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdk"

type sumProps struct {
	lhs *f64
	rhs *f64
}

type Sum struct {
	construct
	result *f64
}result *f64

func NewSum(scope construct, id *string, props sumProps) *Sum {
	this := &Sum{}
	newConstruct_Override(this, scope, id)

	resourceType := "Custom::Sum"
	serviceToken := awscdk.CustomResourceProvider_GetOrCreate(this, resourceType, &CustomResourceProviderProps{
		CodeDirectory: fmt.Sprintf("%v/sum-handler", __dirname),
		Runtime: awscdk.CustomResourceProviderRuntime_NODEJS_18_X,
	})

	resource := awscdk.NewCustomResource(this, jsii.String("Resource"), &CustomResourceProps{
		ResourceType: resourceType,
		ServiceToken: serviceToken,
		Properties: map[string]interface{}{
			"lhs": props.lhs,
			"rhs": props.rhs,
		},
	})

	this.result = awscdk.Token_AsNumber(resource.GetAtt(jsii.String("Result")))
	return this
}

Usage will look like this:

sum := NewSum(this, jsii.String("MySum"), &sumProps{
	lhs: jsii.Number(40),
	rhs: jsii.Number(2),
})
awscdk.NewCfnOutput(this, jsii.String("Result"), &CfnOutputProps{
	Value: awscdk.Token_AsString(sum.result),
})

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

provider := awscdk.CustomResourceProvider_GetOrCreateProvider(this, jsii.String("Custom::MyCustomResourceType"), &CustomResourceProviderProps{
	CodeDirectory: fmt.Sprintf("%v/my-handler", __dirname),
	Runtime: awscdk.CustomResourceProviderRuntime_NODEJS_18_X,
})

roleArn := provider.RoleArn

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

To add IAM policy statements to this role, use addToRolePolicy():

provider := awscdk.CustomResourceProvider_GetOrCreateProvider(this, jsii.String("Custom::MyCustomResourceType"), &CustomResourceProviderProps{
	CodeDirectory: fmt.Sprintf("%v/my-handler", __dirname),
	Runtime: awscdk.CustomResourceProviderRuntime_NODEJS_18_X,
})
provider.AddToRolePolicy(map[string]*string{
	"Effect": jsii.String("Allow"),
	"Action": jsii.String("s3:GetObject"),
	"Resource": jsii.String("*"),
})

Note that addToRolePolicy() uses direct IAM JSON policy blobs, not a iam.PolicyStatement object like you will see in the rest of the CDK.

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:

provider := customresources.NewProvider(this, jsii.String("MyProvider"), &ProviderProps{
	OnEventHandler: OnEventHandler,
	IsCompleteHandler: IsCompleteHandler,
})

awscdk.NewCustomResource(this, jsii.String("MyResource"), &CustomResourceProps{
	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:

awscdk.NewCfnOutput(this, jsii.String("OutputName"), &CfnOutputProps{
	Value: myBucket.BucketName,
	Description: jsii.String("The name of an S3 bucket"),
	 // Optional
	ExportName: jsii.String("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:

awscdk.NewCfnParameter(this, jsii.String("MyParameter"), &CfnParameterProps{
	Type: jsii.String("Number"),
	Default: jsii.Number(1337),
})

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):

param := awscdk.NewCfnParameter(this, jsii.String("ParameterName"), &CfnParameterProps{
})

// 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
stack := awscdk.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:

rawBucket := s3.NewCfnBucket(this, jsii.String("Bucket"), &CfnBucketProps{
})
// -or-
rawBucketAlt := myBucket.Node.defaultChild.(cfnBucket)

// then
rawBucket.CfnOptions.Condition = awscdk.NewCfnCondition(this, jsii.String("EnableBucket"), &CfnConditionProps{
})
rawBucket.CfnOptions.Metadata = map[string]interface{}{
	"metadataKey": jsii.String("MetadataValue"),
}

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

resourceA := awscdk.NewCfnResource(this, jsii.String("ResourceA"), resourceProps)
resourceB := awscdk.NewCfnResource(this, jsii.String("ResourceB"), resourceProps)

resourceB.AddDependency(resourceA)
CreationPolicy

Some resources support a CreationPolicy to be specified as a CfnOption.

The creation policy is invoked only when AWS CloudFormation creates the associated resource. Currently, the only AWS CloudFormation resources that support creation policies are CfnAutoScalingGroup, CfnInstance, CfnWaitCondition and CfnFleet.

The CfnFleet resource from the aws-appstream module supports specifying startFleet as a property of the creationPolicy on the resource options. Setting it to true will make AWS CloudFormation wait until the fleet is started before continuing with the creation of resources that depend on the fleet resource.

fleet := appstream.NewCfnFleet(this, jsii.String("Fleet"), &CfnFleetProps{
	InstanceType: jsii.String("stream.standard.small"),
	Name: jsii.String("Fleet"),
	ComputeCapacity: &ComputeCapacityProperty{
		DesiredInstances: jsii.Number(1),
	},
	ImageName: jsii.String("AppStream-AmazonLinux2-09-21-2022"),
})
fleet.CfnOptions.CreationPolicy = &CfnCreationPolicy{
	StartFleet: jsii.Boolean(true),
}

The properties passed to the level 2 constructs AutoScalingGroup and Instance from the aws-ec2 module abstract what is passed into the CfnOption properties resourceSignal and autoScalingCreationPolicy, but when using level 1 constructs you can specify these yourself.

The CfnWaitCondition resource from the aws-cloudformation module suppports the resourceSignal. The format of the timeout is PT#H#M#S. In the example below AWS Cloudformation will wait for 3 success signals to occur within 15 minutes before the status of the resource will be set to CREATE_COMPLETE.

var resource cfnResource


resource.CfnOptions.CreationPolicy = &CfnCreationPolicy{
	ResourceSignal: &CfnResourceSignal{
		Count: jsii.Number(3),
		Timeout: jsii.String("PR15M"),
	},
}
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:

var myObjectOrArray interface{}
var myArray interface{}


// To use Fn::Base64
awscdk.Fn_Base64(jsii.String("SGVsbG8gQ0RLIQo="))

// To compose condition expressions:
environmentParameter := awscdk.NewCfnParameter(this, jsii.String("Environment"))
awscdk.Fn_ConditionAnd(awscdk.Fn_ConditionEquals(jsii.String("Production"), environmentParameter), awscdk.Fn_ConditionNot(awscdk.Fn_ConditionEquals(jsii.String("us-east-1"), awscdk.Aws_REGION())))

// To use Fn::ToJsonString
awscdk.Fn_ToJsonString(myObjectOrArray)

// To use Fn::Length
awscdk.Fn_Len(awscdk.Fn_Split(jsii.String(","), myArray))

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:

environmentParameter := awscdk.NewCfnParameter(this, jsii.String("Environment"))
isProd := awscdk.NewCfnCondition(this, jsii.String("IsProduction"), &CfnConditionProps{
	Expression: awscdk.Fn_ConditionEquals(jsii.String("Production"), environmentParameter),
})

// Configuration value that is a different string based on IsProduction
stage := awscdk.Fn_ConditionIf(isProd.LogicalId, jsii.String("Beta"), jsii.String("Prod")).ToString()

// Make Bucket creation condition to IsProduction by accessing
// and overriding the CloudFormation resource
bucket := s3.NewBucket(this, jsii.String("Bucket"))
cfnBucket := myBucket.Node.defaultChild.(cfnBucket)
cfnBucket.CfnOptions.Condition = isProd
Mappings

CloudFormation mappings are created and queried using the CfnMappings class:

regionTable := awscdk.NewCfnMapping(this, jsii.String("RegionTable"), &CfnMappingProps{
	Mapping: map[string]map[string]interface{}{
		"us-east-1": map[string]interface{}{
			"regionName": jsii.String("US East (N. Virginia)"),
		},
		"us-east-2": map[string]interface{}{
			"regionName": jsii.String("US East (Ohio)"),
		},
	},
})

regionTable.FindInMap(awscdk.Aws_REGION(), jsii.String("regionName"))

This will yield the following template:

Mappings:
  RegionTable:
    us-east-1:
      regionName: US East (N. Virginia)
    us-east-2:
      regionName: 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)'.

regionTable := awscdk.NewCfnMapping(this, jsii.String("RegionTable"), &CfnMappingProps{
	Mapping: map[string]map[string]interface{}{
		"us-east-1": map[string]interface{}{
			"regionName": jsii.String("US East (N. Virginia)"),
		},
		"us-east-2": map[string]interface{}{
			"regionName": jsii.String("US East (Ohio)"),
		},
	},
	Lazy: jsii.Boolean(true),
})

regionTable.FindInMap(jsii.String("us-east-2"), jsii.String("regionName"))

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

var regionTable cfnMapping


regionTable.FindInMap(awscdk.Aws_REGION(), jsii.String("regionName"))
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:

awscdk.NewCfnDynamicReference(awscdk.CfnDynamicReferenceService_SECRETS_MANAGER, jsii.String("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:

stack := awscdk.Newstack(app, jsii.String("StackName"))

stack.TemplateOptions.Description = "This will appear in the AWS console"
stack.TemplateOptions.Transforms = []*string{
	"AWS::Serverless-2016-10-31",
}
stack.TemplateOptions.Metadata = map[string]interface{}{
	"metadataKey": jsii.String("MetadataValue"),
}
Emitting Raw Resources

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

awscdk.NewCfnResource(this, jsii.String("ResourceId"), &cfnResourceProps{
	Type: jsii.String("AWS::S3::Bucket"),
	Properties: map[string]interface{}{
		"BucketName": jsii.String("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.

awscdk.NewCfnInclude(this, jsii.String("ID"), &cfnIncludeProps{
	template: map[string]map[string]map[string]interface{}{
		"Resources": map[string]map[string]interface{}{
			"Bucket": map[string]interface{}{
				"Type": jsii.String("AWS::S3::Bucket"),
				"Properties": map[string]*string{
					"BucketName": jsii.String("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.

stack := awscdk.Newstack(app, jsii.String("StackName"), &stackProps{
	TerminationProtection: jsii.Boolean(true),
})

By default, termination protection is disabled.

Description

You can add a description of the stack in the same way as StackProps.

stack := awscdk.Newstack(app, jsii.String("StackName"), &stackProps{
	Description: jsii.String("This is a description."),
})
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.

tagParam := awscdk.NewCfnParameter(this, jsii.String("TagName"))

stringEquals := awscdk.NewCfnJson(this, jsii.String("ConditionJson"), &CfnJsonProps{
	Value: map[string]*bool{
		fmt.Sprintf("aws:PrincipalTag/%v", tagParam.valueAsString): jsii.Boolean(true),
	},
})

principal := iam.NewAccountRootPrincipal().WithConditions(map[string]interface{}{
	"StringEquals": stringEquals,
})

iam.NewRole(this, jsii.String("MyRole"), &RoleProps{
	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.

App Context

Context values are key-value pairs that can be associated with an app, stack, or construct. One common use case for context is to use it for enabling/disabling feature flags. There are several places where context can be specified. They are listed below in the order they are evaluated (items at the top take precedence over those below).

  • The node.setContext() method
  • The postCliContext prop when you create an App
  • The CLI via the --context CLI argument
  • The cdk.json file via the context key:
  • The cdk.context.json file:
  • The ~/.cdk.json file via the context key:
  • The context prop when you create an App
Examples of setting context
awscdk.NewApp(&AppProps{
	Context: map[string]interface{}{
		"@aws-cdk/core:newStyleStackSynthesis": jsii.Boolean(true),
	},
})
app := awscdk.NewApp()
app.Node.SetContext(jsii.String("@aws-cdk/core:newStyleStackSynthesis"), jsii.Boolean(true))
awscdk.NewApp(&AppProps{
	PostCliContext: map[string]interface{}{
		"@aws-cdk/core:newStyleStackSynthesis": jsii.Boolean(true),
	},
})
cdk synth --context @aws-cdk/core:newStyleStackSynthesis=true

cdk.json

{
  "context": {
    "@aws-cdk/core:newStyleStackSynthesis": true
  }
}

cdk.context.json

{
  "@aws-cdk/core:newStyleStackSynthesis": true
}

~/.cdk.json

{
  "context": {
    "@aws-cdk/core:newStyleStackSynthesis": true
  }
}

IAM Permissions Boundary

It is possible to apply an IAM permissions boundary to all roles within a specific construct scope. The most common use case would be to apply a permissions boundary at the Stage level.

prodStage := awscdk.NewStage(app, jsii.String("ProdStage"), &StageProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_FromName(jsii.String("cdk-${Qualifier}-PermissionsBoundary")),
})

Any IAM Roles or Users created within this Stage will have the default permissions boundary attached.

For more details see the Permissions Boundary section in the IAM guide.

Policy Validation

If you or your organization use (or would like to use) any policy validation tool, such as CloudFormation Guard or OPA, to define constraints on your CloudFormation template, you can incorporate them into the CDK application. By using the appropriate plugin, you can make the CDK application check the generated CloudFormation templates against your policies immediately after synthesis. If there are any violations, the synthesis will fail and a report will be printed to the console or to a file (see below).

Note This feature is considered experimental, and both the plugin API and the format of the validation report are subject to change in the future.

For application developers

To use one or more validation plugins in your application, use the policyValidationBeta1 property of Stage:

// globally for the entire app (an app is a stage)
app := awscdk.NewApp(&AppProps{
	PolicyValidationBeta1: []iPolicyValidationPluginBeta1{
		// These hypothetical classes implement IPolicyValidationPluginBeta1:
		NewThirdPartyPluginX(),
		NewThirdPartyPluginY(),
	},
})

// only apply to a particular stage
prodStage := awscdk.NewStage(app, jsii.String("ProdStage"), &StageProps{
	PolicyValidationBeta1: []*iPolicyValidationPluginBeta1{
		NewThirdPartyPluginX(),
	},
})

Immediately after synthesis, all plugins registered this way will be invoked to validate all the templates generated in the scope you defined. In particular, if you register the templates in the App object, all templates will be subject to validation.

Warning Other than modifying the cloud assembly, plugins can do anything that your CDK application can. They can read data from the filesystem, access the network etc. It's your responsibility as the consumer of a plugin to verify that it is secure to use.

By default, the report will be printed in a human readable format. If you want a report in JSON format, enable it using the @aws-cdk/core:validationReportJson context passing it directly to the application:

app := awscdk.NewApp(&AppProps{
	Context: map[string]interface{}{
		"@aws-cdk/core:validationReportJson": jsii.Boolean(true),
	},
})

Alternatively, you can set this context key-value pair using the cdk.json or cdk.context.json files in your project directory (see Runtime context).

If you choose the JSON format, the CDK will print the policy validation report to a file called policy-validation-report.json in the cloud assembly directory. For the default, human-readable format, the report will be printed to the standard output.

For plugin authors

The communication protocol between the CDK core module and your policy tool is defined by the IPolicyValidationPluginBeta1 interface. To create a new plugin you must write a class that implements this interface. There are two things you need to implement: the plugin name (by overriding the name property), and the validate() method.

The framework will call validate(), passing an IPolicyValidationContextBeta1 object. The location of the templates to be validated is given by templatePaths. The plugin should return an instance of PolicyValidationPluginReportBeta1. This object represents the report that the user wil receive at the end of the synthesis.

type myPlugin struct {
	name
}

func (this *myPlugin) validate(context iPolicyValidationContextBeta1) policyValidationPluginReportBeta1 {
	// First read the templates using context.templatePaths...

	// ...then perform the validation, and then compose and return the report.
	// Using hard-coded values here for better clarity:
	return &policyValidationPluginReportBeta1{
		Success: jsii.Boolean(false),
		Violations: []policyViolationBeta1{
			&policyViolationBeta1{
				RuleName: jsii.String("CKV_AWS_117"),
				Description: jsii.String("Ensure that AWS Lambda function is configured inside a VPC"),
				Fix: jsii.String("https://docs.bridgecrew.io/docs/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1"),
				ViolatingResources: []policyViolatingResourceBeta1{
					&policyViolatingResourceBeta1{
						ResourceLogicalId: jsii.String("MyFunction3BAA72D1"),
						TemplatePath: jsii.String("/home/johndoe/myapp/cdk.out/MyService.template.json"),
						Locations: []*string{
							jsii.String("Properties/VpcConfig"),
						},
					},
				},
			},
		},
	}
}

Note that plugins are not allowed to modify anything in the cloud assembly. Any attempt to do so will result in synthesis failure.

If your plugin depends on an external tool, keep in mind that some developers may not have that tool installed in their workstations yet. To minimize friction, we highly recommend that you provide some installation script along with your plugin package, to automate the whole process. Better yet, run that script as part of the installation of your package. With npm, for example, you can run add it to the postinstall script in the package.json file.

Documentation

Overview

Version 2 of 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`.

func App_IsConstruct

func App_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func App_IsStage

func App_IsStage(x interface{}) *bool

Test whether the given construct is a stage.

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 `/`.

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'.

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.

func AssetStaging_IsConstruct

func AssetStaging_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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_DOCKER_ASSET_PREFIX

func BootstraplessSynthesizer_DEFAULT_DOCKER_ASSET_PREFIX() *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.

func CfnCodeDeployBlueGreenHook_IsConstruct

func CfnCodeDeployBlueGreenHook_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnCondition_IsConstruct

func CfnCondition_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnCustomResource_IsCfnResource

func CfnCustomResource_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnCustomResource_IsConstruct

func CfnCustomResource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnElement_IsConstruct

func CfnElement_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func CfnHookDefaultVersion_CFN_RESOURCE_TYPE_NAME added in v2.13.0

func CfnHookDefaultVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnHookDefaultVersion_IsCfnElement added in v2.13.0

func CfnHookDefaultVersion_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.

func CfnHookDefaultVersion_IsCfnResource added in v2.13.0

func CfnHookDefaultVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnHookDefaultVersion_IsConstruct added in v2.13.0

func CfnHookDefaultVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func CfnHookTypeConfig_CFN_RESOURCE_TYPE_NAME added in v2.13.0

func CfnHookTypeConfig_CFN_RESOURCE_TYPE_NAME() *string

func CfnHookTypeConfig_IsCfnElement added in v2.13.0

func CfnHookTypeConfig_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.

func CfnHookTypeConfig_IsCfnResource added in v2.13.0

func CfnHookTypeConfig_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnHookTypeConfig_IsConstruct added in v2.13.0

func CfnHookTypeConfig_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func CfnHookVersion_CFN_RESOURCE_TYPE_NAME added in v2.13.0

func CfnHookVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnHookVersion_IsCfnElement added in v2.13.0

func CfnHookVersion_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.

func CfnHookVersion_IsCfnResource added in v2.13.0

func CfnHookVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnHookVersion_IsConstruct added in v2.13.0

func CfnHookVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnHook_IsConstruct

func CfnHook_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func CfnJson_IsConstruct

func CfnJson_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnMacro_IsCfnResource

func CfnMacro_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnMacro_IsConstruct

func CfnMacro_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnMapping_IsConstruct

func CfnMapping_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnModuleDefaultVersion_IsCfnResource

func CfnModuleDefaultVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnModuleDefaultVersion_IsConstruct

func CfnModuleDefaultVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnModuleVersion_IsCfnResource

func CfnModuleVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnModuleVersion_IsConstruct

func CfnModuleVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnOutput_IsConstruct

func CfnOutput_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnParameter_IsConstruct

func CfnParameter_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnPublicTypeVersion_IsCfnResource

func CfnPublicTypeVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnPublicTypeVersion_IsConstruct

func CfnPublicTypeVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnPublisher_IsCfnResource

func CfnPublisher_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnPublisher_IsConstruct

func CfnPublisher_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnRefElement_IsConstruct

func CfnRefElement_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnResourceDefaultVersion_IsCfnResource

func CfnResourceDefaultVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnResourceDefaultVersion_IsConstruct

func CfnResourceDefaultVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnResourceVersion_IsCfnResource

func CfnResourceVersion_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnResourceVersion_IsConstruct

func CfnResourceVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnResource_IsCfnResource

func CfnResource_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnResource_IsConstruct

func CfnResource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnRule_IsConstruct

func CfnRule_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnStackSet_IsCfnResource

func CfnStackSet_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnStackSet_IsConstruct

func CfnStackSet_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnStack_IsCfnResource

func CfnStack_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnStack_IsConstruct

func CfnStack_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnTypeActivation_IsCfnResource

func CfnTypeActivation_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnTypeActivation_IsConstruct

func CfnTypeActivation_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnWaitConditionHandle_IsCfnResource

func CfnWaitConditionHandle_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnWaitConditionHandle_IsConstruct

func CfnWaitConditionHandle_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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.

func CfnWaitCondition_IsCfnResource

func CfnWaitCondition_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnWaitCondition_IsConstruct

func CfnWaitCondition_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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`.

func CustomResourceProvider_IsConstruct

func CustomResourceProvider_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func CustomResource_IsConstruct

func CustomResource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func CustomResource_IsOwnedResource added in v2.32.0

func CustomResource_IsOwnedResource(construct constructs.IConstruct) *bool

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

func CustomResource_IsResource

func CustomResource_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

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_DOCKER_ASSET_PREFIX

func DefaultStackSynthesizer_DEFAULT_DOCKER_ASSET_PREFIX() *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 DockerBuildSecret_FromSrc added in v2.65.0

func DockerBuildSecret_FromSrc(src *string) *string

A Docker build secret from a file source.

Returns: The latter half required for `--secret`.

func FileSystem_CopyDirectory

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

Copies an entire directory structure.

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.

Line endings are converted from CRLF to LF.

The fingerprint will also include: 1. An extra string if defined in `options.extra`. 2. The symlink follow mode value.

func FileSystem_IsEmpty

func FileSystem_IsEmpty(dir *string) *bool

Checks whether a directory is empty.

func FileSystem_Mkdtemp

func FileSystem_Mkdtemp(prefix *string) *string

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

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.

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.

func Fn_FindInMap

func Fn_FindInMap(mapName *string, topLevelKey *string, secondLevelKey *string, defaultValue *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.

Warning: do not use with lazy mappings as this function will not guarentee a lazy mapping to render in the template. Prefer to use `CfnMapping.findInMap` in general.

Returns: a token represented as a string.

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.

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`.

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.

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.

func Fn_Len added in v2.40.0

func Fn_Len(array interface{}) *float64

The intrinsic function `Fn::Length` returns the number of elements within an array or an intrinsic function that returns an array.

func Fn_ParseDomainName

func Fn_ParseDomainName(url *string) *string

Given an url, parse the domain name.

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 parameter/resource reference defined in a “CfnInclude“ template.

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.

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.

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.

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.

func Fn_ToJsonString added in v2.40.0

func Fn_ToJsonString(object interface{}) *string

The `Fn::ToJsonString` intrinsic function converts an object or array to its corresponding JSON string.

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.

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.

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.

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.

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.

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.

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.

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.

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.

func Names_UniqueId

func Names_UniqueId(construct constructs.IConstruct) *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. uniqueId is not unique if multiple copies of the stack are deployed. Prefer using uniqueResourceName().

Returns: a unique id based on the construct path.

func Names_UniqueResourceName added in v2.29.0

func Names_UniqueResourceName(construct constructs.IConstruct, options *UniqueResourceNameOptions) *string

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

This function finds the stackName of the parent stack (non-nested) to the construct, and the ids of the components in the construct path.

The user can define allowed special characters, a separator between the elements, and the maximum length of the resource name. The name includes a human readable portion rendered from the path components, with or without user defined separators, and a hash suffix. If the resource name is longer than the maximum length, it is trimmed in the middle.

Returns: a unique resource name based on the construct path.

func NestedStack_IsConstruct

func NestedStack_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func NestedStack_IsNestedStack

func NestedStack_IsNestedStack(x interface{}) *bool

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

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'.

func NewApp_Override

func NewApp_Override(a App, props *AppProps)

Initializes a CDK application.

func NewAssetManifestBuilder_Override added in v2.45.0

func NewAssetManifestBuilder_Override(a AssetManifestBuilder)

func NewAssetStaging_Override

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

func NewBootstraplessSynthesizer_Override

func NewBootstraplessSynthesizer_Override(b BootstraplessSynthesizer, props *BootstraplessSynthesizerProps)

func NewCfnCodeDeployBlueGreenHook_Override

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

Creates a new CodeDeploy blue-green ECS Hook.

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.

func NewCfnCustomResource_Override

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

func NewCfnDynamicReference_Override

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

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).

func NewCfnHookDefaultVersion_Override added in v2.13.0

func NewCfnHookDefaultVersion_Override(c CfnHookDefaultVersion, scope constructs.Construct, id *string, props *CfnHookDefaultVersionProps)

func NewCfnHookTypeConfig_Override added in v2.13.0

func NewCfnHookTypeConfig_Override(c CfnHookTypeConfig, scope constructs.Construct, id *string, props *CfnHookTypeConfigProps)

func NewCfnHookVersion_Override added in v2.13.0

func NewCfnHookVersion_Override(c CfnHookVersion, scope constructs.Construct, id *string, props *CfnHookVersionProps)

func NewCfnHook_Override

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

Creates a new Hook object.

func NewCfnJson_Override

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

func NewCfnMacro_Override

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

func NewCfnMapping_Override

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

func NewCfnModuleDefaultVersion_Override

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

func NewCfnModuleVersion_Override

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

func NewCfnOutput_Override

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

Creates an CfnOutput value for this stack.

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.

func NewCfnPublicTypeVersion_Override

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

func NewCfnPublisher_Override

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

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).

func NewCfnResourceDefaultVersion_Override

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

func NewCfnResourceVersion_Override

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

func NewCfnResource_Override

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

Creates a resource construct.

func NewCfnRule_Override

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

Creates and adds a rule.

func NewCfnStackSet_Override

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

func NewCfnStack_Override

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

func NewCfnTypeActivation_Override

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

func NewCfnWaitConditionHandle_Override

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

func NewCfnWaitCondition_Override

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

func NewCliCredentialsStackSynthesizer_Override added in v2.13.0

func NewCliCredentialsStackSynthesizer_Override(c CliCredentialsStackSynthesizer, props *CliCredentialsStackSynthesizerProps)

func NewCustomResourceProvider_Override

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

func NewCustomResource_Override

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

func NewDefaultStackSynthesizer_Override

func NewDefaultStackSynthesizer_Override(d DefaultStackSynthesizer, props *DefaultStackSynthesizerProps)

func NewDefaultTokenResolver_Override

func NewDefaultTokenResolver_Override(d DefaultTokenResolver, concat IFragmentConcatenator)

func NewDockerBuildSecret_Override added in v2.65.0

func NewDockerBuildSecret_Override(d DockerBuildSecret)

func NewDockerIgnoreStrategy_Override

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

func NewDockerImage_Override

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

func NewFileSystem_Override

func NewFileSystem_Override(f FileSystem)

func NewGitIgnoreStrategy_Override

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

func NewGlobIgnoreStrategy_Override

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

func NewIgnoreStrategy_Override

func NewIgnoreStrategy_Override(i IgnoreStrategy)

func NewIntrinsic_Override

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

func NewLegacyStackSynthesizer_Override

func NewLegacyStackSynthesizer_Override(l LegacyStackSynthesizer)

func NewNestedStackSynthesizer_Override

func NewNestedStackSynthesizer_Override(n NestedStackSynthesizer, parentDeployment IStackSynthesizer)

func NewNestedStack_Override

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

func NewReference_Override

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

func NewRemoveTag_Override

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

func NewResource_Override

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

func NewScopedAws_Override

func NewScopedAws_Override(s ScopedAws, scope constructs.Construct)

func NewSecretValue_Override

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

Construct a SecretValue (do not use!).

Do not use the constructor directly: use one of the factory functions on the class instead.

func NewStackSynthesizer_Override

func NewStackSynthesizer_Override(s StackSynthesizer)

func NewStack_Override

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

Creates a new stack.

func NewStage_Override

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

func NewStringConcat_Override

func NewStringConcat_Override(s StringConcat)

func NewTagManager_Override

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

func NewTag_Override

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

func NewTokenizedStringFragments_Override

func NewTokenizedStringFragments_Override(t TokenizedStringFragments)

func NewTreeInspector_Override

func NewTreeInspector_Override(t TreeInspector)

func NewValidationResult_Override

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

func NewValidationResults_Override

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

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.

func Resource_IsConstruct

func Resource_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func Resource_IsOwnedResource added in v2.32.0

func Resource_IsOwnedResource(construct constructs.IConstruct) *bool

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

func Resource_IsResource

func Resource_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

func SecretValue_IsSecretValue added in v2.21.0

func SecretValue_IsSecretValue(x interface{}) *bool

Test whether an object is a SecretValue.

func Stack_IsConstruct

func Stack_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

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'.

func Stage_IsConstruct

func Stage_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

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

func Stage_IsStage

func Stage_IsStage(x interface{}) *bool

Test whether the given construct is a stage.

func TagManager_IsTaggable

func TagManager_IsTaggable(construct interface{}) *bool

Check whether the given construct is Taggable.

func TagManager_IsTaggableV2 added in v2.81.0

func TagManager_IsTaggableV2(construct interface{}) *bool

Check whether the given construct is ITaggableV2.

func Token_AsList

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

Return a reversible list representation of this token.

func Token_AsNumber

func Token_AsNumber(value interface{}) *float64

Return a reversible number representation of this token.

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.

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 contain resolvables.

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.

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.

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.

Types

type Annotations

type Annotations interface {
	// Acknowledge a warning. When a warning is acknowledged for a scope all warnings that match the id will be ignored.
	//
	// The acknowledgement will apply to all child scopes.
	//
	// Example:
	//   var myConstruct construct
	//
	//   awscdk.Annotations_Of(myConstruct).AcknowledgeWarning(jsii.String("SomeWarningId"), jsii.String("This warning can be ignored because..."))
	//
	AcknowledgeWarning(id *string, message *string)
	// Adds a deprecation warning for a specific API.
	//
	// Deprecations will be added only once per construct as a warning and will be
	// deduplicated based on the `api`.
	//
	// If the environment variable `CDK_BLOCK_DEPRECATIONS` is set, this method
	// will throw an error instead with the deprecation message.
	AddDeprecation(api *string, message *string)
	// Adds an { "error": <message> } metadata entry to this construct.
	//
	// The toolkit will fail deployment of any stack that has errors reported against it.
	AddError(message *string)
	// Adds an info metadata entry to this construct.
	//
	// The CLI will display the info message when apps are synthesized.
	AddInfo(message *string)
	// Adds a warning metadata entry to this construct. Prefer using `addWarningV2`.
	//
	// The CLI will display the warning when an app is synthesized, or fail if run
	// in `--strict` mode.
	//
	// Warnings added by this call cannot be acknowledged. This will block users from
	// running in `--strict` mode until the deal with the warning, which makes it
	// effectively not very different from `addError`. Prefer using `addWarningV2` instead.
	AddWarning(message *string)
	// Adds an acknowledgeable warning metadata entry to this construct.
	//
	// The CLI will display the warning when an app is synthesized, or fail if run
	// in `--strict` mode.
	//
	// If the warning is acknowledged using `acknowledgeWarning()`, it will not be shown by
	// the CLI, and will not cause `--strict` mode to fail synthesis.
	//
	// Example:
	//   var myConstruct construct
	//
	//   awscdk.Annotations_Of(myConstruct).AddWarningV2(jsii.String("my-library:Construct.someWarning"), jsii.String("Some message explaining the warning"))
	//
	AddWarningV2(id *string, message *string)
}

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

Example:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/constructs-go/constructs"

type myAspect struct {
}

func (this *myAspect) visit(node iConstruct) {
	if *node instanceof cdk.CfnResource && *node.CfnResourceType == "Foo::Bar" {
		this.error(*node, jsii.String("we do not want a Foo::Bar resource"))
	}
}

func (this *myAspect) error(node iConstruct, message *string) {
	cdk.Annotations_Of(*node).AddError(*message)
}

type myStack struct {
	stack
}

func newMyStack(scope construct, id *string) *myStack {
	this := &myStack{}
	cdk.NewStack_Override(this, scope, id)

	stack := cdk.NewStack()
	cdk.NewCfnResource(stack, jsii.String("Foo"), &CfnResourceProps{
		Type: jsii.String("Foo::Bar"),
		Properties: map[string]interface{}{
			"Fred": jsii.String("Thud"),
		},
	})
	cdk.Aspects_Of(stack).Add(NewMyAspect())
	return this
}

func Annotations_Of

func Annotations_Of(scope constructs.IConstruct) Annotations

Returns the annotations API for a construct scope.

type App

type App interface {
	Stage
	// The default account for all resources defined within this stage.
	Account() *string
	// Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string.
	//
	// Derived from the construct path.
	ArtifactId() *string
	// The cloud assembly asset output directory.
	AssetOutdir() *string
	// The tree node.
	Node() constructs.Node
	// The cloud assembly output directory.
	Outdir() *string
	// The parent stage or `undefined` if this is the app.
	//
	// *.
	ParentStage() Stage
	// Validation plugins to run during synthesis.
	//
	// If any plugin reports any violation,
	// synthesis will be interrupted and the report displayed to the user.
	// Default: - no validation plugins are used.
	//
	PolicyValidationBeta1() *[]IPolicyValidationPluginBeta1
	// The default region for all resources defined within this stage.
	Region() *string
	// The name of the stage.
	//
	// Based on names of the parent stages separated by
	// hypens.
	StageName() *string
	// Synthesize this stage into a cloud assembly.
	//
	// Once an assembly has been synthesized, it cannot be modified. Subsequent
	// calls will return the same assembly.
	Synth(options *StageSynthesisOptions) cxapi.CloudAssembly
	// Returns a string representation of this construct.
	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.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

app := cdk.NewApp()
stack := cdk.NewStack(app, jsii.String("Stack"), &StackProps{
	Env: &Environment{
		Region: jsii.String("us-west-2"),
	},
})

globalTable := dynamodb.NewTableV2(stack, jsii.String("GlobalTable"), &TablePropsV2{
	PartitionKey: &Attribute{
		Name: jsii.String("pk"),
		Type: dynamodb.AttributeType_STRING,
	},
	// applys to all replicas, i.e., us-west-2, us-east-1, us-east-2
	RemovalPolicy: cdk.RemovalPolicy_DESTROY,
	Replicas: []replicaTableProps{
		&replicaTableProps{
			Region: jsii.String("us-east-1"),
		},
		&replicaTableProps{
			Region: jsii.String("us-east-2"),
		},
	},
})

See: https://docs.aws.amazon.com/cdk/latest/guide/apps.html

func NewApp

func NewApp(props *AppProps) App

Initializes a CDK application.

type AppProps

type AppProps struct {
	// Include runtime versioning information in the Stacks of this app.
	// Default: Value of 'aws:cdk:version-reporting' context key.
	//
	AnalyticsReporting *bool `field:"optional" json:"analyticsReporting" yaml:"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.
	// Default: true if running via CDK CLI (`CDK_OUTDIR` is set), `false`
	// otherwise.
	//
	AutoSynth *bool `field:"optional" json:"autoSynth" yaml:"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)`.
	// Default: - no additional context.
	//
	Context *map[string]interface{} `field:"optional" json:"context" yaml:"context"`
	// The stack synthesizer to use by default for all Stacks in the App.
	//
	// The Stack Synthesizer controls aspects of synthesis and deployment,
	// like how assets are referenced and what IAM roles to use. For more
	// information, see the README of the main CDK package.
	// Default: - A `DefaultStackSynthesizer` with default settings.
	//
	DefaultStackSynthesizer IReusableStackSynthesizer `field:"optional" json:"defaultStackSynthesizer" yaml:"defaultStackSynthesizer"`
	// The output directory into which to emit synthesized artifacts.
	//
	// You should never need to set this value. By default, the value you pass to
	// the CLI's `--output` flag will be used, and if you change it to a different
	// directory the CLI will fail to pick up the generated Cloud Assembly.
	//
	// This property is intended for internal and testing use.
	// Default: - If this value is _not_ set, considers the environment variable `CDK_OUTDIR`.
	//   If `CDK_OUTDIR` is not defined, uses a temp directory.
	//
	Outdir *string `field:"optional" json:"outdir" yaml:"outdir"`
	// Validation plugins to run after synthesis.
	// Default: - no validation plugins.
	//
	PolicyValidationBeta1 *[]IPolicyValidationPluginBeta1 `field:"optional" json:"policyValidationBeta1" yaml:"policyValidationBeta1"`
	// Additional context values for the application.
	//
	// Context provided here has precedence over context set by:
	//
	// - The CLI via --context
	// - The `context` key in `cdk.json`
	// - The `AppProps.context` property
	//
	// This property is recommended over the `AppProps.context` property since you
	// can make final decision over which context value to take in your app.
	//
	// Context can be read from any construct using `node.getContext(key)`.
	//
	// Example:
	//   // context from the CLI and from `cdk.json` are stored in the
	//   // CDK_CONTEXT env variable
	//   cliContext := jSON.parse(process.env.cDK_CONTEXT)
	//
	//   // determine whether to take the context passed in the CLI or not
	//   determineValue := process.env.PROD ? cliContext.SOMEKEY : 'my-prod-value'
	//   awscdk.NewApp(&AppProps{
	//   	PostCliContext: map[string]interface{}{
	//   		"SOMEKEY": determineValue,
	//   	},
	//   })
	//
	// Default: - no additional context.
	//
	PostCliContext *map[string]interface{} `field:"optional" json:"postCliContext" yaml:"postCliContext"`
	// Include construct creation stack trace in the `aws:cdk:trace` metadata key of all constructs.
	// Default: true stack traces are included unless `aws:cdk:disable-stack-trace` is set in the context.
	//
	StackTraces *bool `field:"optional" json:"stackTraces" yaml:"stackTraces"`
	// Include construct tree metadata as part of the Cloud Assembly.
	// Default: true.
	//
	TreeMetadata *bool `field:"optional" json:"treeMetadata" yaml:"treeMetadata"`
}

Initialization props for apps.

Example:

app := awscdk.NewApp(&AppProps{
	DefaultStackSynthesizer: awscdkappstagingsynthesizeralpha.AppStagingSynthesizer_DefaultResources(&DefaultResourcesOptions{
		AppId: jsii.String("my-app-id"),
		DeploymentIdentities: *awscdkappstagingsynthesizeralpha.DeploymentIdentities_CliCredentials(),
	}),
})

type Arn

type Arn interface {
}

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.
	Resource *string `field:"required" json:"resource" yaml:"resource"`
	// The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline').
	Service *string `field:"required" json:"service" yaml:"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.
	// Default: The account the stack is deployed to.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// The specific ARN format to use for this ARN value.
	// Default: - uses value of `sep` as the separator for formatting,
	// `ArnFormat.SLASH_RESOURCE_NAME` if that property was also not provided
	//
	ArnFormat ArnFormat `field:"optional" json:"arnFormat" yaml:"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.
	// Default: The AWS partition the stack is deployed to.
	//
	Partition *string `field:"optional" json:"partition" yaml:"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.
	// Default: The region the stack is deployed to.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
	// Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as “"*"“. This is service-dependent.
	ResourceName *string `field:"optional" json:"resourceName" yaml:"resourceName"`
}

Example:

subZone := route53.NewPublicHostedZone(this, jsii.String("SubZone"), &PublicHostedZoneProps{
	ZoneName: jsii.String("sub.someexample.com"),
})

// import the delegation role by constructing the roleArn
delegationRoleArn := awscdk.stack_Of(this).FormatArn(&ArnComponents{
	Region: jsii.String(""),
	 // IAM is global in each partition
	Service: jsii.String("iam"),
	Account: jsii.String("parent-account-id"),
	Resource: jsii.String("role"),
	ResourceName: jsii.String("MyDelegationRole"),
})
delegationRole := iam.Role_FromRoleArn(this, jsii.String("DelegationRole"), delegationRoleArn)

// create the record
// create the record
route53.NewCrossAccountZoneDelegationRecord(this, jsii.String("delegate"), &CrossAccountZoneDelegationRecordProps{
	DelegatedZone: subZone,
	ParentHostedZoneName: jsii.String("someexample.com"),
	 // or you can use parentHostedZoneId
	DelegationRole: DelegationRole,
})

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).

type ArnFormat

type ArnFormat string

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

const (
	// This represents a format where there is no 'resourceName' part.
	//
	// This format is used for S3 resources,
	// like 'arn:aws:s3:::bucket'.
	// Everything after the last colon is considered the 'resource',
	// even if it contains slashes,
	// like in 'arn:aws:s3:::bucket/object.zip'.
	ArnFormat_NO_RESOURCE_NAME ArnFormat = "NO_RESOURCE_NAME"
	// This represents a format where the 'resource' and 'resourceName' parts are separated with a colon.
	//
	// Like in: 'arn:aws:service:region:account:resource:resourceName'.
	// Everything after the last colon is considered the 'resourceName',
	// even if it contains slashes,
	// like in 'arn:aws:apigateway:region:account:resource:/test/mydemoresource/*'.
	ArnFormat_COLON_RESOURCE_NAME ArnFormat = "COLON_RESOURCE_NAME"
	// This represents a format where the 'resource' and 'resourceName' parts are separated with a slash.
	//
	// Like in: 'arn:aws:service:region:account:resource/resourceName'.
	// Everything after the separating slash is considered the 'resourceName',
	// even if it contains colons,
	// like in 'arn:aws:cognito-sync:region:account:identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla'.
	ArnFormat_SLASH_RESOURCE_NAME ArnFormat = "SLASH_RESOURCE_NAME"
	// This represents a format where the 'resource' and 'resourceName' parts are seperated with a slash, but there is also an additional slash after the colon separating 'account' from 'resource'.
	//
	// Like in: 'arn:aws:service:region:account:/resource/resourceName'.
	// Note that the leading slash is _not_ included in the parsed 'resource' part.
	ArnFormat_SLASH_RESOURCE_SLASH_RESOURCE_NAME ArnFormat = "SLASH_RESOURCE_SLASH_RESOURCE_NAME"
)

type Aspects

type Aspects interface {
	// The list of aspects which were directly applied on this scope.
	All() *[]IAspect
	// Adds an aspect to apply this scope before synthesis.
	Add(aspect IAspect)
}

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

Example:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/constructs-go/constructs"

type myAspect struct {
}

func (this *myAspect) visit(node iConstruct) {
	if *node instanceof cdk.CfnResource && *node.CfnResourceType == "Foo::Bar" {
		this.error(*node, jsii.String("we do not want a Foo::Bar resource"))
	}
}

func (this *myAspect) error(node iConstruct, message *string) {
	cdk.Annotations_Of(*node).AddError(*message)
}

type myStack struct {
	stack
}

func newMyStack(scope construct, id *string) *myStack {
	this := &myStack{}
	cdk.NewStack_Override(this, scope, id)

	stack := cdk.NewStack()
	cdk.NewCfnResource(stack, jsii.String("Foo"), &CfnResourceProps{
		Type: jsii.String("Foo::Bar"),
		Properties: map[string]interface{}{
			"Fred": jsii.String("Thud"),
		},
	})
	cdk.Aspects_Of(stack).Add(NewMyAspect())
	return this
}

func Aspects_Of

func Aspects_Of(scope constructs.IConstruct) Aspects

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

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.

const (
	// Based on the content of the source path.
	//
	// When bundling, use `SOURCE` when the content of the bundling output is not
	// stable across repeated bundling operations.
	AssetHashType_SOURCE AssetHashType = "SOURCE"
	// Based on the content of the bundling output.
	//
	// Use `OUTPUT` when the source of the asset is a top level folder containing
	// code and/or dependencies that are not directly linked to the asset.
	AssetHashType_OUTPUT AssetHashType = "OUTPUT"
	// Use a custom hash.
	AssetHashType_CUSTOM AssetHashType = "CUSTOM"
)

type AssetManifestBuilder added in v2.45.0

type AssetManifestBuilder interface {
	// Whether there are any assets registered in the manifest.
	HasAssets() *bool
	// Add a docker asset source and destination to the manifest.
	//
	// sourceHash should be unique for every source.
	AddDockerImageAsset(stack Stack, sourceHash *string, source *cloudassemblyschema.DockerImageSource, dest *cloudassemblyschema.DockerImageDestination) *cloudassemblyschema.DockerImageDestination
	// Add a file asset source and destination to the manifest.
	//
	// sourceHash should be unique for every source.
	AddFileAsset(stack Stack, sourceHash *string, source *cloudassemblyschema.FileSource, dest *cloudassemblyschema.FileDestination) *cloudassemblyschema.FileDestination
	// Add a docker image asset to the manifest with default settings.
	//
	// Derive the region from the stack, use the asset hash as the key, and set the prefix.
	DefaultAddDockerImageAsset(stack Stack, asset *DockerImageAssetSource, target *AssetManifestDockerImageDestination) *cloudassemblyschema.DockerImageDestination
	// Add a file asset to the manifest with default settings.
	//
	// Derive the region from the stack, use the asset hash as the key, copy the
	// file extension over, and set the prefix.
	DefaultAddFileAsset(stack Stack, asset *FileAssetSource, target *AssetManifestFileDestination) *cloudassemblyschema.FileDestination
	// Write the manifest to disk, and add it to the synthesis session.
	//
	// Return the artifact id, which should be added to the `additionalDependencies`
	// field of the stack artifact.
	EmitManifest(stack Stack, session ISynthesisSession, options *cloudassemblyschema.AssetManifestOptions, dependencies *[]*string) *string
}

Build an asset manifest from assets added to a stack.

This class does not need to be used by app builders; it is only necessary for building Stack Synthesizers.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

assetManifestBuilder := cdk.NewAssetManifestBuilder()

func NewAssetManifestBuilder added in v2.45.0

func NewAssetManifestBuilder() AssetManifestBuilder

type AssetManifestDockerImageDestination added in v2.45.0

type AssetManifestDockerImageDestination struct {
	// Repository name where the docker image asset should be written.
	RepositoryName *string `field:"required" json:"repositoryName" yaml:"repositoryName"`
	// Prefix to add to the asset hash to make the Docker image tag.
	// Default: ”.
	//
	DockerTagPrefix *string `field:"optional" json:"dockerTagPrefix" yaml:"dockerTagPrefix"`
	// Role to use to perform the upload.
	// Default: - No role.
	//
	Role *RoleOptions `field:"optional" json:"role" yaml:"role"`
}

The destination for a docker image asset, when it is given to the AssetManifestBuilder.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

assetManifestDockerImageDestination := &AssetManifestDockerImageDestination{
	RepositoryName: jsii.String("repositoryName"),

	// the properties below are optional
	DockerTagPrefix: jsii.String("dockerTagPrefix"),
	Role: &RoleOptions{
		AssumeRoleArn: jsii.String("assumeRoleArn"),

		// the properties below are optional
		AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
	},
}

type AssetManifestFileDestination added in v2.45.0

type AssetManifestFileDestination struct {
	// Bucket name where the file asset should be written.
	BucketName *string `field:"required" json:"bucketName" yaml:"bucketName"`
	// Prefix to prepend to the asset hash.
	// Default: ”.
	//
	BucketPrefix *string `field:"optional" json:"bucketPrefix" yaml:"bucketPrefix"`
	// Role to use for uploading.
	// Default: - current role.
	//
	Role *RoleOptions `field:"optional" json:"role" yaml:"role"`
}

The destination for a file asset, when it is given to the AssetManifestBuilder.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

assetManifestFileDestination := &AssetManifestFileDestination{
	BucketName: jsii.String("bucketName"),

	// the properties below are optional
	BucketPrefix: jsii.String("bucketPrefix"),
	Role: &RoleOptions{
		AssumeRoleArn: jsii.String("assumeRoleArn"),

		// the properties below are optional
		AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
	},
}

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.
	// Default: - based on `assetHashType`.
	//
	AssetHash *string `field:"optional" json:"assetHash" yaml:"assetHash"`
	// Specifies the type of hash to calculate for this asset.
	//
	// If `assetHash` is configured, this option must be `undefined` or
	// `AssetHashType.CUSTOM`.
	// Default: - the default is `AssetHashType.SOURCE`, but if `assetHash` is
	// explicitly specified this value defaults to `AssetHashType.CUSTOM`.
	//
	AssetHashType AssetHashType `field:"optional" json:"assetHashType" yaml:"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.
	// Default: - uploaded as-is to S3 if the asset is a regular file or a .zip file,
	// archived into a .zip file and uploaded to S3 otherwise
	//
	Bundling *BundlingOptions `field:"optional" json:"bundling" yaml:"bundling"`
}

Asset hash options.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var dockerImage dockerImage
var localBundling iLocalBundling

assetOptions := &AssetOptions{
	AssetHash: jsii.String("assetHash"),
	AssetHashType: cdk.AssetHashType_SOURCE,
	Bundling: &BundlingOptions{
		Image: dockerImage,

		// the properties below are optional
		BundlingFileAccess: cdk.BundlingFileAccess_VOLUME_COPY,
		Command: []*string{
			jsii.String("command"),
		},
		Entrypoint: []*string{
			jsii.String("entrypoint"),
		},
		Environment: map[string]*string{
			"environmentKey": jsii.String("environment"),
		},
		Local: localBundling,
		Network: jsii.String("network"),
		OutputType: cdk.BundlingOutput_ARCHIVED,
		Platform: jsii.String("platform"),
		SecurityOpt: jsii.String("securityOpt"),
		User: jsii.String("user"),
		Volumes: []dockerVolume{
			&dockerVolume{
				ContainerPath: jsii.String("containerPath"),
				HostPath: jsii.String("hostPath"),

				// the properties below are optional
				Consistency: cdk.DockerVolumeConsistency_CONSISTENT,
			},
		},
		VolumesFrom: []*string{
			jsii.String("volumesFrom"),
		},
		WorkingDirectory: jsii.String("workingDirectory"),
	},
}

type AssetStaging

type AssetStaging interface {
	constructs.Construct
	// Absolute path to the asset data.
	//
	// If asset staging is disabled, this will just be the source path or
	// a temporary directory used for bundling.
	//
	// If asset staging is enabled it will be the staged path.
	//
	// IMPORTANT: If you are going to call `addFileAsset()`, use
	// `relativeStagedPath()` instead.
	AbsoluteStagedPath() *string
	// A cryptographic hash of the asset.
	AssetHash() *string
	// Whether this asset is an archive (zip or jar).
	IsArchive() *bool
	// The tree node.
	Node() constructs.Node
	// How this asset should be packaged.
	Packaging() FileAssetPackaging
	// The absolute path of the asset as it was referenced by the user.
	SourcePath() *string
	// Return the path to the staged asset, relative to the Cloud Assembly (manifest) directory of the given stack.
	//
	// Only returns a relative path if the asset was staged, returns an absolute path if
	// it was not staged.
	//
	// A bundled asset might end up in the outDir and still not count as
	// "staged"; if asset staging is disabled we're technically expected to
	// reference source directories, but we don't have a source directory for the
	// bundled outputs (as the bundle output is written to a temporary
	// directory). Nevertheless, we will still return an absolute path.
	//
	// A non-obvious directory layout may look like this:
	//
	// “`
	//   CLOUD ASSEMBLY ROOT
	//     +-- asset.12345abcdef/
	//     +-- assembly-Stage
	//           +-- MyStack.template.json
	//           +-- MyStack.assets.json <- will contain { "path": "../asset.12345abcdef" }
	// “`.
	RelativeStagedPath(stack Stack) *string
	// Returns a string representation of this construct.
	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.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var dockerImage dockerImage
var localBundling iLocalBundling

assetStaging := cdk.NewAssetStaging(this, jsii.String("MyAssetStaging"), &AssetStagingProps{
	SourcePath: jsii.String("sourcePath"),

	// the properties below are optional
	AssetHash: jsii.String("assetHash"),
	AssetHashType: cdk.AssetHashType_SOURCE,
	Bundling: &BundlingOptions{
		Image: dockerImage,

		// the properties below are optional
		BundlingFileAccess: cdk.BundlingFileAccess_VOLUME_COPY,
		Command: []*string{
			jsii.String("command"),
		},
		Entrypoint: []*string{
			jsii.String("entrypoint"),
		},
		Environment: map[string]*string{
			"environmentKey": jsii.String("environment"),
		},
		Local: localBundling,
		Network: jsii.String("network"),
		OutputType: cdk.BundlingOutput_ARCHIVED,
		Platform: jsii.String("platform"),
		SecurityOpt: jsii.String("securityOpt"),
		User: jsii.String("user"),
		Volumes: []dockerVolume{
			&dockerVolume{
				ContainerPath: jsii.String("containerPath"),
				HostPath: jsii.String("hostPath"),

				// the properties below are optional
				Consistency: cdk.DockerVolumeConsistency_CONSISTENT,
			},
		},
		VolumesFrom: []*string{
			jsii.String("volumesFrom"),
		},
		WorkingDirectory: jsii.String("workingDirectory"),
	},
	Exclude: []*string{
		jsii.String("exclude"),
	},
	ExtraHash: jsii.String("extraHash"),
	Follow: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
})

func NewAssetStaging

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

type AssetStagingProps

type AssetStagingProps struct {
	// File paths matching the patterns will be excluded.
	//
	// See `ignoreMode` to set the matching behavior.
	// Has no effect on Assets bundled using the `bundling` property.
	// Default: - nothing is excluded.
	//
	Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"`
	// A strategy for how to handle symlinks.
	// Default: SymlinkFollowMode.NEVER
	//
	Follow SymlinkFollowMode `field:"optional" json:"follow" yaml:"follow"`
	// The ignore behavior to use for `exclude` patterns.
	// Default: IgnoreMode.GLOB
	//
	IgnoreMode IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"`
	// Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
	// Default: - hash is only based on source content.
	//
	ExtraHash *string `field:"optional" json:"extraHash" yaml:"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.
	// Default: - based on `assetHashType`.
	//
	AssetHash *string `field:"optional" json:"assetHash" yaml:"assetHash"`
	// Specifies the type of hash to calculate for this asset.
	//
	// If `assetHash` is configured, this option must be `undefined` or
	// `AssetHashType.CUSTOM`.
	// Default: - the default is `AssetHashType.SOURCE`, but if `assetHash` is
	// explicitly specified this value defaults to `AssetHashType.CUSTOM`.
	//
	AssetHashType AssetHashType `field:"optional" json:"assetHashType" yaml:"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.
	// Default: - uploaded as-is to S3 if the asset is a regular file or a .zip file,
	// archived into a .zip file and uploaded to S3 otherwise
	//
	Bundling *BundlingOptions `field:"optional" json:"bundling" yaml:"bundling"`
	// The source file or directory to copy from.
	SourcePath *string `field:"required" json:"sourcePath" yaml:"sourcePath"`
}

Initialization properties for `AssetStaging`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var dockerImage dockerImage
var localBundling iLocalBundling

assetStagingProps := &AssetStagingProps{
	SourcePath: jsii.String("sourcePath"),

	// the properties below are optional
	AssetHash: jsii.String("assetHash"),
	AssetHashType: cdk.AssetHashType_SOURCE,
	Bundling: &BundlingOptions{
		Image: dockerImage,

		// the properties below are optional
		BundlingFileAccess: cdk.BundlingFileAccess_VOLUME_COPY,
		Command: []*string{
			jsii.String("command"),
		},
		Entrypoint: []*string{
			jsii.String("entrypoint"),
		},
		Environment: map[string]*string{
			"environmentKey": jsii.String("environment"),
		},
		Local: localBundling,
		Network: jsii.String("network"),
		OutputType: cdk.BundlingOutput_ARCHIVED,
		Platform: jsii.String("platform"),
		SecurityOpt: jsii.String("securityOpt"),
		User: jsii.String("user"),
		Volumes: []dockerVolume{
			&dockerVolume{
				ContainerPath: jsii.String("containerPath"),
				HostPath: jsii.String("hostPath"),

				// the properties below are optional
				Consistency: cdk.DockerVolumeConsistency_CONSISTENT,
			},
		},
		VolumesFrom: []*string{
			jsii.String("volumesFrom"),
		},
		WorkingDirectory: jsii.String("workingDirectory"),
	},
	Exclude: []*string{
		jsii.String("exclude"),
	},
	ExtraHash: jsii.String("extraHash"),
	Follow: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
}

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.

type BootstraplessSynthesizer

type BootstraplessSynthesizer interface {
	DefaultStackSynthesizer
	// The qualifier used to bootstrap this stack.
	BootstrapQualifier() *string
	// Retrieve the bound stack.
	//
	// Fails if the stack hasn't been bound yet.
	BoundStack() Stack
	// Returns the ARN of the CFN execution Role.
	CloudFormationExecutionRoleArn() *string
	// Returns the ARN of the deploy Role.
	DeployRoleArn() *string
	// The role used to lookup for this stack.
	LookupRole() *string
	// Return the currently bound stack.
	// Deprecated: Use `boundStack` instead.
	Stack() Stack
	// Add a CfnRule to the bound stack that checks whether an SSM parameter exceeds a given version.
	//
	// This will modify the template, so must be called before the stack is synthesized.
	AddBootstrapVersionRule(requiredVersion *float64, bootstrapStackVersionSsmParameter *string)
	// Register a Docker Image Asset.
	//
	// Returns the parameters that can be used to refer to the asset inside the template.
	//
	// The synthesizer must rely on some out-of-band mechanism to make sure the given files
	// are actually placed in the returned location before the deployment happens. This can
	// be by writing the instructions to the asset manifest (for use by the `cdk-assets` tool),
	// by relying on the CLI to upload files (legacy behavior), or some other operator controlled
	// mechanism.
	AddDockerImageAsset(_asset *DockerImageAssetSource) *DockerImageAssetLocation
	// Register a File Asset.
	//
	// Returns the parameters that can be used to refer to the asset inside the template.
	//
	// The synthesizer must rely on some out-of-band mechanism to make sure the given files
	// are actually placed in the returned location before the deployment happens. This can
	// be by writing the instructions to the asset manifest (for use by the `cdk-assets` tool),
	// by relying on the CLI to upload files (legacy behavior), or some other operator controlled
	// mechanism.
	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.
	Bind(stack Stack)
	// Turn a docker asset location into a CloudFormation representation of that location.
	//
	// If any of the fields contain placeholders, the result will be wrapped in a `Fn.sub`.
	CloudFormationLocationFromDockerImageAsset(dest *cloudassemblyschema.DockerImageDestination) *DockerImageAssetLocation
	// Turn a file asset location into a CloudFormation representation of that location.
	//
	// If any of the fields contain placeholders, the result will be wrapped in a `Fn.sub`.
	CloudFormationLocationFromFileAsset(location *cloudassemblyschema.FileDestination) *FileAssetLocation
	// Write the CloudFormation stack artifact to the session.
	//
	// Use default settings to add a CloudFormationStackArtifact artifact to
	// the given synthesis session. The Stack artifact will control the settings for the
	// CloudFormation deployment.
	EmitArtifact(session ISynthesisSession, options *SynthesizeStackArtifactOptions)
	// Write the stack artifact to the session.
	//
	// Use default settings to add a CloudFormationStackArtifact artifact to
	// the given synthesis session.
	// Deprecated: Use `emitArtifact` instead.
	EmitStackArtifact(stack Stack, session ISynthesisSession, options *SynthesizeStackArtifactOptions)
	// Produce a bound Stack Synthesizer for the given stack.
	//
	// This method may be called more than once on the same object.
	ReusableBind(stack Stack) IBoundStackSynthesizer
	// Synthesize the associated stack to the session.
	Synthesize(session ISynthesisSession)
	// Synthesize the stack template to the given session, passing the configured lookup role ARN.
	SynthesizeStackTemplate(stack Stack, session ISynthesisSession)
	// Write the stack template to the given session.
	//
	// Return a descriptor that represents the stack template as a file asset
	// source, for adding to an asset manifest (if desired). This can be used to
	// have the asset manifest system (`cdk-assets`) upload the template to S3
	// using the appropriate role, so that afterwards only a CloudFormation
	// deployment is necessary.
	//
	// If the template is uploaded as an asset, the `stackTemplateAssetObjectUrl`
	// property should be set when calling `emitArtifact.`
	//
	// If the template is *NOT* uploaded as an asset first and the template turns
	// out to be >50KB, it will need to be uploaded to S3 anyway. At that point
	// the credentials will be the same identity that is doing the `UpdateStack`
	// call, which may not have the right permissions to write to S3.
	SynthesizeTemplate(session ISynthesisSession, lookupRoleArn *string) *FileAssetSource
}

Synthesizer that reuses bootstrap roles from a different region.

A special synthesizer that behaves similarly to `DefaultStackSynthesizer`, but doesn't require bootstrapping the environment it operates in. Instead, it will re-use the Roles that were created for a different region (which is possible because IAM is a global service).

However, it will not assume asset buckets or repositories have been created, and therefore does not support assets.

The name is poorly chosen -- it does still require bootstrapping, it just does not support assets.

Used by the CodePipeline construct for the support stacks needed for cross-region replication S3 buckets. App builders do not need to use this synthesizer directly.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

bootstraplessSynthesizer := cdk.NewBootstraplessSynthesizer(&BootstraplessSynthesizerProps{
	CloudFormationExecutionRoleArn: jsii.String("cloudFormationExecutionRoleArn"),
	DeployRoleArn: jsii.String("deployRoleArn"),
})

type BootstraplessSynthesizerProps

type BootstraplessSynthesizerProps struct {
	// The CFN execution Role ARN to use.
	// Default: - No CloudFormation role (use CLI credentials).
	//
	CloudFormationExecutionRoleArn *string `field:"optional" json:"cloudFormationExecutionRoleArn" yaml:"cloudFormationExecutionRoleArn"`
	// The deploy Role ARN to use.
	// Default: - No deploy role (use CLI credentials).
	//
	DeployRoleArn *string `field:"optional" json:"deployRoleArn" yaml:"deployRoleArn"`
}

Construction properties of `BootstraplessSynthesizer`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

bootstraplessSynthesizerProps := &BootstraplessSynthesizerProps{
	CloudFormationExecutionRoleArn: jsii.String("cloudFormationExecutionRoleArn"),
	DeployRoleArn: jsii.String("deployRoleArn"),
}

type BundlingFileAccess added in v2.63.0

type BundlingFileAccess string

The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.

Example:

go.NewGoFunction(this, jsii.String("GoFunction"), &GoFunctionProps{
	Entry: jsii.String("app/cmd/api"),
	Bundling: &BundlingOptions{
		BundlingFileAccess: awscdk.BundlingFileAccess_VOLUME_COPY,
	},
})
const (
	// Creates temporary volumes and containers to copy files from the host to the bundling container and back.
	//
	// This is slower, but works also in more complex situations with remote or shared docker sockets.
	BundlingFileAccess_VOLUME_COPY BundlingFileAccess = "VOLUME_COPY"
	// The source and output folders will be mounted as bind mount from the host system This is faster and simpler, but less portable than `VOLUME_COPY`.
	BundlingFileAccess_BIND_MOUNT BundlingFileAccess = "BIND_MOUNT"
)

type BundlingOptions

type BundlingOptions struct {
	// The Docker image where the command will run.
	Image DockerImage `field:"required" json:"image" yaml:"image"`
	// The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.
	// Default: - BundlingFileAccess.BIND_MOUNT
	//
	BundlingFileAccess BundlingFileAccess `field:"optional" json:"bundlingFileAccess" yaml:"bundlingFileAccess"`
	// The command to run in the Docker container.
	//
	// Example value: `['npm', 'install']`.
	// See: https://docs.docker.com/engine/reference/run/
	//
	// Default: - run the command defined in the image.
	//
	Command *[]*string `field:"optional" json:"command" yaml:"command"`
	// The entrypoint to run in the Docker container.
	//
	// Example value: `['/bin/sh', '-c']`.
	// See: https://docs.docker.com/engine/reference/builder/#entrypoint
	//
	// Default: - run the entrypoint defined in the image.
	//
	Entrypoint *[]*string `field:"optional" json:"entrypoint" yaml:"entrypoint"`
	// The environment variables to pass to the Docker container.
	// Default: - no environment variables.
	//
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"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.
	// Default: - bundling will only be performed in a Docker container.
	//
	Local ILocalBundling `field:"optional" json:"local" yaml:"local"`
	// Docker [Networking options](https://docs.docker.com/engine/reference/commandline/run/#connect-a-container-to-a-network---network).
	// Default: - no networking options.
	//
	Network *string `field:"optional" json:"network" yaml:"network"`
	// The type of output that this bundling operation is producing.
	// Default: BundlingOutput.AUTO_DISCOVER
	//
	OutputType BundlingOutput `field:"optional" json:"outputType" yaml:"outputType"`
	// Platform to build for. _Requires Docker Buildx_.
	//
	// Specify this property to build images on a specific platform.
	// Default: - no platform specified (the current machine architecture will be used).
	//
	Platform *string `field:"optional" json:"platform" yaml:"platform"`
	// [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
	// Default: - no security options.
	//
	SecurityOpt *string `field:"optional" json:"securityOpt" yaml:"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
	//
	// Default: - uid:gid of the current user or 1000:1000 on Windows.
	//
	User *string `field:"optional" json:"user" yaml:"user"`
	// Additional Docker volumes to mount.
	// Default: - no additional volumes are mounted.
	//
	Volumes *[]*DockerVolume `field:"optional" json:"volumes" yaml:"volumes"`
	// Where to mount the specified volumes from.
	// See: https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from
	//
	// Default: - no containers are specified to mount volumes from.
	//
	VolumesFrom *[]*string `field:"optional" json:"volumesFrom" yaml:"volumesFrom"`
	// Working directory inside the Docker container.
	// Default: /asset-input.
	//
	WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
}

Bundling options.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

asset := awscdk.NewAsset(this, jsii.String("BundledAsset"), &AssetProps{
	Path: jsii.String("/path/to/asset"),
	Bundling: &BundlingOptions{
		Image: cdk.DockerImage_FromRegistry(jsii.String("alpine")),
		Command: []*string{
			jsii.String("command-that-produces-an-archive.sh"),
		},
		OutputType: cdk.BundlingOutput_NOT_ARCHIVED,
	},
})

type BundlingOutput

type BundlingOutput string

The type of output that a bundling operation is producing.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

asset := awscdk.NewAsset(this, jsii.String("BundledAsset"), &AssetProps{
	Path: jsii.String("/path/to/asset"),
	Bundling: &BundlingOptions{
		Image: cdk.DockerImage_FromRegistry(jsii.String("alpine")),
		Command: []*string{
			jsii.String("command-that-produces-an-archive.sh"),
		},
		OutputType: cdk.BundlingOutput_NOT_ARCHIVED,
	},
})
const (
	// The bundling output directory includes a single .zip or .jar file which will be used as the final bundle. If the output directory does not include exactly a single archive, bundling will fail.
	BundlingOutput_ARCHIVED BundlingOutput = "ARCHIVED"
	// The bundling output directory contains one or more files which will be archived and uploaded as a .zip file to S3.
	BundlingOutput_NOT_ARCHIVED BundlingOutput = "NOT_ARCHIVED"
	// If the bundling output directory contains a single archive file (zip or jar) it will be used as the bundle output as-is.
	//
	// Otherwise, all the files in the bundling output directory will be zipped.
	BundlingOutput_AUTO_DISCOVER BundlingOutput = "AUTO_DISCOVER"
	// The bundling output directory includes a single file which will be used as the final bundle.
	//
	// If the output directory does not
	// include exactly a single file, bundling will fail.
	//
	// Similar to ARCHIVED but for non-archive files.
	BundlingOutput_SINGLE_FILE BundlingOutput = "SINGLE_FILE"
)

type CfnAutoScalingReplacingUpdate

type CfnAutoScalingReplacingUpdate struct {
	WillReplace *bool `field:"optional" json:"willReplace" yaml:"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.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnAutoScalingReplacingUpdate := &CfnAutoScalingReplacingUpdate{
	WillReplace: jsii.Boolean(false),
}

type CfnAutoScalingRollingUpdate

type CfnAutoScalingRollingUpdate struct {
	// Specifies the maximum number of instances that AWS CloudFormation updates.
	MaxBatchSize *float64 `field:"optional" json:"maxBatchSize" yaml:"maxBatchSize"`
	// Specifies the minimum number of instances that must be in service within the Auto Scaling group while AWS CloudFormation updates old instances.
	MinInstancesInService *float64 `field:"optional" json:"minInstancesInService" yaml:"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.
	MinSuccessfulInstancesPercent *float64 `field:"optional" json:"minSuccessfulInstancesPercent" yaml:"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).
	PauseTime *string `field:"optional" json:"pauseTime" yaml:"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.
	SuspendProcesses *[]*string `field:"optional" json:"suspendProcesses" yaml:"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.
	WaitOnResourceSignals *bool `field:"optional" json:"waitOnResourceSignals" yaml:"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.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnAutoScalingRollingUpdate := &CfnAutoScalingRollingUpdate{
	MaxBatchSize: jsii.Number(123),
	MinInstancesInService: jsii.Number(123),
	MinSuccessfulInstancesPercent: jsii.Number(123),
	PauseTime: jsii.String("pauseTime"),
	SuspendProcesses: []*string{
		jsii.String("suspendProcesses"),
	},
	WaitOnResourceSignals: jsii.Boolean(false),
}

type CfnAutoScalingScheduledAction

type CfnAutoScalingScheduledAction struct {
	IgnoreUnmodifiedGroupSizeProperties *bool `field:"optional" json:"ignoreUnmodifiedGroupSizeProperties" yaml:"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.\

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnAutoScalingScheduledAction := &CfnAutoScalingScheduledAction{
	IgnoreUnmodifiedGroupSizeProperties: jsii.Boolean(false),
}

type CfnCapabilities

type CfnCapabilities string

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

const (
	// No IAM Capabilities.
	//
	// Pass this capability if you wish to block the creation IAM resources.
	CfnCapabilities_NONE CfnCapabilities = "NONE"
	// Capability to create anonymous IAM resources.
	//
	// Pass this capability if you're only creating anonymous resources.
	CfnCapabilities_ANONYMOUS_IAM CfnCapabilities = "ANONYMOUS_IAM"
	// Capability to create named IAM resources.
	//
	// Pass this capability if you're creating IAM resources that have physical
	// names.
	//
	// `CloudFormationCapabilities.NamedIAM` implies `CloudFormationCapabilities.IAM`; you don't have to pass both.
	CfnCapabilities_NAMED_IAM CfnCapabilities = "NAMED_IAM"
	// Capability to run CloudFormation macros.
	//
	// Pass this capability if your template includes macros, for example AWS::Include or AWS::Serverless.
	CfnCapabilities_AUTO_EXPAND CfnCapabilities = "AUTO_EXPAND"
)

type CfnCodeDeployBlueGreenAdditionalOptions

type CfnCodeDeployBlueGreenAdditionalOptions struct {
	// Specifies time to wait, in minutes, before terminating the blue resources.
	// Default: - 5 minutes.
	//
	TerminationWaitTimeInMinutes *float64 `field:"optional" json:"terminationWaitTimeInMinutes" yaml:"terminationWaitTimeInMinutes"`
}

Additional options for the blue/green deployment.

The type of the `CfnCodeDeployBlueGreenHookProps.additionalOptions` property.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployBlueGreenAdditionalOptions := &CfnCodeDeployBlueGreenAdditionalOptions{
	TerminationWaitTimeInMinutes: jsii.Number(123),
}

type CfnCodeDeployBlueGreenApplication

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

The application actually being deployed.

Type of the `CfnCodeDeployBlueGreenHookProps.applications` property.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployBlueGreenApplication := &CfnCodeDeployBlueGreenApplication{
	EcsAttributes: &CfnCodeDeployBlueGreenEcsAttributes{
		TaskDefinitions: []*string{
			jsii.String("taskDefinitions"),
		},
		TaskSets: []*string{
			jsii.String("taskSets"),
		},
		TrafficRouting: &CfnTrafficRouting{
			ProdTrafficRoute: &CfnTrafficRoute{
				LogicalId: jsii.String("logicalId"),
				Type: jsii.String("type"),
			},
			TargetGroups: []*string{
				jsii.String("targetGroups"),
			},
			TestTrafficRoute: &CfnTrafficRoute{
				LogicalId: jsii.String("logicalId"),
				Type: jsii.String("type"),
			},
		},
	},
	Target: &CfnCodeDeployBlueGreenApplicationTarget{
		LogicalId: jsii.String("logicalId"),
		Type: jsii.String("type"),
	},
}

type CfnCodeDeployBlueGreenApplicationTarget

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

Type of the `CfnCodeDeployBlueGreenApplication.target` property.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployBlueGreenApplicationTarget := &CfnCodeDeployBlueGreenApplicationTarget{
	LogicalId: jsii.String("logicalId"),
	Type: jsii.String("type"),
}

type CfnCodeDeployBlueGreenEcsAttributes

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

The attributes of the ECS Service being deployed.

Type of the `CfnCodeDeployBlueGreenApplication.ecsAttributes` property.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployBlueGreenEcsAttributes := &CfnCodeDeployBlueGreenEcsAttributes{
	TaskDefinitions: []*string{
		jsii.String("taskDefinitions"),
	},
	TaskSets: []*string{
		jsii.String("taskSets"),
	},
	TrafficRouting: &CfnTrafficRouting{
		ProdTrafficRoute: &CfnTrafficRoute{
			LogicalId: jsii.String("logicalId"),
			Type: jsii.String("type"),
		},
		TargetGroups: []*string{
			jsii.String("targetGroups"),
		},
		TestTrafficRoute: &CfnTrafficRoute{
			LogicalId: jsii.String("logicalId"),
			Type: jsii.String("type"),
		},
	},
}

type CfnCodeDeployBlueGreenHook

type CfnCodeDeployBlueGreenHook interface {
	CfnHook
	// Additional options for the blue/green deployment.
	// Default: - no additional options.
	//
	AdditionalOptions() *CfnCodeDeployBlueGreenAdditionalOptions
	SetAdditionalOptions(val *CfnCodeDeployBlueGreenAdditionalOptions)
	// Properties of the Amazon ECS applications being deployed.
	Applications() *[]*CfnCodeDeployBlueGreenApplication
	SetApplications(val *[]*CfnCodeDeployBlueGreenApplication)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// 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 `CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic`
	// function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
	// Default: - no lifecycle event hooks.
	//
	LifecycleEventHooks() *CfnCodeDeployBlueGreenLifecycleEventHooks
	SetLifecycleEventHooks(val *CfnCodeDeployBlueGreenLifecycleEventHooks)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// The IAM Role for CloudFormation to use to perform blue-green deployments.
	ServiceRole() *string
	SetServiceRole(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// Traffic routing configuration settings.
	// Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time.
	//
	TrafficRoutingConfig() *CfnTrafficRoutingConfig
	SetTrafficRoutingConfig(val *CfnTrafficRoutingConfig)
	// The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
	Type() *string
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(_props *map[string]interface{}) *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

A CloudFormation Hook for CodeDeploy blue-green ECS deployments.

Example:

var cfnTemplate cfnInclude

// mutating the hook
var myRole role

hook := cfnTemplate.GetHook(jsii.String("MyOutput"))
codeDeployHook := hook.(cfnCodeDeployBlueGreenHook)
codeDeployHook.serviceRole = myRole.RoleArn

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html#blue-green-template-reference

func NewCfnCodeDeployBlueGreenHook

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

Creates a new CodeDeploy blue-green ECS Hook.

type CfnCodeDeployBlueGreenHookProps

type CfnCodeDeployBlueGreenHookProps struct {
	// Properties of the Amazon ECS applications being deployed.
	Applications *[]*CfnCodeDeployBlueGreenApplication `field:"required" json:"applications" yaml:"applications"`
	// The IAM Role for CloudFormation to use to perform blue-green deployments.
	ServiceRole *string `field:"required" json:"serviceRole" yaml:"serviceRole"`
	// Additional options for the blue/green deployment.
	// Default: - no additional options.
	//
	AdditionalOptions *CfnCodeDeployBlueGreenAdditionalOptions `field:"optional" json:"additionalOptions" yaml:"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 `CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic`
	// function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
	// Default: - no lifecycle event hooks.
	//
	LifecycleEventHooks *CfnCodeDeployBlueGreenLifecycleEventHooks `field:"optional" json:"lifecycleEventHooks" yaml:"lifecycleEventHooks"`
	// Traffic routing configuration settings.
	// Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time.
	//
	TrafficRoutingConfig *CfnTrafficRoutingConfig `field:"optional" json:"trafficRoutingConfig" yaml:"trafficRoutingConfig"`
}

Construction properties of `CfnCodeDeployBlueGreenHook`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployBlueGreenHookProps := &CfnCodeDeployBlueGreenHookProps{
	Applications: []cfnCodeDeployBlueGreenApplication{
		&cfnCodeDeployBlueGreenApplication{
			EcsAttributes: &CfnCodeDeployBlueGreenEcsAttributes{
				TaskDefinitions: []*string{
					jsii.String("taskDefinitions"),
				},
				TaskSets: []*string{
					jsii.String("taskSets"),
				},
				TrafficRouting: &CfnTrafficRouting{
					ProdTrafficRoute: &CfnTrafficRoute{
						LogicalId: jsii.String("logicalId"),
						Type: jsii.String("type"),
					},
					TargetGroups: []*string{
						jsii.String("targetGroups"),
					},
					TestTrafficRoute: &CfnTrafficRoute{
						LogicalId: jsii.String("logicalId"),
						Type: jsii.String("type"),
					},
				},
			},
			Target: &CfnCodeDeployBlueGreenApplicationTarget{
				LogicalId: jsii.String("logicalId"),
				Type: jsii.String("type"),
			},
		},
	},
	ServiceRole: jsii.String("serviceRole"),

	// the properties below are optional
	AdditionalOptions: &CfnCodeDeployBlueGreenAdditionalOptions{
		TerminationWaitTimeInMinutes: jsii.Number(123),
	},
	LifecycleEventHooks: &CfnCodeDeployBlueGreenLifecycleEventHooks{
		AfterAllowTestTraffic: jsii.String("afterAllowTestTraffic"),
		AfterAllowTraffic: jsii.String("afterAllowTraffic"),
		AfterInstall: jsii.String("afterInstall"),
		BeforeAllowTraffic: jsii.String("beforeAllowTraffic"),
		BeforeInstall: jsii.String("beforeInstall"),
	},
	TrafficRoutingConfig: &CfnTrafficRoutingConfig{
		Type: cdk.CfnTrafficRoutingType_ALL_AT_ONCE,

		// the properties below are optional
		TimeBasedCanary: &CfnTrafficRoutingTimeBasedCanary{
			BakeTimeMins: jsii.Number(123),
			StepPercentage: jsii.Number(123),
		},
		TimeBasedLinear: &CfnTrafficRoutingTimeBasedLinear{
			BakeTimeMins: jsii.Number(123),
			StepPercentage: jsii.Number(123),
		},
	},
}

type CfnCodeDeployBlueGreenLifecycleEventHooks

type CfnCodeDeployBlueGreenLifecycleEventHooks struct {
	// Function to use to run tasks after the test listener serves traffic to the replacement task set.
	// Default: - none.
	//
	AfterAllowTestTraffic *string `field:"optional" json:"afterAllowTestTraffic" yaml:"afterAllowTestTraffic"`
	// Function to use to run tasks after the second target group serves traffic to the replacement task set.
	// Default: - none.
	//
	AfterAllowTraffic *string `field:"optional" json:"afterAllowTraffic" yaml:"afterAllowTraffic"`
	// Function to use to run tasks after the replacement task set is created and one of the target groups is associated with it.
	// Default: - none.
	//
	AfterInstall *string `field:"optional" json:"afterInstall" yaml:"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.
	// Default: - none.
	//
	BeforeAllowTraffic *string `field:"optional" json:"beforeAllowTraffic" yaml:"beforeAllowTraffic"`
	// Function to use to run tasks before the replacement task set is created.
	// Default: - none.
	//
	BeforeInstall *string `field:"optional" json:"beforeInstall" yaml:"beforeInstall"`
}

Lifecycle events for blue-green deployments.

The type of the `CfnCodeDeployBlueGreenHookProps.lifecycleEventHooks` property.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployBlueGreenLifecycleEventHooks := &CfnCodeDeployBlueGreenLifecycleEventHooks{
	AfterAllowTestTraffic: jsii.String("afterAllowTestTraffic"),
	AfterAllowTraffic: jsii.String("afterAllowTraffic"),
	AfterInstall: jsii.String("afterInstall"),
	BeforeAllowTraffic: jsii.String("beforeAllowTraffic"),
	BeforeInstall: jsii.String("beforeInstall"),
}

type CfnCodeDeployLambdaAliasUpdate

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

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

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployLambdaAliasUpdate := &CfnCodeDeployLambdaAliasUpdate{
	ApplicationName: jsii.String("applicationName"),
	DeploymentGroupName: jsii.String("deploymentGroupName"),

	// the properties below are optional
	AfterAllowTrafficHook: jsii.String("afterAllowTrafficHook"),
	BeforeAllowTrafficHook: jsii.String("beforeAllowTrafficHook"),
}

type CfnCondition

type CfnCondition interface {
	CfnElement
	ICfnConditionExpression
	IResolvable
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The condition statement.
	Expression() ICfnConditionExpression
	SetExpression(val ICfnConditionExpression)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Synthesizes the condition.
	Resolve(_context IResolveContext) interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

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

Example:

rawBucket := s3.NewCfnBucket(this, jsii.String("Bucket"), &CfnBucketProps{
})
// -or-
rawBucketAlt := myBucket.Node.defaultChild.(cfnBucket)

// then
rawBucket.CfnOptions.Condition = awscdk.NewCfnCondition(this, jsii.String("EnableBucket"), &CfnConditionProps{
})
rawBucket.CfnOptions.Metadata = map[string]interface{}{
	"metadataKey": jsii.String("MetadataValue"),
}

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.

type CfnConditionProps

type CfnConditionProps struct {
	// The expression that the condition will evaluate.
	// Default: - None.
	//
	Expression ICfnConditionExpression `field:"optional" json:"expression" yaml:"expression"`
}

Example:

rawBucket := s3.NewCfnBucket(this, jsii.String("Bucket"), &CfnBucketProps{
})
// -or-
rawBucketAlt := myBucket.Node.defaultChild.(cfnBucket)

// then
rawBucket.CfnOptions.Condition = awscdk.NewCfnCondition(this, jsii.String("EnableBucket"), &CfnConditionProps{
})
rawBucket.CfnOptions.Metadata = map[string]interface{}{
	"metadataKey": jsii.String("MetadataValue"),
}

type CfnCreationPolicy

type CfnCreationPolicy struct {
	// For an Auto Scaling group replacement update, specifies how many instances must signal success for the update to succeed.
	AutoScalingCreationPolicy *CfnResourceAutoScalingCreationPolicy `field:"optional" json:"autoScalingCreationPolicy" yaml:"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.
	ResourceSignal *CfnResourceSignal `field:"optional" json:"resourceSignal" yaml:"resourceSignal"`
	// For an AppStream Fleet creation, specifies that the fleet is started after creation.
	StartFleet *bool `field:"optional" json:"startFleet" yaml:"startFleet"`
}

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, AWS::CloudFormation::WaitCondition and AWS::AppStream::Fleet.

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.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCreationPolicy := &CfnCreationPolicy{
	AutoScalingCreationPolicy: &CfnResourceAutoScalingCreationPolicy{
		MinSuccessfulInstancesPercent: jsii.Number(123),
	},
	ResourceSignal: &CfnResourceSignal{
		Count: jsii.Number(123),
		Timeout: jsii.String("timeout"),
	},
	StartFleet: jsii.Boolean(false),
}

type CfnCustomResource

type CfnCustomResource interface {
	CfnResource
	IInspectable
	AttrId() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// > Only one property is defined by AWS for a custom resource: `ServiceToken` .
	ServiceToken() *string
	SetServiceToken(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint ResolutionTypeHint) Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target CfnResource, newTarget CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

In a CloudFormation template, you use the `AWS::CloudFormation::CustomResource` or `Custom:: *String*` resource type to specify custom resources.

Custom resources provide a way for you to write custom provisioning logic in CloudFormation template and have CloudFormation run it during a stack operation, such as when you create, update or delete a stack. For more information, see [Custom resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) .

> If you use the [VPC endpoints](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html) feature, custom resources in the VPC must have access to CloudFormation -specific Amazon Simple Storage Service ( Amazon S3 ) buckets. Custom resources must send responses to a presigned Amazon S3 URL. If they can't send responses to Amazon S3 , CloudFormation won't receive a response and the stack operation fails. For more information, see [Setting up VPC endpoints for AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-vpce-bucketnames.html) .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCustomResource := cdk.NewCfnCustomResource(this, jsii.String("MyCfnCustomResource"), &CfnCustomResourceProps{
	ServiceToken: jsii.String("serviceToken"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html

func NewCfnCustomResource

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

type CfnCustomResourceProps

type CfnCustomResourceProps struct {
	// > Only one property is defined by AWS for a custom resource: `ServiceToken` .
	//
	// All other properties are defined by the service provider.
	//
	// The service token that was given to the template developer by the service provider to access the service, such as an Amazon SNS topic ARN or Lambda function ARN. The service token must be from the same Region in which you are creating the stack.
	//
	// Updates aren't supported.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#cfn-cloudformation-customresource-servicetoken
	//
	ServiceToken *string `field:"required" json:"serviceToken" yaml:"serviceToken"`
}

Properties for defining a `CfnCustomResource`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCustomResourceProps := &CfnCustomResourceProps{
	ServiceToken: jsii.String("serviceToken"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html

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.

const (
	// AWS CloudFormation deletes the resource and all its content if applicable during stack deletion.
	//
	// You can add this
	// deletion policy to any resource type. By default, if you don't specify a DeletionPolicy, AWS CloudFormation deletes
	// your resources. However, be aware of the following considerations:
	CfnDeletionPolicy_DELETE CfnDeletionPolicy = "DELETE"
	// AWS CloudFormation keeps the resource without deleting the resource or its contents when its stack is deleted.
	//
	// You can add this deletion policy to any resource type. Note that when AWS CloudFormation completes the stack deletion,
	// the stack will be in Delete_Complete state; however, resources that are retained continue to exist and continue to incur
	// applicable charges until you delete those resources.
	CfnDeletionPolicy_RETAIN CfnDeletionPolicy = "RETAIN"
	// RetainExceptOnCreate behaves like Retain for stack operations, except for the stack operation that initially created the resource.
	//
	// If the stack operation that created the resource is rolled back, CloudFormation deletes the resource. For all other stack operations,
	// such as stack deletion, CloudFormation retains the resource and its contents. The result is that new, empty, and unused resources are deleted,
	// while in-use resources and their data are retained.
	CfnDeletionPolicy_RETAIN_EXCEPT_ON_CREATE CfnDeletionPolicy = "RETAIN_EXCEPT_ON_CREATE"
	// For resources that support snapshots (AWS::EC2::Volume, AWS::ElastiCache::CacheCluster, AWS::ElastiCache::ReplicationGroup, AWS::RDS::DBInstance, AWS::RDS::DBCluster, and AWS::Redshift::Cluster), AWS CloudFormation creates a snapshot for the resource before deleting it.
	//
	// Note that when AWS CloudFormation completes the stack deletion, the stack will be in the
	// Delete_Complete state; however, the snapshots that are created with this policy continue to exist and continue to
	// incur applicable charges until you delete those snapshots.
	CfnDeletionPolicy_SNAPSHOT CfnDeletionPolicy = "SNAPSHOT"
)

type CfnDynamicReference

type CfnDynamicReference interface {
	Intrinsic
	// The captured stack trace which represents the location in which this token was created.
	CreationStack() *[]*string
	// Type that the Intrinsic is expected to evaluate to.
	TypeHint() ResolutionTypeHint
	// Creates a throwable Error object that contains the token creation stack trace.
	NewError(message *string) interface{}
	// Produce the Token's value at resolution time.
	Resolve(_context IResolveContext) interface{}
	// Turn this Token into JSON.
	//
	// Called automatically when JSON.stringify() is called on a Token.
	ToJSON() interface{}
	// Convert an instance of this Token to a string.
	//
	// This method will be called implicitly by language runtimes if the object
	// is embedded into a string. We treat it the same as an explicit
	// stringification.
	ToString() *string
	// Convert an instance of this Token to a string list.
	//
	// This method will be called implicitly by language runtimes if the object
	// is embedded into a list. We treat it the same as an explicit
	// stringification.
	ToStringList() *[]*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.

Example:

awscdk.NewCfnDynamicReference(awscdk.CfnDynamicReferenceService_SECRETS_MANAGER, jsii.String("secret-id:secret-string:json-key:version-stage:version-id"))

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html

func NewCfnDynamicReference

func NewCfnDynamicReference(service CfnDynamicReferenceService, key *string) CfnDynamicReference

type CfnDynamicReferenceProps

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

Properties for a Dynamic Reference.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnDynamicReferenceProps := &CfnDynamicReferenceProps{
	ReferenceKey: jsii.String("referenceKey"),
	Service: cdk.CfnDynamicReferenceService_SSM,
}

type CfnDynamicReferenceService

type CfnDynamicReferenceService string

The service to retrieve the dynamic reference from.

Example:

awscdk.NewCfnDynamicReference(awscdk.CfnDynamicReferenceService_SECRETS_MANAGER, jsii.String("secret-id:secret-string:json-key:version-stage:version-id"))
const (
	// Plaintext value stored in AWS Systems Manager Parameter Store.
	CfnDynamicReferenceService_SSM CfnDynamicReferenceService = "SSM"
	// Secure string stored in AWS Systems Manager Parameter Store.
	CfnDynamicReferenceService_SSM_SECURE CfnDynamicReferenceService = "SSM_SECURE"
	// Secret stored in AWS Secrets Manager.
	CfnDynamicReferenceService_SECRETS_MANAGER CfnDynamicReferenceService = "SECRETS_MANAGER"
)

type CfnElement

type CfnElement interface {
	constructs.Construct
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Returns a string representation of this construct.
	ToString() *string
}

An element of a CloudFormation stack.

type CfnHook

type CfnHook interface {
	CfnElement
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
	Type() *string
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

Represents a CloudFormation resource.

Example:

var cfnTemplate cfnInclude

// mutating the hook
var myRole role

hook := cfnTemplate.GetHook(jsii.String("MyOutput"))
codeDeployHook := hook.(cfnCodeDeployBlueGreenHook)
codeDeployHook.serviceRole = myRole.RoleArn

func NewCfnHook

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

Creates a new Hook object.

type CfnHookDefaultVersion added in v2.13.0

type CfnHookDefaultVersion interface {
	CfnResource
	IInspectable
	// The Amazon Resource Number (ARN) of the activated extension, in this account and Region.
	AttrArn() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// The name of the hook.
	TypeName() *string
	SetTypeName(val *string)
	// The version ID of the type configuration.
	TypeVersionArn() *string
	SetTypeVersionArn(val *string)
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// The version ID of the type specified.
	VersionId() *string
	SetVersionId(val *string)
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint ResolutionTypeHint) Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target CfnResource, newTarget CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

The `HookDefaultVersion` resource specifies the default version of the hook.

The default version of the hook is used in CloudFormation operations for this AWS account and AWS Region .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnHookDefaultVersion := cdk.NewCfnHookDefaultVersion(this, jsii.String("MyCfnHookDefaultVersion"), &CfnHookDefaultVersionProps{
	TypeName: jsii.String("typeName"),
	TypeVersionArn: jsii.String("typeVersionArn"),
	VersionId: jsii.String("versionId"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookdefaultversion.html

func NewCfnHookDefaultVersion added in v2.13.0

func NewCfnHookDefaultVersion(scope constructs.Construct, id *string, props *CfnHookDefaultVersionProps) CfnHookDefaultVersion

type CfnHookDefaultVersionProps added in v2.13.0

type CfnHookDefaultVersionProps struct {
	// The name of the hook.
	//
	// You must specify either `TypeVersionArn` , or `TypeName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookdefaultversion.html#cfn-cloudformation-hookdefaultversion-typename
	//
	TypeName *string `field:"optional" json:"typeName" yaml:"typeName"`
	// The version ID of the type configuration.
	//
	// You must specify either `TypeVersionArn` , or `TypeName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookdefaultversion.html#cfn-cloudformation-hookdefaultversion-typeversionarn
	//
	TypeVersionArn *string `field:"optional" json:"typeVersionArn" yaml:"typeVersionArn"`
	// The version ID of the type specified.
	//
	// You must specify either `TypeVersionArn` , or `TypeName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookdefaultversion.html#cfn-cloudformation-hookdefaultversion-versionid
	//
	VersionId *string `field:"optional" json:"versionId" yaml:"versionId"`
}

Properties for defining a `CfnHookDefaultVersion`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnHookDefaultVersionProps := &CfnHookDefaultVersionProps{
	TypeName: jsii.String("typeName"),
	TypeVersionArn: jsii.String("typeVersionArn"),
	VersionId: jsii.String("versionId"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookdefaultversion.html

type CfnHookProps

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

Construction properties of `CfnHook`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

var properties interface{}

cfnHookProps := &CfnHookProps{
	Type: jsii.String("type"),

	// the properties below are optional
	Properties: map[string]interface{}{
		"propertiesKey": properties,
	},
}

type CfnHookTypeConfig added in v2.13.0

type CfnHookTypeConfig interface {
	CfnResource
	IInspectable
	// The Amazon Resource Number (ARN) of the activated hook type configuration, in this account and Region.
	AttrConfigurationArn() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Specifies the activated hook type configuration, in this AWS account and AWS Region .
	Configuration() *string
	SetConfiguration(val *string)
	// Specifies the activated hook type configuration, in this AWS account and AWS Region .
	ConfigurationAlias() *string
	SetConfigurationAlias(val *string)
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// The Amazon Resource Number (ARN) for the hook to set `Configuration` for.
	TypeArn() *string
	SetTypeArn(val *string)
	// The unique name for your hook.
	TypeName() *string
	SetTypeName(val *string)
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint ResolutionTypeHint) Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target CfnResource, newTarget CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

The `HookTypeConfig` resource specifies the configuration of a hook.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnHookTypeConfig := cdk.NewCfnHookTypeConfig(this, jsii.String("MyCfnHookTypeConfig"), &CfnHookTypeConfigProps{
	Configuration: jsii.String("configuration"),

	// the properties below are optional
	ConfigurationAlias: jsii.String("configurationAlias"),
	TypeArn: jsii.String("typeArn"),
	TypeName: jsii.String("typeName"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hooktypeconfig.html

func NewCfnHookTypeConfig added in v2.13.0

func NewCfnHookTypeConfig(scope constructs.Construct, id *string, props *CfnHookTypeConfigProps) CfnHookTypeConfig

type CfnHookTypeConfigProps added in v2.13.0

type CfnHookTypeConfigProps struct {
	// Specifies the activated hook type configuration, in this AWS account and AWS Region .
	//
	// You must specify either `TypeName` and `Configuration` or `TypeARN` and `Configuration` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hooktypeconfig.html#cfn-cloudformation-hooktypeconfig-configuration
	//
	Configuration *string `field:"required" json:"configuration" yaml:"configuration"`
	// Specifies the activated hook type configuration, in this AWS account and AWS Region .
	//
	// Defaults to `default` alias. Hook types currently support default configuration alias.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hooktypeconfig.html#cfn-cloudformation-hooktypeconfig-configurationalias
	//
	// Default: - "default".
	//
	ConfigurationAlias *string `field:"optional" json:"configurationAlias" yaml:"configurationAlias"`
	// The Amazon Resource Number (ARN) for the hook to set `Configuration` for.
	//
	// You must specify either `TypeName` and `Configuration` or `TypeARN` and `Configuration` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hooktypeconfig.html#cfn-cloudformation-hooktypeconfig-typearn
	//
	TypeArn *string `field:"optional" json:"typeArn" yaml:"typeArn"`
	// The unique name for your hook.
	//
	// Specifies a three-part namespace for your hook, with a recommended pattern of `Organization::Service::Hook` .
	//
	// You must specify either `TypeName` and `Configuration` or `TypeARN` and `Configuration` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hooktypeconfig.html#cfn-cloudformation-hooktypeconfig-typename
	//
	TypeName *string `field:"optional" json:"typeName" yaml:"typeName"`
}

Properties for defining a `CfnHookTypeConfig`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnHookTypeConfigProps := &CfnHookTypeConfigProps{
	Configuration: jsii.String("configuration"),

	// the properties below are optional
	ConfigurationAlias: jsii.String("configurationAlias"),
	TypeArn: jsii.String("typeArn"),
	TypeName: jsii.String("typeName"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hooktypeconfig.html

type CfnHookVersion added in v2.13.0

type CfnHookVersion interface {
	CfnResource
	IInspectable
	// The Amazon Resource Name (ARN) of the hook.
	AttrArn() *string
	// Whether the specified hook version is set as the default version.
	AttrIsDefaultVersion() IResolvable
	// The Amazon Resource Number (ARN) assigned to this version of the hook.
	AttrTypeArn() *string
	// The ID of this version of the hook.
	AttrVersionId() *string
	// The scope at which the resource is visible and usable in CloudFormation operations.
	//
	// Valid values include:
	//
	// - `PRIVATE` : The resource is only visible and usable within the account in which it's registered. CloudFormation marks any resources you register as `PRIVATE` .
	// - `PUBLIC` : The resource is publicly visible and usable within any Amazon account.
	AttrVisibility() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The Amazon Resource Name (ARN) of the task execution role that grants the hook permission.
	ExecutionRoleArn() *string
	SetExecutionRoleArn(val *string)
	// Contains logging configuration information for an extension.
	LoggingConfig() interface{}
	SetLoggingConfig(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// A URL to the Amazon S3 bucket containing the hook project package that contains the necessary files for the hook you want to register.
	SchemaHandlerPackage() *string
	SetSchemaHandlerPackage(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// The unique name for your hook.
	TypeName() *string
	SetTypeName(val *string)
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint ResolutionTypeHint) Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target CfnResource, newTarget CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

The `HookVersion` resource publishes new or first hook version to the AWS CloudFormation registry.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnHookVersion := cdk.NewCfnHookVersion(this, jsii.String("MyCfnHookVersion"), &CfnHookVersionProps{
	SchemaHandlerPackage: jsii.String("schemaHandlerPackage"),
	TypeName: jsii.String("typeName"),

	// the properties below are optional
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	LoggingConfig: &LoggingConfigProperty{
		LogGroupName: jsii.String("logGroupName"),
		LogRoleArn: jsii.String("logRoleArn"),
	},
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html

func NewCfnHookVersion added in v2.13.0

func NewCfnHookVersion(scope constructs.Construct, id *string, props *CfnHookVersionProps) CfnHookVersion

type CfnHookVersionProps added in v2.13.0

type CfnHookVersionProps struct {
	// A URL to the Amazon S3 bucket containing the hook project package that contains the necessary files for the hook you want to register.
	//
	// For information on generating a schema handler package for the resource you want to register, see [submit](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html) in the *CloudFormation CLI User Guide for Extension Development* .
	//
	// > The user registering the resource must be able to access the package in the S3 bucket. That's, the user must have [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) permissions for the schema handler package. For more information, see [Actions, Resources, and Condition Keys for Amazon S3](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html) in the *AWS Identity and Access Management User Guide* .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-schemahandlerpackage
	//
	SchemaHandlerPackage *string `field:"required" json:"schemaHandlerPackage" yaml:"schemaHandlerPackage"`
	// The unique name for your hook.
	//
	// Specifies a three-part namespace for your hook, with a recommended pattern of `Organization::Service::Hook` .
	//
	// > The following organization namespaces are reserved and can't be used in your hook type names:
	// >
	// > - `Alexa`
	// > - `AMZN`
	// > - `Amazon`
	// > - `ASK`
	// > - `AWS`
	// > - `Custom`
	// > - `Dev`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-typename
	//
	TypeName *string `field:"required" json:"typeName" yaml:"typeName"`
	// The Amazon Resource Name (ARN) of the task execution role that grants the hook permission.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-executionrolearn
	//
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// Contains logging configuration information for an extension.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-loggingconfig
	//
	LoggingConfig interface{} `field:"optional" json:"loggingConfig" yaml:"loggingConfig"`
}

Properties for defining a `CfnHookVersion`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnHookVersionProps := &CfnHookVersionProps{
	SchemaHandlerPackage: jsii.String("schemaHandlerPackage"),
	TypeName: jsii.String("typeName"),

	// the properties below are optional
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	LoggingConfig: &LoggingConfigProperty{
		LogGroupName: jsii.String("logGroupName"),
		LogRoleArn: jsii.String("logRoleArn"),
	},
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html

type CfnHookVersion_LoggingConfigProperty added in v2.13.0

type CfnHookVersion_LoggingConfigProperty struct {
	// The Amazon CloudWatch Logs group to which CloudFormation sends error logging information when invoking the extension's handlers.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-hookversion-loggingconfig.html#cfn-cloudformation-hookversion-loggingconfig-loggroupname
	//
	LogGroupName *string `field:"optional" json:"logGroupName" yaml:"logGroupName"`
	// The Amazon Resource Name (ARN) of the role that CloudFormation should assume when sending log entries to CloudWatch Logs.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-hookversion-loggingconfig.html#cfn-cloudformation-hookversion-loggingconfig-logrolearn
	//
	LogRoleArn *string `field:"optional" json:"logRoleArn" yaml:"logRoleArn"`
}

The `LoggingConfig` property type specifies logging configuration information for an extension.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

loggingConfigProperty := &LoggingConfigProperty{
	LogGroupName: jsii.String("logGroupName"),
	LogRoleArn: jsii.String("logRoleArn"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-hookversion-loggingconfig.html

type CfnJson

type CfnJson interface {
	constructs.Construct
	IResolvable
	// 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.
	CreationStack() *[]*string
	// The tree node.
	Node() constructs.Node
	// An Fn::GetAtt to the JSON object passed through `value` and resolved during synthesis.
	//
	// Normally there is no need to use this property since `CfnJson` is an
	// IResolvable, so it can be simply used as a value.
	Value() Reference
	// Produce the Token's value at resolution time.
	Resolve(_context IResolveContext) interface{}
	// This is required in case someone JSON.stringifys an object which references this object. Otherwise, we'll get a cyclic JSON reference.
	ToJSON() *string
	// Returns a string representation of this construct.
	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.

Example:

tagParam := awscdk.NewCfnParameter(this, jsii.String("TagName"))

stringEquals := awscdk.NewCfnJson(this, jsii.String("ConditionJson"), &CfnJsonProps{
	Value: map[string]*bool{
		fmt.Sprintf("aws:PrincipalTag/%v", tagParam.valueAsString): jsii.Boolean(true),
	},
})

principal := iam.NewAccountRootPrincipal().WithConditions(map[string]interface{}{
	"StringEquals": stringEquals,
})

iam.NewRole(this, jsii.String("MyRole"), &RoleProps{
	AssumedBy: principal,
})

func NewCfnJson

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

type CfnJsonProps

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

Example:

tagParam := awscdk.NewCfnParameter(this, jsii.String("TagName"))

stringEquals := awscdk.NewCfnJson(this, jsii.String("ConditionJson"), &CfnJsonProps{
	Value: map[string]*bool{
		fmt.Sprintf("aws:PrincipalTag/%v", tagParam.valueAsString): jsii.Boolean(true),
	},
})

principal := iam.NewAccountRootPrincipal().WithConditions(map[string]interface{}{
	"StringEquals": stringEquals,
})

iam.NewRole(this, jsii.String("MyRole"), &RoleProps{
	AssumedBy: principal,
})

type CfnMacro

type CfnMacro interface {
	CfnResource
	IInspectable
	AttrId() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// A description of the macro.
	Description() *string
	SetDescription(val *string)
	// The Amazon Resource Name (ARN) of the underlying AWS Lambda function that you want AWS CloudFormation to invoke when the macro is run.
	FunctionName() *string
	SetFunctionName(val *string)
	// The CloudWatch Logs group to which AWS CloudFormation sends error logging information when invoking the macro's underlying AWS Lambda function.
	LogGroupName() *string
	SetLogGroupName(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The ARN of the role AWS CloudFormation should assume when sending log entries to CloudWatch Logs .
	LogRoleArn() *string
	SetLogRoleArn(val *string)
	// The name of the macro.
	Name() *string
	SetName(val *string)
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy RemovalPolicy, options *RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint ResolutionTypeHint) Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target CfnResource, newTarget CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

The `AWS::CloudFormation::Macro` resource is a CloudFormation resource type that creates a CloudFormation macro to perform custom processing on CloudFormation templates.

For more information, see [Using AWS CloudFormation macros to perform custom processing on templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnMacro := cdk.NewCfnMacro(this, jsii.String("MyCfnMacro"), &CfnMacroProps{
	FunctionName: jsii.String("functionName"),
	Name: jsii.String("name"),

	// the properties below are optional
	Description: jsii.String("description"),
	LogGroupName: jsii.String("logGroupName"),
	LogRoleArn: jsii.String("logRoleArn"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html

func NewCfnMacro

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

type CfnMacroProps

type CfnMacroProps struct {
	// The Amazon Resource Name (ARN) of the underlying AWS Lambda function that you want AWS CloudFormation to invoke when the macro is run.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-functionname
	//
	FunctionName *string `field:"required" json:"functionName" yaml:"functionName"`
	// The name of the macro.
	//
	// The name of the macro must be unique across all macros in the account.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-name
	//
	Name *string `field:"required" json:"name" yaml:"name"`
	// A description of the macro.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-description
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The CloudWatch Logs group to which AWS CloudFormation sends error logging information when invoking the macro's underlying AWS Lambda function.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-loggroupname
	//
	LogGroupName *string `field:"optional" json:"logGroupName" yaml:"logGroupName"`
	// The ARN of the role AWS CloudFormation should assume when sending log entries to CloudWatch Logs .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-logrolearn
	//
	LogRoleArn *string `field:"optional" json:"logRoleArn" yaml:"logRoleArn"`
}

Properties for defining a `CfnMacro`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnMacroProps := &CfnMacroProps{
	FunctionName: jsii.String("functionName"),
	Name: jsii.String("name"),

	// the properties below are optional
	Description: jsii.String("description"),
	LogGroupName: jsii.String("logGroupName"),
	LogRoleArn: jsii.String("logRoleArn"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html

type CfnMapping

type CfnMapping interface {
	CfnRefElement
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// Returns: A reference to a value in the map based on the two keys.
	// If mapping is lazy, the value from the map or default value is returned instead of the reference and the mapping is not rendered in the template.
	FindInMap(key1 *string, key2 *string, defaultValue *string) *string
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Sets a value in the map based on the two keys.
	SetValue(key1 *string, key2 *string, value interface{})
	// Returns a string representation of this construct.
	ToString() *string
}

Represents a CloudFormation mapping.

Example:

regionTable := awscdk.NewCfnMapping(this, jsii.String("RegionTable"), &CfnMappingProps{
	Mapping: map[string]map[string]interface{}{
		"us-east-1": map[string]interface{}{
			"regionName": jsii.String("US East (N. Virginia)"),
		},
		"us-east-2": map[string]interface{}{
			"regionName": jsii.String("US East (Ohio)"),
		},
	},
})

regionTable.FindInMap(awscdk.Aws_REGION(), jsii.String("regionName"))

func NewCfnMapping

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

type CfnMappingProps

type CfnMappingProps struct {
	Lazy *bool `field:"optional" json:"lazy" yaml:"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.
	// Default: - No mapping.
	//
	Mapping *map[string]*map[string]interface{} `field:"optional" json:"mapping" yaml:"mapping"`
}

Example:

regionTable := awscdk.NewCfnMapping(this, jsii.String("RegionTable"), &CfnMappingProps{
	Mapping: map[string]map[string]interface{}{
		"us-east-1": map[string]interface{}{
			"regionName": jsii.String("US East (N. Virginia)"),
		},
		"us-east-2": map[string]interface{}{
			"regionName": jsii.String("US East (Ohio)"),
		},
	},
})

regionTable.FindInMap(awscdk.Aws_REGION(), jsii.String("regionName"))

type CfnModuleDefaultVersion

type CfnModuleDefaultVersion interface {
	CfnResource
	IInspectable
	// The Amazon Resource Name (ARN) of the module version to set as the default version.
	Arn() *string
	SetArn(val *string)
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The name of the module.
	ModuleName() *string
	SetModuleName(val *string)
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directl