awscdk

package module
v2.151.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 298

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.

[!NOTE] As a consequence of this feature being built on a Custom Resource, we are restricted to a CloudFormation response body size limitation of 4096 bytes. To prevent deployment errors related to the Custom Resource Provider response body being too large, we recommend limiting the use of nested stacks and minimizing the length of stack names. Doing this will prevent SSM parameter names from becoming too long which will reduce the size of the response body.

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.splitArn() 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"),
	ArnFormat: awscdk.ArnFormat_COLON_RESOURCE_NAME,
	ResourceName: jsii.String("MyFunction"),
})

splitArn() can be used to get a single component from an ARN. splitArn() 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.SplitArn(arn, awscdk.ArnFormat_COLON_RESOURCE_NAME)
functionName := arnComponents.ResourceName

Note that the format of the resource separator depends on the service and may be any of the values supported by ArnFormat. When dealing with these functions, it is important 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.NewSingletonFunction(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). The CustomResourceProviderRuntime supports runtime nodejs12.x, nodejs14.x, nodejs16.x, nodejs18.x.

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

An optional default value can also be passed to findInMap. If either key is not found in the map and the mapping is lazy, findInMap will return the default value and not render the mapping. If the mapping is not lazy or either key is an unresolved token, the call to findInMap will return a token that resolves to { "Fn::FindInMap": [ "MapName", "TopLevelKey", "SecondLevelKey", { "DefaultValue": "DefaultValue" } ] }, and the mapping will be rendered. Note that the AWS::LanguageExtentions transform is added to enable the default value functionality.

For example, the following code will again not produce anything in the "Mappings" section. The call to findInMap will be able to resolve the value during synthesis and simply return 'Region not found'.

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-west-1"), jsii.String("regionName"), jsii.String("Region not found"))
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),
})

You can also set termination protection with the setter after you've instantiated the stack.

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

Template Indentation

The AWS CloudFormation templates generated by CDK include indentation by default. Indentation makes the templates more readable, but also increases their size, and CloudFormation templates cannot exceed 1MB.

It's possible to reduce the size of your templates by suppressing indentation.

To do this for all templates, set the context key @aws-cdk/core:suppressTemplateIndentation to true.

To do this for a specific stack, add a suppressTemplateIndentation: true property to the stack's StackProps parameter. You can also set this property to false to override the context key setting.

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"),
						},
					},
				},
			},
		},
	}
}

In addition to the name, plugins may optionally report their version (version property ) and a list of IDs of the rules they are going to evaluate (ruleIds property).

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.

Annotations

Construct authors can add annotations to constructs to report at three different levels: ERROR, WARN, INFO.

Typically warnings are added for things that are important for the user to be aware of, but will not cause deployment errors in all cases. Some common scenarios are (non-exhaustive list):

  • Warn when the user needs to take a manual action, e.g. IAM policy should be added to an referenced resource.
  • Warn if the user configuration might not follow best practices (but is still valid)
  • Warn if the user is using a deprecated API
Acknowledging Warnings

If you would like to run with --strict mode enabled (warnings will throw errors) it is possible to acknowledge warnings to make the warning go away.

For example, if > 10 IAM managed policies are added to an IAM Group, a warning will be created:

IAM:Group:MaxPoliciesExceeded: You added 11 to IAM Group my-group. The maximum number of managed policies attached to an IAM group is 10.

If you have requested a quota increase you may have the ability to add > 10 managed policies which means that this warning does not apply to you. You can acknowledge this by acknowledging the warning by the id.

awscdk.Annotations_Of(this).AcknowledgeWarning(jsii.String("IAM:Group:MaxPoliciesExceeded"), jsii.String("Account has quota increased to 20"))

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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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(x interface{}) *bool

Check whether the given object 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 CustomResourceProviderBase_IsConstruct ¶ added in v2.116.0

func CustomResourceProviderBase_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 NewCustomResourceProviderBase_Override ¶ added in v2.116.0

func NewCustomResourceProviderBase_Override(c CustomResourceProviderBase, scope constructs.Construct, id *string, props *CustomResourceProviderBaseProps)

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"
import s3 "github.com/aws/aws-cdk-go/awscdk"

var bucket iBucket

app := cdk.NewApp()
stack := cdk.NewStack(app, jsii.String("Stack"))

dynamodb.NewTable(stack, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	ImportSource: &ImportSourceSpecification{
		CompressionType: dynamodb.InputCompressionType_GZIP,
		InputFormat: dynamodb.InputFormat_Csv(&CsvOptions{
			Delimiter: jsii.String(","),
			HeaderList: []*string{
				jsii.String("id"),
				jsii.String("name"),
			},
		}),
		Bucket: *Bucket,
		KeyPrefix: jsii.String("prefix"),
	},
})

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:

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

app := awscdk.NewApp(&AppProps{
	DefaultStackSynthesizer: awscdkappstagingsynthesizeralpha.AppStagingSynthesizer_DefaultResources(&DefaultResourcesOptions{
		AppId: jsii.String("my-app-id"),
		StagingBucketEncryption: awscdk.BucketEncryption_S3_MANAGED,
		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', 'codepipeline').
	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.

Example:

var stack stack

// Builds "arn:<PARTITION>:lambda:<REGION>:<ACCOUNT>:function:MyFunction"
stack.FormatArn(&ArnComponents{
	Service: jsii.String("lambda"),
	Resource: jsii.String("function"),
	ArnFormat: awscdk.ArnFormat_COLON_RESOURCE_NAME,
	ResourceName: jsii.String("MyFunction"),
})
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
	// The service token, such as an Amazon SNS topic ARN or Lambda function ARN.
	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 {
	// The service token, such as an Amazon SNS topic ARN or Lambda function ARN.
	//
	// The service token must be from the same Region as 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)"),
		},
	},
	Lazy: jsii.Boolean(true),
})

regionTable.FindInMap(jsii.String("us-east-2"), 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 (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{}
	// The ID for the specific version of the module.
	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{})
}

Specifies the default version of a module.

The default version of the module will be used in CloudFormation operations for this account and Region.

To register a module version, use the `[`AWS::CloudFormation::ModuleVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-moduleversion.html)` resource.

For more information using modules, see [Using modules to encapsulate and reuse resource configurations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/modules.html) and [Registering extensions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html#registry-register) in the *AWS CloudFormation User Guide* . For information on developing modules, see [Developing modules](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/modules.html) in the *AWS CloudFormation CLI User Guide* .

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"

cfnModuleDefaultVersion := cdk.NewCfnModuleDefaultVersion(this, jsii.String("MyCfnModuleDefaultVersion"), &CfnModuleDefaultVersionProps{
	Arn: jsii.String("arn"),
	ModuleName: jsii.String("moduleName"),
	VersionId: jsii.String("versionId"),
})

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

func NewCfnModuleDefaultVersion ¶

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

type CfnModuleDefaultVersionProps ¶

type CfnModuleDefaultVersionProps struct {
	// The Amazon Resource Name (ARN) of the module version to set as the default version.
	//
	// Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-moduledefaultversion.html#cfn-cloudformation-moduledefaultversion-arn
	//
	Arn *string `field:"optional" json:"arn" yaml:"arn"`
	// The name of the module.
	//
	// Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-moduledefaultversion.html#cfn-cloudformation-moduledefaultversion-modulename
	//
	ModuleName *string `field:"optional" json:"moduleName" yaml:"moduleName"`
	// The ID for the specific version of the module.
	//
	// Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-moduledefaultversion.html#cfn-cloudformation-moduledefaultversion-versionid
	//
	VersionId *string `field:"optional" json:"versionId" yaml:"versionId"`
}

Properties for defining a `CfnModuleDefaultVersion`.

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"

cfnModuleDefaultVersionProps := &CfnModuleDefaultVersionProps{
	Arn: jsii.String("arn"),
	ModuleName: jsii.String("moduleName"),
	VersionId: jsii.String("versionId"),
}

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

type CfnModuleVersion ¶

type CfnModuleVersion interface {
	CfnResource
	IInspectable
	// The Amazon Resource Name (ARN) of the extension.
	AttrArn() *string
	// The description of the extension.
	AttrDescription() *string
	// The URL of a page providing detailed documentation for this module.
	AttrDocumentationUrl() *string
	// Whether the specified extension version is set as the default version.
	//
	// This applies only to private extensions you have registered in your account, and extensions published by AWS . For public third-party extensions, whether they are activated in your account, CloudFormation returns `null` .
	AttrIsDefaultVersion() IResolvable
	// The schema that defines the extension.
	//
	// For more information about extension schemas, see [Resource Provider Schema](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html) in the *CloudFormation CLI User Guide* .
	AttrSchema() *string
	// When the specified private extension version was registered or activated in your account.
	AttrTimeCreated() *string
	// The ID of this version of the module.
	AttrVersionId() *string
	// The scope at which the extension is visible and usable in CloudFormation operations.
	//
	// Valid values include:
	//
	// - `PRIVATE` : The extension is only visible and usable within the account in which it is registered. AWS CloudFormation marks any extensions you register as `PRIVATE` .
	// - `PUBLIC` : The extension is publicly visible and usable within any AWS 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 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 being registered.
	ModuleName() *string
	SetModuleName(val *string)
	// A URL to the S3 bucket containing the package that contains the template fragment and schema files for the module version to register.
	ModulePackage() *string
	SetModulePackage(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{})
}

Registers the specified version of the module with the CloudFormation service.

Registering a module makes it available for use in CloudFormation templates in your AWS account and Region.

To specify a module version as the default version, use the `[`AWS::CloudFormation::ModuleDefaultVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-moduledefaultversion.html)` resource.

For more information using modules, see [Using modules to encapsulate and reuse resource configurations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/modules.html) and [Registering extensions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html#registry-register) in the *CloudFormation User Guide* . For information on developing modules, see [Developing modules](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/modules.html) in the *CloudFormation CLI User Guide* .

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"

cfnModuleVersion := cdk.NewCfnModuleVersion(this, jsii.String("MyCfnModuleVersion"), &CfnModuleVersionProps{
	ModuleName: jsii.String("moduleName"),
	ModulePackage: jsii.String("modulePackage"),
})

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

func NewCfnModuleVersion ¶

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

type CfnModuleVersionProps ¶

type CfnModuleVersionProps struct {
	// The name of the module being registered.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-moduleversion.html#cfn-cloudformation-moduleversion-modulename
	//
	ModuleName *string `field:"required" json:"moduleName" yaml:"moduleName"`
	// A URL to the S3 bucket containing the package that contains the template fragment and schema files for the module version to register.
	//
	// > The user registering the module version must be able to access the module package in the S3 bucket. That's, the user needs to have [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) permissions for the 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-moduleversion.html#cfn-cloudformation-moduleversion-modulepackage
	//
	ModulePackage *string `field:"required" json:"modulePackage" yaml:"modulePackage"`
}

Properties for defining a `CfnModuleVersion`.

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"

cfnModuleVersionProps := &CfnModuleVersionProps{
	ModuleName: jsii.String("moduleName"),
	ModulePackage: jsii.String("modulePackage"),
}

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

type CfnOutput ¶

type CfnOutput interface {
	CfnElement
	// A condition to associate with this output value.
	//
	// If the condition evaluates
	// to `false`, this output value will not be included in the stack.
	// Default: - No condition is associated with the output.
	//
	Condition() CfnCondition
	SetCondition(val CfnCondition)
	// 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 String type that describes the output value.
	//
	// The description can be a maximum of 4 K in length.
	// Default: - No description.
	//
	Description() *string
	SetDescription(val *string)
	// The name used to export the value of this output across stacks.
	//
	// To use the value in another stack, pass the value of
	// `output.importValue` to it.
	// Default: - the output is not exported.
	//
	ExportName() *string
	SetExportName(val *string)
	// Return the `Fn.importValue` expression to import this value into another stack.
	//
	// The returned value should not be used in the same stack, but in a
	// different one. It must be deployed to the same environment, as
	// CloudFormation exports can only be imported in the same Region and
	// account.
	//
	// The is no automatic registration of dependencies between stacks when using
	// this mechanism, so you should make sure to deploy them in the right order
	// yourself.
	//
	// You can use this mechanism to share values across Stacks in different
	// Stages. If you intend to share the value to another Stack inside the same
	// Stage, the automatic cross-stack referencing mechanism is more convenient.
	ImportValue() *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 value of the property returned by the aws cloudformation describe-stacks command.
	//
	// The value of an output can include literals, parameter references, pseudo-parameters,
	// a mapping value, or intrinsic functions.
	Value() interface{}
	SetValue(val interface{})
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Returns a string representation of this construct.
	ToString() *string
}

Example:

var cluster cluster

// add service account
serviceAccount := cluster.addServiceAccount(jsii.String("MyServiceAccount"))

bucket := s3.NewBucket(this, jsii.String("Bucket"))
bucket.GrantReadWrite(serviceAccount)

mypod := cluster.addManifest(jsii.String("mypod"), map[string]interface{}{
	"apiVersion": jsii.String("v1"),
	"kind": jsii.String("Pod"),
	"metadata": map[string]*string{
		"name": jsii.String("mypod"),
	},
	"spec": map[string]interface{}{
		"serviceAccountName": serviceAccount.serviceAccountName,
		"containers": []map[string]interface{}{
			map[string]interface{}{
				"name": jsii.String("hello"),
				"image": jsii.String("paulbouwer/hello-kubernetes:1.5"),
				"ports": []map[string]*f64{
					map[string]*f64{
						"containerPort": jsii.Number(8080),
					},
				},
			},
		},
	},
})

// create the resource after the service account.
mypod.Node.AddDependency(serviceAccount)

// print the IAM role arn for this service account
// print the IAM role arn for this service account
awscdk.NewCfnOutput(this, jsii.String("ServiceAccountIamRole"), &CfnOutputProps{
	Value: serviceAccount.Role.RoleArn,
})

func NewCfnOutput ¶

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

Creates an CfnOutput value for this stack.

type CfnOutputProps ¶

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

Example:

var cluster cluster

// add service account
serviceAccount := cluster.addServiceAccount(jsii.String("MyServiceAccount"))

bucket := s3.NewBucket(this, jsii.String("Bucket"))
bucket.GrantReadWrite(serviceAccount)

mypod := cluster.addManifest(jsii.String("mypod"), map[string]interface{}{
	"apiVersion": jsii.String("v1"),
	"kind": jsii.String("Pod"),
	"metadata": map[string]*string{
		"name": jsii.String("mypod"),
	},
	"spec": map[string]interface{}{
		"serviceAccountName": serviceAccount.serviceAccountName,
		"containers": []map[string]interface{}{
			map[string]interface{}{
				"name": jsii.String("hello"),
				"image": jsii.String("paulbouwer/hello-kubernetes:1.5"),
				"ports": []map[string]*f64{
					map[string]*f64{
						"containerPort": jsii.Number(8080),
					},
				},
			},
		},
	},
})

// create the resource after the service account.
mypod.Node.AddDependency(serviceAccount)

// print the IAM role arn for this service account
// print the IAM role arn for this service account
awscdk.NewCfnOutput(this, jsii.String("ServiceAccountIamRole"), &CfnOutputProps{
	Value: serviceAccount.Role.RoleArn,
})

type CfnParameter ¶

type CfnParameter interface {
	CfnElement
	// A regular expression that represents the patterns to allow for String types.
	// Default: - No constraints on patterns allowed for parameter.
	//
	AllowedPattern() *string
	SetAllowedPattern(val *string)
	// An array containing the list of values allowed for the parameter.
	// Default: - No constraints on values allowed for parameter.
	//
	AllowedValues() *[]*string
	SetAllowedValues(val *[]*string)
	// A string that explains a constraint when the constraint is violated.
	//
	// For example, without a constraint description, a parameter that has an allowed
	// pattern of [A-Za-z0-9]+ displays the following error message when the user specifies
	// an invalid value:.
	// Default: - No description with customized error message when user specifies invalid values.
	//
	ConstraintDescription() *string
	SetConstraintDescription(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
	// A value of the appropriate type for the template to use if no value is specified when a stack is created.
	//
	// If you define constraints for the parameter, you must specify
	// a value that adheres to those constraints.
	// Default: - No default value for parameter.
	//
	Default() interface{}
	SetDefault(val interface{})
	// A string of up to 4000 characters that describes the parameter.
	// Default: - No description for the parameter.
	//
	Description() *string
	SetDescription(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
	// An integer value that determines the largest number of characters you want to allow for String types.
	// Default: - None.
	//
	MaxLength() *float64
	SetMaxLength(val *float64)
	// A numeric value that determines the largest numeric value you want to allow for Number types.
	// Default: - None.
	//
	MaxValue() *float64
	SetMaxValue(val *float64)
	// An integer value that determines the smallest number of characters you want to allow for String types.
	// Default: - None.
	//
	MinLength() *float64
	SetMinLength(val *float64)
	// A numeric value that determines the smallest numeric value you want to allow for Number types.
	// Default: - None.
	//
	MinValue() *float64
	SetMinValue(val *float64)
	// The tree node.
	Node() constructs.Node
	// Indicates if this parameter is configured with "NoEcho" enabled.
	NoEcho() *bool
	SetNoEcho(val *bool)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() Stack
	// The data type for the parameter (DataType).
	// Default: String.
	//
	Type() *string
	SetType(val *string)
	// The parameter value as a Token.
	Value() IResolvable
	// The parameter value, if it represents a string list.
	ValueAsList() *[]*string
	// The parameter value, if it represents a number.
	ValueAsNumber() *float64
	// The parameter value, if it represents a string.
	ValueAsString() *string
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	Resolve(_context IResolveContext) interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

A CloudFormation parameter.

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

Example:

myTopic := sns.NewTopic(this, jsii.String("MyTopic"))
url := awscdk.NewCfnParameter(this, jsii.String("url-param"))

myTopic.AddSubscription(subscriptions.NewUrlSubscription(url.valueAsString))

func NewCfnParameter ¶

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

Creates a parameter construct.

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

type CfnParameterProps ¶

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

Example:

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

type CfnPublicTypeVersion ¶

type CfnPublicTypeVersion interface {
	CfnResource
	IInspectable
	// The Amazon Resource Number (ARN) of the extension.
	Arn() *string
	SetArn(val *string)
	// The Amazon Resource Number (ARN) assigned to the public extension upon publication.
	AttrPublicTypeArn() *string
	// The publisher ID of the extension publisher.
	//
	// This applies only to public third-party extensions. For private registered extensions, and extensions provided by AWS , CloudFormation returns `null` .
	AttrPublisherId() *string
	// The Amazon Resource Number (ARN) assigned to this version of the extension.
	AttrTypeVersionArn() *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 S3 bucket to which CloudFormation delivers the contract test execution logs.
	LogDeliveryBucket() *string
	SetLogDeliveryBucket(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 tree node.
	Node() constructs.Node
	// The version number to assign to this version of the extension.
	PublicVersionNumber() *string
	SetPublicVersionNumber(val *string)
	// 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 type of the extension to test.
	Type() *string
	SetType(val *string)
	// The name of the extension to test.
	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{})
}

Tests and publishes a registered extension as a public, third-party extension.

CloudFormation first tests the extension to make sure it meets all necessary requirements for being published in the CloudFormation registry. If it does, CloudFormation then publishes it to the registry as a public third-party extension in this Region. Public extensions are available for use by all CloudFormation users.

- For resource types, testing includes passing all contracts tests defined for the type. - For modules, testing includes determining if the module's model meets all necessary requirements.

For more information, see [Testing your public extension prior to publishing](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html#publish-extension-testing) in the *CloudFormation CLI User Guide* .

If you don't specify a version, CloudFormation uses the default version of the extension in your account and Region for testing.

To perform testing, CloudFormation assumes the execution role specified when the type was registered.

An extension must have a test status of `PASSED` before it can be published. For more information, see [Publishing extensions to make them available for public use](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-publish.html) in the *CloudFormation CLI User Guide* .

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"

cfnPublicTypeVersion := cdk.NewCfnPublicTypeVersion(this, jsii.String("MyCfnPublicTypeVersion"), &CfnPublicTypeVersionProps{
	Arn: jsii.String("arn"),
	LogDeliveryBucket: jsii.String("logDeliveryBucket"),
	PublicVersionNumber: jsii.String("publicVersionNumber"),
	Type: jsii.String("type"),
	TypeName: jsii.String("typeName"),
})

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

func NewCfnPublicTypeVersion ¶

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

type CfnPublicTypeVersionProps ¶

type CfnPublicTypeVersionProps struct {
	// The Amazon Resource Number (ARN) of the extension.
	//
	// Conditional: You must specify `Arn` , or `TypeName` and `Type` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-publictypeversion.html#cfn-cloudformation-publictypeversion-arn
	//
	Arn *string `field:"optional" json:"arn" yaml:"arn"`
	// The S3 bucket to which CloudFormation delivers the contract test execution logs.
	//
	// CloudFormation delivers the logs by the time contract testing has completed and the extension has been assigned a test type status of `PASSED` or `FAILED` .
	//
	// The user initiating the stack operation must be able to access items in the specified S3 bucket. Specifically, the user needs the following permissions:
	//
	// - GetObject
	// - PutObject
	//
	// For more information, see [Actions, Resources, and Condition Keys for Amazon S3](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html) in the *AWS Identity and Access Management User Guide* .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-publictypeversion.html#cfn-cloudformation-publictypeversion-logdeliverybucket
	//
	LogDeliveryBucket *string `field:"optional" json:"logDeliveryBucket" yaml:"logDeliveryBucket"`
	// The version number to assign to this version of the extension.
	//
	// Use the following format, and adhere to semantic versioning when assigning a version number to your extension:
	//
	// `MAJOR.MINOR.PATCH`
	//
	// For more information, see [Semantic Versioning 2.0.0](https://docs.aws.amazon.com/https://semver.org/) .
	//
	// If you don't specify a version number, CloudFormation increments the version number by one minor version release.
	//
	// You cannot specify a version number the first time you publish a type. AWS CloudFormation automatically sets the first version number to be `1.0.0` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-publictypeversion.html#cfn-cloudformation-publictypeversion-publicversionnumber
	//
	PublicVersionNumber *string `field:"optional" json:"publicVersionNumber" yaml:"publicVersionNumber"`
	// The type of the extension to test.
	//
	// Conditional: You must specify `Arn` , or `TypeName` and `Type` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-publictypeversion.html#cfn-cloudformation-publictypeversion-type
	//
	Type *string `field:"optional" json:"type" yaml:"type"`
	// The name of the extension to test.
	//
	// Conditional: You must specify `Arn` , or `TypeName` and `Type` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-publictypeversion.html#cfn-cloudformation-publictypeversion-typename
	//
	TypeName *string `field:"optional" json:"typeName" yaml:"typeName"`
}

Properties for defining a `CfnPublicTypeVersion`.

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"

cfnPublicTypeVersionProps := &CfnPublicTypeVersionProps{
	Arn: jsii.String("arn"),
	LogDeliveryBucket: jsii.String("logDeliveryBucket"),
	PublicVersionNumber: jsii.String("publicVersionNumber"),
	Type: jsii.String("type"),
	TypeName: jsii.String("typeName"),
}

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

type CfnPublisher ¶

type CfnPublisher interface {
	CfnResource
	IInspectable
	// Whether you accept the [Terms and Conditions](https://docs.aws.amazon.com/https://cloudformation-registry-documents.s3.amazonaws.com/Terms_and_Conditions_for_AWS_CloudFormation_Registry_Publishers.pdf) for publishing extensions in the CloudFormation registry. You must accept the terms and conditions in order to register to publish public extensions to the CloudFormation registry.
	AcceptTermsAndConditions() interface{}
	SetAcceptTermsAndConditions(val interface{})
	// The type of account used as the identity provider when registering this publisher with CloudFormation.
	AttrIdentityProvider() *string
	// The ID of the extension publisher.
	AttrPublisherId() *string
	// The URL to the publisher's profile with the identity provider.
	AttrPublisherProfile() *string
	// Whether the publisher is verified.
	//
	// Currently, all registered publishers are verified.
	AttrPublisherStatus() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// If you are using a Bitbucket or GitHub account for identity verification, the Amazon Resource Name (ARN) for your connection to that account.
	ConnectionArn() *string
	SetConnectionArn(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
	// 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{})
}

Registers your account as a publisher of public extensions in the CloudFormation registry.

Public extensions are available for use by all CloudFormation users.

For information on requirements for registering as a public extension publisher, see [Registering your account to publish CloudFormation extensions](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html#publish-extension-prereqs) in the *CloudFormation CLI User Guide* .

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"

cfnPublisher := cdk.NewCfnPublisher(this, jsii.String("MyCfnPublisher"), &CfnPublisherProps{
	AcceptTermsAndConditions: jsii.Boolean(false),

	// the properties below are optional
	ConnectionArn: jsii.String("connectionArn"),
})

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

func NewCfnPublisher ¶

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

type CfnPublisherProps ¶

type CfnPublisherProps struct {
	// Whether you accept the [Terms and Conditions](https://docs.aws.amazon.com/https://cloudformation-registry-documents.s3.amazonaws.com/Terms_and_Conditions_for_AWS_CloudFormation_Registry_Publishers.pdf) for publishing extensions in the CloudFormation registry. You must accept the terms and conditions in order to register to publish public extensions to the CloudFormation registry.
	//
	// The default is `false` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-publisher.html#cfn-cloudformation-publisher-accepttermsandconditions
	//
	AcceptTermsAndConditions interface{} `field:"required" json:"acceptTermsAndConditions" yaml:"acceptTermsAndConditions"`
	// If you are using a Bitbucket or GitHub account for identity verification, the Amazon Resource Name (ARN) for your connection to that account.
	//
	// For more information, see [Registering your account to publish CloudFormation extensions](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html#publish-extension-prereqs) in the *CloudFormation CLI User Guide* .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-publisher.html#cfn-cloudformation-publisher-connectionarn
	//
	ConnectionArn *string `field:"optional" json:"connectionArn" yaml:"connectionArn"`
}

Properties for defining a `CfnPublisher`.

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"

cfnPublisherProps := &CfnPublisherProps{
	AcceptTermsAndConditions: jsii.Boolean(false),

	// the properties below are optional
	ConnectionArn: jsii.String("connectionArn"),
}

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

type CfnRefElement ¶

type CfnRefElement 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
	// 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
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Returns a string representation of this construct.
	ToString() *string
}

Base class for referencable CloudFormation constructs which are not Resources.

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

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

type CfnResource ¶

type CfnResource interface {
	CfnRefElement
	// 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
	// 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{}
	// 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{})
}

Represents a CloudFormation resource.

Example:

type myConstruct struct {
	resource
	tags
}

func newMyConstruct(scope construct, id *string) *myConstruct {
	this := &myConstruct{}
	newResource_Override(this, scope, id)

	awscdk.NewCfnResource(this, jsii.String("Resource"), &cfnResourceProps{
		Type: jsii.String("Whatever::The::Type"),
		Properties: map[string]interface{}{
			// ...
			"Tags": this.tags.renderedTags,
		},
	})
	return this
}

func NewCfnResource ¶

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

Creates a resource construct.

type CfnResourceAutoScalingCreationPolicy ¶

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

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

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"

cfnResourceAutoScalingCreationPolicy := &CfnResourceAutoScalingCreationPolicy{
	MinSuccessfulInstancesPercent: jsii.Number(123),
}

type CfnResourceDefaultVersion ¶

type CfnResourceDefaultVersion interface {
	CfnResource
	IInspectable
	// The Amazon Resource Name (ARN) of the resource.
	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 resource.
	TypeName() *string
	SetTypeName(val *string)
	// The Amazon Resource Name (ARN) of the resource version.
	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 ID of a specific version of the resource.
	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{})
}

Specifies the default version of a resource.

The default version of a resource will be used in CloudFormation operations.

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"

cfnResourceDefaultVersion := cdk.NewCfnResourceDefaultVersion(this, jsii.String("MyCfnResourceDefaultVersion"), &CfnResourceDefaultVersionProps{
	TypeName: jsii.String("typeName"),
	TypeVersionArn: jsii.String("typeVersionArn"),
	VersionId: jsii.String("versionId"),
})

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

func NewCfnResourceDefaultVersion ¶

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

type CfnResourceDefaultVersionProps ¶

type CfnResourceDefaultVersionProps struct {
	// The name of the resource.
	//
	// Conditional: You must specify either `TypeVersionArn` , or `TypeName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourcedefaultversion.html#cfn-cloudformation-resourcedefaultversion-typename
	//
	TypeName *string `field:"optional" json:"typeName" yaml:"typeName"`
	// The Amazon Resource Name (ARN) of the resource version.
	//
	// Conditional: You must specify either `TypeVersionArn` , or `TypeName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourcedefaultversion.html#cfn-cloudformation-resourcedefaultversion-typeversionarn
	//
	TypeVersionArn *string `field:"optional" json:"typeVersionArn" yaml:"typeVersionArn"`
	// The ID of a specific version of the resource.
	//
	// The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the resource version when it's registered.
	//
	// Conditional: You must specify either `TypeVersionArn` , or `TypeName` and `VersionId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourcedefaultversion.html#cfn-cloudformation-resourcedefaultversion-versionid
	//
	VersionId *string `field:"optional" json:"versionId" yaml:"versionId"`
}

Properties for defining a `CfnResourceDefaultVersion`.

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"

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

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

type CfnResourceProps ¶

type CfnResourceProps struct {
	// CloudFormation resource type (e.g. `AWS::S3::Bucket`).
	Type *string `field:"required" json:"type" yaml:"type"`
	// Resource properties.
	// Default: - No resource properties.
	//
	Properties *map[string]interface{} `field:"optional" json:"properties" yaml:"properties"`
}

Example:

type myConstruct struct {
	resource
	tags
}

func newMyConstruct(scope construct, id *string) *myConstruct {
	this := &myConstruct{}
	newResource_Override(this, scope, id)

	awscdk.NewCfnResource(this, jsii.String("Resource"), &cfnResourceProps{
		Type: jsii.String("Whatever::The::Type"),
		Properties: map[string]interface{}{
			// ...
			"Tags": this.tags.renderedTags,
		},
	})
	return this
}

type CfnResourceSignal ¶

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

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

Example:

var resource cfnResource

resource.CfnOptions.CreationPolicy = &CfnCreationPolicy{
	ResourceSignal: &CfnResourceSignal{
		Count: jsii.Number(3),
		Timeout: jsii.String("PR15M"),
	},
}

type CfnResourceVersion ¶

type CfnResourceVersion interface {
	CfnResource
	IInspectable
	// The Amazon Resource Name (ARN) of the extension.
	AttrArn() *string
	// Whether the specified extension version is set as the default version.
	//
	// This applies only to private extensions you have registered in your account, and extensions published by AWS . For public third-party extensions, whether they are activated in your account, CloudFormation returns `null` .
	AttrIsDefaultVersion() IResolvable
	// For resource type extensions, the provisioning behavior of the resource type.
	//
	// AWS CloudFormation determines the provisioning type during registration, based on the types of handlers in the schema handler package submitted.
	//
	// Valid values include:
	//
	// - `FULLY_MUTABLE` : The resource type includes an update handler to process updates to the type during stack update operations.
	// - `IMMUTABLE` : The resource type doesn't include an update handler, so the type can't be updated and must instead be replaced during stack update operations.
	// - `NON_PROVISIONABLE` : The resource type doesn't include all the following handlers, and therefore can't actually be provisioned.
	//
	// - create
	// - read
	// - delete.
	AttrProvisioningType() *string
	// The Amazon Resource Name (ARN) of the extension.
	AttrTypeArn() *string
	// The ID of a specific version of the extension.
	//
	// The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.
	//
	// If you specify a `VersionId` , `DescribeType` returns information about that specific extension version. Otherwise, it returns information about the default extension version.
	AttrVersionId() *string
	// The scope at which the extension is visible and usable in CloudFormation operations.
	//
	// Valid values include:
	//
	// - `PRIVATE` : The extension is only visible and usable within the account in which it is registered. AWS CloudFormation marks any extensions you register as `PRIVATE` .
	// - `PUBLIC` : The extension is publicly visible and usable within any AWS 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 IAM role for CloudFormation to assume when invoking the resource.
	ExecutionRoleArn() *string
	SetExecutionRoleArn(val *string)
	// Logging configuration information for a resource.
	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 S3 bucket containing the resource project package that contains the necessary files for the resource 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 name of the resource being registered.
	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{})
}

Registers a resource version with the CloudFormation service.

Registering a resource version makes it available for use in CloudFormation templates in your AWS account , and includes:

- Validating the resource schema. - Determining which handlers, if any, have been specified for the resource. - Making the resource available for use in your account.

For more information on how to develop resources and ready them for registration, see [Creating Resource Providers](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-types.html) in the *CloudFormation CLI User Guide* .

You can have a maximum of 50 resource versions registered at a time. This maximum is per account and per 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"

cfnResourceVersion := cdk.NewCfnResourceVersion(this, jsii.String("MyCfnResourceVersion"), &CfnResourceVersionProps{
	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-resourceversion.html

func NewCfnResourceVersion ¶

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

type CfnResourceVersionProps ¶

type CfnResourceVersionProps struct {
	// A URL to the S3 bucket containing the resource project package that contains the necessary files for the resource 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* .
	//
	// > The user registering the resource must be able to access the package in the S3 bucket. That is, the user needs to 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-resourceversion.html#cfn-cloudformation-resourceversion-schemahandlerpackage
	//
	SchemaHandlerPackage *string `field:"required" json:"schemaHandlerPackage" yaml:"schemaHandlerPackage"`
	// The name of the resource being registered.
	//
	// We recommend that resource names adhere to the following pattern: *company_or_organization* :: *service* :: *type* .
	//
	// > The following organization namespaces are reserved and can't be used in your resource names:
	// >
	// > - `Alexa`
	// > - `AMZN`
	// > - `Amazon`
	// > - `AWS`
	// > - `Custom`
	// > - `Dev`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html#cfn-cloudformation-resourceversion-typename
	//
	TypeName *string `field:"required" json:"typeName" yaml:"typeName"`
	// The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the resource.
	//
	// If your resource calls AWS APIs in any of its handlers, you must create an *[IAM execution role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)* that includes the necessary permissions to call those AWS APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html#cfn-cloudformation-resourceversion-executionrolearn
	//
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// Logging configuration information for a resource.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html#cfn-cloudformation-resourceversion-loggingconfig
	//
	LoggingConfig interface{} `field:"optional" json:"loggingConfig" yaml:"loggingConfig"`
}

Properties for defining a `CfnResourceVersion`.

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"

cfnResourceVersionProps := &CfnResourceVersionProps{
	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-resourceversion.html

type CfnResourceVersion_LoggingConfigProperty ¶

type CfnResourceVersion_LoggingConfigProperty struct {
	// The Amazon CloudWatch logs group to which CloudFormation sends error logging information when invoking the type's handlers.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-resourceversion-loggingconfig.html#cfn-cloudformation-resourceversion-loggingconfig-loggroupname
	//
	LogGroupName *string `field:"optional" json:"logGroupName" yaml:"logGroupName"`
	// The 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-resourceversion-loggingconfig.html#cfn-cloudformation-resourceversion-loggingconfig-logrolearn
	//
	LogRoleArn *string `field:"optional" json:"logRoleArn" yaml:"logRoleArn"`
}

Logging configuration information for a resource.

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-resourceversion-loggingconfig.html

type CfnRule ¶

type CfnRule 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
	// Adds an assertion to the rule.
	AddAssertion(condition ICfnConditionExpression, description *string)
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Returns a string representation of this construct.
	ToString() *string
}

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

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

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

Example:

var cfnTemplate cfnInclude

// mutating the rule
var myParameter cfnParameter

rule := cfnTemplate.GetRule(jsii.String("MyRule"))
rule.AddAssertion(core.Fn_ConditionContains([]*string{
	jsii.String("m1.small"),
}, myParameter.valueAsString), jsii.String("MyParameter has to be m1.small"))

func NewCfnRule ¶

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

Creates and adds a rule.

type CfnRuleAssertion ¶

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

A rule assertion.

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 cfnConditionExpression iCfnConditionExpression

cfnRuleAssertion := &CfnRuleAssertion{
	Assert: cfnConditionExpression,
	AssertDescription: jsii.String("assertDescription"),
}

type CfnRuleProps ¶

type CfnRuleProps struct {
	// Assertions which define the rule.
	// Default: - No assertions for the rule.
	//
	Assertions *[]*CfnRuleAssertion `field:"optional" json:"assertions" yaml:"assertions"`
	// If the rule condition evaluates to false, the rule doesn't take effect.
	//
	// If the function in the rule condition evaluates to true, expressions in each assert are evaluated and applied.
	// Default: - Rule's assertions will always take effect.
	//
	RuleCondition ICfnConditionExpression `field:"optional" json:"ruleCondition" yaml:"ruleCondition"`
}

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

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

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

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

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

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 cfnConditionExpression iCfnConditionExpression

cfnRuleProps := &CfnRuleProps{
	Assertions: []cfnRuleAssertion{
		&cfnRuleAssertion{
			Assert: cfnConditionExpression,
			AssertDescription: jsii.String("assertDescription"),
		},
	},
	RuleCondition: cfnConditionExpression,
}

type CfnStack ¶

type CfnStack interface {
	CfnResource
	IInspectable
	ITaggable
	// Returns the unique ID of the change set.
	AttrChangeSetId() *string
	// Returns The time at which the stack was created.
	AttrCreationTime() *string
	// Returns the time the stack was last updated.
	//
	// This will only be returned if the stack has been updated at least once.
	AttrLastUpdateTime() *string
	// Returns a list of output structures.
	AttrOutputs() IResolvable
	// For nested stacks--stacks created as resources for another stack--returns the stack ID of the direct parent of this stack.
	//
	// For the first level of nested stacks, the root stack is also the parent stack.
	//
	// For more information, see [Working with Nested Stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) in the *AWS CloudFormation User Guide* .
	AttrParentId() *string
	// For nested stacks--stacks created as resources for another stack--returns the stack ID of the top-level stack to which the nested stack ultimately belongs.
	//
	// For more information, see [Working with Nested Stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) in the *AWS CloudFormation User Guide* .
	AttrRootId() *string
	// Returns the unique identifier of the stack.
	AttrStackId() *string
	// Returns a success or failure message associated with the stack status.
	AttrStackStatus() *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
	// The Amazon Simple Notification Service (Amazon SNS) topic ARNs to publish stack related events.
	NotificationArns() *[]*string
	SetNotificationArns(val *[]*string)
	// The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.
	Parameters() interface{}
	SetParameters(val interface{})
	// 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
	// Tag Manager which manages the tags for this resource.
	Tags() TagManager
	// Key-value pairs to associate with this stack.
	TagsRaw() *[]*CfnTag
	SetTagsRaw(val *[]*CfnTag)
	// Location of file containing the template body.
	TemplateUrl() *string
	SetTemplateUrl(val *string)
	// The length of time, in minutes, that CloudFormation waits for the nested stack to reach the `CREATE_COMPLETE` state.
	TimeoutInMinutes() *float64
	SetTimeoutInMinutes(val *float64)
	// 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::Stack` resource nests a stack as a resource in a top-level template.

You can add output values from a nested stack within the containing template. You use the [GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html) function with the nested stack's logical name and the name of the output value in the nested stack in the format `Outputs. *NestedStackOutputName*` .

> We strongly recommend that updates to nested stacks are run from the parent stack.

When you apply template changes to update a top-level stack, CloudFormation updates the top-level stack and initiates an update to its nested stacks. CloudFormation updates the resources of modified nested stacks, but doesn't update the resources of unmodified nested stacks. For more information, see [CloudFormation stack updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html) .

> You must acknowledge IAM capabilities for nested stacks that contain IAM resources. Also, verify that you have cancel update stack permissions, which is required if an update rolls back. For more information about IAM and CloudFormation , see [Controlling access with AWS Identity and Access Management](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html) . > A subset of `AWS::CloudFormation::Stack` resource type properties listed below are available to customers using AWS CloudFormation , AWS CDK , and AWS Cloud Control API to configure. > > - `NotificationARNs` > - `Parameters` > - `Tags` > - `TemplateURL` > - `TimeoutInMinutes` > > These properties can be configured only when using AWS Cloud Control API . This is because the below properties are set by the parent stack, and thus cannot be configured using AWS CloudFormation or AWS CDK but only AWS Cloud Control API . > > - `Capabilities` > - `Description` > - `DisableRollback` > - `EnableTerminationProtection` > - `RoleARN` > - `StackName` > - `StackPolicyBody` > - `StackPolicyURL` > - `StackStatusReason` > - `TemplateBody` > > Customers that configure `AWS::CloudFormation::Stack` using AWS CloudFormation and AWS CDK can do so for nesting a CloudFormation stack as a resource in their top-level template. > > These read-only properties can be accessed only when using AWS Cloud Control API . > > - `ChangeSetId` > - `CreationTime` > - `LastUpdateTime` > - `Outputs` > - `ParentId` > - `RootId` > - `StackId` > - `StackStatus`.

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"

cfnStack := cdk.NewCfnStack(this, jsii.String("MyCfnStack"), &CfnStackProps{
	NotificationArns: []*string{
		jsii.String("notificationArns"),
	},
	Parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	Tags: []cfnTag{
		&cfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TemplateUrl: jsii.String("templateUrl"),
	TimeoutInMinutes: jsii.Number(123),
})

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

func NewCfnStack ¶

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

type CfnStackProps ¶

type CfnStackProps struct {
	// The Amazon Simple Notification Service (Amazon SNS) topic ARNs to publish stack related events.
	//
	// You can find your Amazon SNS topic ARNs using the Amazon SNS console or your Command Line Interface (CLI).
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html#cfn-cloudformation-stack-notificationarns
	//
	NotificationArns *[]*string `field:"optional" json:"notificationArns" yaml:"notificationArns"`
	// The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.
	//
	// Each parameter has a name corresponding to a parameter defined in the embedded template and a value representing the value that you want to set for the parameter.
	//
	// > If you use the `Ref` function to pass a parameter value to a nested stack, comma-delimited list parameters must be of type `String` . In other words, you can't pass values that are of type `CommaDelimitedList` to nested stacks.
	//
	// Conditional. Required if the nested stack requires input parameters.
	//
	// Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html#cfn-cloudformation-stack-parameters
	//
	Parameters interface{} `field:"optional" json:"parameters" yaml:"parameters"`
	// Key-value pairs to associate with this stack.
	//
	// AWS CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 50 tags can be specified.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html#cfn-cloudformation-stack-tags
	//
	Tags *[]*CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// Location of file containing the template body.
	//
	// The URL must point to a template (max size: 460,800 bytes) that's located in an Amazon S3 bucket. For more information, see [Template anatomy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) .
	//
	// Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html#cfn-cloudformation-stack-templateurl
	//
	TemplateUrl *string `field:"optional" json:"templateUrl" yaml:"templateUrl"`
	// The length of time, in minutes, that CloudFormation waits for the nested stack to reach the `CREATE_COMPLETE` state.
	//
	// The default is no timeout. When CloudFormation detects that the nested stack has reached the `CREATE_COMPLETE` state, it marks the nested stack resource as `CREATE_COMPLETE` in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reaches `CREATE_COMPLETE` , CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.
	//
	// Updates aren't supported.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html#cfn-cloudformation-stack-timeoutinminutes
	//
	TimeoutInMinutes *float64 `field:"optional" json:"timeoutInMinutes" yaml:"timeoutInMinutes"`
}

Properties for defining a `CfnStack`.

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"

cfnStackProps := &CfnStackProps{
	NotificationArns: []*string{
		jsii.String("notificationArns"),
	},
	Parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	Tags: []cfnTag{
		&cfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TemplateUrl: jsii.String("templateUrl"),
	TimeoutInMinutes: jsii.Number(123),
}

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

type CfnStackSet ¶

type CfnStackSet interface {
	CfnResource
	IInspectable
	ITaggable
	// The Amazon Resource Number (ARN) of the IAM role to use to create this stack set.
	AdministrationRoleArn() *string
	SetAdministrationRoleArn(val *string)
	// The ID of the stack that you're creating.
	AttrStackSetId() *string
	// [ `Service-managed` permissions] Describes whether StackSets automatically deploys to AWS Organizations accounts that are added to a target organization or organizational unit (OU).
	AutoDeployment() interface{}
	SetAutoDeployment(val interface{})
	// [Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.
	CallAs() *string
	SetCallAs(val *string)
	// The capabilities that are allowed in the stack set.
	Capabilities() *[]*string
	SetCapabilities(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
	// A description of the stack set.
	Description() *string
	SetDescription(val *string)
	// The name of the IAM execution role to use to create the stack set.
	ExecutionRoleName() *string
	SetExecutionRoleName(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
	// Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
	ManagedExecution() interface{}
	SetManagedExecution(val interface{})
	// The tree node.
	Node() constructs.Node
	// The user-specified preferences for how AWS CloudFormation performs a stack set operation.
	OperationPreferences() interface{}
	SetOperationPreferences(val interface{})
	// The input parameters for the stack set template.
	Parameters() interface{}
	SetParameters(val interface{})
	// Describes how the IAM roles required for stack set operations are created.
	PermissionModel() *string
	SetPermissionModel(val *string)
	// 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
	// A group of stack instances with parameters in some specific accounts and Regions.
	StackInstancesGroup() interface{}
	SetStackInstancesGroup(val interface{})
	// The name to associate with the stack set.
	StackSetName() *string
	SetStackSetName(val *string)
	// Tag Manager which manages the tags for this resource.
	Tags() TagManager
	// Key-value pairs to associate with this stack.
	TagsRaw() *[]*CfnTag
	SetTagsRaw(val *[]*CfnTag)
	// The structure that contains the template body, with a minimum length of 1 byte and a maximum length of 51,200 bytes.
	TemplateBody() *string
	SetTemplateBody(val *string)
	// Location of file containing the template body.
	TemplateUrl() *string
	SetTemplateUrl(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 `AWS::CloudFormation::StackSet` enables you to provision stacks into AWS accounts and across Regions by using a single CloudFormation template.

In the stack set, you specify the template to use, in addition to any parameters and capabilities that the template requires.

> Run deployments to nested StackSets from the parent stack, not directly through the StackSet API.

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 managedExecution interface{}

cfnStackSet := cdk.NewCfnStackSet(this, jsii.String("MyCfnStackSet"), &CfnStackSetProps{
	PermissionModel: jsii.String("permissionModel"),
	StackSetName: jsii.String("stackSetName"),

	// the properties below are optional
	AdministrationRoleArn: jsii.String("administrationRoleArn"),
	AutoDeployment: &AutoDeploymentProperty{
		Enabled: jsii.Boolean(false),
		RetainStacksOnAccountRemoval: jsii.Boolean(false),
	},
	CallAs: jsii.String("callAs"),
	Capabilities: []*string{
		jsii.String("capabilities"),
	},
	Description: jsii.String("description"),
	ExecutionRoleName: jsii.String("executionRoleName"),
	ManagedExecution: managedExecution,
	OperationPreferences: &OperationPreferencesProperty{
		FailureToleranceCount: jsii.Number(123),
		FailureTolerancePercentage: jsii.Number(123),
		MaxConcurrentCount: jsii.Number(123),
		MaxConcurrentPercentage: jsii.Number(123),
		RegionConcurrencyType: jsii.String("regionConcurrencyType"),
		RegionOrder: []*string{
			jsii.String("regionOrder"),
		},
	},
	Parameters: []interface{}{
		&ParameterProperty{
			ParameterKey: jsii.String("parameterKey"),
			ParameterValue: jsii.String("parameterValue"),
		},
	},
	StackInstancesGroup: []interface{}{
		&StackInstancesProperty{
			DeploymentTargets: &DeploymentTargetsProperty{
				AccountFilterType: jsii.String("accountFilterType"),
				Accounts: []*string{
					jsii.String("accounts"),
				},
				AccountsUrl: jsii.String("accountsUrl"),
				OrganizationalUnitIds: []*string{
					jsii.String("organizationalUnitIds"),
				},
			},
			Regions: []*string{
				jsii.String("regions"),
			},

			// the properties below are optional
			ParameterOverrides: []interface{}{
				&ParameterProperty{
					ParameterKey: jsii.String("parameterKey"),
					ParameterValue: jsii.String("parameterValue"),
				},
			},
		},
	},
	Tags: []cfnTag{
		&cfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TemplateBody: jsii.String("templateBody"),
	TemplateUrl: jsii.String("templateUrl"),
})

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

func NewCfnStackSet ¶

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

type CfnStackSetProps ¶

type CfnStackSetProps struct {
	// Describes how the IAM roles required for stack set operations are created.
	//
	// - With `SELF_MANAGED` permissions, you must create the administrator and execution roles required to deploy to target accounts. For more information, see [Grant Self-Managed Stack Set Permissions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html) .
	// - With `SERVICE_MANAGED` permissions, StackSets automatically creates the IAM roles required to deploy to accounts managed by AWS Organizations .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-permissionmodel
	//
	PermissionModel *string `field:"required" json:"permissionModel" yaml:"permissionModel"`
	// The name to associate with the stack set.
	//
	// The name must be unique in the Region where you create your stack set.
	//
	// > The `StackSetName` property is required.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-stacksetname
	//
	StackSetName *string `field:"required" json:"stackSetName" yaml:"stackSetName"`
	// The Amazon Resource Number (ARN) of the IAM role to use to create this stack set.
	//
	// Specify an IAM role only if you are using customized administrator roles to control which users or groups can manage specific stack sets within the same administrator account.
	//
	// Use customized administrator roles to control which users or groups can manage specific stack sets within the same administrator account. For more information, see [Prerequisites: Granting Permissions for Stack Set Operations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) in the *AWS CloudFormation User Guide* .
	//
	// *Minimum* : `20`
	//
	// *Maximum* : `2048`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-administrationrolearn
	//
	AdministrationRoleArn *string `field:"optional" json:"administrationRoleArn" yaml:"administrationRoleArn"`
	// [ `Service-managed` permissions] Describes whether StackSets automatically deploys to AWS Organizations accounts that are added to a target organization or organizational unit (OU).
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-autodeployment
	//
	AutoDeployment interface{} `field:"optional" json:"autoDeployment" yaml:"autoDeployment"`
	// [Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.
	//
	// By default, `SELF` is specified. Use `SELF` for stack sets with self-managed permissions.
	//
	// - To create a stack set with service-managed permissions while signed in to the management account, specify `SELF` .
	// - To create a stack set with service-managed permissions while signed in to a delegated administrator account, specify `DELEGATED_ADMIN` .
	//
	// Your AWS account must be registered as a delegated admin in the management account. For more information, see [Register a delegated administrator](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html) in the *AWS CloudFormation User Guide* .
	//
	// Stack sets with service-managed permissions are created in the management account, including stack sets that are created by delegated administrators.
	//
	// *Valid Values* : `SELF` | `DELEGATED_ADMIN`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-callas
	//
	CallAs *string `field:"optional" json:"callAs" yaml:"callAs"`
	// The capabilities that are allowed in the stack set.
	//
	// Some stack set templates might include resources that can affect permissions in your AWS account —for example, by creating new AWS Identity and Access Management ( IAM ) users. For more information, see [Acknowledging IAM Resources in AWS CloudFormation Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-capabilities
	//
	Capabilities *[]*string `field:"optional" json:"capabilities" yaml:"capabilities"`
	// A description of the stack set.
	//
	// *Minimum* : `1`
	//
	// *Maximum* : `1024`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-description
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The name of the IAM execution role to use to create the stack set.
	//
	// If you don't specify an execution role, AWS CloudFormation uses the `AWSCloudFormationStackSetExecutionRole` role for the stack set operation.
	//
	// *Minimum* : `1`
	//
	// *Maximum* : `64`
	//
	// *Pattern* : `[a-zA-Z_0-9+=,.@-]+`
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-executionrolename
	//
	ExecutionRoleName *string `field:"optional" json:"executionRoleName" yaml:"executionRoleName"`
	// Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
	//
	// When active, StackSets performs non-conflicting operations concurrently and queues conflicting operations. After conflicting operations finish, StackSets starts queued operations in request order.
	//
	// > If there are already running or queued operations, StackSets queues all incoming operations even if they are non-conflicting.
	// >
	// > You can't modify your stack set's execution configuration while there are running or queued operations for that stack set.
	//
	// When inactive (default), StackSets performs one operation at a time in request order.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-managedexecution
	//
	ManagedExecution interface{} `field:"optional" json:"managedExecution" yaml:"managedExecution"`
	// The user-specified preferences for how AWS CloudFormation performs a stack set operation.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-operationpreferences
	//
	OperationPreferences interface{} `field:"optional" json:"operationPreferences" yaml:"operationPreferences"`
	// The input parameters for the stack set template.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-parameters
	//
	Parameters interface{} `field:"optional" json:"parameters" yaml:"parameters"`
	// A group of stack instances with parameters in some specific accounts and Regions.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-stackinstancesgroup
	//
	StackInstancesGroup interface{} `field:"optional" json:"stackInstancesGroup" yaml:"stackInstancesGroup"`
	// Key-value pairs to associate with this stack.
	//
	// AWS CloudFormation also propagates these tags to supported resources in the stack. You can specify a maximum number of 50 tags.
	//
	// If you don't specify this parameter, AWS CloudFormation doesn't modify the stack's tags. If you specify an empty value, AWS CloudFormation removes all associated tags.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-tags
	//
	Tags *[]*CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// The structure that contains the template body, with a minimum length of 1 byte and a maximum length of 51,200 bytes.
	//
	// You must include either `TemplateURL` or `TemplateBody` in a StackSet, but you can't use both. Dynamic references in the `TemplateBody` may not work correctly in all cases. It's recommended to pass templates containing dynamic references through `TemplateUrl` instead.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-templatebody
	//
	TemplateBody *string `field:"optional" json:"templateBody" yaml:"templateBody"`
	// Location of file containing the template body.
	//
	// The URL must point to a template that's located in an Amazon S3 bucket or a Systems Manager document. For more information, go to [Template Anatomy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) in the AWS CloudFormation User Guide.
	//
	// Conditional: You must specify only one of the following parameters: `TemplateBody` , `TemplateURL` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-templateurl
	//
	TemplateUrl *string `field:"optional" json:"templateUrl" yaml:"templateUrl"`
}

Properties for defining a `CfnStackSet`.

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 managedExecution interface{}

cfnStackSetProps := &CfnStackSetProps{
	PermissionModel: jsii.String("permissionModel"),
	StackSetName: jsii.String("stackSetName"),

	// the properties below are optional
	AdministrationRoleArn: jsii.String("administrationRoleArn"),
	AutoDeployment: &AutoDeploymentProperty{
		Enabled: jsii.Boolean(false),
		RetainStacksOnAccountRemoval: jsii.Boolean(false),
	},
	CallAs: jsii.String("callAs"),
	Capabilities: []*string{
		jsii.String("capabilities"),
	},
	Description: jsii.String("description"),
	ExecutionRoleName: jsii.String("executionRoleName"),
	ManagedExecution: managedExecution,
	OperationPreferences: &OperationPreferencesProperty{
		FailureToleranceCount: jsii.Number(123),
		FailureTolerancePercentage: jsii.Number(123),
		MaxConcurrentCount: jsii.Number(123),
		MaxConcurrentPercentage: jsii.Number(123),
		RegionConcurrencyType: jsii.String("regionConcurrencyType"),
		RegionOrder: []*string{
			jsii.String("regionOrder"),
		},
	},
	Parameters: []interface{}{
		&ParameterProperty{
			ParameterKey: jsii.String("parameterKey"),
			ParameterValue: jsii.String("parameterValue"),
		},
	},
	StackInstancesGroup: []interface{}{
		&StackInstancesProperty{
			DeploymentTargets: &DeploymentTargetsProperty{
				AccountFilterType: jsii.String("accountFilterType"),
				Accounts: []*string{
					jsii.String("accounts"),
				},
				AccountsUrl: jsii.String("accountsUrl"),
				OrganizationalUnitIds: []*string{
					jsii.String("organizationalUnitIds"),
				},
			},
			Regions: []*string{
				jsii.String("regions"),
			},

			// the properties below are optional
			ParameterOverrides: []interface{}{
				&ParameterProperty{
					ParameterKey: jsii.String("parameterKey"),
					ParameterValue: jsii.String("parameterValue"),
				},
			},
		},
	},
	Tags: []cfnTag{
		&cfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TemplateBody: jsii.String("templateBody"),
	TemplateUrl: jsii.String("templateUrl"),
}

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

type CfnStackSet_AutoDeploymentProperty ¶

type CfnStackSet_AutoDeploymentProperty struct {
	// If set to `true` , StackSets automatically deploys additional stack instances to AWS Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions.
	//
	// If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-autodeployment.html#cfn-cloudformation-stackset-autodeployment-enabled
	//
	Enabled interface{} `field:"optional" json:"enabled" yaml:"enabled"`
	// If set to `true` , stack resources are retained when an account is removed from a target organization or OU.
	//
	// If set to `false` , stack resources are deleted. Specify only if `Enabled` is set to `True` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-autodeployment.html#cfn-cloudformation-stackset-autodeployment-retainstacksonaccountremoval
	//
	RetainStacksOnAccountRemoval interface{} `field:"optional" json:"retainStacksOnAccountRemoval" yaml:"retainStacksOnAccountRemoval"`
}

[ `Service-managed` permissions] Describes whether StackSets automatically deploys to AWS Organizations accounts that are added to a target organizational unit (OU).

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"

autoDeploymentProperty := &AutoDeploymentProperty{
	Enabled: jsii.Boolean(false),
	RetainStacksOnAccountRemoval: jsii.Boolean(false),
}

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

type CfnStackSet_DeploymentTargetsProperty ¶

type CfnStackSet_DeploymentTargetsProperty struct {
	// Limit deployment targets to individual accounts or include additional accounts with provided OUs.
	//
	// The following is a list of possible values for the `AccountFilterType` operation.
	//
	// - `INTERSECTION` : StackSet deploys to the accounts specified in the `Accounts` parameter.
	// - `DIFFERENCE` : StackSet deploys to the OU, excluding the accounts specified in the `Accounts` parameter.
	// - `UNION` StackSet deploys to the OU, and the accounts specified in the `Accounts` parameter. `UNION` is not supported for create operations when using StackSet as a resource.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-accountfiltertype
	//
	AccountFilterType *string `field:"optional" json:"accountFilterType" yaml:"accountFilterType"`
	// The names of one or more AWS accounts for which you want to deploy stack set updates.
	//
	// *Pattern* : `^[0-9]{12}$`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-accounts
	//
	Accounts *[]*string `field:"optional" json:"accounts" yaml:"accounts"`
	// Returns the value of the `AccountsUrl` property.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-accountsurl
	//
	AccountsUrl *string `field:"optional" json:"accountsUrl" yaml:"accountsUrl"`
	// The organization root ID or organizational unit (OU) IDs to which StackSets deploys.
	//
	// *Pattern* : `^(ou-[a-z0-9]{4,32}-[a-z0-9]{8,32}|r-[a-z0-9]{4,32})$`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-organizationalunitids
	//
	OrganizationalUnitIds *[]*string `field:"optional" json:"organizationalUnitIds" yaml:"organizationalUnitIds"`
}

The AWS OrganizationalUnitIds or Accounts for which to create stack instances in the specified Regions.

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"

deploymentTargetsProperty := &DeploymentTargetsProperty{
	AccountFilterType: jsii.String("accountFilterType"),
	Accounts: []*string{
		jsii.String("accounts"),
	},
	AccountsUrl: jsii.String("accountsUrl"),
	OrganizationalUnitIds: []*string{
		jsii.String("organizationalUnitIds"),
	},
}

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

type CfnStackSet_ManagedExecutionProperty ¶ added in v2.55.0

type CfnStackSet_ManagedExecutionProperty struct {
	// When `true` , StackSets performs non-conflicting operations concurrently and queues conflicting operations.
	//
	// After conflicting operations finish, StackSets starts queued operations in request order.
	//
	// > If there are already running or queued operations, StackSets queues all incoming operations even if they are non-conflicting.
	// >
	// > You can't modify your stack set's execution configuration while there are running or queued operations for that stack set.
	//
	// When `false` (default), StackSets performs one operation at a time in request order.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-managedexecution.html#cfn-cloudformation-stackset-managedexecution-active
	//
	Active interface{} `field:"optional" json:"active" yaml:"active"`
}

Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.

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"

managedExecutionProperty := &ManagedExecutionProperty{
	Active: jsii.Boolean(false),
}

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

type CfnStackSet_OperationPreferencesProperty ¶

type CfnStackSet_OperationPreferencesProperty struct {
	// The number of accounts, per Region, for which this operation can fail before AWS CloudFormation stops the operation in that Region.
	//
	// If the operation is stopped in a Region, AWS CloudFormation doesn't attempt the operation in any subsequent Regions.
	//
	// Conditional: You must specify either `FailureToleranceCount` or `FailureTolerancePercentage` (but not both).
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-failuretolerancecount
	//
	FailureToleranceCount *float64 `field:"optional" json:"failureToleranceCount" yaml:"failureToleranceCount"`
	// The percentage of accounts, per Region, for which this stack operation can fail before AWS CloudFormation stops the operation in that Region.
	//
	// If the operation is stopped in a Region, AWS CloudFormation doesn't attempt the operation in any subsequent Regions.
	//
	// When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds *down* to the next whole number.
	//
	// Conditional: You must specify either `FailureToleranceCount` or `FailureTolerancePercentage` , but not both.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-failuretolerancepercentage
	//
	FailureTolerancePercentage *float64 `field:"optional" json:"failureTolerancePercentage" yaml:"failureTolerancePercentage"`
	// The maximum number of accounts in which to perform this operation at one time.
	//
	// This is dependent on the value of `FailureToleranceCount` . `MaxConcurrentCount` is at most one more than the `FailureToleranceCount` .
	//
	// Note that this setting lets you specify the *maximum* for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.
	//
	// Conditional: You must specify either `MaxConcurrentCount` or `MaxConcurrentPercentage` , but not both.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-maxconcurrentcount
	//
	MaxConcurrentCount *float64 `field:"optional" json:"maxConcurrentCount" yaml:"maxConcurrentCount"`
	// The maximum percentage of accounts in which to perform this operation at one time.
	//
	// When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, CloudFormation sets the number as one instead.
	//
	// Note that this setting lets you specify the *maximum* for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.
	//
	// Conditional: You must specify either `MaxConcurrentCount` or `MaxConcurrentPercentage` , but not both.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-maxconcurrentpercentage
	//
	MaxConcurrentPercentage *float64 `field:"optional" json:"maxConcurrentPercentage" yaml:"maxConcurrentPercentage"`
	// The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-regionconcurrencytype
	//
	RegionConcurrencyType *string `field:"optional" json:"regionConcurrencyType" yaml:"regionConcurrencyType"`
	// The order of the Regions where you want to perform the stack operation.
	//
	// > `RegionOrder` isn't followed if `AutoDeployment` is enabled.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-regionorder
	//
	RegionOrder *[]*string `field:"optional" json:"regionOrder" yaml:"regionOrder"`
}

The user-specified preferences for how AWS CloudFormation performs a stack set operation.

For more information on maximum concurrent accounts and failure tolerance, see [Stack set operation options](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options) .

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"

operationPreferencesProperty := &OperationPreferencesProperty{
	FailureToleranceCount: jsii.Number(123),
	FailureTolerancePercentage: jsii.Number(123),
	MaxConcurrentCount: jsii.Number(123),
	MaxConcurrentPercentage: jsii.Number(123),
	RegionConcurrencyType: jsii.String("regionConcurrencyType"),
	RegionOrder: []*string{
		jsii.String("regionOrder"),
	},
}

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

type CfnStackSet_ParameterProperty ¶

type CfnStackSet_ParameterProperty struct {
	// The key associated with the parameter.
	//
	// If you don't specify a key and value for a particular parameter, AWS CloudFormation uses the default value that's specified in your template.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-parameter.html#cfn-cloudformation-stackset-parameter-parameterkey
	//
	ParameterKey *string `field:"required" json:"parameterKey" yaml:"parameterKey"`
	// The input value associated with the parameter.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-parameter.html#cfn-cloudformation-stackset-parameter-parametervalue
	//
	ParameterValue *string `field:"required" json:"parameterValue" yaml:"parameterValue"`
}

The Parameter data type.

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"

parameterProperty := &ParameterProperty{
	ParameterKey: jsii.String("parameterKey"),
	ParameterValue: jsii.String("parameterValue"),
}

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

type CfnStackSet_StackInstancesProperty ¶

type CfnStackSet_StackInstancesProperty struct {
	// The AWS `OrganizationalUnitIds` or `Accounts` for which to create stack instances in the specified Regions.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-stackinstances.html#cfn-cloudformation-stackset-stackinstances-deploymenttargets
	//
	DeploymentTargets interface{} `field:"required" json:"deploymentTargets" yaml:"deploymentTargets"`
	// The names of one or more Regions where you want to create stack instances using the specified AWS accounts .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-stackinstances.html#cfn-cloudformation-stackset-stackinstances-regions
	//
	Regions *[]*string `field:"required" json:"regions" yaml:"regions"`
	// A list of stack set parameters whose values you want to override in the selected stack instances.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-stackinstances.html#cfn-cloudformation-stackset-stackinstances-parameteroverrides
	//
	ParameterOverrides interface{} `field:"optional" json:"parameterOverrides" yaml:"parameterOverrides"`
}

Stack instances in some specific accounts and Regions.

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"

stackInstancesProperty := &StackInstancesProperty{
	DeploymentTargets: &DeploymentTargetsProperty{
		AccountFilterType: jsii.String("accountFilterType"),
		Accounts: []*string{
			jsii.String("accounts"),
		},
		AccountsUrl: jsii.String("accountsUrl"),
		OrganizationalUnitIds: []*string{
			jsii.String("organizationalUnitIds"),
		},
	},
	Regions: []*string{
		jsii.String("regions"),
	},

	// the properties below are optional
	ParameterOverrides: []interface{}{
		&ParameterProperty{
			ParameterKey: jsii.String("parameterKey"),
			ParameterValue: jsii.String("parameterValue"),
		},
	},
}

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

type CfnStack_OutputProperty ¶ added in v2.97.0

type CfnStack_OutputProperty struct {
	// User defined description associated with the output.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stack-output.html#cfn-cloudformation-stack-output-description
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The name of the export associated with the output.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stack-output.html#cfn-cloudformation-stack-output-exportname
	//
	ExportName *string `field:"optional" json:"exportName" yaml:"exportName"`
	// The key associated with the output.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stack-output.html#cfn-cloudformation-stack-output-outputkey
	//
	OutputKey *string `field:"optional" json:"outputKey" yaml:"outputKey"`
	// The value associated with the output.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stack-output.html#cfn-cloudformation-stack-output-outputvalue
	//
	OutputValue *string `field:"optional" json:"outputValue" yaml:"outputValue"`
}

The Output data type.

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"

outputProperty := &OutputProperty{
	Description: jsii.String("description"),
	ExportName: jsii.String("exportName"),
	OutputKey: jsii.String("outputKey"),
	OutputValue: jsii.String("outputValue"),
}

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

type CfnTag ¶

type CfnTag struct {
	Key   *string `field:"required" json:"key" yaml:"key"`
	Value *string `field:"required" json:"value" yaml:"value"`
}

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"

cfnTag := &CfnTag{
	Key: jsii.String("key"),
	Value: jsii.String("value"),
}

type CfnTrafficRoute ¶

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

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

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"

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

type CfnTrafficRouting ¶

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

Type of the `CfnCodeDeployBlueGreenEcsAttributes.trafficRouting` 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"

cfnTrafficRouting := &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 CfnTrafficRoutingConfig ¶

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

Traffic routing configuration settings.

The type of the `CfnCodeDeployBlueGreenHookProps.trafficRoutingConfig` 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"

cfnTrafficRoutingConfig := &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 CfnTrafficRoutingTimeBasedCanary ¶

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

The traffic routing configuration if `CfnTrafficRoutingConfig.type` is `CfnTrafficRoutingType.TIME_BASED_CANARY`.

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"

cfnTrafficRoutingTimeBasedCanary := &CfnTrafficRoutingTimeBasedCanary{
	BakeTimeMins: jsii.Number(123),
	StepPercentage: jsii.Number(123),
}

type CfnTrafficRoutingTimeBasedLinear ¶

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

The traffic routing configuration if `CfnTrafficRoutingConfig.type` is `CfnTrafficRoutingType.TIME_BASED_LINEAR`.

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"

cfnTrafficRoutingTimeBasedLinear := &CfnTrafficRoutingTimeBasedLinear{
	BakeTimeMins: jsii.Number(123),
	StepPercentage: jsii.Number(123),
}

type CfnTrafficRoutingType ¶

type CfnTrafficRoutingType string

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

The type of the `CfnTrafficRoutingConfig.type` property.

const (
	// Switch from blue to green at once.
	CfnTrafficRoutingType_ALL_AT_ONCE CfnTrafficRoutingType = "ALL_AT_ONCE"
	// Specifies a configuration that shifts traffic from blue to green in two increments.
	CfnTrafficRoutingType_TIME_BASED_CANARY CfnTrafficRoutingType = "TIME_BASED_CANARY"
	// Specifies a configuration that shifts traffic from blue to green in equal increments, with an equal number of minutes between each increment.
	CfnTrafficRoutingType_TIME_BASED_LINEAR CfnTrafficRoutingType = "TIME_BASED_LINEAR"
)

type CfnTypeActivation ¶

type CfnTypeActivation interface {
	CfnResource
	IInspectable
	// The Amazon Resource Name (ARN) of the activated extension, in this account and Region.
	AttrArn() *string
	// Whether to automatically update the extension in this account and Region when a new *minor* version is published by the extension publisher.
	AutoUpdate() interface{}
	SetAutoUpdate(val interface{})
	// 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 name of the IAM execution role to use to activate the extension.
	ExecutionRoleArn() *string
	SetExecutionRoleArn(val *string)
	// Specifies 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 major version of this extension you want to activate, if multiple major versions are available.
	MajorVersion() *string
	SetMajorVersion(val *string)
	// The tree node.
	Node() constructs.Node
	// The Amazon Resource Number (ARN) of the public extension.
	PublicTypeArn() *string
	SetPublicTypeArn(val *string)
	// The ID of the extension publisher.
	PublisherId() *string
	SetPublisherId(val *string)
	// 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 extension type.
	Type() *string
	SetType(val *string)
	// The name of the extension.
	TypeName() *string
	SetTypeName(val *string)
	// An alias to assign to the public extension, in this account and Region.
	TypeNameAlias() *string
	SetTypeNameAlias(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{}
	// Manually updates a previously-activated type to a new major or minor version, if available.
	VersionBump() *string
	SetVersionBump(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{})
}

Activates a public third-party extension, making it available for use in stack templates.

For more information, see [Using public extensions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html) in the *AWS CloudFormation User Guide* .

Once you have activated a public third-party extension in your account and Region, use [SetTypeConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html) to specify configuration properties for the extension. For more information, see [Configuring extensions at the account level](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html#registry-set-configuration) in the *CloudFormation User Guide* .

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"

cfnTypeActivation := cdk.NewCfnTypeActivation(this, jsii.String("MyCfnTypeActivation"), &CfnTypeActivationProps{
	AutoUpdate: jsii.Boolean(false),
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	LoggingConfig: &LoggingConfigProperty{
		LogGroupName: jsii.String("logGroupName"),
		LogRoleArn: jsii.String("logRoleArn"),
	},
	MajorVersion: jsii.String("majorVersion"),
	PublicTypeArn: jsii.String("publicTypeArn"),
	PublisherId: jsii.String("publisherId"),
	Type: jsii.String("type"),
	TypeName: jsii.String("typeName"),
	TypeNameAlias: jsii.String("typeNameAlias"),
	VersionBump: jsii.String("versionBump"),
})

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

func NewCfnTypeActivation ¶

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

type CfnTypeActivationProps ¶

type CfnTypeActivationProps struct {
	// Whether to automatically update the extension in this account and Region when a new *minor* version is published by the extension publisher.
	//
	// Major versions released by the publisher must be manually updated.
	//
	// The default is `true` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-autoupdate
	//
	AutoUpdate interface{} `field:"optional" json:"autoUpdate" yaml:"autoUpdate"`
	// The name of the IAM execution role to use to activate the extension.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-executionrolearn
	//
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// Specifies logging configuration information for an extension.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-loggingconfig
	//
	LoggingConfig interface{} `field:"optional" json:"loggingConfig" yaml:"loggingConfig"`
	// The major version of this extension you want to activate, if multiple major versions are available.
	//
	// The default is the latest major version. CloudFormation uses the latest available *minor* version of the major version selected.
	//
	// You can specify `MajorVersion` or `VersionBump` , but not both.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-majorversion
	//
	MajorVersion *string `field:"optional" json:"majorVersion" yaml:"majorVersion"`
	// The Amazon Resource Number (ARN) of the public extension.
	//
	// Conditional: You must specify `PublicTypeArn` , or `TypeName` , `Type` , and `PublisherId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-publictypearn
	//
	PublicTypeArn *string `field:"optional" json:"publicTypeArn" yaml:"publicTypeArn"`
	// The ID of the extension publisher.
	//
	// Conditional: You must specify `PublicTypeArn` , or `TypeName` , `Type` , and `PublisherId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-publisherid
	//
	PublisherId *string `field:"optional" json:"publisherId" yaml:"publisherId"`
	// The extension type.
	//
	// Conditional: You must specify `PublicTypeArn` , or `TypeName` , `Type` , and `PublisherId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-type
	//
	Type *string `field:"optional" json:"type" yaml:"type"`
	// The name of the extension.
	//
	// Conditional: You must specify `PublicTypeArn` , or `TypeName` , `Type` , and `PublisherId` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-typename
	//
	TypeName *string `field:"optional" json:"typeName" yaml:"typeName"`
	// An alias to assign to the public extension, in this account and Region.
	//
	// If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.
	//
	// An extension alias must be unique within a given account and Region. You can activate the same public resource multiple times in the same account and Region, using different type name aliases.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-typenamealias
	//
	TypeNameAlias *string `field:"optional" json:"typeNameAlias" yaml:"typeNameAlias"`
	// Manually updates a previously-activated type to a new major or minor version, if available.
	//
	// You can also use this parameter to update the value of `AutoUpdate` .
	//
	// - `MAJOR` : CloudFormation updates the extension to the newest major version, if one is available.
	// - `MINOR` : CloudFormation updates the extension to the newest minor version, if one is available.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-typeactivation.html#cfn-cloudformation-typeactivation-versionbump
	//
	VersionBump *string `field:"optional" json:"versionBump" yaml:"versionBump"`
}

Properties for defining a `CfnTypeActivation`.

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"

cfnTypeActivationProps := &CfnTypeActivationProps{
	AutoUpdate: jsii.Boolean(false),
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	LoggingConfig: &LoggingConfigProperty{
		LogGroupName: jsii.String("logGroupName"),
		LogRoleArn: jsii.String("logRoleArn"),
	},
	MajorVersion: jsii.String("majorVersion"),
	PublicTypeArn: jsii.String("publicTypeArn"),
	PublisherId: jsii.String("publisherId"),
	Type: jsii.String("type"),
	TypeName: jsii.String("typeName"),
	TypeNameAlias: jsii.String("typeNameAlias"),
	VersionBump: jsii.String("versionBump"),
}

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

type CfnTypeActivation_LoggingConfigProperty ¶

type CfnTypeActivation_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-typeactivation-loggingconfig.html#cfn-cloudformation-typeactivation-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-typeactivation-loggingconfig.html#cfn-cloudformation-typeactivation-loggingconfig-logrolearn
	//
	LogRoleArn *string `field:"optional" json:"logRoleArn" yaml:"logRoleArn"`
}

Contains 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-typeactivation-loggingconfig.html

type CfnUpdatePolicy ¶

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

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

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

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"

cfnUpdatePolicy := &CfnUpdatePolicy{
	AutoScalingReplacingUpdate: &CfnAutoScalingReplacingUpdate{
		WillReplace: jsii.Boolean(false),
	},
	AutoScalingRollingUpdate: &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),
	},
	AutoScalingScheduledAction: &CfnAutoScalingScheduledAction{
		IgnoreUnmodifiedGroupSizeProperties: jsii.Boolean(false),
	},
	CodeDeployLambdaAliasUpdate: &CfnCodeDeployLambdaAliasUpdate{
		ApplicationName: jsii.String("applicationName"),
		DeploymentGroupName: jsii.String("deploymentGroupName"),

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

type CfnWaitCondition ¶

type CfnWaitCondition interface {
	CfnResource
	IInspectable
	AttrData() IResolvable
	AttrId() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// The number of success signals that CloudFormation must receive before it continues the stack creation process.
	Count() *float64
	SetCount(val *float64)
	// 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 reference to the wait condition handle used to signal this wait condition.
	Handle() *string
	SetHandle(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 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 length of time (in seconds) to wait for the number of signals that the `Count` property specifies.
	Timeout() *string
	SetTimeout(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{})
}

> For Amazon EC2 and Auto Scaling resources, we recommend that you use a `CreationPolicy` attribute instead of wait conditions.

Add a CreationPolicy attribute to those resources, and use the cfn-signal helper script to signal when an instance creation process has completed successfully.

You can use a wait condition for situations like the following:

- To coordinate stack resource creation with configuration actions that are external to the stack creation. - To track the status of a configuration process.

For these situations, we recommend that you associate a [CreationPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html) attribute with the wait condition so that you don't have to use a wait condition handle. For more information and an example, see [Creating wait conditions in a template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-waitcondition.html) . If you use a CreationPolicy with a wait condition, don't specify any of the wait condition's properties.

> If you use the [VPC endpoints](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html) feature, resources in the VPC that respond to wait conditions must have access to CloudFormation , specific Amazon Simple Storage Service ( Amazon S3 ) buckets. Resources must send wait condition 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"

cfnWaitCondition := cdk.NewCfnWaitCondition(this, jsii.String("MyCfnWaitCondition"), &CfnWaitConditionProps{
	Count: jsii.Number(123),
	Handle: jsii.String("handle"),
	Timeout: jsii.String("timeout"),
})

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

func NewCfnWaitCondition ¶

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

type CfnWaitConditionHandle ¶

type CfnWaitConditionHandle interface {
	CfnResource
	IInspectable
	// A unique identifier for the resource.
	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
	// 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{})
}

> For Amazon EC2 and Auto Scaling resources, we recommend that you use a `CreationPolicy` attribute instead of wait conditions.

Add a `CreationPolicy` attribute to those resources, and use the cfn-signal helper script to signal when an instance creation process has completed successfully. > > For more information, see [Deploying applications on Amazon EC2 with AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/deploying.applications.html) .

The `AWS::CloudFormation::WaitConditionHandle` type has no properties. When you reference the `WaitConditionHandle` resource by using the `Ref` function, AWS CloudFormation returns a presigned URL. You pass this URL to applications or scripts that are running on your Amazon EC2 instances to send signals to that URL. An associated `AWS::CloudFormation::WaitCondition` resource checks the URL for the required number of success signals or for a failure signal.

> Anytime you add a `WaitCondition` resource during a stack update or update a resource with a wait condition, you must associate the wait condition with a new `WaitConditionHandle` resource. Don't reuse an old wait condition handle that has already been defined in the template. If you reuse a wait condition handle, the wait condition might evaluate old signals from a previous create or update stack command. > Updates aren't supported for this resource.

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"

cfnWaitConditionHandle := cdk.NewCfnWaitConditionHandle(this, jsii.String("MyCfnWaitConditionHandle"), &CfnWaitConditionHandleProps{
})

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

func NewCfnWaitConditionHandle ¶

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

type CfnWaitConditionHandleProps ¶ added in v2.88.0

type CfnWaitConditionHandleProps struct {
}

Properties for defining a `CfnWaitConditionHandle`.

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"

cfnWaitConditionHandleProps := &CfnWaitConditionHandleProps{
}

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

type CfnWaitConditionProps ¶

type CfnWaitConditionProps struct {
	// The number of success signals that CloudFormation must receive before it continues the stack creation process.
	//
	// When the wait condition receives the requisite number of success signals, CloudFormation resumes the creation of the stack. If the wait condition doesn't receive the specified number of success signals before the Timeout period expires, CloudFormation assumes that the wait condition has failed and rolls the stack back.
	//
	// Updates aren't supported.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-waitcondition.html#cfn-cloudformation-waitcondition-count
	//
	Count *float64 `field:"optional" json:"count" yaml:"count"`
	// A reference to the wait condition handle used to signal this wait condition.
	//
	// Use the `Ref` intrinsic function to specify an [`AWS::CloudFormation::WaitConditionHandle`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitconditionhandle.html) resource.
	//
	// Anytime you add a `WaitCondition` resource during a stack update, you must associate the wait condition with a new WaitConditionHandle resource. Don't reuse an old wait condition handle that has already been defined in the template. If you reuse a wait condition handle, the wait condition might evaluate old signals from a previous create or update stack command.
	//
	// Updates aren't supported.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-waitcondition.html#cfn-cloudformation-waitcondition-handle
	//
	Handle *string `field:"optional" json:"handle" yaml:"handle"`
	// The length of time (in seconds) to wait for the number of signals that the `Count` property specifies.
	//
	// `Timeout` is a minimum-bound property, meaning the timeout occurs no sooner than the time you specify, but can occur shortly thereafter. The maximum time that can be specified for this property is 12 hours (43200 seconds).
	//
	// Updates aren't supported.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-waitcondition.html#cfn-cloudformation-waitcondition-timeout
	//
	Timeout *string `field:"optional" json:"timeout" yaml:"timeout"`
}

Properties for defining a `CfnWaitCondition`.

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"

cfnWaitConditionProps := &CfnWaitConditionProps{
	Count: jsii.Number(123),
	Handle: jsii.String("handle"),
	Timeout: jsii.String("timeout"),
}

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

type CliCredentialsStackSynthesizer ¶ added in v2.13.0

type CliCredentialsStackSynthesizer interface {
	StackSynthesizer
	IBoundStackSynthesizer
	IReusableStackSynthesizer
	// The qualifier used to bootstrap this stack.
	BootstrapQualifier() *string
	// Retrieve the bound stack.
	//
	// Fails if the stack hasn't been bound yet.
	BoundStack() Stack
	// The role used to lookup for this stack.
	LookupRole() *string
	// 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)
	// Have the stack write out its template.
	// Deprecated: Use `synthesizeTemplate` instead.
	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
}

A synthesizer that uses conventional asset locations, but not conventional deployment roles.

Instead of assuming the bootstrapped deployment roles, all stack operations will be performed using the CLI's current credentials.

  • This synthesizer does not support deploying to accounts to which the CLI does not have credentials. It also does not support deploying using **CDK Pipelines**. For either of those features, use `DefaultStackSynthesizer`.
  • This synthesizer requires an S3 bucket and ECR repository with well-known names. To not depend on those, use `LegacyStackSynthesizer`.

Be aware that your CLI credentials must be valid for the duration of the entire deployment. If you are using session credentials, make sure the session lifetime is long enough.

By default, expects the environment to have been bootstrapped with just the staging resources of the Bootstrap Stack V2 (also known as "modern bootstrap stack"). You can override the default names using the synthesizer's construction properties.

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"

cliCredentialsStackSynthesizer := cdk.NewCliCredentialsStackSynthesizer(&CliCredentialsStackSynthesizerProps{
	BucketPrefix: jsii.String("bucketPrefix"),
	DockerTagPrefix: jsii.String("dockerTagPrefix"),
	FileAssetsBucketName: jsii.String("fileAssetsBucketName"),
	ImageAssetsRepositoryName: jsii.String("imageAssetsRepositoryName"),
	Qualifier: jsii.String("qualifier"),
})

func NewCliCredentialsStackSynthesizer ¶ added in v2.13.0

func NewCliCredentialsStackSynthesizer(props *CliCredentialsStackSynthesizerProps) CliCredentialsStackSynthesizer

type CliCredentialsStackSynthesizerProps ¶ added in v2.13.0

type CliCredentialsStackSynthesizerProps struct {
	// bucketPrefix to use while storing S3 Assets.
	// Default: - DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PREFIX
	//
	BucketPrefix *string `field:"optional" json:"bucketPrefix" yaml:"bucketPrefix"`
	// A prefix to use while tagging and uploading Docker images to ECR.
	//
	// This does not add any separators - the source hash will be appended to
	// this string directly.
	// Default: - DefaultStackSynthesizer.DEFAULT_DOCKER_ASSET_PREFIX
	//
	DockerTagPrefix *string `field:"optional" json:"dockerTagPrefix" yaml:"dockerTagPrefix"`
	// Name of the S3 bucket to hold file assets.
	//
	// You must supply this if you have given a non-standard name to the staging bucket.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSETS_BUCKET_NAME
	//
	FileAssetsBucketName *string `field:"optional" json:"fileAssetsBucketName" yaml:"fileAssetsBucketName"`
	// Name of the ECR repository to hold Docker Image assets.
	//
	// You must supply this if you have given a non-standard name to the ECR repository.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME
	//
	ImageAssetsRepositoryName *string `field:"optional" json:"imageAssetsRepositoryName" yaml:"imageAssetsRepositoryName"`
	// Qualifier to disambiguate multiple environments in the same account.
	//
	// You can use this and leave the other naming properties empty if you have deployed
	// the bootstrap environment with standard names but only different qualifiers.
	// Default: - Value of context key '@aws-cdk/core:bootstrapQualifier' if set, otherwise `DefaultStackSynthesizer.DEFAULT_QUALIFIER`
	//
	Qualifier *string `field:"optional" json:"qualifier" yaml:"qualifier"`
}

Properties for the CliCredentialsStackSynthesizer.

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"

cliCredentialsStackSynthesizerProps := &CliCredentialsStackSynthesizerProps{
	BucketPrefix: jsii.String("bucketPrefix"),
	DockerTagPrefix: jsii.String("dockerTagPrefix"),
	FileAssetsBucketName: jsii.String("fileAssetsBucketName"),
	ImageAssetsRepositoryName: jsii.String("imageAssetsRepositoryName"),
	Qualifier: jsii.String("qualifier"),
}

type ContextProvider ¶

type ContextProvider interface {
}

Base class for the model side of context providers.

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

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

type CopyOptions ¶

type CopyOptions 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"`
}

Options applied when copying directories.

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"

copyOptions := &CopyOptions{
	Exclude: []*string{
		jsii.String("exclude"),
	},
	Follow: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
}

type CustomResource ¶

type CustomResource interface {
	Resource
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *ResourceEnvironment
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	// The physical name of this custom resource.
	Ref() *string
	// The stack in which this resource is defined.
	Stack() Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	ApplyRemovalPolicy(policy RemovalPolicy)
	GeneratePhysicalName() *string
	// Returns the value of an attribute of the custom resource of an arbitrary type.
	//
	// Attributes are returned from the custom resource provider through the
	// `Data` map where the key is the attribute name.
	//
	// Returns: a token for `Fn::GetAtt`. Use `Token.asXxx` to encode the returned `Reference` as a specific type or
	// use the convenience `getAttString` for string attributes.
	GetAtt(attributeName *string) Reference
	// Returns the value of an attribute of the custom resource of type string.
	//
	// Attributes are returned from the custom resource provider through the
	// `Data` map where the key is the attribute name.
	//
	// Returns: a token for `Fn::GetAtt` encoded as a string.
	GetAttString(attributeName *string) *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	ToString() *string
}

Instantiation of a custom resource, whose implementation is provided a Provider.

This class is intended to be used by construct library authors. Application builder should not be able to tell whether or not a construct is backed by a custom resource, and so the use of this class should be invisible.

Instead, construct library authors declare a custom construct that hides the choice of provider, and accepts a strongly-typed properties object with the properties your provider accepts.

Your custom resource provider (identified by the `serviceToken` property) can be one of 4 constructs:

  • If you are authoring a construct library or application, we recommend you use the `Provider` class in the `custom-resources` module.
  • If you are authoring a construct for the CDK's AWS Construct Library, you should use the `CustomResourceProvider` construct in this package.
  • If you want full control over the provider, you can always directly use a Lambda Function or SNS Topic by passing the ARN into `serviceToken`.

Example:

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,
})

func NewCustomResource ¶

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

type CustomResourceProps ¶

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

Properties to provide a Lambda-backed custom resource.

Example:

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,
})

type CustomResourceProvider ¶

type CustomResourceProvider interface {
	CustomResourceProviderBase
	// The hash of the lambda code backing this provider.
	//
	// Can be used to trigger updates
	// on code changes, even when the properties of a custom resource remain unchanged.
	CodeHash() *string
	// The tree node.
	Node() constructs.Node
	// The ARN of the provider's AWS Lambda function role.
	RoleArn() *string
	// The ARN of the provider's AWS Lambda function which should be used as the `serviceToken` when defining a custom resource.
	ServiceToken() *string
	// Add an IAM policy statement to the inline policy of the provider's lambda function's role.
	//
	// **Please note**: this is a direct IAM JSON policy blob, *not* a `iam.PolicyStatement`
	// object like you will see in the rest of the CDK.
	//
	// Example:
	//   declare const myProvider: CustomResourceProvider;
	//
	//   myProvider.addToRolePolicy({
	//     Effect: 'Allow',
	//     Action: 's3:GetObject',
	//     Resource: '*',
	//   });
	//
	AddToRolePolicy(statement interface{})
	// Returns a string representation of this construct.
	ToString() *string
}

An AWS-Lambda backed custom resource provider, for CDK Construct Library constructs.

This is a provider for `CustomResource` constructs, backed by an AWS Lambda Function. It only supports NodeJS runtimes.

> **Application builders do not need to use this provider type**. This is not > a generic custom resource provider class. It is specifically > intended to be used only by constructs in the AWS CDK Construct Library, and > only exists here because of reverse dependency issues (for example, it cannot > use `iam.PolicyStatement` objects, since the `iam` library already depends on > the CDK `core` library and we cannot have cyclic dependencies).

If you are not writing constructs for the AWS Construct Library, you should use the `Provider` class in the `custom-resources` module instead, which has a better API and supports all Lambda runtimes, not just Node.

N.B.: When you are writing Custom Resource Providers, there are a number of lifecycle events you have to pay attention to. These are documented in the README of the `custom-resources` module. Be sure to give the documentation in that module a read, regardless of whether you end up using the Provider class in there or this one.

Example:

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("*"),
})

func CustomResourceProvider_GetOrCreateProvider ¶

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

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

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

func NewCustomResourceProvider ¶

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

type CustomResourceProviderBase ¶ added in v2.116.0

type CustomResourceProviderBase interface {
	constructs.Construct
	// The hash of the lambda code backing this provider.
	//
	// Can be used to trigger updates
	// on code changes, even when the properties of a custom resource remain unchanged.
	CodeHash() *string
	// The tree node.
	Node() constructs.Node
	// The ARN of the provider's AWS Lambda function role.
	RoleArn() *string
	// The ARN of the provider's AWS Lambda function which should be used as the `serviceToken` when defining a custom resource.
	ServiceToken() *string
	// Add an IAM policy statement to the inline policy of the provider's lambda function's role.
	//
	// **Please note**: this is a direct IAM JSON policy blob, *not* a `iam.PolicyStatement`
	// object like you will see in the rest of the CDK.
	//
	// Example:
	//   var myProvider customResourceProvider
	//
	//
	//   myProvider.AddToRolePolicy(map[string]*string{
	//   	"Effect": jsii.String("Allow"),
	//   	"Action": jsii.String("s3:GetObject"),
	//   	"Resource": jsii.String("*"),
	//   })
	//
	AddToRolePolicy(statement interface{})
	// Returns a string representation of this construct.
	ToString() *string
}

Base class for creating a custom resource provider.

type CustomResourceProviderBaseProps ¶ added in v2.116.0

type CustomResourceProviderBaseProps struct {
	// A description of the function.
	// Default: - No description.
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Key-value pairs that are passed to Lambda as Environment.
	// Default: - No environment variables.
	//
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The amount of memory that your function has access to.
	//
	// Increasing the
	// function's memory also increases its CPU allocation.
	// Default: Size.mebibytes(128)
	//
	MemorySize Size `field:"optional" json:"memorySize" yaml:"memorySize"`
	// A set of IAM policy statements to include in the inline policy of the provider's lambda function.
	//
	// **Please note**: these are direct IAM JSON policy blobs, *not* `iam.PolicyStatement`
	// objects like you will see in the rest of the CDK.
	//
	// Example:
	//   const provider = CustomResourceProvider.getOrCreateProvider(this, 'Custom::MyCustomResourceType', {
	//     codeDirectory: `${__dirname}/my-handler`,
	//     runtime: CustomResourceProviderRuntime.NODEJS_18_X,
	//     policyStatements: [
	//       {
	//         Effect: 'Allow',
	//         Action: 's3:PutObject*',
	//         Resource: '*',
	//       }
	//     ],
	//   });
	//
	// Default: - no additional inline policy.
	//
	PolicyStatements *[]interface{} `field:"optional" json:"policyStatements" yaml:"policyStatements"`
	// AWS Lambda timeout for the provider.
	// Default: Duration.minutes(15)
	//
	Timeout Duration `field:"optional" json:"timeout" yaml:"timeout"`
	// Whether or not the cloudformation response wrapper (`nodejs-entrypoint.ts`) is used. If set to `true`, `nodejs-entrypoint.js` is bundled in the same asset as the custom resource and set as the entrypoint. If set to `false`, the custom resource provided is the entrypoint.
	// Default: - `true` if `inlineCode: false` and `false` otherwise.
	//
	UseCfnResponseWrapper *bool `field:"optional" json:"useCfnResponseWrapper" yaml:"useCfnResponseWrapper"`
	// A local file system directory with the provider's code.
	//
	// The code will be
	// bundled into a zip asset and wired to the provider's AWS Lambda function.
	CodeDirectory *string `field:"required" json:"codeDirectory" yaml:"codeDirectory"`
	// The AWS Lambda runtime and version name to use for the provider.
	RuntimeName *string `field:"required" json:"runtimeName" yaml:"runtimeName"`
}

Initialization properties for `CustomResourceProviderBase`.

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 policyStatements interface{}
var size size

customResourceProviderBaseProps := &CustomResourceProviderBaseProps{
	CodeDirectory: jsii.String("codeDirectory"),
	RuntimeName: jsii.String("runtimeName"),

	// the properties below are optional
	Description: jsii.String("description"),
	Environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	MemorySize: size,
	PolicyStatements: []interface{}{
		policyStatements,
	},
	Timeout: cdk.Duration_Minutes(jsii.Number(30)),
	UseCfnResponseWrapper: jsii.Boolean(false),
}

type CustomResourceProviderOptions ¶ added in v2.116.0

type CustomResourceProviderOptions struct {
	// A description of the function.
	// Default: - No description.
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Key-value pairs that are passed to Lambda as Environment.
	// Default: - No environment variables.
	//
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The amount of memory that your function has access to.
	//
	// Increasing the
	// function's memory also increases its CPU allocation.
	// Default: Size.mebibytes(128)
	//
	MemorySize Size `field:"optional" json:"memorySize" yaml:"memorySize"`
	// A set of IAM policy statements to include in the inline policy of the provider's lambda function.
	//
	// **Please note**: these are direct IAM JSON policy blobs, *not* `iam.PolicyStatement`
	// objects like you will see in the rest of the CDK.
	//
	// Example:
	//   provider := awscdk.CustomResourceProvider_GetOrCreateProvider(this, jsii.String("Custom::MyCustomResourceType"), &CustomResourceProviderProps{
	//   	CodeDirectory: fmt.Sprintf("%v/my-handler", __dirname),
	//   	Runtime: awscdk.CustomResourceProviderRuntime_NODEJS_18_X,
	//   	PolicyStatements: []interface{}{
	//   		map[string]*string{
	//   			"Effect": jsii.String("Allow"),
	//   			"Action": jsii.String("s3:PutObject*"),
	//   			"Resource": jsii.String("*"),
	//   		},
	//   	},
	//   })
	//
	// Default: - no additional inline policy.
	//
	PolicyStatements *[]interface{} `field:"optional" json:"policyStatements" yaml:"policyStatements"`
	// AWS Lambda timeout for the provider.
	// Default: Duration.minutes(15)
	//
	Timeout Duration `field:"optional" json:"timeout" yaml:"timeout"`
	// Whether or not the cloudformation response wrapper (`nodejs-entrypoint.ts`) is used. If set to `true`, `nodejs-entrypoint.js` is bundled in the same asset as the custom resource and set as the entrypoint. If set to `false`, the custom resource provided is the entrypoint.
	// Default: - `true` if `inlineCode: false` and `false` otherwise.
	//
	UseCfnResponseWrapper *bool `field:"optional" json:"useCfnResponseWrapper" yaml:"useCfnResponseWrapper"`
}

Initialization options for custom resource providers.

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 policyStatements interface{}
var size size

customResourceProviderOptions := &CustomResourceProviderOptions{
	Description: jsii.String("description"),
	Environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	MemorySize: size,
	PolicyStatements: []interface{}{
		policyStatements,
	},
	Timeout: cdk.Duration_Minutes(jsii.Number(30)),
	UseCfnResponseWrapper: jsii.Boolean(false),
}

type CustomResourceProviderProps ¶

type CustomResourceProviderProps struct {
	// A description of the function.
	// Default: - No description.
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Key-value pairs that are passed to Lambda as Environment.
	// Default: - No environment variables.
	//
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The amount of memory that your function has access to.
	//
	// Increasing the
	// function's memory also increases its CPU allocation.
	// Default: Size.mebibytes(128)
	//
	MemorySize Size `field:"optional" json:"memorySize" yaml:"memorySize"`
	// A set of IAM policy statements to include in the inline policy of the provider's lambda function.
	//
	// **Please note**: these are direct IAM JSON policy blobs, *not* `iam.PolicyStatement`
	// objects like you will see in the rest of the CDK.
	//
	// Example:
	//   const provider = CustomResourceProvider.getOrCreateProvider(this, 'Custom::MyCustomResourceType', {
	//     codeDirectory: `${__dirname}/my-handler`,
	//     runtime: CustomResourceProviderRuntime.NODEJS_18_X,
	//     policyStatements: [
	//       {
	//         Effect: 'Allow',
	//         Action: 's3:PutObject*',
	//         Resource: '*',
	//       }
	//     ],
	//   });
	//
	// Default: - no additional inline policy.
	//
	PolicyStatements *[]interface{} `field:"optional" json:"policyStatements" yaml:"policyStatements"`
	// AWS Lambda timeout for the provider.
	// Default: Duration.minutes(15)
	//
	Timeout Duration `field:"optional" json:"timeout" yaml:"timeout"`
	// Whether or not the cloudformation response wrapper (`nodejs-entrypoint.ts`) is used. If set to `true`, `nodejs-entrypoint.js` is bundled in the same asset as the custom resource and set as the entrypoint. If set to `false`, the custom resource provided is the entrypoint.
	// Default: - `true` if `inlineCode: false` and `false` otherwise.
	//
	UseCfnResponseWrapper *bool `field:"optional" json:"useCfnResponseWrapper" yaml:"useCfnResponseWrapper"`
	// A local file system directory with the provider's code.
	//
	// The code will be
	// bundled into a zip asset and wired to the provider's AWS Lambda function.
	CodeDirectory *string `field:"required" json:"codeDirectory" yaml:"codeDirectory"`
	// The AWS Lambda runtime and version to use for the provider.
	Runtime CustomResourceProviderRuntime `field:"required" json:"runtime" yaml:"runtime"`
}

Initialization properties for `CustomResourceProvider`.

Example:

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("*"),
})

type CustomResourceProviderRuntime ¶

type CustomResourceProviderRuntime string

The lambda runtime to use for the resource provider.

This also indicates which language is used for the handler.

Example:

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("*"),
})
const (
	// Node.js 12.x.
	// Deprecated: Use latest version.
	CustomResourceProviderRuntime_NODEJS_12_X CustomResourceProviderRuntime = "NODEJS_12_X"
	// Node.js 14.x.
	// Deprecated: Use latest version.
	CustomResourceProviderRuntime_NODEJS_14_X CustomResourceProviderRuntime = "NODEJS_14_X"
	// Node.js 16.x.
	CustomResourceProviderRuntime_NODEJS_16_X CustomResourceProviderRuntime = "NODEJS_16_X"
	// Node.js 18.x.
	CustomResourceProviderRuntime_NODEJS_18_X CustomResourceProviderRuntime = "NODEJS_18_X"
	// Node.js 20.x.
	CustomResourceProviderRuntime_NODEJS_20_X CustomResourceProviderRuntime = "NODEJS_20_X"
)

type DefaultStackSynthesizer ¶

type DefaultStackSynthesizer interface {
	StackSynthesizer
	IBoundStackSynthesizer
	IReusableStackSynthesizer
	// 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
}

Uses conventionally named roles and asset storage locations.

This synthesizer:

  • Supports cross-account deployments (the CLI can have credentials to one account, and you can still deploy to another account by assuming roles with well-known names in the other account).
  • Supports the **CDK Pipelines** library.

Requires the environment to have been bootstrapped with Bootstrap Stack V2 (also known as "modern bootstrap stack"). The synthesizer adds a version check to the template, to make sure the bootstrap stack is recent enough to support all features expected by this synthesizer.

Example:

var app app

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

awscdk.Newstack(prodStage, jsii.String("ProdStack"), &StackProps{
	Synthesizer: awscdk.NewDefaultStackSynthesizer(&DefaultStackSynthesizerProps{
		Qualifier: jsii.String("custom"),
	}),
})

type DefaultStackSynthesizerProps ¶

type DefaultStackSynthesizerProps struct {
	// Bootstrap stack version SSM parameter.
	//
	// The placeholder `${Qualifier}` will be replaced with the value of qualifier.
	// Default: DefaultStackSynthesizer.DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER
	//
	BootstrapStackVersionSsmParameter *string `field:"optional" json:"bootstrapStackVersionSsmParameter" yaml:"bootstrapStackVersionSsmParameter"`
	// bucketPrefix to use while storing S3 Assets.
	// Default: - DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PREFIX
	//
	BucketPrefix *string `field:"optional" json:"bucketPrefix" yaml:"bucketPrefix"`
	// The role CloudFormation will assume when deploying the Stack.
	//
	// You must supply this if you have given a non-standard name to the execution role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_CLOUDFORMATION_ROLE_ARN
	//
	CloudFormationExecutionRole *string `field:"optional" json:"cloudFormationExecutionRole" yaml:"cloudFormationExecutionRole"`
	// The role to assume to initiate a deployment in this environment.
	//
	// You must supply this if you have given a non-standard name to the publishing role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_DEPLOY_ROLE_ARN
	//
	DeployRoleArn *string `field:"optional" json:"deployRoleArn" yaml:"deployRoleArn"`
	// External ID to use when assuming role for cloudformation deployments.
	// Default: - No external ID.
	//
	DeployRoleExternalId *string `field:"optional" json:"deployRoleExternalId" yaml:"deployRoleExternalId"`
	// A prefix to use while tagging and uploading Docker images to ECR.
	//
	// This does not add any separators - the source hash will be appended to
	// this string directly.
	// Default: - DefaultStackSynthesizer.DEFAULT_DOCKER_ASSET_PREFIX
	//
	DockerTagPrefix *string `field:"optional" json:"dockerTagPrefix" yaml:"dockerTagPrefix"`
	// External ID to use when assuming role for file asset publishing.
	// Default: - No external ID.
	//
	FileAssetPublishingExternalId *string `field:"optional" json:"fileAssetPublishingExternalId" yaml:"fileAssetPublishingExternalId"`
	// The role to use to publish file assets to the S3 bucket in this environment.
	//
	// You must supply this if you have given a non-standard name to the publishing role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN
	//
	FileAssetPublishingRoleArn *string `field:"optional" json:"fileAssetPublishingRoleArn" yaml:"fileAssetPublishingRoleArn"`
	// Name of the S3 bucket to hold file assets.
	//
	// You must supply this if you have given a non-standard name to the staging bucket.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSETS_BUCKET_NAME
	//
	FileAssetsBucketName *string `field:"optional" json:"fileAssetsBucketName" yaml:"fileAssetsBucketName"`
	// Whether to add a Rule to the stack template verifying the bootstrap stack version.
	//
	// This generally should be left set to `true`, unless you explicitly
	// want to be able to deploy to an unbootstrapped environment.
	// Default: true.
	//
	GenerateBootstrapVersionRule *bool `field:"optional" json:"generateBootstrapVersionRule" yaml:"generateBootstrapVersionRule"`
	// External ID to use when assuming role for image asset publishing.
	// Default: - No external ID.
	//
	ImageAssetPublishingExternalId *string `field:"optional" json:"imageAssetPublishingExternalId" yaml:"imageAssetPublishingExternalId"`
	// The role to use to publish image assets to the ECR repository in this environment.
	//
	// You must supply this if you have given a non-standard name to the publishing role.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN
	//
	ImageAssetPublishingRoleArn *string `field:"optional" json:"imageAssetPublishingRoleArn" yaml:"imageAssetPublishingRoleArn"`
	// Name of the ECR repository to hold Docker Image assets.
	//
	// You must supply this if you have given a non-standard name to the ECR repository.
	//
	// The placeholders `${Qualifier}`, `${AWS::AccountId}` and `${AWS::Region}` will
	// be replaced with the values of qualifier and the stack's account and region,
	// respectively.
	// Default: DefaultStackSynthesizer.DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME
	//
	ImageAssetsRepositoryName *string `field:"optional" json:"imageAssetsRepositoryName" yaml:"imageAssetsRepositoryName"`
	// The role to use to look up values from the target AWS account during synthesis.
	// Default: - None.
	//
	LookupRoleArn *string `field:"optional" json:"lookupRoleArn" yaml:"lookupRoleArn"`
	// External ID to use when assuming lookup role.
	// Default: - No external ID.
	//
	LookupRoleExternalId *string `field:"optional" json:"lookupRoleExternalId" yaml:"lookupRoleExternalId"`
	// Qualifier to disambiguate multiple environments in the same account.
	//
	// You can use this and leave the other naming properties empty if you have deployed
	// the bootstrap environment with standard names but only different qualifiers.
	// Default: - Value of context key '@aws-cdk/core:bootstrapQualifier' if set, otherwise `DefaultStackSynthesizer.DEFAULT_QUALIFIER`
	//
	Qualifier *string `field:"optional" json:"qualifier" yaml:"qualifier"`
	// Use the bootstrapped lookup role for (read-only) stack operations.
	//
	// Use the lookup role when performing a `cdk diff`. If set to `false`, the
	// `deploy role` credentials will be used to perform a `cdk diff`.
	//
	// Requires bootstrap stack version 8.
	// Default: true.
	//
	UseLookupRoleForStackOperations *bool `field:"optional" json:"useLookupRoleForStackOperations" yaml:"useLookupRoleForStackOperations"`
}

Configuration properties for DefaultStackSynthesizer.

Example:

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

type DefaultTokenResolver ¶

type DefaultTokenResolver interface {
	ITokenResolver
	// Resolve a tokenized list.
	ResolveList(xs *[]*string, context IResolveContext) interface{}
	// Resolve string fragments to Tokens.
	ResolveString(fragments TokenizedStringFragments, context IResolveContext) interface{}
	// Default Token resolution.
	//
	// Resolve the Token, recurse into whatever it returns,
	// then finally post-process it.
	ResolveToken(t IResolvable, context IResolveContext, postProcessor IPostProcessor) interface{}
}

Default resolver implementation.

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 fragmentConcatenator iFragmentConcatenator

defaultTokenResolver := cdk.NewDefaultTokenResolver(fragmentConcatenator)

func NewDefaultTokenResolver ¶

func NewDefaultTokenResolver(concat IFragmentConcatenator) DefaultTokenResolver

type DockerBuildOptions ¶

type DockerBuildOptions struct {
	// Build args.
	// Default: - no build args.
	//
	BuildArgs *map[string]*string `field:"optional" json:"buildArgs" yaml:"buildArgs"`
	// Disable the cache and pass `--no-cache` to the `docker build` command.
	// Default: - cache is used.
	//
	CacheDisabled *bool `field:"optional" json:"cacheDisabled" yaml:"cacheDisabled"`
	// Cache from options to pass to the `docker build` command.
	// Default: - no cache from args are passed.
	//
	CacheFrom *[]*DockerCacheOption `field:"optional" json:"cacheFrom" yaml:"cacheFrom"`
	// Cache to options to pass to the `docker build` command.
	// Default: - no cache to args are passed.
	//
	CacheTo *DockerCacheOption `field:"optional" json:"cacheTo" yaml:"cacheTo"`
	// Name of the Dockerfile, must relative to the docker build path.
	// Default: `Dockerfile`.
	//
	File *string `field:"optional" json:"file" yaml:"file"`
	// Set platform if server is multi-platform capable. _Requires Docker Engine API v1.38+_.
	//
	// Example value: `linux/amd64`.
	// Default: - no platform specified.
	//
	Platform *string `field:"optional" json:"platform" yaml:"platform"`
	// Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.
	//
	// Example value: `build-env`.
	// Default: - Build all stages defined in the Dockerfile.
	//
	TargetStage *string `field:"optional" json:"targetStage" yaml:"targetStage"`
}

Docker build options.

Example:

lambda.NewFunction(this, jsii.String("Function"), &FunctionProps{
	Code: lambda.Code_FromAsset(jsii.String("/path/to/handler"), &AssetOptions{
		Bundling: &BundlingOptions{
			Image: awscdk.DockerImage_FromBuild(jsii.String("/path/to/dir/with/DockerFile"), &DockerBuildOptions{
				BuildArgs: map[string]*string{
					"ARG1": jsii.String("value1"),
				},
			}),
			Command: []*string{
				jsii.String("my"),
				jsii.String("cool"),
				jsii.String("command"),
			},
		},
	}),
	Runtime: lambda.Runtime_PYTHON_3_9(),
	Handler: jsii.String("index.handler"),
})

type DockerBuildSecret ¶ added in v2.65.0

type DockerBuildSecret interface {
}

Methods to build Docker CLI arguments for builds using secrets.

Docker BuildKit must be enabled to use build secrets.

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"

dockerBuildSecret := cdk.NewDockerBuildSecret()

See: https://docs.docker.com/build/buildkit/

func NewDockerBuildSecret ¶ added in v2.65.0

func NewDockerBuildSecret() DockerBuildSecret

type DockerCacheOption ¶ added in v2.69.0

type DockerCacheOption struct {
	// The type of cache to use.
	//
	// Refer to https://docs.docker.com/build/cache/backends/ for full list of backends.
	//
	// Example:
	//   "registry"
	//
	// Default: - unspecified.
	//
	Type *string `field:"required" json:"type" yaml:"type"`
	// Any parameters to pass into the docker cache backend configuration.
	//
	// Refer to https://docs.docker.com/build/cache/backends/ for cache backend configuration.
	//
	// Example:
	//   var branch string
	//
	//
	//   params := map[string]interface{}{
	//   	"ref": fmt.Sprintf("12345678.dkr.ecr.us-west-2.amazonaws.com/cache:%v", branch),
	//   	"mode": jsii.String("max"),
	//   }
	//
	// Default: {} No options provided.
	//
	Params *map[string]*string `field:"optional" json:"params" yaml:"params"`
}

Options for configuring the Docker cache backend.

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"

dockerCacheOption := &DockerCacheOption{
	Type: jsii.String("type"),

	// the properties below are optional
	Params: map[string]*string{
		"paramsKey": jsii.String("params"),
	},
}

type DockerIgnoreStrategy ¶

type DockerIgnoreStrategy interface {
	IgnoreStrategy
	// Adds another pattern.
	Add(pattern *string)
	// Determines whether a given file path should be ignored or not.
	//
	// Returns: `true` if the file should be ignored.
	Ignores(absoluteFilePath *string) *bool
}

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

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"

dockerIgnoreStrategy := cdk.NewDockerIgnoreStrategy(jsii.String("absoluteRootPath"), []*string{
	jsii.String("patterns"),
})

func DockerIgnoreStrategy_Docker ¶

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

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

Returns: `DockerIgnorePattern` associated with the given patterns.

func GitIgnoreStrategy_Docker ¶

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

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

Returns: `DockerIgnorePattern` associated with the given patterns.

func GlobIgnoreStrategy_Docker ¶

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

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

Returns: `DockerIgnorePattern` associated with the given patterns.

func IgnoreStrategy_Docker ¶

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

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

Returns: `DockerIgnorePattern` associated with the given patterns.

func NewDockerIgnoreStrategy ¶

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

type DockerImage ¶

type DockerImage interface {
	// The Docker image.
	Image() *string
	// Copies a file or directory out of the Docker image to the local filesystem.
	//
	// If `outputPath` is omitted the destination path is a temporary directory.
	//
	// Returns: the destination path.
	Cp(imagePath *string, outputPath *string) *string
	// Runs a Docker image.
	Run(options *DockerRunOptions)
	// Provides a stable representation of this image for JSON serialization.
	//
	// Returns: The overridden image name if set or image hash name in that order.
	ToJSON() *string
}

A Docker image.

Example:

entry := "/path/to/function"
image := awscdk.DockerImage_FromBuild(entry)

python.NewPythonFunction(this, jsii.String("function"), &PythonFunctionProps{
	Entry: jsii.String(Entry),
	Runtime: awscdk.Runtime_PYTHON_3_8(),
	Bundling: &BundlingOptions{
		BuildArgs: map[string]*string{
			"PIP_INDEX_URL": jsii.String("https://your.index.url/simple/"),
			"PIP_EXTRA_INDEX_URL": jsii.String("https://your.extra-index.url/simple/"),
		},
	},
})

func DockerImage_FromBuild ¶

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

Builds a Docker image.

func DockerImage_FromRegistry ¶

func DockerImage_FromRegistry(image *string) DockerImage

Reference an image on DockerHub or another online registry.

func NewDockerImage ¶

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

type DockerImageAssetLocation ¶

type DockerImageAssetLocation struct {
	// The URI of the image in Amazon ECR (including a tag).
	ImageUri *string `field:"required" json:"imageUri" yaml:"imageUri"`
	// The name of the ECR repository.
	RepositoryName *string `field:"required" json:"repositoryName" yaml:"repositoryName"`
	// The tag of the image in Amazon ECR.
	// Default: - the hash of the asset, or the `dockerTagPrefix` concatenated with the asset hash if a `dockerTagPrefix` is specified in the stack synthesizer.
	//
	ImageTag *string `field:"optional" json:"imageTag" yaml:"imageTag"`
}

The location of the published docker image.

This is where the image can be consumed at runtime.

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"

dockerImageAssetLocation := &DockerImageAssetLocation{
	ImageUri: jsii.String("imageUri"),
	RepositoryName: jsii.String("repositoryName"),

	// the properties below are optional
	ImageTag: jsii.String("imageTag"),
}

type DockerImageAssetSource ¶

type DockerImageAssetSource struct {
	// The hash of the contents of the docker build context.
	//
	// This hash is used
	// throughout the system to identify this image and avoid duplicate work
	// in case the source did not change.
	//
	// NOTE: this means that if you wish to update your docker image, you
	// must make a modification to the source (e.g. add some metadata to your Dockerfile).
	SourceHash *string `field:"required" json:"sourceHash" yaml:"sourceHash"`
	// Unique identifier of the docker image asset and its potential revisions.
	//
	// Required if using AppScopedStagingSynthesizer.
	// Default: - no asset name.
	//
	AssetName *string `field:"optional" json:"assetName" yaml:"assetName"`
	// The directory where the Dockerfile is stored, must be relative to the cloud assembly root.
	// Default: - Exactly one of `directoryName` and `executable` is required.
	//
	DirectoryName *string `field:"optional" json:"directoryName" yaml:"directoryName"`
	// Build args to pass to the `docker build` command.
	//
	// Since Docker build arguments are resolved before deployment, keys and
	// values cannot refer to unresolved tokens (such as `lambda.functionArn` or
	// `queue.queueUrl`).
	//
	// Only allowed when `directoryName` is specified.
	// Default: - no build args are passed.
	//
	DockerBuildArgs *map[string]*string `field:"optional" json:"dockerBuildArgs" yaml:"dockerBuildArgs"`
	// Build secrets to pass to the `docker build` command.
	//
	// Since Docker build secrets are resolved before deployment, keys and
	// values cannot refer to unresolved tokens (such as `lambda.functionArn` or
	// `queue.queueUrl`).
	//
	// Only allowed when `directoryName` is specified.
	// Default: - no build secrets are passed.
	//
	DockerBuildSecrets *map[string]*string `field:"optional" json:"dockerBuildSecrets" yaml:"dockerBuildSecrets"`
	// SSH agent socket or keys to pass to the `docker buildx` command.
	// Default: - no ssh arg is passed.
	//
	DockerBuildSsh *string `field:"optional" json:"dockerBuildSsh" yaml:"dockerBuildSsh"`
	// Docker target to build to.
	//
	// Only allowed when `directoryName` is specified.
	// Default: - no target.
	//
	DockerBuildTarget *string `field:"optional" json:"dockerBuildTarget" yaml:"dockerBuildTarget"`
	// Disable the cache and pass `--no-cache` to the `docker build` command.
	// Default: - cache is used.
	//
	DockerCacheDisabled *bool `field:"optional" json:"dockerCacheDisabled" yaml:"dockerCacheDisabled"`
	// Cache from options to pass to the `docker build` command.
	// Default: - no cache from args are passed.
	//
	DockerCacheFrom *[]*DockerCacheOption `field:"optional" json:"dockerCacheFrom" yaml:"dockerCacheFrom"`
	// Cache to options to pass to the `docker build` command.
	// Default: - no cache to args are passed.
	//
	DockerCacheTo *DockerCacheOption `field:"optional" json:"dockerCacheTo" yaml:"dockerCacheTo"`
	// Path to the Dockerfile (relative to the directory).
	//
	// Only allowed when `directoryName` is specified.
	// Default: - no file.
	//
	DockerFile *string `field:"optional" json:"dockerFile" yaml:"dockerFile"`
	// Outputs to pass to the `docker build` command.
	// Default: - no build args are passed.
	//
	DockerOutputs *[]*string `field:"optional" json:"dockerOutputs" yaml:"dockerOutputs"`
	// An external command that will produce the packaged asset.
	//
	// The command should produce the name of a local Docker image on `stdout`.
	// Default: - Exactly one of `directoryName` and `executable` is required.
	//
	Executable *[]*string `field:"optional" json:"executable" yaml:"executable"`
	// Networking mode for the RUN commands during build. _Requires Docker Engine API v1.25+_.
	//
	// Specify this property to build images on a specific networking mode.
	// Default: - no networking mode specified.
	//
	NetworkMode *string `field:"optional" json:"networkMode" yaml:"networkMode"`
	// 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"`
}

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"

dockerImageAssetSource := &DockerImageAssetSource{
	SourceHash: jsii.String("sourceHash"),

	// the properties below are optional
	AssetName: jsii.String("assetName"),
	DirectoryName: jsii.String("directoryName"),
	DockerBuildArgs: map[string]*string{
		"dockerBuildArgsKey": jsii.String("dockerBuildArgs"),
	},
	DockerBuildSecrets: map[string]*string{
		"dockerBuildSecretsKey": jsii.String("dockerBuildSecrets"),
	},
	DockerBuildSsh: jsii.String("dockerBuildSsh"),
	DockerBuildTarget: jsii.String("dockerBuildTarget"),
	DockerCacheDisabled: jsii.Boolean(false),
	DockerCacheFrom: []dockerCacheOption{
		&dockerCacheOption{
			Type: jsii.String("type"),

			// the properties below are optional
			Params: map[string]*string{
				"paramsKey": jsii.String("params"),
			},
		},
	},
	DockerCacheTo: &dockerCacheOption{
		Type: jsii.String("type"),

		// the properties below are optional
		Params: map[string]*string{
			"paramsKey": jsii.String("params"),
		},
	},
	DockerFile: jsii.String("dockerFile"),
	DockerOutputs: []*string{
		jsii.String("dockerOutputs"),
	},
	Executable: []*string{
		jsii.String("executable"),
	},
	NetworkMode: jsii.String("networkMode"),
	Platform: jsii.String("platform"),
}

type DockerRunOptions ¶

type DockerRunOptions struct {
	// The command to run in the container.
	// Default: - run the command defined in the image.
	//
	Command *[]*string `field:"optional" json:"command" yaml:"command"`
	// The entrypoint to run in the container.
	// Default: - run the entrypoint defined in the image.
	//
	Entrypoint *[]*string `field:"optional" json:"entrypoint" yaml:"entrypoint"`
	// The environment variables to pass to the container.
	// Default: - no environment variables.
	//
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// 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"`
	// Set platform if server is multi-platform capable. _Requires Docker Engine API v1.38+_.
	//
	// Example value: `linux/amd64`.
	// Default: - no platform specified.
	//
	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 container.
	// Default: - root or image default.
	//
	User *string `field:"optional" json:"user" yaml:"user"`
	// Docker volumes to mount.
	// Default: - no 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 container.
	// Default: - image default.
	//
	WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
}

Docker run options.

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"

dockerRunOptions := &DockerRunOptions{
	Command: []*string{
		jsii.String("command"),
	},
	Entrypoint: []*string{
		jsii.String("entrypoint"),
	},
	Environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	Network: jsii.String("network"),
	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 DockerVolume ¶

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

A Docker volume.

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"

dockerVolume := &DockerVolume{
	ContainerPath: jsii.String("containerPath"),
	HostPath: jsii.String("hostPath"),

	// the properties below are optional
	Consistency: cdk.DockerVolumeConsistency_CONSISTENT,
}

type DockerVolumeConsistency ¶

type DockerVolumeConsistency string

Supported Docker volume consistency types.

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

const (
	// Read/write operations inside the Docker container are applied immediately on the mounted host machine volumes.
	DockerVolumeConsistency_CONSISTENT DockerVolumeConsistency = "CONSISTENT"
	// Read/write operations on mounted Docker volumes are first written inside the container and then synchronized to the host machine.
	DockerVolumeConsistency_DELEGATED DockerVolumeConsistency = "DELEGATED"
	// Read/write operations on mounted Docker volumes are first applied on the host machine and then synchronized to the container.
	DockerVolumeConsistency_CACHED DockerVolumeConsistency = "CACHED"
)

type Duration ¶

type Duration interface {
	// Returns stringified number of duration.
	FormatTokenToNumber() *string
	// Checks if duration is a token or a resolvable object.
	IsUnresolved() *bool
	// Substract two Durations together.
	Minus(rhs Duration) Duration
	// Add two Durations together.
	Plus(rhs Duration) Duration
	// Return the total number of days in this Duration.
	//
	// Returns: the value of this `Duration` expressed in Days.
	ToDays(opts *TimeConversionOptions) *float64
	// Return the total number of hours in this Duration.
	//
	// Returns: the value of this `Duration` expressed in Hours.
	ToHours(opts *TimeConversionOptions) *float64
	// Turn this duration into a human-readable string.
	ToHumanString() *string
	// Return an ISO 8601 representation of this period.
	//
	// Returns: a string starting with 'P' describing the period.
	// See: https://www.iso.org/standard/70907.html
	//
	ToIsoString() *string
	// Return the total number of milliseconds in this Duration.
	//
	// Returns: the value of this `Duration` expressed in Milliseconds.
	ToMilliseconds(opts *TimeConversionOptions) *float64
	// Return the total number of minutes in this Duration.
	//
	// Returns: the value of this `Duration` expressed in Minutes.
	ToMinutes(opts *TimeConversionOptions) *float64
	// Return the total number of seconds in this Duration.
	//
	// Returns: the value of this `Duration` expressed in Seconds.
	ToSeconds(opts *TimeConversionOptions) *float64
	// Returns a string representation of this `Duration`.
	//
	// This is is never the right function to use when you want to use the `Duration`
	// object in a template. Use `toSeconds()`, `toMinutes()`, `toDays()`, etc. instead.
	ToString() *string
	// Returns unit of the duration.
	UnitLabel() *string
}

Represents a length of time.

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

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

Example:

var myRole role

cr.NewAwsCustomResource(this, jsii.String("Customized"), &AwsCustomResourceProps{
	Role: myRole,
	 // must be assumable by the `lambda.amazonaws.com` service principal
	Timeout: awscdk.Duration_Minutes(jsii.Number(10)),
	 // defaults to 2 minutes
	MemorySize: jsii.Number(1025),
	 // defaults to 512 if installLatestAwsSdk is true
	LogGroup: logs.NewLogGroup(this, jsii.String("AwsCustomResourceLogs"), &LogGroupProps{
		Retention: logs.RetentionDays_ONE_DAY,
	}),
	FunctionName: jsii.String("my-custom-name"),
	 // defaults to a CloudFormation generated name
	RemovalPolicy: awscdk.RemovalPolicy_RETAIN,
	 // defaults to `RemovalPolicy.DESTROY`
	Policy: cr.AwsCustomResourcePolicy_FromSdkCalls(&SdkCallsPolicyOptions{
		Resources: cr.AwsCustomResourcePolicy_ANY_RESOURCE(),
	}),
})

func Duration_Days ¶

func Duration_Days(amount *float64) Duration

Create a Duration representing an amount of days.

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

func Duration_Hours ¶

func Duration_Hours(amount *float64) Duration

Create a Duration representing an amount of hours.

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

func Duration_Millis ¶

func Duration_Millis(amount *float64) Duration

Create a Duration representing an amount of milliseconds.

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

func Duration_Minutes ¶

func Duration_Minutes(amount *float64) Duration

Create a Duration representing an amount of minutes.

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

func Duration_Parse ¶

func Duration_Parse(duration *string) Duration

Parse a period formatted according to the ISO 8601 standard.

Days are the largest ISO duration supported, i.e., weeks, months, and years are not supported.

Returns: the parsed `Duration`.

Example:

// This represents 1 day, 2 hours, 3 minutes, 4 seconds, and 567 milliseconds.
"P1DT2H3M4.567S"

See: https://www.iso.org/standard/70907.html

func Duration_Seconds ¶

func Duration_Seconds(amount *float64) Duration

Create a Duration representing an amount of seconds.

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

type EncodingOptions ¶

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

Properties to string encodings.

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"

encodingOptions := &EncodingOptions{
	DisplayHint: jsii.String("displayHint"),
}

type Environment ¶

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

The deployment environment for a stack.

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,
	},
	Replicas: []replicaTableProps{
		&replicaTableProps{
			Region: jsii.String("us-east-1"),
		},
	},
})

globalTable.AddReplica(&replicaTableProps{
	Region: jsii.String("us-east-2"),
	DeletionProtection: jsii.Boolean(true),
})

type Expiration ¶

type Expiration interface {
	// Expiration value as a Date object.
	Date() *time.Time
	// Check if Expiration expires after input.
	IsAfter(t Duration) *bool
	// Check if Expiration expires before input.
	IsBefore(t Duration) *bool
	// Expiration Value in a formatted Unix Epoch Time in seconds.
	ToEpoch() *float64
}

Represents a date of expiration.

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

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"

expiration := cdk.Expiration_After(cdk.Duration_Minutes(jsii.Number(30)))

func Expiration_After ¶

func Expiration_After(t Duration) Expiration

Expire once the specified duration has passed since deployment time.

func Expiration_AtDate ¶

func Expiration_AtDate(d *time.Time) Expiration

Expire at the specified date.

func Expiration_AtTimestamp ¶

func Expiration_AtTimestamp(t *float64) Expiration

Expire at the specified timestamp.

func Expiration_FromString ¶

func Expiration_FromString(s *string) Expiration

Expire at specified date, represented as a string.

type ExportValueOptions ¶

type ExportValueOptions struct {
	// The description of the outputs.
	// Default: - No description.
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The name of the export to create.
	// Default: - A name is automatically chosen.
	//
	Name *string `field:"optional" json:"name" yaml:"name"`
}

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

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"

exportValueOptions := &ExportValueOptions{
	Description: jsii.String("description"),
	Name: jsii.String("name"),
}

type FeatureFlags ¶

type FeatureFlags interface {
	// Check whether a feature flag is enabled.
	//
	// If configured, the flag is present in
	// the construct node context. Falls back to the defaults defined in the `cx-api`
	// module.
	IsEnabled(featureFlag *string) *bool
}

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

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

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

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"

featureFlags := cdk.FeatureFlags_Of(this)

func FeatureFlags_Of ¶

func FeatureFlags_Of(scope constructs.IConstruct) FeatureFlags

Inspect feature flags on the construct node's context.

type FileAssetLocation ¶

type FileAssetLocation struct {
	// The name of the Amazon S3 bucket.
	BucketName *string `field:"required" json:"bucketName" yaml:"bucketName"`
	// The HTTP URL of this asset on Amazon S3.
	//
	// This value suitable for inclusion in a CloudFormation template, and
	// may be an encoded token.
	//
	// Example value: `https://s3-us-east-1.amazonaws.com/mybucket/myobject`
	HttpUrl *string `field:"required" json:"httpUrl" yaml:"httpUrl"`
	// The Amazon S3 object key.
	ObjectKey *string `field:"required" json:"objectKey" yaml:"objectKey"`
	// The S3 URL of this asset on Amazon S3.
	//
	// This value suitable for inclusion in a CloudFormation template, and
	// may be an encoded token.
	//
	// Example value: `s3://mybucket/myobject`.
	S3ObjectUrl *string `field:"required" json:"s3ObjectUrl" yaml:"s3ObjectUrl"`
	// The ARN of the KMS key used to encrypt the file asset bucket, if any.
	//
	// The CDK bootstrap stack comes with a key policy that does not require
	// setting this property, so you only need to set this property if you
	// have customized the bootstrap stack to require it.
	// Default: - Asset bucket is not encrypted, or decryption permissions are
	// defined by a Key Policy.
	//
	KmsKeyArn *string `field:"optional" json:"kmsKeyArn" yaml:"kmsKeyArn"`
	// Like `s3ObjectUrl`, but not suitable for CloudFormation consumption.
	//
	// If there are placeholders in the S3 URL, they will be returned un-replaced
	// and un-evaluated.
	// Default: - This feature cannot be used.
	//
	S3ObjectUrlWithPlaceholders *string `field:"optional" json:"s3ObjectUrlWithPlaceholders" yaml:"s3ObjectUrlWithPlaceholders"`
}

The location of the published file asset.

This is where the asset can be consumed at runtime.

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"

fileAssetLocation := &FileAssetLocation{
	BucketName: jsii.String("bucketName"),
	HttpUrl: jsii.String("httpUrl"),
	ObjectKey: jsii.String("objectKey"),
	S3ObjectUrl: jsii.String("s3ObjectUrl"),

	// the properties below are optional
	KmsKeyArn: jsii.String("kmsKeyArn"),
	S3ObjectUrlWithPlaceholders: jsii.String("s3ObjectUrlWithPlaceholders"),
}

type FileAssetPackaging ¶

type FileAssetPackaging string

Packaging modes for file assets.

const (
	// The asset source path points to a directory, which should be archived using zip and and then uploaded to Amazon S3.
	FileAssetPackaging_ZIP_DIRECTORY FileAssetPackaging = "ZIP_DIRECTORY"
	// The asset source path points to a single file, which should be uploaded to Amazon S3.
	FileAssetPackaging_FILE FileAssetPackaging = "FILE"
)

type FileAssetSource ¶

type FileAssetSource struct {
	// A hash on the content source.
	//
	// This hash is used to uniquely identify this
	// asset throughout the system. If this value doesn't change, the asset will
	// not be rebuilt or republished.
	SourceHash *string `field:"required" json:"sourceHash" yaml:"sourceHash"`
	// Whether or not the asset needs to exist beyond deployment time;
	//
	// i.e.
	// are copied over to a different location and not needed afterwards.
	// Setting this property to true has an impact on the lifecycle of the asset,
	// because we will assume that it is safe to delete after the CloudFormation
	// deployment succeeds.
	//
	// For example, Lambda Function assets are copied over to Lambda during
	// deployment. Therefore, it is not necessary to store the asset in S3, so
	// we consider those deployTime assets.
	// Default: false.
	//
	DeployTime *bool `field:"optional" json:"deployTime" yaml:"deployTime"`
	// An external command that will produce the packaged asset.
	//
	// The command should produce the location of a ZIP file on `stdout`.
	// Default: - Exactly one of `fileName` and `executable` is required.
	//
	Executable *[]*string `field:"optional" json:"executable" yaml:"executable"`
	// The path, relative to the root of the cloud assembly, in which this asset source resides.
	//
	// This can be a path to a file or a directory, depending on the
	// packaging type.
	// Default: - Exactly one of `fileName` and `executable` is required.
	//
	FileName *string `field:"optional" json:"fileName" yaml:"fileName"`
	// Which type of packaging to perform.
	// Default: - Required if `fileName` is specified.
	//
	Packaging FileAssetPackaging `field:"optional" json:"packaging" yaml:"packaging"`
}

Represents the source for a file asset.

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"

fileAssetSource := &FileAssetSource{
	SourceHash: jsii.String("sourceHash"),

	// the properties below are optional
	DeployTime: jsii.Boolean(false),
	Executable: []*string{
		jsii.String("executable"),
	},
	FileName: jsii.String("fileName"),
	Packaging: cdk.FileAssetPackaging_ZIP_DIRECTORY,
}

type FileCopyOptions ¶

type FileCopyOptions 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
	//
	FollowSymlinks SymlinkFollowMode `field:"optional" json:"followSymlinks" yaml:"followSymlinks"`
	// The ignore behavior to use for `exclude` patterns.
	// Default: IgnoreMode.GLOB
	//
	IgnoreMode IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"`
}

Options applied when copying directories into the staging location.

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"

fileCopyOptions := &FileCopyOptions{
	Exclude: []*string{
		jsii.String("exclude"),
	},
	FollowSymlinks: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
}

type FileFingerprintOptions ¶

type FileFingerprintOptions 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
	//
	FollowSymlinks SymlinkFollowMode `field:"optional" json:"followSymlinks" yaml:"followSymlinks"`
	// 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"`
}

Options related to calculating source hash.

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"

fileFingerprintOptions := &FileFingerprintOptions{
	Exclude: []*string{
		jsii.String("exclude"),
	},
	ExtraHash: jsii.String("extraHash"),
	FollowSymlinks: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
}

type FileSystem ¶

type FileSystem interface {
}

File system utilities.

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"

fileSystem := cdk.NewFileSystem()

func NewFileSystem ¶

func NewFileSystem() FileSystem

type FingerprintOptions ¶

type FingerprintOptions 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"`
}

Options related to calculating source hash.

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"

fingerprintOptions := &FingerprintOptions{
	Exclude: []*string{
		jsii.String("exclude"),
	},
	ExtraHash: jsii.String("extraHash"),
	Follow: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
}

type Fn ¶

type Fn interface {
}

CloudFormation intrinsic functions.

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

Example:

var cfnTemplate cfnInclude

// mutating the rule
var myParameter cfnParameter

rule := cfnTemplate.GetRule(jsii.String("MyRule"))
rule.AddAssertion(core.Fn_ConditionContains([]*string{
	jsii.String("m1.small"),
}, myParameter.valueAsString), jsii.String("MyParameter has to be m1.small"))

type GetContextKeyOptions ¶

type GetContextKeyOptions struct {
	// The context provider to query.
	Provider *string `field:"required" json:"provider" yaml:"provider"`
	// Whether to include the stack's account and region automatically.
	// Default: true.
	//
	IncludeEnvironment *bool `field:"optional" json:"includeEnvironment" yaml:"includeEnvironment"`
	// Provider-specific properties.
	Props *map[string]interface{} `field:"optional" json:"props" yaml:"props"`
}

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 props interface{}

getContextKeyOptions := &GetContextKeyOptions{
	Provider: jsii.String("provider"),

	// the properties below are optional
	IncludeEnvironment: jsii.Boolean(false),
	Props: map[string]interface{}{
		"propsKey": props,
	},
}

type GetContextKeyResult ¶

type GetContextKeyResult struct {
	Key   *string                 `field:"required" json:"key" yaml:"key"`
	Props *map[string]interface{} `field:"required" json:"props" yaml:"props"`
}

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 props interface{}

getContextKeyResult := &GetContextKeyResult{
	Key: jsii.String("key"),
	Props: map[string]interface{}{
		"propsKey": props,
	},
}

func ContextProvider_GetKey ¶

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

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

type GetContextValueOptions ¶

type GetContextValueOptions struct {
	// The context provider to query.
	Provider *string `field:"required" json:"provider" yaml:"provider"`
	// Whether to include the stack's account and region automatically.
	// Default: true.
	//
	IncludeEnvironment *bool `field:"optional" json:"includeEnvironment" yaml:"includeEnvironment"`
	// Provider-specific properties.
	Props *map[string]interface{} `field:"optional" json:"props" yaml:"props"`
	// The value to return if the context value was not found and a missing context is reported.
	//
	// This should be a dummy value that should preferably
	// fail during deployment since it represents an invalid state.
	DummyValue interface{} `field:"required" json:"dummyValue" yaml:"dummyValue"`
}

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 dummyValue interface{}
var props interface{}

getContextValueOptions := &GetContextValueOptions{
	DummyValue: dummyValue,
	Provider: jsii.String("provider"),

	// the properties below are optional
	IncludeEnvironment: jsii.Boolean(false),
	Props: map[string]interface{}{
		"propsKey": props,
	},
}

type GetContextValueResult ¶

type GetContextValueResult struct {
	Value interface{} `field:"optional" json:"value" yaml:"value"`
}

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 value interface{}

getContextValueResult := &GetContextValueResult{
	Value: value,
}

func ContextProvider_GetValue ¶

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

type GitIgnoreStrategy ¶

type GitIgnoreStrategy interface {
	IgnoreStrategy
	// Adds another pattern.
	Add(pattern *string)
	// Determines whether a given file path should be ignored or not.
	//
	// Returns: `true` if the file should be ignored.
	Ignores(absoluteFilePath *string) *bool
}

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

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"

gitIgnoreStrategy := cdk.NewGitIgnoreStrategy(jsii.String("absoluteRootPath"), []*string{
	jsii.String("patterns"),
})

func DockerIgnoreStrategy_Git ¶

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

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

Returns: `GitIgnorePattern` associated with the given patterns.

func GitIgnoreStrategy_Git ¶

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

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

Returns: `GitIgnorePattern` associated with the given patterns.

func GlobIgnoreStrategy_Git ¶

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

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

Returns: `GitIgnorePattern` associated with the given patterns.

func IgnoreStrategy_Git ¶

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

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

Returns: `GitIgnorePattern` associated with the given patterns.

func NewGitIgnoreStrategy ¶

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

type GlobIgnoreStrategy ¶

type GlobIgnoreStrategy interface {
	IgnoreStrategy
	// Adds another pattern.
	Add(pattern *string)
	// Determines whether a given file path should be ignored or not.
	//
	// Returns: `true` if the file should be ignored.
	Ignores(absoluteFilePath *string) *bool
}

Ignores file paths based on simple glob patterns.

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"

globIgnoreStrategy := cdk.NewGlobIgnoreStrategy(jsii.String("absoluteRootPath"), []*string{
	jsii.String("patterns"),
})

func DockerIgnoreStrategy_Glob ¶

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

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns.

func GitIgnoreStrategy_Glob ¶

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

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns.

func GlobIgnoreStrategy_Glob ¶

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

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns.

func IgnoreStrategy_Glob ¶

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

Ignores file paths based on simple glob patterns.

Returns: `GlobIgnorePattern` associated with the given patterns.

func NewGlobIgnoreStrategy ¶

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

type IAnyProducer ¶

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

Interface for lazy untyped value producers.

type IAspect ¶

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

Represents an Aspect.

type IAsset ¶

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

Common interface for all assets.

type IBoundStackSynthesizer ¶ added in v2.61.0

type IBoundStackSynthesizer interface {
	IStackSynthesizer
}

A Stack Synthesizer, obtained from `IReusableStackSynthesizer.`.

Just a type alias with a very concrete contract.

type ICfnConditionExpression ¶

type ICfnConditionExpression interface {
	IResolvable
}

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

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

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

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

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

```ts

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

```.

type ICfnResourceOptions ¶

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

type ICfnRuleConditionExpression ¶

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

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

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

func Fn_ConditionAnd ¶

func Fn_ConditionAnd(conditions ...ICfnConditionExpression) ICfnRuleConditionExpression

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

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

Returns: an FnCondition token.

func Fn_ConditionContains ¶

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

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

Returns: an FnCondition token.

func Fn_ConditionEachMemberEquals ¶

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

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

Returns: an FnCondition token.

func Fn_ConditionEachMemberIn ¶

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

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

Returns: an FnCondition token.

func Fn_ConditionEquals ¶

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

Compares if two values are equal.

Returns true if the two values are equal or false if they aren't.

Returns: an FnCondition token.

func Fn_ConditionIf ¶

func Fn_ConditionIf(conditionId *string, valueIfTrue interface{}, valueIfFalse interface{}) ICfnRuleConditionExpression

Returns one value if the specified condition evaluates to true and another value if the specified condition evaluates to false.

Currently, AWS CloudFormation supports the “Fn::If“ intrinsic function in the metadata attribute, update policy attribute, and property values in the Resources section and Outputs sections of a template. You can use the AWS::NoValue pseudo parameter as a return value to remove the corresponding property.

Returns: an FnCondition token.

func Fn_ConditionNot ¶

func Fn_ConditionNot(condition ICfnConditionExpression) ICfnRuleConditionExpression

Returns true for a condition that evaluates to false or returns false for a condition that evaluates to true.

“Fn::Not“ acts as a NOT operator.

Returns: an FnCondition token.

func Fn_ConditionOr ¶

func Fn_ConditionOr(conditions ...ICfnConditionExpression) ICfnRuleConditionExpression

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

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

Returns: an FnCondition token.

type IFragmentConcatenator ¶

type IFragmentConcatenator interface {
	// Join the fragment on the left and on the right.
	Join(left interface{}, right interface{}) interface{}
}

Function used to concatenate symbols in the target document language.

Interface so it could potentially be exposed over jsii.

type IInspectable ¶

type IInspectable interface {
	// Examines construct.
	Inspect(inspector TreeInspector)
}

Interface for examining a construct and exposing metadata.

type IListProducer ¶

type IListProducer interface {
	// Produce the list value.
	Produce(context IResolveContext) *[]*string
}

Interface for lazy list producers.

type ILocalBundling ¶

type ILocalBundling interface {
	// This method is called before attempting docker bundling to allow the bundler to be executed locally.
	//
	// If the local bundler exists, and bundling
	// was performed locally, return `true`. Otherwise, return `false`.
	TryBundle(outputDir *string, options *BundlingOptions) *bool
}

Local bundling.

type INumberProducer ¶

type INumberProducer interface {
	// Produce the number value.
	Produce(context IResolveContext) *float64
}

Interface for lazy number producers.

type IPolicyValidationContextBeta1 ¶ added in v2.71.0

type IPolicyValidationContextBeta1 interface {
	// The absolute path of all templates to be processed.
	TemplatePaths() *[]*string
}

Context available to the validation plugin.

type IPolicyValidationPluginBeta1 ¶ added in v2.71.0

type IPolicyValidationPluginBeta1 interface {
	// The method that will be called by the CDK framework to perform validations.
	//
	// This is where the plugin will evaluate the CloudFormation
	// templates for compliance and report and violations.
	Validate(context IPolicyValidationContextBeta1) *PolicyValidationPluginReportBeta1
	// The name of the plugin that will be displayed in the validation report.
	Name() *string
	// The list of rule IDs that the plugin will evaluate.
	//
	// Used for analytics
	// purposes.
	// Default: - No rule is reported.
	//
	RuleIds() *[]*string
	// The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
	Version() *string
}

Represents a validation plugin that will be executed during synthesis.

Example:

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"),
						},
					},
				},
			},
		},
	}
}

type IPostProcessor ¶

type IPostProcessor interface {
	// Process the completely resolved value, after full recursion/resolution has happened.
	PostProcess(input interface{}, context IResolveContext) interface{}
}

A Token that can post-process the complete resolved value, after resolve() has recursed over it.

type IResolvable ¶

type IResolvable interface {
	// Produce the Token's value at resolution time.
	Resolve(context IResolveContext) interface{}
	// Return a string representation of this resolvable object.
	//
	// Returns a reversible string representation.
	ToString() *string
	// The creation stack of this resolvable which will be appended to errors thrown during resolution.
	//
	// This may return an array with a single informational element indicating how
	// to get this property populated, if it was skipped for performance reasons.
	CreationStack() *[]*string
	// The type that this token will likely resolve to.
	TypeHint() ResolutionTypeHint
}

Interface for values that can be resolvable later.

Tokens are special objects that participate in synthesis.

func Fn_GetAtt ¶

func Fn_GetAtt(logicalNameOfResource *string, attributeName *string) IResolvable

The “Fn::GetAtt“ intrinsic function returns the value of an attribute from a resource in the template.

Returns: an IResolvable object.

func Fn_Transform ¶

func Fn_Transform(macroName *string, parameters *map[string]interface{}) IResolvable

Creates a token representing the “Fn::Transform“ expression.

Returns: a token representing the transform expression. See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-transform.html

func Lazy_Any ¶

func Lazy_Any(producer IStableAnyProducer, options *LazyAnyValueOptions) IResolvable

Defer the one-time calculation of an arbitrarily typed value to synthesis time.

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

The inner function will only be invoked one time and cannot depend on resolution context.

func Lazy_UncachedAny ¶

func Lazy_UncachedAny(producer IAnyProducer, options *LazyAnyValueOptions) IResolvable

Defer the calculation of an untyped value to synthesis time.

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

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

func Token_AsAny ¶

func Token_AsAny(value interface{}) IResolvable

Return a resolvable representation of the given value.

func Tokenization_Reverse ¶

func Tokenization_Reverse(x interface{}, options *ReverseOptions) IResolvable

Reverse any value into a Resolvable, if possible.

In case of a string, the string must not be a concatenation.

func Tokenization_ReverseCompleteString ¶

func Tokenization_ReverseCompleteString(s *string) IResolvable

Un-encode a string which is either a complete encoded token, or doesn't contain tokens at all.

It's illegal for the string to be a concatenation of an encoded token and something else.

func Tokenization_ReverseList ¶

func Tokenization_ReverseList(l *[]*string) IResolvable

Un-encode a Tokenized value from a list.

func Tokenization_ReverseNumber ¶

func Tokenization_ReverseNumber(n *float64) IResolvable

Un-encode a Tokenized value from a number.

type IResolveContext ¶

type IResolveContext interface {
	// Use this postprocessor after the entire token structure has been resolved.
	RegisterPostProcessor(postProcessor IPostProcessor)
	// Resolve an inner object.
	Resolve(x interface{}, options *ResolveChangeContextOptions) interface{}
	// Path in the JSON document that is being constructed.
	DocumentPath() *[]*string
	// True when we are still preparing, false if we're rendering the final output.
	Preparing() *bool
	// The scope from which resolution has been initiated.
	Scope() constructs.IConstruct
}

Current resolution context for tokens.

type IResource ¶

type IResource interface {
	constructs.IConstruct
	// Apply the given removal policy to this resource.
	//
	// 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`).
	ApplyRemovalPolicy(policy RemovalPolicy)
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *ResourceEnvironment
	// The stack in which this resource is defined.
	Stack() Stack
}

Interface for the Resource construct.

type IReusableStackSynthesizer ¶ added in v2.61.0

type IReusableStackSynthesizer interface {
	IStackSynthesizer
	// 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
}

Interface for Stack Synthesizers that can be used for more than one stack.

Regular `IStackSynthesizer` instances can only be bound to a Stack once. `IReusableStackSynthesizer` instances.

For backwards compatibility reasons, this class inherits from `IStackSynthesizer`, but if an object implements `IReusableStackSynthesizer`, no other methods than `reusableBind()` will be called.

type IStableAnyProducer ¶

type IStableAnyProducer interface {
	// Produce the value.
	Produce() interface{}
}

Interface for (stable) lazy untyped value producers.

type IStableListProducer ¶

type IStableListProducer interface {
	// Produce the list value.
	Produce() *[]*string
}

Interface for (stable) lazy list producers.

type IStableNumberProducer ¶

type IStableNumberProducer interface {
	// Produce the number value.
	Produce() *float64
}

Interface for (stable) lazy number producers.

type IStableStringProducer ¶

type IStableStringProducer interface {
	// Produce the string value.
	Produce() *string
}

Interface for (stable) lazy string producers.

type IStackSynthesizer ¶

type IStackSynthesizer interface {
	// Register a Docker Image Asset.
	//
	// Returns the parameters that can be used to refer to the asset inside the template.
	AddDockerImageAsset(asset *DockerImageAssetSource) *DockerImageAssetLocation
	// Register a File Asset.
	//
	// Returns the parameters that can be used to refer to the asset inside the template.
	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, and can only be called once.
	Bind(stack Stack)
	// Synthesize the associated stack to the session.
	Synthesize(session ISynthesisSession)
	// The qualifier used to bootstrap this stack.
	// Default: - no qualifier.
	//
	BootstrapQualifier() *string
	// The role used to lookup for this stack.
	// Default: - no role.
	//
	LookupRole() *string
}

Encodes information how a certain Stack should be deployed.

type IStringProducer ¶

type IStringProducer interface {
	// Produce the string value.
	Produce(context IResolveContext) *string
}

Interface for lazy string producers.

type ISynthesisSession ¶

type ISynthesisSession interface {
	// Cloud assembly builder.
	Assembly() cxapi.CloudAssemblyBuilder
	SetAssembly(a cxapi.CloudAssemblyBuilder)
	// The output directory for this synthesis session.
	Outdir() *string
	SetOutdir(o *string)
	// Whether the stack should be validated after synthesis to check for error metadata.
	// Default: - false.
	//
	ValidateOnSynth() *bool
	SetValidateOnSynth(v *bool)
}

Represents a single session of synthesis.

Passed into `Construct.synthesize()` methods.

type ITaggable ¶

type ITaggable interface {
	// TagManager to set, remove and format tags.
	Tags() TagManager
}

Interface to implement tags.

type ITaggableV2 ¶ added in v2.81.0

type ITaggableV2 interface {
	// TagManager to set, remove and format tags.
	CdkTagManager() TagManager
}

Modernized version of ITaggable.

`ITaggable` has a problem: for a number of L1 resources, we failed to generate `tags: TagManager`, and generated `tags: CfnSomeResource.TagProperty[]` instead.

To mark these resources as taggable, we need to put the `TagManager` in a new property whose name is unlikely to conflict with any existing properties. Hence, a new interface for that purpose. All future resources will implement `ITaggableV2`.

type ITemplateOptions ¶

type ITemplateOptions interface {
	// Gets or sets the description of this stack.
	//
	// If provided, it will be included in the CloudFormation template's "Description" attribute.
	Description() *string
	SetDescription(d *string)
	// Metadata associated with the CloudFormation template.
	Metadata() *map[string]interface{}
	SetMetadata(m *map[string]interface{})
	// Gets or sets the AWSTemplateFormatVersion field of the CloudFormation template.
	TemplateFormatVersion() *string
	SetTemplateFormatVersion(t *string)
	// Gets or sets the top-level template transform(s) for this stack (e.g. `["AWS::Serverless-2016-10-31"]`).
	Transforms() *[]*string
	SetTransforms(t *[]*string)
}

CloudFormation template options for a stack.

type ITokenMapper ¶

type ITokenMapper interface {
	// Replace a single token.
	MapToken(t IResolvable) interface{}
}

Interface to apply operation to tokens in a string.

Interface so it can be exported via jsii.

type ITokenResolver ¶

type ITokenResolver interface {
	// Resolve a tokenized list.
	ResolveList(l *[]*string, context IResolveContext) interface{}
	// Resolve a string with at least one stringified token in it.
	//
	// (May use concatenation).
	ResolveString(s TokenizedStringFragments, context IResolveContext) interface{}
	// Resolve a single token.
	ResolveToken(t IResolvable, context IResolveContext, postProcessor IPostProcessor) interface{}
}

How to resolve tokens.

type IgnoreMode ¶

type IgnoreMode string

Determines the ignore behavior to use.

Example:

lambda.NewFunction(this, jsii.String("Function"), &FunctionProps{
	Code: lambda.Code_FromAsset(path.join(__dirname, jsii.String("my-python-handler")), &AssetOptions{
		Exclude: []*string{
			jsii.String("*.ignore"),
		},
		IgnoreMode: awscdk.IgnoreMode_DOCKER,
	}),
	Runtime: lambda.Runtime_PYTHON_3_9(),
	Handler: jsii.String("index.handler"),
})
const (
	// Ignores file paths based on simple glob patterns.
	//
	// This is the default for file assets.
	//
	// It is also the default for Docker image assets, unless the '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport'
	// context flag is set.
	IgnoreMode_GLOB IgnoreMode = "GLOB"
	// Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore).
	IgnoreMode_GIT IgnoreMode = "GIT"
	// Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file).
	//
	// This is the default for Docker image assets if the '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport'
	// context flag is set.
	IgnoreMode_DOCKER IgnoreMode = "DOCKER"
)

type IgnoreStrategy ¶

type IgnoreStrategy interface {
	// Adds another pattern.
	Add(pattern *string)
	// Determines whether a given file path should be ignored or not.
	//
	// Returns: `true` if the file should be ignored.
	Ignores(absoluteFilePath *string) *bool
}

Represents file path ignoring behavior.

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"

ignoreStrategy := cdk.IgnoreStrategy_FromCopyOptions(&CopyOptions{
	Exclude: []*string{
		jsii.String("exclude"),
	},
	Follow: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
}, jsii.String("absoluteRootPath"))

func DockerIgnoreStrategy_FromCopyOptions ¶

func DockerIgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions`.

func GitIgnoreStrategy_FromCopyOptions ¶

func GitIgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions`.

func GlobIgnoreStrategy_FromCopyOptions ¶

func GlobIgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions`.

func IgnoreStrategy_FromCopyOptions ¶

func IgnoreStrategy_FromCopyOptions(options *CopyOptions, absoluteRootPath *string) IgnoreStrategy

Creates an IgnoreStrategy based on the `ignoreMode` and `exclude` in a `CopyOptions`.

Returns: `IgnoreStrategy` based on the `CopyOptions`.

type Intrinsic ¶

type Intrinsic interface {
	IResolvable
	// 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
}

Token subclass that represents values intrinsic to the target document language.

WARNING: this class should not be externally exposed, but is currently visible because of a limitation of jsii (https://github.com/aws/jsii/issues/524).

This class will disappear in a future release and should not be used.

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 value interface{}

intrinsic := cdk.NewIntrinsic(value, &IntrinsicProps{
	StackTrace: jsii.Boolean(false),
	TypeHint: cdk.ResolutionTypeHint_STRING,
})

func NewIntrinsic ¶

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

type IntrinsicProps ¶

type IntrinsicProps struct {
	// Capture the stack trace of where this token is created.
	// Default: true.
	//
	StackTrace *bool `field:"optional" json:"stackTrace" yaml:"stackTrace"`
	// Type that this token is expected to evaluate to.
	// Default: ResolutionTypeHint.STRING
	//
	TypeHint ResolutionTypeHint `field:"optional" json:"typeHint" yaml:"typeHint"`
}

Customization properties for an Intrinsic token.

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"

intrinsicProps := &IntrinsicProps{
	StackTrace: jsii.Boolean(false),
	TypeHint: cdk.ResolutionTypeHint_STRING,
}

type JsonNull ¶ added in v2.69.0

type JsonNull interface {
	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
	// Produce the Token's value at resolution time.
	Resolve(_ctx IResolveContext) interface{}
	// Obtains the JSON representation of this object (`null`).
	ToJSON() interface{}
	// Obtains the string representation of this object (`'null'`).
	ToString() *string
}

An object which serializes to the JSON `null` literal, and which can safely be passed across languages where `undefined` and `null` are not different.

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"

jsonNull := cdk.JsonNull_INSTANCE()

func JsonNull_INSTANCE ¶ added in v2.69.0

func JsonNull_INSTANCE() JsonNull

type Lazy ¶

type Lazy interface {
}

Lazily produce a value.

Can be used to return a string, list or numeric value whose actual value will only be calculated later, during synthesis.

type LazyAnyValueOptions ¶

type LazyAnyValueOptions struct {
	// Use the given name as a display hint.
	// Default: - No hint.
	//
	DisplayHint *string `field:"optional" json:"displayHint" yaml:"displayHint"`
	// If the produced value is an array and it is empty, return 'undefined' instead.
	// Default: false.
	//
	OmitEmptyArray *bool `field:"optional" json:"omitEmptyArray" yaml:"omitEmptyArray"`
}

Options for creating lazy untyped tokens.

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"

lazyAnyValueOptions := &LazyAnyValueOptions{
	DisplayHint: jsii.String("displayHint"),
	OmitEmptyArray: jsii.Boolean(false),
}

type LazyListValueOptions ¶

type LazyListValueOptions struct {
	// Use the given name as a display hint.
	// Default: - No hint.
	//
	DisplayHint *string `field:"optional" json:"displayHint" yaml:"displayHint"`
	// If the produced list is empty, return 'undefined' instead.
	// Default: false.
	//
	OmitEmpty *bool `field:"optional" json:"omitEmpty" yaml:"omitEmpty"`
}

Options for creating a lazy list token.

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"

lazyListValueOptions := &LazyListValueOptions{
	DisplayHint: jsii.String("displayHint"),
	OmitEmpty: jsii.Boolean(false),
}

type LazyStringValueOptions ¶

type LazyStringValueOptions struct {
	// Use the given name as a display hint.
	// Default: - No hint.
	//
	DisplayHint *string `field:"optional" json:"displayHint" yaml:"displayHint"`
}

Options for creating a lazy string token.

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"

lazyStringValueOptions := &LazyStringValueOptions{
	DisplayHint: jsii.String("displayHint"),
}

type LegacyStackSynthesizer ¶

type LegacyStackSynthesizer interface {
	StackSynthesizer
	IBoundStackSynthesizer
	IReusableStackSynthesizer
	// The qualifier used to bootstrap this stack.
	BootstrapQualifier() *string
	// Retrieve the bound stack.
	//
	// Fails if the stack hasn't been bound yet.
	BoundStack() Stack
	// The role used to lookup for this stack.
	LookupRole() *string
	// 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)
	// Have the stack write out its template.
	// Deprecated: Use `synthesizeTemplate` instead.
	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
}

Use the CDK classic way of referencing assets.

This synthesizer will generate CloudFormation parameters for every referenced asset, and use the CLI's current credentials to deploy the stack.

  • It does not support cross-account deployment (the CLI must have credentials to the account you are trying to deploy to).
  • It cannot be used with **CDK Pipelines**. To deploy using CDK Pipelines, you must use the `DefaultStackSynthesizer`.
  • Each asset will take up a CloudFormation Parameter in your template. Keep in mind that there is a maximum of 200 parameters in a CloudFormation template. To use deterministic asset locations instead, use `CliCredentialsStackSynthesizer`.

Be aware that your CLI credentials must be valid for the duration of the entire deployment. If you are using session credentials, make sure the session lifetime is long enough.

This is the only StackSynthesizer that supports customizing asset behavior by overriding `Stack.addFileAsset()` and `Stack.addDockerImageAsset()`.

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"

legacyStackSynthesizer := cdk.NewLegacyStackSynthesizer()

func NewLegacyStackSynthesizer ¶

func NewLegacyStackSynthesizer() LegacyStackSynthesizer

type Names ¶

type Names interface {
}

Functions for devising unique names for constructs.

For example, those can be used to allocate unique physical names for resources.

type NestedStack ¶

type NestedStack interface {
	Stack
	// The AWS account into which this stack will be deployed.
	//
	// This value is resolved according to the following rules:
	//
	// 1. The value provided to `env.account` when the stack is defined. This can
	//    either be a concrete account (e.g. `585695031111`) or the
	//    `Aws.ACCOUNT_ID` token.
	// 3. `Aws.ACCOUNT_ID`, which represents the CloudFormation intrinsic reference
	//    `{ "Ref": "AWS::AccountId" }` encoded as a string token.
	//
	// Preferably, you should use the return value as an opaque string and not
	// attempt to parse it to implement your logic. If you do, you must first
	// check that it is a concrete value an not an unresolved token. If this
	// value is an unresolved token (`Token.isUnresolved(stack.account)` returns
	// `true`), this implies that the user wishes that this stack will synthesize
	// into a **account-agnostic template**. In this case, your code should either
	// fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
	// implement some other region-agnostic behavior.
	Account() *string
	// The ID of the cloud assembly artifact for this stack.
	ArtifactId() *string
	// Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack.
	//
	// If the stack is environment-agnostic (either account and/or region are
	// tokens), this property will return an array with 2 tokens that will resolve
	// at deploy-time to the first two availability zones returned from CloudFormation's
	// `Fn::GetAZs` intrinsic function.
	//
	// If they are not available in the context, returns a set of dummy values and
	// reports them as missing, and let the CLI resolve them by calling EC2
	// `DescribeAvailabilityZones` on the target environment.
	//
	// To specify a different strategy for selecting availability zones override this method.
	AvailabilityZones() *[]*string
	// Indicates whether the stack requires bundling or not.
	BundlingRequired() *bool
	// Return the stacks this stack depends on.
	Dependencies() *[]Stack
	// The environment coordinates in which this stack is deployed.
	//
	// In the form
	// `aws://account/region`. Use `stack.account` and `stack.region` to obtain
	// the specific values, no need to parse.
	//
	// You can use this value to determine if two stacks are targeting the same
	// environment.
	//
	// If either `stack.account` or `stack.region` are not concrete values (e.g.
	// `Aws.ACCOUNT_ID` or `Aws.REGION`) the special strings `unknown-account` and/or
	// `unknown-region` will be used respectively to indicate this stack is
	// region/account-agnostic.
	Environment() *string
	// Indicates if this is a nested stack, in which case `parentStack` will include a reference to it's parent.
	Nested() *bool
	// If this is a nested stack, returns it's parent stack.
	NestedStackParent() Stack
	// If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource.
	//
	// `undefined` for top-level (non-nested) stacks.
	NestedStackResource() CfnResource
	// The tree node.
	Node() constructs.Node
	// Returns the list of notification Amazon Resource Names (ARNs) for the current stack.
	NotificationArns() *[]*string
	// The partition in which this stack is defined.
	Partition() *string
	// The AWS region into which this stack will be deployed (e.g. `us-west-2`).
	//
	// This value is resolved according to the following rules:
	//
	// 1. The value provided to `env.region` when the stack is defined. This can
	//    either be a concrete region (e.g. `us-west-2`) or the `Aws.REGION`
	//    token.
	// 3. `Aws.REGION`, which is represents the CloudFormation intrinsic reference
	//    `{ "Ref": "AWS::Region" }` encoded as a string token.
	//
	// Preferably, you should use the return value as an opaque string and not
	// attempt to parse it to implement your logic. If you do, you must first
	// check that it is a concrete value an not an unresolved token. If this
	// value is an unresolved token (`Token.isUnresolved(stack.region)` returns
	// `true`), this implies that the user wishes that this stack will synthesize
	// into a **region-agnostic template**. In this case, your code should either
	// fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
	// implement some other region-agnostic behavior.
	Region() *string
	// An attribute that represents the ID of the stack.
	//
	// This is a context aware attribute:
	// - If this is referenced from the parent stack, it will return `{ "Ref": "LogicalIdOfNestedStackResource" }`.
	// - If this is referenced from the context of the nested stack, it will return `{ "Ref": "AWS::StackId" }`
	//
	// Example value: `arn:aws:cloudformation:us-east-2:123456789012:stack/mystack-mynestedstack-sggfrhxhum7w/f449b250-b969-11e0-a185-5081d0136786`.
	StackId() *string
	// An attribute that represents the name of the nested stack.
	//
	// This is a context aware attribute:
	// - If this is referenced from the parent stack, it will return a token that parses the name from the stack ID.
	// - If this is referenced from the context of the nested stack, it will return `{ "Ref": "AWS::StackName" }`
	//
	// Example value: `mystack-mynestedstack-sggfrhxhum7w`.
	StackName() *string
	// Synthesis method for this stack.
	Synthesizer() IStackSynthesizer
	// Tags to be applied to the stack.
	Tags() TagManager
	// The name of the CloudFormation template file emitted to the output directory during synthesis.
	//
	// Example value: `MyStack.template.json`
	TemplateFile() *string
	// Options for CloudFormation template (like version, transform, description).
	TemplateOptions() ITemplateOptions
	// Whether termination protection is enabled for this stack.
	TerminationProtection() *bool
	SetTerminationProtection(val *bool)
	// The Amazon domain suffix for the region in which this stack is defined.
	UrlSuffix() *string
	// Add a dependency between this stack and another stack.
	//
	// This can be used to define dependencies between any two stacks within an
	// app, and also supports nested stacks.
	AddDependency(target Stack, reason *string)
	// Adds an arbitary key-value pair, with information you want to record about the stack.
	//
	// These get translated to the Metadata section of the generated template.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	AddMetadata(key *string, value interface{})
	// Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template.
	//
	// Duplicate values are removed when stack is synthesized.
	//
	// Example:
	//   declare const stack: Stack;
	//
	//   stack.addTransform('AWS::Serverless-2016-10-31')
	//
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html
	//
	AddTransform(transform *string)
	// Returns the naming scheme used to allocate logical IDs.
	//
	// By default, uses
	// the `HashedAddressingScheme` but this method can be overridden to customize
	// this behavior.
	//
	// In order to make sure logical IDs are unique and stable, we hash the resource
	// construct tree path (i.e. toplevel/secondlevel/.../myresource) and add it as
	// a suffix to the path components joined without a separator (CloudFormation
	// IDs only allow alphanumeric characters).
	//
	// The result will be:
	//
	//   <path.join(”)><md5(path.join('/')>
	//     "human"      "hash"
	//
	// If the "human" part of the ID exceeds 240 characters, we simply trim it so
	// the total ID doesn't exceed CloudFormation's 255 character limit.
	//
	// We only take 8 characters from the md5 hash (0.000005 chance of collision).
	//
	// Special cases:
	//
	// - If the path only contains a single component (i.e. it's a top-level
	//   resource), we won't add the hash to it. The hash is not needed for
	//   disambiguation and also, it allows for a more straightforward migration an
	//   existing CloudFormation template to a CDK stack without logical ID changes
	//   (or renames).
	// - For aesthetic reasons, if the last components of the path are the same
	//   (i.e. `L1/L2/Pipeline/Pipeline`), they will be de-duplicated to make the
	//   resulting human portion of the ID more pleasing: `L1L2Pipeline<HASH>`
	//   instead of `L1L2PipelinePipeline<HASH>`
	// - If a component is named "Default" it will be omitted from the path. This
	//   allows refactoring higher level abstractions around constructs without affecting
	//   the IDs of already deployed resources.
	// - If a component is named "Resource" it will be omitted from the user-visible
	//   path, but included in the hash. This reduces visual noise in the human readable
	//   part of the identifier.
	AllocateLogicalId(cfnElement CfnElement) *string
	// Create a CloudFormation Export for a string list value.
	//
	// Returns a string list representing the corresponding `Fn.importValue()`
	// expression for this Export. The export expression is automatically wrapped with an
	// `Fn::Join` and the import value with an `Fn::Split`, since CloudFormation can only
	// export strings. You can control the name for the export by passing the `name` option.
	//
	// If you don't supply a value for `name`, the value you're exporting must be
	// a Resource attribute (for example: `bucket.bucketName`) and it will be
	// given the same name as the automatic cross-stack reference that would be created
	// if you used the attribute in another Stack.
	//
	// One of the uses for this method is to *remove* the relationship between
	// two Stacks established by automatic cross-stack references. It will
	// temporarily ensure that the CloudFormation Export still exists while you
	// remove the reference from the consuming stack. After that, you can remove
	// the resource and the manual export.
	//
	// See `exportValue` for an example of this process.
	ExportStringListValue(exportedValue interface{}, options *ExportValueOptions) *[]*string
	// Create a CloudFormation Export for a string value.
	//
	// Returns a string representing the corresponding `Fn.importValue()`
	// expression for this Export. You can control the name for the export by
	// passing the `name` option.
	//
	// If you don't supply a value for `name`, the value you're exporting must be
	// a Resource attribute (for example: `bucket.bucketName`) and it will be
	// given the same name as the automatic cross-stack reference that would be created
	// if you used the attribute in another Stack.
	//
	// One of the uses for this method is to *remove* the relationship between
	// two Stacks established by automatic cross-stack references. It will
	// temporarily ensure that the CloudFormation Export still exists while you
	// remove the reference from the consuming stack. After that, you can remove
	// the resource and the manual export.
	//
	// Here is how the process works. Let's say there are two stacks,
	// `producerStack` and `consumerStack`, and `producerStack` has a bucket
	// called `bucket`, which is referenced by `consumerStack` (perhaps because
	// an AWS Lambda Function writes into it, or something like that).
	//
	// It is not safe to remove `producerStack.bucket` because as the bucket is being
	// deleted, `consumerStack` might still be using it.
	//
	// Instead, the process takes two deployments:
	//
	// **Deployment 1: break the relationship**:
	//
	// - Make sure `consumerStack` 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 `ProducerStack` 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 `consumerStack`, but it's safe to deploy both).
	//
	// **Deployment 2: remove the bucket resource**:
	//
	// - You are now free to remove the `bucket` resource from `producerStack`.
	// - Don't forget to remove the `exportValue()` call as well.
	// - Deploy again (this time only the `producerStack` will be changed -- the bucket will be deleted).
	ExportValue(exportedValue interface{}, options *ExportValueOptions) *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'.
	FormatArn(components *ArnComponents) *string
	// Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource.
	//
	// This method is called when a `CfnElement` is created and used to render the
	// initial logical identity of resources. Logical ID renames are applied at
	// this stage.
	//
	// This method uses the protected method `allocateLogicalId` to render the
	// logical ID for an element. To modify the naming scheme, extend the `Stack`
	// class and override this method.
	GetLogicalId(element CfnElement) *string
	// Look up a fact value for the given fact for the region of this stack.
	//
	// Will return a definite value only if the region of the current stack is resolved.
	// If not, a lookup map will be added to the stack and the lookup will be done at
	// CDK deployment time.
	//
	// What regions will be included in the lookup map is controlled by the
	// `@aws-cdk/core:target-partitions` context value: it must be set to a list
	// of partitions, and only regions from the given partitions will be included.
	// If no such context key is set, all regions will be included.
	//
	// This function is intended to be used by construct library authors. Application
	// builders can rely on the abstractions offered by construct libraries and do
	// not have to worry about regional facts.
	//
	// If `defaultValue` is not given, it is an error if the fact is unknown for
	// the given region.
	RegionalFact(factName *string, defaultValue *string) *string
	// Rename a generated logical identities.
	//
	// To modify the naming scheme strategy, extend the `Stack` class and
	// override the `allocateLogicalId` method.
	RenameLogicalId(oldId *string, newId *string)
	// Indicate that a context key was expected.
	//
	// Contains instructions which will be emitted into the cloud assembly on how
	// the key should be supplied.
	ReportMissingContextKey(report *cloudassemblyschema.MissingContext)
	// Resolve a tokenized value in the context of the current stack.
	Resolve(obj interface{}) interface{}
	// Assign a value to one of the nested stack parameters.
	SetParameter(name *string, value *string)
	// 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).
	SplitArn(arn *string, arnFormat ArnFormat) *ArnComponents
	// Convert an object, potentially containing tokens, to a JSON string.
	ToJsonString(obj interface{}, space *float64) *string
	// Returns a string representation of this construct.
	ToString() *string
	// Convert an object, potentially containing tokens, to a YAML string.
	ToYamlString(obj interface{}) *string
}

A CloudFormation nested stack.

When you apply template changes to update a top-level stack, CloudFormation updates the top-level stack and initiates an update to its nested stacks. CloudFormation updates the resources of modified nested stacks, but does not update the resources of unmodified nested stacks.

Furthermore, this stack will not be treated as an independent deployment artifact (won't be listed in "cdk list" or deployable through "cdk deploy"), but rather only synthesized as a template and uploaded as an asset to S3.

Cross references of resource attributes between the parent stack and the nested stack will automatically be translated to stack parameters and outputs.

Example:

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

/**
 * This file showcases how to split up a RestApi's Resources and Methods across nested stacks.
 *
 * The root stack 'RootStack' first defines a RestApi.
 * Two nested stacks BooksStack and PetsStack, create corresponding Resources '/books' and '/pets'.
 * They are then deployed to a 'prod' Stage via a third nested stack - DeployStack.
 *
 * To verify this worked, go to the APIGateway
 */

type rootStack struct {
	stack
}

func newRootStack(scope construct) *rootStack {
	this := &rootStack{}
	newStack_Override(this, scope, jsii.String("integ-restapi-import-RootStack"))

	restApi := awscdk.NewRestApi(this, jsii.String("RestApi"), &RestApiProps{
		CloudWatchRole: jsii.Boolean(true),
		Deploy: jsii.Boolean(false),
	})
	restApi.Root.AddMethod(jsii.String("ANY"))

	petsStack := NewPetsStack(this, &resourceNestedStackProps{
		restApiId: restApi.RestApiId,
		rootResourceId: restApi.RestApiRootResourceId,
	})
	booksStack := NewBooksStack(this, &resourceNestedStackProps{
		restApiId: restApi.*RestApiId,
		rootResourceId: restApi.*RestApiRootResourceId,
	})
	NewDeployStack(this, &deployStackProps{
		restApiId: restApi.*RestApiId,
		methods: petsStack.methods.concat(booksStack.methods),
	})

	awscdk.NewCfnOutput(this, jsii.String("PetsURL"), &CfnOutputProps{
		Value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/pets", restApi.*RestApiId, this.Region),
	})

	awscdk.NewCfnOutput(this, jsii.String("BooksURL"), &CfnOutputProps{
		Value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/books", restApi.*RestApiId, this.*Region),
	})
	return this
}

type resourceNestedStackProps struct {
	nestedStackProps
	restApiId *string
	rootResourceId *string
}

type petsStack struct {
	nestedStack
	methods []method
}

func newPetsStack(scope construct, props resourceNestedStackProps) *petsStack {
	this := &petsStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-PetsStack"), props)

	api := awscdk.RestApi_FromRestApiAttributes(this, jsii.String("RestApi"), &RestApiAttributes{
		RestApiId: props.restApiId,
		RootResourceId: props.rootResourceId,
	})

	method := api.Root.AddResource(jsii.String("pets")).AddMethod(jsii.String("GET"), awscdk.NewMockIntegration(&IntegrationOptions{
		IntegrationResponses: []integrationResponse{
			&integrationResponse{
				StatusCode: jsii.String("200"),
			},
		},
		PassthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		RequestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &MethodOptions{
		MethodResponses: []methodResponse{
			&methodResponse{
				StatusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type booksStack struct {
	nestedStack
	methods []*method
}

func newBooksStack(scope construct, props resourceNestedStackProps) *booksStack {
	this := &booksStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-BooksStack"), props)

	api := awscdk.RestApi_FromRestApiAttributes(this, jsii.String("RestApi"), &RestApiAttributes{
		RestApiId: props.restApiId,
		RootResourceId: props.rootResourceId,
	})

	method := api.Root.AddResource(jsii.String("books")).AddMethod(jsii.String("GET"), awscdk.NewMockIntegration(&IntegrationOptions{
		IntegrationResponses: []*integrationResponse{
			&integrationResponse{
				StatusCode: jsii.String("200"),
			},
		},
		PassthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		RequestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &MethodOptions{
		MethodResponses: []*methodResponse{
			&methodResponse{
				StatusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type deployStackProps struct {
	nestedStackProps
	restApiId *string
	methods []*method
}

type deployStack struct {
	nestedStack
}

func newDeployStack(scope construct, props deployStackProps) *deployStack {
	this := &deployStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-DeployStack"), props)

	deployment := awscdk.NewDeployment(this, jsii.String("Deployment"), &DeploymentProps{
		Api: awscdk.RestApi_FromRestApiId(this, jsii.String("RestApi"), props.restApiId),
	})
	if *props.methods {
		for _, method := range *props.methods {
			deployment.Node.AddDependency(method)
		}
	}
	awscdk.NewStage(this, jsii.String("Stage"), &StageProps{
		Deployment: Deployment,
	})
	return this
}

NewRootStack(awscdk.NewApp())

func NewNestedStack ¶

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

type NestedStackProps ¶

type NestedStackProps struct {
	// A description of the stack.
	// Default: - No description.
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The Simple Notification Service (SNS) topics to publish stack related events.
	// Default: - notifications are not sent for this stack.
	//
	NotificationArns *[]*string `field:"optional" json:"notificationArns" yaml:"notificationArns"`
	// The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.
	//
	// Each parameter has a name corresponding
	// to a parameter defined in the embedded template and a value representing
	// the value that you want to set for the parameter.
	//
	// The nested stack construct will automatically synthesize parameters in order
	// to bind references from the parent stack(s) into the nested stack.
	// Default: - no user-defined parameters are passed to the nested stack.
	//
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// Policy to apply when the nested stack is removed.
	//
	// The default is `Destroy`, because all Removal Policies of resources inside the
	// Nested Stack should already have been set correctly. You normally should
	// not need to set this value.
	// Default: RemovalPolicy.DESTROY
	//
	RemovalPolicy RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"`
	// The length of time that CloudFormation waits for the nested stack to reach the CREATE_COMPLETE state.
	//
	// When CloudFormation detects that the nested stack has reached the
	// CREATE_COMPLETE state, it marks the nested stack resource as
	// CREATE_COMPLETE in the parent stack and resumes creating the parent stack.
	// If the timeout period expires before the nested stack reaches
	// CREATE_COMPLETE, CloudFormation marks the nested stack as failed and rolls
	// back both the nested stack and parent stack.
	// Default: - no timeout.
	//
	Timeout Duration `field:"optional" json:"timeout" yaml:"timeout"`
}

Initialization props for the `NestedStack` construct.

Example:

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

/**
 * This file showcases how to split up a RestApi's Resources and Methods across nested stacks.
 *
 * The root stack 'RootStack' first defines a RestApi.
 * Two nested stacks BooksStack and PetsStack, create corresponding Resources '/books' and '/pets'.
 * They are then deployed to a 'prod' Stage via a third nested stack - DeployStack.
 *
 * To verify this worked, go to the APIGateway
 */

type rootStack struct {
	stack
}

func newRootStack(scope construct) *rootStack {
	this := &rootStack{}
	newStack_Override(this, scope, jsii.String("integ-restapi-import-RootStack"))

	restApi := awscdk.NewRestApi(this, jsii.String("RestApi"), &RestApiProps{
		CloudWatchRole: jsii.Boolean(true),
		Deploy: jsii.Boolean(false),
	})
	restApi.Root.AddMethod(jsii.String("ANY"))

	petsStack := NewPetsStack(this, &resourceNestedStackProps{
		restApiId: restApi.RestApiId,
		rootResourceId: restApi.RestApiRootResourceId,
	})
	booksStack := NewBooksStack(this, &resourceNestedStackProps{
		restApiId: restApi.*RestApiId,
		rootResourceId: restApi.*RestApiRootResourceId,
	})
	NewDeployStack(this, &deployStackProps{
		restApiId: restApi.*RestApiId,
		methods: petsStack.methods.concat(booksStack.methods),
	})

	awscdk.NewCfnOutput(this, jsii.String("PetsURL"), &CfnOutputProps{
		Value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/pets", restApi.*RestApiId, this.Region),
	})

	awscdk.NewCfnOutput(this, jsii.String("BooksURL"), &CfnOutputProps{
		Value: fmt.Sprintf("https://%v.execute-api.%v.amazonaws.com/prod/books", restApi.*RestApiId, this.*Region),
	})
	return this
}

type resourceNestedStackProps struct {
	nestedStackProps
	restApiId *string
	rootResourceId *string
}

type petsStack struct {
	nestedStack
	methods []method
}

func newPetsStack(scope construct, props resourceNestedStackProps) *petsStack {
	this := &petsStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-PetsStack"), props)

	api := awscdk.RestApi_FromRestApiAttributes(this, jsii.String("RestApi"), &RestApiAttributes{
		RestApiId: props.restApiId,
		RootResourceId: props.rootResourceId,
	})

	method := api.Root.AddResource(jsii.String("pets")).AddMethod(jsii.String("GET"), awscdk.NewMockIntegration(&IntegrationOptions{
		IntegrationResponses: []integrationResponse{
			&integrationResponse{
				StatusCode: jsii.String("200"),
			},
		},
		PassthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		RequestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &MethodOptions{
		MethodResponses: []methodResponse{
			&methodResponse{
				StatusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type booksStack struct {
	nestedStack
	methods []*method
}

func newBooksStack(scope construct, props resourceNestedStackProps) *booksStack {
	this := &booksStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-BooksStack"), props)

	api := awscdk.RestApi_FromRestApiAttributes(this, jsii.String("RestApi"), &RestApiAttributes{
		RestApiId: props.restApiId,
		RootResourceId: props.rootResourceId,
	})

	method := api.Root.AddResource(jsii.String("books")).AddMethod(jsii.String("GET"), awscdk.NewMockIntegration(&IntegrationOptions{
		IntegrationResponses: []*integrationResponse{
			&integrationResponse{
				StatusCode: jsii.String("200"),
			},
		},
		PassthroughBehavior: awscdk.PassthroughBehavior_NEVER,
		RequestTemplates: map[string]*string{
			"application/json": jsii.String("{ \"statusCode\": 200 }"),
		},
	}), &MethodOptions{
		MethodResponses: []*methodResponse{
			&methodResponse{
				StatusCode: jsii.String("200"),
			},
		},
	})

	this.methods.push(method)
	return this
}

type deployStackProps struct {
	nestedStackProps
	restApiId *string
	methods []*method
}

type deployStack struct {
	nestedStack
}

func newDeployStack(scope construct, props deployStackProps) *deployStack {
	this := &deployStack{}
	newNestedStack_Override(this, scope, jsii.String("integ-restapi-import-DeployStack"), props)

	deployment := awscdk.NewDeployment(this, jsii.String("Deployment"), &DeploymentProps{
		Api: awscdk.RestApi_FromRestApiId(this, jsii.String("RestApi"), props.restApiId),
	})
	if *props.methods {
		for _, method := range *props.methods {
			deployment.Node.AddDependency(method)
		}
	}
	awscdk.NewStage(this, jsii.String("Stage"), &StageProps{
		Deployment: Deployment,
	})
	return this
}

NewRootStack(awscdk.NewApp())

type NestedStackSynthesizer ¶

type NestedStackSynthesizer interface {
	StackSynthesizer
	// The qualifier used to bootstrap this stack.
	BootstrapQualifier() *string
	// Retrieve the bound stack.
	//
	// Fails if the stack hasn't been bound yet.
	BoundStack() Stack
	// The role used to lookup for this stack.
	LookupRole() *string
	// 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)
	// Synthesize the associated stack to the session.
	Synthesize(session ISynthesisSession)
	// Have the stack write out its template.
	// Deprecated: Use `synthesizeTemplate` instead.
	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 for a nested stack.

Forwards all calls to the parent stack's synthesizer.

This synthesizer is automatically used for `NestedStack` constructs. App builder do not need to use this class 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"

var stackSynthesizer stackSynthesizer

nestedStackSynthesizer := cdk.NewNestedStackSynthesizer(stackSynthesizer)

func NewNestedStackSynthesizer ¶

func NewNestedStackSynthesizer(parentDeployment IStackSynthesizer) NestedStackSynthesizer

type PermissionsBoundary ¶ added in v2.54.0

type PermissionsBoundary interface {
}

Apply a permissions boundary to all IAM Roles and Users within a specific scope.

A permissions boundary is typically applied at the `Stage` scope. This allows setting different permissions boundaries per Stage. For example, you may _not_ apply a boundary to the `Dev` stage which deploys to a personal dev account, but you _do_ apply the default boundary to the `Prod` stage.

It is possible to apply different permissions boundaries to different scopes within your app. In this case the most specifically applied one wins

Example:

// no permissions boundary for dev stage
// no permissions boundary for dev stage
awscdk.NewStage(app, jsii.String("DevStage"))

// default boundary for prod stage
prodStage := awscdk.NewStage(app, jsii.String("ProdStage"), &StageProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_FromName(jsii.String("prod-pb")),
})

// overriding the pb applied for this stack
// overriding the pb applied for this stack
awscdk.Newstack(prodStage, jsii.String("ProdStack1"), &stackProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_*FromName(jsii.String("stack-pb")),
})

// will inherit the permissions boundary from the stage
// will inherit the permissions boundary from the stage
awscdk.Newstack(prodStage, jsii.String("ProdStack2"))

func PermissionsBoundary_FromArn ¶ added in v2.54.0

func PermissionsBoundary_FromArn(arn *string) PermissionsBoundary

Apply a permissions boundary with the given ARN to all IAM Roles and Users created within a scope.

The arn can include placeholders for the partition, region, qualifier, and account These placeholders will be replaced with the actual values if available. This requires that the Stack has the environment specified, it does not work with environment agnostic stacks.

- '${AWS::Partition}' - '${AWS::Region}' - '${AWS::AccountId}' - '${Qualifier}'.

Example:

awscdk.NewStage(app, jsii.String("ProdStage"), &StageProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_FromArn(jsii.String("arn:aws:iam::${AWS::AccountId}:policy/my-custom-permissions-boundary")),
})

func PermissionsBoundary_FromName ¶ added in v2.54.0

func PermissionsBoundary_FromName(name *string) PermissionsBoundary

Apply a permissions boundary with the given name to all IAM Roles and Users created within a scope.

The name can include placeholders for the partition, region, qualifier, and account These placeholders will be replaced with the actual values if available. This requires that the Stack has the environment specified, it does not work with environment agnostic stacks.

- '${AWS::Partition}' - '${AWS::Region}' - '${AWS::AccountId}' - '${Qualifier}'.

Example:

awscdk.NewStage(app, jsii.String("ProdStage"), &StageProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_FromName(jsii.String("my-custom-permissions-boundary")),
})

type PermissionsBoundaryBindOptions ¶ added in v2.54.0

type PermissionsBoundaryBindOptions struct {
}

Options for binding a Permissions Boundary to a construct scope.

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"

permissionsBoundaryBindOptions := &PermissionsBoundaryBindOptions{
}

type PhysicalName ¶

type PhysicalName interface {
}

Includes special markers for automatic generation of physical names.

type PolicyValidationPluginReportBeta1 ¶ added in v2.71.0

type PolicyValidationPluginReportBeta1 struct {
	// Whether or not the report was successful.
	Success *bool `field:"required" json:"success" yaml:"success"`
	// List of violations in the report.
	Violations *[]*PolicyViolationBeta1 `field:"required" json:"violations" yaml:"violations"`
	// Arbitrary information about the report.
	// Default: - no metadata.
	//
	Metadata *map[string]*string `field:"optional" json:"metadata" yaml:"metadata"`
	// The version of the plugin that created the report.
	// Default: - no version.
	//
	PluginVersion *string `field:"optional" json:"pluginVersion" yaml:"pluginVersion"`
}

The report emitted by the plugin after evaluation.

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"

policyValidationPluginReportBeta1 := &PolicyValidationPluginReportBeta1{
	Success: jsii.Boolean(false),
	Violations: []policyViolationBeta1{
		&policyViolationBeta1{
			Description: jsii.String("description"),
			RuleName: jsii.String("ruleName"),
			ViolatingResources: []policyViolatingResourceBeta1{
				&policyViolatingResourceBeta1{
					Locations: []*string{
						jsii.String("locations"),
					},
					ResourceLogicalId: jsii.String("resourceLogicalId"),
					TemplatePath: jsii.String("templatePath"),
				},
			},

			// the properties below are optional
			Fix: jsii.String("fix"),
			RuleMetadata: map[string]*string{
				"ruleMetadataKey": jsii.String("ruleMetadata"),
			},
			Severity: jsii.String("severity"),
		},
	},

	// the properties below are optional
	Metadata: map[string]*string{
		"metadataKey": jsii.String("metadata"),
	},
	PluginVersion: jsii.String("pluginVersion"),
}

type PolicyValidationReportStatusBeta1 ¶ added in v2.71.0

type PolicyValidationReportStatusBeta1 string

The final status of the validation report.

const (
	// No violations were found.
	PolicyValidationReportStatusBeta1_SUCCESS PolicyValidationReportStatusBeta1 = "SUCCESS"
	// At least one violation was found.
	PolicyValidationReportStatusBeta1_FAILURE PolicyValidationReportStatusBeta1 = "FAILURE"
)

type PolicyViolatingResourceBeta1 ¶ added in v2.71.0

type PolicyViolatingResourceBeta1 struct {
	// The locations in the CloudFormation template that pose the violations.
	Locations *[]*string `field:"required" json:"locations" yaml:"locations"`
	// The logical ID of the resource in the CloudFormation template.
	ResourceLogicalId *string `field:"required" json:"resourceLogicalId" yaml:"resourceLogicalId"`
	// The path to the CloudFormation template that contains this resource.
	TemplatePath *string `field:"required" json:"templatePath" yaml:"templatePath"`
}

Resource violating a specific rule.

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"

policyViolatingResourceBeta1 := &PolicyViolatingResourceBeta1{
	Locations: []*string{
		jsii.String("locations"),
	},
	ResourceLogicalId: jsii.String("resourceLogicalId"),
	TemplatePath: jsii.String("templatePath"),
}

type PolicyViolationBeta1 ¶ added in v2.71.0

type PolicyViolationBeta1 struct {
	// The description of the violation.
	Description *string `field:"required" json:"description" yaml:"description"`
	// The name of the rule.
	RuleName *string `field:"required" json:"ruleName" yaml:"ruleName"`
	// The resources violating this rule.
	ViolatingResources *[]*PolicyViolatingResourceBeta1 `field:"required" json:"violatingResources" yaml:"violatingResources"`
	// How to fix the violation.
	// Default: - no fix is provided.
	//
	Fix *string `field:"optional" json:"fix" yaml:"fix"`
	// Additional metadata to include with the rule results.
	//
	// This can be used to provide additional information that is
	// plugin specific. The data provided here will be rendered as is.
	// Default: - no rule metadata.
	//
	RuleMetadata *map[string]*string `field:"optional" json:"ruleMetadata" yaml:"ruleMetadata"`
	// The severity of the violation, only used for reporting purposes.
	//
	// This is useful for helping the user discriminate between warnings,
	// errors, information, etc.
	// Default: - no severity.
	//
	Severity *string `field:"optional" json:"severity" yaml:"severity"`
}

Violation produced by the validation plugin.

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"

policyViolationBeta1 := &PolicyViolationBeta1{
	Description: jsii.String("description"),
	RuleName: jsii.String("ruleName"),
	ViolatingResources: []policyViolatingResourceBeta1{
		&policyViolatingResourceBeta1{
			Locations: []*string{
				jsii.String("locations"),
			},
			ResourceLogicalId: jsii.String("resourceLogicalId"),
			TemplatePath: jsii.String("templatePath"),
		},
	},

	// the properties below are optional
	Fix: jsii.String("fix"),
	RuleMetadata: map[string]*string{
		"ruleMetadataKey": jsii.String("ruleMetadata"),
	},
	Severity: jsii.String("severity"),
}

type Reference ¶

type Reference interface {
	Intrinsic
	// The captured stack trace which represents the location in which this token was created.
	CreationStack() *[]*string
	DisplayName() *string
	Target() constructs.IConstruct
	// 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
}

An intrinsic Token that represents a reference to a construct.

References are recorded.

type RemovalPolicy ¶

type RemovalPolicy string

Possible values for a resource's Removal Policy.

The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:

  • The resource is removed from the template, so CloudFormation stops managing it;
  • A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it;
  • The stack is deleted, so CloudFormation stops managing all resources in it.

The Removal Policy applies to all above cases.

Many stateful resources in the AWS Construct Library will accept a `removalPolicy` as a property, typically defaulting it to `RETAIN`.

If the AWS Construct Library resource does not accept a `removalPolicy` argument, you can always configure it by using the escape hatch mechanism, as shown in the following example:

```ts declare const bucket: s3.Bucket;

const cfnBucket = bucket.node.findChild('Resource') as CfnResource; cfnBucket.applyRemovalPolicy(RemovalPolicy.DESTROY); ```.

Example:

var myRole role

cr.NewAwsCustomResource(this, jsii.String("Customized"), &AwsCustomResourceProps{
	Role: myRole,
	 // must be assumable by the `lambda.amazonaws.com` service principal
	Timeout: awscdk.Duration_Minutes(jsii.Number(10)),
	 // defaults to 2 minutes
	MemorySize: jsii.Number(1025),
	 // defaults to 512 if installLatestAwsSdk is true
	LogGroup: logs.NewLogGroup(this, jsii.String("AwsCustomResourceLogs"), &LogGroupProps{
		Retention: logs.RetentionDays_ONE_DAY,
	}),
	FunctionName: jsii.String("my-custom-name"),
	 // defaults to a CloudFormation generated name
	RemovalPolicy: awscdk.RemovalPolicy_RETAIN,
	 // defaults to `RemovalPolicy.DESTROY`
	Policy: cr.AwsCustomResourcePolicy_FromSdkCalls(&SdkCallsPolicyOptions{
		Resources: cr.AwsCustomResourcePolicy_ANY_RESOURCE(),
	}),
})
const (
	// This is the default removal policy.
	//
	// It means that when the resource is
	// removed from the app, it will be physically destroyed.
	RemovalPolicy_DESTROY RemovalPolicy = "DESTROY"
	// This uses the 'Retain' DeletionPolicy, which will cause the resource to be retained in the account, but orphaned from the stack.
	RemovalPolicy_RETAIN RemovalPolicy = "RETAIN"
	// This retention policy deletes the resource, but saves a snapshot of its data before deleting, so that it can be re-created later.
	//
	// Only available for some stateful resources,
	// like databases, EC2 volumes, etc.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	RemovalPolicy_SNAPSHOT RemovalPolicy = "SNAPSHOT"
	// Resource will be retained when they are requested to be deleted during a stack delete request or need to be replaced due to a stack update request.
	//
	// Resource are not retained, if the creation is rolled back.
	//
	// The result is that new, empty, and unused resources are deleted,
	// while in-use resources and their data are retained.
	//
	// This uses the 'RetainExceptOnCreate' DeletionPolicy,
	// and the 'Retain' UpdateReplacePolicy, when `applyToUpdateReplacePolicy` is set.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	RemovalPolicy_RETAIN_ON_UPDATE_OR_DELETE RemovalPolicy = "RETAIN_ON_UPDATE_OR_DELETE"
)

type RemovalPolicyOptions ¶

type RemovalPolicyOptions struct {
	// Apply the same deletion policy to the resource's "UpdateReplacePolicy".
	// Default: true.
	//
	ApplyToUpdateReplacePolicy *bool `field:"optional" json:"applyToUpdateReplacePolicy" yaml:"applyToUpdateReplacePolicy"`
	// The default policy to apply in case the removal policy is not defined.
	// Default: - Default value is resource specific. To determine the default value for a resource,
	// please consult that specific resource's documentation.
	//
	Default RemovalPolicy `field:"optional" json:"default" yaml:"default"`
}

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"

removalPolicyOptions := &RemovalPolicyOptions{
	ApplyToUpdateReplacePolicy: jsii.Boolean(false),
	Default: cdk.RemovalPolicy_DESTROY,
}

type RemoveTag ¶

type RemoveTag interface {
	IAspect
	// The string key for the tag.
	Key() *string
	Props() *TagProps
	ApplyTag(resource ITaggable)
	ApplyTagV2(resource ITaggableV2)
	// All aspects can visit an IConstruct.
	Visit(construct constructs.IConstruct)
}

The RemoveTag Aspect will handle removing tags from this node and children.

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"

removeTag := cdk.NewRemoveTag(jsii.String("key"), &TagProps{
	ApplyToLaunchedInstances: jsii.Boolean(false),
	ExcludeResourceTypes: []*string{
		jsii.String("excludeResourceTypes"),
	},
	IncludeResourceTypes: []*string{
		jsii.String("includeResourceTypes"),
	},
	Priority: jsii.Number(123),
})

func NewRemoveTag ¶

func NewRemoveTag(key *string, props *TagProps) RemoveTag

type ResolutionTypeHint ¶ added in v2.55.0

type ResolutionTypeHint string

Type hints for resolved values.

const (
	// This value is expected to resolve to a String.
	ResolutionTypeHint_STRING ResolutionTypeHint = "STRING"
	// This value is expected to resolve to a Number.
	ResolutionTypeHint_NUMBER ResolutionTypeHint = "NUMBER"
	// This value is expected to resolve to a String List.
	ResolutionTypeHint_STRING_LIST ResolutionTypeHint = "STRING_LIST"
)

type ResolveChangeContextOptions ¶

type ResolveChangeContextOptions struct {
	// Change the 'allowIntrinsicKeys' option.
	// Default: - Unchanged.
	//
	AllowIntrinsicKeys *bool `field:"optional" json:"allowIntrinsicKeys" yaml:"allowIntrinsicKeys"`
	// Whether to remove undefined elements from arrays and objects when resolving.
	// Default: - Unchanged.
	//
	RemoveEmpty *bool `field:"optional" json:"removeEmpty" yaml:"removeEmpty"`
}

Options that can be changed while doing a recursive resolve.

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"

resolveChangeContextOptions := &ResolveChangeContextOptions{
	AllowIntrinsicKeys: jsii.Boolean(false),
	RemoveEmpty: jsii.Boolean(false),
}

type ResolveOptions ¶

type ResolveOptions struct {
	// The resolver to apply to any resolvable tokens found.
	Resolver ITokenResolver `field:"required" json:"resolver" yaml:"resolver"`
	// The scope from which resolution is performed.
	Scope constructs.IConstruct `field:"required" json:"scope" yaml:"scope"`
	// Whether the resolution is being executed during the prepare phase or not.
	// Default: false.
	//
	Preparing *bool `field:"optional" json:"preparing" yaml:"preparing"`
	// Whether to remove undefined elements from arrays and objects when resolving.
	// Default: true.
	//
	RemoveEmpty *bool `field:"optional" json:"removeEmpty" yaml:"removeEmpty"`
}

Options to the resolve() operation.

NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way.

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"
import constructs "github.com/aws/constructs-go/constructs"

var construct construct
var tokenResolver iTokenResolver

resolveOptions := &ResolveOptions{
	Resolver: tokenResolver,
	Scope: construct,

	// the properties below are optional
	Preparing: jsii.Boolean(false),
	RemoveEmpty: jsii.Boolean(false),
}

type Resource ¶

type Resource interface {
	constructs.Construct
	IResource
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *ResourceEnvironment
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	// The stack in which this resource is defined.
	Stack() Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	ApplyRemovalPolicy(policy RemovalPolicy)
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	ToString() *string
}

A construct which represents an AWS resource.

Example:

type myConstruct struct {
	resource
	tags
}

func newMyConstruct(scope construct, id *string) *myConstruct {
	this := &myConstruct{}
	newResource_Override(this, scope, id)

	awscdk.NewCfnResource(this, jsii.String("Resource"), &cfnResourceProps{
		Type: jsii.String("Whatever::The::Type"),
		Properties: map[string]interface{}{
			// ...
			"Tags": this.tags.renderedTags,
		},
	})
	return this
}

type ResourceEnvironment ¶

type ResourceEnvironment struct {
	// The AWS account ID that this resource belongs to.
	//
	// Since this can be a Token
	// (for example, when the account is CloudFormation's AWS::AccountId intrinsic),
	// make sure to use Token.compareStrings()
	// instead of just comparing the values for equality.
	Account *string `field:"required" json:"account" yaml:"account"`
	// The AWS region that this resource belongs to.
	//
	// Since this can be a Token
	// (for example, when the region is CloudFormation's AWS::Region intrinsic),
	// make sure to use Token.compareStrings()
	// instead of just comparing the values for equality.
	Region *string `field:"required" json:"region" yaml:"region"`
}

Represents the environment a given resource lives in.

Used as the return value for the `IResource.env` 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"

resourceEnvironment := &ResourceEnvironment{
	Account: jsii.String("account"),
	Region: jsii.String("region"),
}

type ResourceProps ¶

type ResourceProps struct {
	// The AWS account ID this resource belongs to.
	// Default: - the resource is in the same account as the stack it belongs to.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// ARN to deduce region and account from.
	//
	// The ARN is parsed and the account and region are taken from the ARN.
	// This should be used for imported resources.
	//
	// Cannot be supplied together with either `account` or `region`.
	// Default: - take environment from `account`, `region` parameters, or use Stack environment.
	//
	EnvironmentFromArn *string `field:"optional" json:"environmentFromArn" yaml:"environmentFromArn"`
	// The value passed in by users to the physical name prop of the resource.
	//
	// - `undefined` implies that a physical name will be allocated by
	//   CloudFormation during deployment.
	// - a concrete value implies a specific physical name
	// - `PhysicalName.GENERATE_IF_NEEDED` is a marker that indicates that a physical will only be generated
	//   by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation.
	// Default: - The physical name will be allocated by CloudFormation at deployment time.
	//
	PhysicalName *string `field:"optional" json:"physicalName" yaml:"physicalName"`
	// The AWS region this resource belongs to.
	// Default: - the resource is in the same region as the stack it belongs to.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
}

Construction properties for `Resource`.

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"

resourceProps := &ResourceProps{
	Account: jsii.String("account"),
	EnvironmentFromArn: jsii.String("environmentFromArn"),
	PhysicalName: jsii.String("physicalName"),
	Region: jsii.String("region"),
}

type ReverseOptions ¶

type ReverseOptions struct {
	// Fail if the given string is a concatenation.
	//
	// If `false`, just return `undefined`.
	// Default: true.
	//
	FailConcat *bool `field:"optional" json:"failConcat" yaml:"failConcat"`
}

Options for the 'reverse()' operation.

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"

reverseOptions := &ReverseOptions{
	FailConcat: jsii.Boolean(false),
}

type RoleOptions ¶ added in v2.45.0

type RoleOptions struct {
	// ARN of the role to assume.
	AssumeRoleArn *string `field:"required" json:"assumeRoleArn" yaml:"assumeRoleArn"`
	// External ID to use when assuming the role.
	// Default: - No external ID.
	//
	AssumeRoleExternalId *string `field:"optional" json:"assumeRoleExternalId" yaml:"assumeRoleExternalId"`
}

Options for specifying a role.

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"

roleOptions := &RoleOptions{
	AssumeRoleArn: jsii.String("assumeRoleArn"),

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

type ScopedAws ¶

type ScopedAws interface {
	AccountId() *string
	NotificationArns() *[]*string
	Partition() *string
	Region() *string
	StackId() *string
	StackName() *string
	UrlSuffix() *string
}

Accessor for scoped pseudo parameters.

These pseudo parameters are anchored to a stack somewhere in the construct tree, and their values will be exported automatically.

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"

scopedAws := cdk.NewScopedAws(this)

func NewScopedAws ¶

func NewScopedAws(scope constructs.Construct) ScopedAws

type SecretValue ¶

type SecretValue 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{}
	// Resolve the secret.
	//
	// If the feature flag is not set, resolve as normal. Otherwise, throw a descriptive
	// error that the usage guard is missing.
	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
	// Disable usage protection on this secret.
	//
	// Call this to indicate that you want to use the secret value held by this
	// object in an unchecked way. If you don't call this method, using the secret
	// value directly in a string context or as a property value somewhere will
	// produce an error.
	//
	// This method has 'unsafe' in the name on purpose! Make sure that the
	// construct property you are using the returned value in is does not end up
	// in a place in your AWS infrastructure where it could be read by anyone
	// unexpected.
	//
	// When in doubt, don't call this method and only pass the object to constructs that
	// accept `SecretValue` parameters.
	UnsafeUnwrap() *string
}

Work with secret values in the CDK.

Constructs that need secrets will declare parameters of type `SecretValue`.

The actual values of these secrets should not be committed to your repository, or even end up in the synthesized CloudFormation template. Instead, you should store them in an external system like AWS Secrets Manager or SSM Parameter Store, and you can reference them by calling `SecretValue.secretsManager()` or `SecretValue.ssmSecure()`.

You can use `SecretValue.unsafePlainText()` to construct a `SecretValue` from a literal string, but doing so is highly discouraged.

To make sure secret values don't accidentally end up in readable parts of your infrastructure definition (such as the environment variables of an AWS Lambda Function, where everyone who can read the function definition has access to the secret), using secret values directly is not allowed. You must pass them to constructs that accept `SecretValue` properties, which are guaranteed to use the value only in CloudFormation properties that are write-only.

If you are sure that what you are doing is safe, you can call `secretValue.unsafeUnwrap()` to access the protected string of the secret value.

(If you are writing something like an AWS Lambda Function and need to access a secret inside it, make the API call to `GetSecretValue` directly inside your Lamba's code, instead of using environment variables.)

Example:

var myHostedZone iPublicHostedZone

ses.NewEmailIdentity(this, jsii.String("Identity"), &EmailIdentityProps{
	Identity: ses.Identity_PublicHostedZone(myHostedZone),
	DkimIdentity: ses.DkimIdentity_ByoDkim(&ByoDkimOptions{
		PrivateKey: awscdk.SecretValue_SecretsManager(jsii.String("dkim-private-key")),
		PublicKey: jsii.String("...base64-encoded-public-key..."),
		Selector: jsii.String("selector"),
	}),
})

func NewSecretValue ¶

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

Construct a SecretValue (do not use!).

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

func SecretValue_CfnDynamicReference ¶

func SecretValue_CfnDynamicReference(ref CfnDynamicReference) SecretValue

Obtain the secret value through a CloudFormation dynamic reference.

If possible, use `SecretValue.ssmSecure` or `SecretValue.secretsManager` directly.

func SecretValue_CfnParameter ¶

func SecretValue_CfnParameter(param CfnParameter) SecretValue

Obtain the secret value through a CloudFormation parameter.

Generally, this is not a recommended approach. AWS Secrets Manager is the recommended way to reference secrets.

func SecretValue_PlainText ¶

func SecretValue_PlainText(secret *string) SecretValue

Construct a literal secret value for use with secret-aware constructs.

Do not use this method for any secrets that you care about! The value will be visible to anyone who has access to the CloudFormation template (via the AWS Console, SDKs, or CLI).

The only reasonable use case for using this method is when you are testing. Deprecated: Use `unsafePlainText()` instead.

func SecretValue_ResourceAttribute ¶ added in v2.21.0

func SecretValue_ResourceAttribute(attr *string) SecretValue

Use a resource's output as secret value.

func SecretValue_SecretsManager ¶

func SecretValue_SecretsManager(secretId *string, options *SecretsManagerSecretOptions) SecretValue

Creates a `SecretValue` with a value which is dynamically loaded from AWS Secrets Manager.

If you rotate the value in the Secret, 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.

func SecretValue_SsmSecure ¶

func SecretValue_SsmSecure(parameterName *string, version *string) SecretValue

Use a secret value stored from a Systems Manager (SSM) parameter.

This secret source in only supported in a limited set of resources and properties. [Click here for the list of supported properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#template-parameters-dynamic-patterns-resources).

func SecretValue_UnsafePlainText ¶ added in v2.21.0

func SecretValue_UnsafePlainText(secret *string) SecretValue

Construct a literal secret value for use with secret-aware constructs.

Do not use this method for any secrets that you care about! The value will be visible to anyone who has access to the CloudFormation template (via the AWS Console, SDKs, or CLI).

The primary use case for using this method is when you are testing.

The other use case where this is appropriate is when constructing a JSON secret. For example, a JSON secret might have multiple fields where only some are actual secret values.

Example:

var secret secretValue

jsonSecret := map[string]secretValue{
	"username": awscdk.SecretValue_unsafePlainText(jsii.String("myUsername")),
	"password": secret,
}

type SecretsManagerSecretOptions ¶

type SecretsManagerSecretOptions struct {
	// The key of a JSON field to retrieve.
	//
	// This can only be used if the secret
	// stores a JSON object.
	// Default: - returns all the content stored in the Secrets Manager secret.
	//
	JsonField *string `field:"optional" json:"jsonField" yaml:"jsonField"`
	// Specifies the unique identifier of the version of the secret you want to use.
	//
	// Can specify at most one of `versionId` and `versionStage`.
	// Default: AWSCURRENT.
	//
	VersionId *string `field:"optional" json:"versionId" yaml:"versionId"`
	// Specifies the secret version that you want to retrieve by the staging label attached to the version.
	//
	// Can specify at most one of `versionId` and `versionStage`.
	// Default: AWSCURRENT.
	//
	VersionStage *string `field:"optional" json:"versionStage" yaml:"versionStage"`
}

Options for referencing a secret value from Secrets Manager.

Example:

codebuild.NewBitBucketSourceCredentials(this, jsii.String("CodeBuildBitBucketCreds"), &BitBucketSourceCredentialsProps{
	Username: awscdk.SecretValue_SecretsManager(jsii.String("my-bitbucket-creds"), &SecretsManagerSecretOptions{
		JsonField: jsii.String("username"),
	}),
	Password: awscdk.SecretValue_*SecretsManager(jsii.String("my-bitbucket-creds"), &SecretsManagerSecretOptions{
		JsonField: jsii.String("password"),
	}),
})

type Size ¶

type Size interface {
	// Checks if size is a token or a resolvable object.
	IsUnresolved() *bool
	// Return this storage as a total number of bytes.
	//
	// Returns: the quantity expressed in bytes.
	ToBytes(opts *SizeConversionOptions) *float64
	// Return this storage as a total number of gibibytes.
	//
	// Returns: the quantity of bytes expressed in gibibytes.
	ToGibibytes(opts *SizeConversionOptions) *float64
	// Return this storage as a total number of kibibytes.
	//
	// Returns: the quantity of bytes expressed in kibibytes.
	ToKibibytes(opts *SizeConversionOptions) *float64
	// Return this storage as a total number of mebibytes.
	//
	// Returns: the quantity of bytes expressed in mebibytes.
	ToMebibytes(opts *SizeConversionOptions) *float64
	// Return this storage as a total number of pebibytes.
	//
	// Returns: the quantity of bytes expressed in pebibytes.
	ToPebibytes(opts *SizeConversionOptions) *float64
	// Return this storage as a total number of tebibytes.
	//
	// Returns: the quantity of bytes expressed in tebibytes.
	ToTebibytes(opts *SizeConversionOptions) *float64
}

Represents the amount of digital storage.

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

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

Example:

var bucket bucket
// Provide a Lambda function that will transform records before delivery, with custom
// buffering and retry configuration
lambdaFunction := lambda.NewFunction(this, jsii.String("Processor"), &FunctionProps{
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	Handler: jsii.String("index.handler"),
	Code: lambda.Code_FromAsset(path.join(__dirname, jsii.String("process-records"))),
})
lambdaProcessor := firehose.NewLambdaFunctionProcessor(lambdaFunction, &DataProcessorProps{
	BufferInterval: awscdk.Duration_Minutes(jsii.Number(5)),
	BufferSize: awscdk.Size_Mebibytes(jsii.Number(5)),
	Retries: jsii.Number(5),
})
s3Destination := destinations.NewS3Bucket(bucket, &S3BucketProps{
	Processor: lambdaProcessor,
})
firehose.NewDeliveryStream(this, jsii.String("Delivery Stream"), &DeliveryStreamProps{
	Destinations: []iDestination{
		s3Destination,
	},
})

func Size_Bytes ¶ added in v2.66.0

func Size_Bytes(amount *float64) Size

Create a Storage representing an amount bytes.

Returns: a new `Size` instance.

func Size_Gibibytes ¶

func Size_Gibibytes(amount *float64) Size

Create a Storage representing an amount gibibytes.

1 GiB = 1024 MiB.

Returns: a new `Size` instance.

func Size_Kibibytes ¶

func Size_Kibibytes(amount *float64) Size

Create a Storage representing an amount kibibytes.

1 KiB = 1024 bytes.

Returns: a new `Size` instance.

func Size_Mebibytes ¶

func Size_Mebibytes(amount *float64) Size

Create a Storage representing an amount mebibytes.

1 MiB = 1024 KiB.

Returns: a new `Size` instance.

func Size_Pebibytes ¶

func Size_Pebibytes(amount *float64) Size

Create a Storage representing an amount pebibytes.

1 PiB = 1024 TiB.

Returns: a new `Size` instance.

func Size_Tebibytes ¶

func Size_Tebibytes(amount *float64) Size

Create a Storage representing an amount tebibytes.

1 TiB = 1024 GiB.

Returns: a new `Size` instance.

type SizeConversionOptions ¶

type SizeConversionOptions struct {
	// How conversions should behave when it encounters a non-integer result.
	// Default: SizeRoundingBehavior.FAIL
	//
	Rounding SizeRoundingBehavior `field:"optional" json:"rounding" yaml:"rounding"`
}

Options for how to convert time to a different unit.

Example:

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

type SizeRoundingBehavior ¶

type SizeRoundingBehavior string

Rounding behaviour when converting between units of `Size`.

Example:

awscdk.Size_Mebibytes(jsii.Number(2)).ToKibibytes() // yields 2048
awscdk.Size_Kibibytes(jsii.Number(2050)).ToMebibytes(&SizeConversionOptions{
	Rounding: awscdk.SizeRoundingBehavior_FLOOR,
})
const (
	// Fail the conversion if the result is not an integer.
	SizeRoundingBehavior_FAIL SizeRoundingBehavior = "FAIL"
	// If the result is not an integer, round it to the closest integer less than the result.
	SizeRoundingBehavior_FLOOR SizeRoundingBehavior = "FLOOR"
	// Don't round.
	//
	// Return even if the result is a fraction.
	SizeRoundingBehavior_NONE SizeRoundingBehavior = "NONE"
)

type Stack ¶

type Stack interface {
	constructs.Construct
	ITaggable
	// The AWS account into which this stack will be deployed.
	//
	// This value is resolved according to the following rules:
	//
	// 1. The value provided to `env.account` when the stack is defined. This can
	//    either be a concrete account (e.g. `585695031111`) or the
	//    `Aws.ACCOUNT_ID` token.
	// 3. `Aws.ACCOUNT_ID`, which represents the CloudFormation intrinsic reference
	//    `{ "Ref": "AWS::AccountId" }` encoded as a string token.
	//
	// Preferably, you should use the return value as an opaque string and not
	// attempt to parse it to implement your logic. If you do, you must first
	// check that it is a concrete value an not an unresolved token. If this
	// value is an unresolved token (`Token.isUnresolved(stack.account)` returns
	// `true`), this implies that the user wishes that this stack will synthesize
	// into a **account-agnostic template**. In this case, your code should either
	// fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
	// implement some other region-agnostic behavior.
	Account() *string
	// The ID of the cloud assembly artifact for this stack.
	ArtifactId() *string
	// Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack.
	//
	// If the stack is environment-agnostic (either account and/or region are
	// tokens), this property will return an array with 2 tokens that will resolve
	// at deploy-time to the first two availability zones returned from CloudFormation's
	// `Fn::GetAZs` intrinsic function.
	//
	// If they are not available in the context, returns a set of dummy values and
	// reports them as missing, and let the CLI resolve them by calling EC2
	// `DescribeAvailabilityZones` on the target environment.
	//
	// To specify a different strategy for selecting availability zones override this method.
	AvailabilityZones() *[]*string
	// Indicates whether the stack requires bundling or not.
	BundlingRequired() *bool
	// Return the stacks this stack depends on.
	Dependencies() *[]Stack
	// The environment coordinates in which this stack is deployed.
	//
	// In the form
	// `aws://account/region`. Use `stack.account` and `stack.region` to obtain
	// the specific values, no need to parse.
	//
	// You can use this value to determine if two stacks are targeting the same
	// environment.
	//
	// If either `stack.account` or `stack.region` are not concrete values (e.g.
	// `Aws.ACCOUNT_ID` or `Aws.REGION`) the special strings `unknown-account` and/or
	// `unknown-region` will be used respectively to indicate this stack is
	// region/account-agnostic.
	Environment() *string
	// Indicates if this is a nested stack, in which case `parentStack` will include a reference to it's parent.
	Nested() *bool
	// If this is a nested stack, returns it's parent stack.
	NestedStackParent() Stack
	// If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource.
	//
	// `undefined` for top-level (non-nested) stacks.
	NestedStackResource() CfnResource
	// The tree node.
	Node() constructs.Node
	// Returns the list of notification Amazon Resource Names (ARNs) for the current stack.
	NotificationArns() *[]*string
	// The partition in which this stack is defined.
	Partition() *string
	// The AWS region into which this stack will be deployed (e.g. `us-west-2`).
	//
	// This value is resolved according to the following rules:
	//
	// 1. The value provided to `env.region` when the stack is defined. This can
	//    either be a concrete region (e.g. `us-west-2`) or the `Aws.REGION`
	//    token.
	// 3. `Aws.REGION`, which is represents the CloudFormation intrinsic reference
	//    `{ "Ref": "AWS::Region" }` encoded as a string token.
	//
	// Preferably, you should use the return value as an opaque string and not
	// attempt to parse it to implement your logic. If you do, you must first
	// check that it is a concrete value an not an unresolved token. If this
	// value is an unresolved token (`Token.isUnresolved(stack.region)` returns
	// `true`), this implies that the user wishes that this stack will synthesize
	// into a **region-agnostic template**. In this case, your code should either
	// fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
	// implement some other region-agnostic behavior.
	Region() *string
	// The ID of the stack.
	//
	// Example:
	//   // After resolving, looks like
	//   "arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123"
	//
	StackId() *string
	// The concrete CloudFormation physical stack name.
	//
	// This is either the name defined explicitly in the `stackName` prop or
	// allocated based on the stack's location in the construct tree. Stacks that
	// are directly defined under the app use their construct `id` as their stack
	// name. Stacks that are defined deeper within the tree will use a hashed naming
	// scheme based on the construct path to ensure uniqueness.
	//
	// If you wish to obtain the deploy-time AWS::StackName intrinsic,
	// you can use `Aws.STACK_NAME` directly.
	StackName() *string
	// Synthesis method for this stack.
	Synthesizer() IStackSynthesizer
	// Tags to be applied to the stack.
	Tags() TagManager
	// The name of the CloudFormation template file emitted to the output directory during synthesis.
	//
	// Example value: `MyStack.template.json`
	TemplateFile() *string
	// Options for CloudFormation template (like version, transform, description).
	TemplateOptions() ITemplateOptions
	// Whether termination protection is enabled for this stack.
	TerminationProtection() *bool
	SetTerminationProtection(val *bool)
	// The Amazon domain suffix for the region in which this stack is defined.
	UrlSuffix() *string
	// Add a dependency between this stack and another stack.
	//
	// This can be used to define dependencies between any two stacks within an
	// app, and also supports nested stacks.
	AddDependency(target Stack, reason *string)
	// Adds an arbitary key-value pair, with information you want to record about the stack.
	//
	// These get translated to the Metadata section of the generated template.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	AddMetadata(key *string, value interface{})
	// Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template.
	//
	// Duplicate values are removed when stack is synthesized.
	//
	// Example:
	//   var stack stack
	//
	//
	//   stack.AddTransform(jsii.String("AWS::Serverless-2016-10-31"))
	//
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html
	//
	AddTransform(transform *string)
	// Returns the naming scheme used to allocate logical IDs.
	//
	// By default, uses
	// the `HashedAddressingScheme` but this method can be overridden to customize
	// this behavior.
	//
	// In order to make sure logical IDs are unique and stable, we hash the resource
	// construct tree path (i.e. toplevel/secondlevel/.../myresource) and add it as
	// a suffix to the path components joined without a separator (CloudFormation
	// IDs only allow alphanumeric characters).
	//
	// The result will be:
	//
	//   <path.join(”)><md5(path.join('/')>
	//     "human"      "hash"
	//
	// If the "human" part of the ID exceeds 240 characters, we simply trim it so
	// the total ID doesn't exceed CloudFormation's 255 character limit.
	//
	// We only take 8 characters from the md5 hash (0.000005 chance of collision).
	//
	// Special cases:
	//
	// - If the path only contains a single component (i.e. it's a top-level
	//   resource), we won't add the hash to it. The hash is not needed for
	//   disambiguation and also, it allows for a more straightforward migration an
	//   existing CloudFormation template to a CDK stack without logical ID changes
	//   (or renames).
	// - For aesthetic reasons, if the last components of the path are the same
	//   (i.e. `L1/L2/Pipeline/Pipeline`), they will be de-duplicated to make the
	//   resulting human portion of the ID more pleasing: `L1L2Pipeline<HASH>`
	//   instead of `L1L2PipelinePipeline<HASH>`
	// - If a component is named "Default" it will be omitted from the path. This
	//   allows refactoring higher level abstractions around constructs without affecting
	//   the IDs of already deployed resources.
	// - If a component is named "Resource" it will be omitted from the user-visible
	//   path, but included in the hash. This reduces visual noise in the human readable
	//   part of the identifier.
	AllocateLogicalId(cfnElement CfnElement) *string
	// Create a CloudFormation Export for a string list value.
	//
	// Returns a string list representing the corresponding `Fn.importValue()`
	// expression for this Export. The export expression is automatically wrapped with an
	// `Fn::Join` and the import value with an `Fn::Split`, since CloudFormation can only
	// export strings. You can control the name for the export by passing the `name` option.
	//
	// If you don't supply a value for `name`, the value you're exporting must be
	// a Resource attribute (for example: `bucket.bucketName`) and it will be
	// given the same name as the automatic cross-stack reference that would be created
	// if you used the attribute in another Stack.
	//
	// One of the uses for this method is to *remove* the relationship between
	// two Stacks established by automatic cross-stack references. It will
	// temporarily ensure that the CloudFormation Export still exists while you
	// remove the reference from the consuming stack. After that, you can remove
	// the resource and the manual export.
	//
	// See `exportValue` for an example of this process.
	ExportStringListValue(exportedValue interface{}, options *ExportValueOptions) *[]*string
	// Create a CloudFormation Export for a string value.
	//
	// Returns a string representing the corresponding `Fn.importValue()`
	// expression for this Export. You can control the name for the export by
	// passing the `name` option.
	//
	// If you don't supply a value for `name`, the value you're exporting must be
	// a Resource attribute (for example: `bucket.bucketName`) and it will be
	// given the same name as the automatic cross-stack reference that would be created
	// if you used the attribute in another Stack.
	//
	// One of the uses for this method is to *remove* the relationship between
	// two Stacks established by automatic cross-stack references. It will
	// temporarily ensure that the CloudFormation Export still exists while you
	// remove the reference from the consuming stack. After that, you can remove
	// the resource and the manual export.
	//
	// Here is how the process works. Let's say there are two stacks,
	// `producerStack` and `consumerStack`, and `producerStack` has a bucket
	// called `bucket`, which is referenced by `consumerStack` (perhaps because
	// an AWS Lambda Function writes into it, or something like that).
	//
	// It is not safe to remove `producerStack.bucket` because as the bucket is being
	// deleted, `consumerStack` might still be using it.
	//
	// Instead, the process takes two deployments:
	//
	// **Deployment 1: break the relationship**:
	//
	// - Make sure `consumerStack` 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 `ProducerStack` 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 `consumerStack`, but it's safe to deploy both).
	//
	// **Deployment 2: remove the bucket resource**:
	//
	// - You are now free to remove the `bucket` resource from `producerStack`.
	// - Don't forget to remove the `exportValue()` call as well.
	// - Deploy again (this time only the `producerStack` will be changed -- the bucket will be deleted).
	ExportValue(exportedValue interface{}, options *ExportValueOptions) *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'.
	FormatArn(components *ArnComponents) *string
	// Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource.
	//
	// This method is called when a `CfnElement` is created and used to render the
	// initial logical identity of resources. Logical ID renames are applied at
	// this stage.
	//
	// This method uses the protected method `allocateLogicalId` to render the
	// logical ID for an element. To modify the naming scheme, extend the `Stack`
	// class and override this method.
	GetLogicalId(element CfnElement) *string
	// Look up a fact value for the given fact for the region of this stack.
	//
	// Will return a definite value only if the region of the current stack is resolved.
	// If not, a lookup map will be added to the stack and the lookup will be done at
	// CDK deployment time.
	//
	// What regions will be included in the lookup map is controlled by the
	// `@aws-cdk/core:target-partitions` context value: it must be set to a list
	// of partitions, and only regions from the given partitions will be included.
	// If no such context key is set, all regions will be included.
	//
	// This function is intended to be used by construct library authors. Application
	// builders can rely on the abstractions offered by construct libraries and do
	// not have to worry about regional facts.
	//
	// If `defaultValue` is not given, it is an error if the fact is unknown for
	// the given region.
	RegionalFact(factName *string, defaultValue *string) *string
	// Rename a generated logical identities.
	//
	// To modify the naming scheme strategy, extend the `Stack` class and
	// override the `allocateLogicalId` method.
	RenameLogicalId(oldId *string, newId *string)
	// Indicate that a context key was expected.
	//
	// Contains instructions which will be emitted into the cloud assembly on how
	// the key should be supplied.
	ReportMissingContextKey(report *cloudassemblyschema.MissingContext)
	// Resolve a tokenized value in the context of the current stack.
	Resolve(obj interface{}) interface{}
	// 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).
	SplitArn(arn *string, arnFormat ArnFormat) *ArnComponents
	// Convert an object, potentially containing tokens, to a JSON string.
	ToJsonString(obj interface{}, space *float64) *string
	// Returns a string representation of this construct.
	ToString() *string
	// Convert an object, potentially containing tokens, to a YAML string.
	ToYamlString(obj interface{}) *string
}

A root construct which represents a single CloudFormation stack.

Example:

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

var bucket iBucket

app := cdk.NewApp()
stack := cdk.NewStack(app, jsii.String("Stack"))

dynamodb.NewTable(stack, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	ImportSource: &ImportSourceSpecification{
		CompressionType: dynamodb.InputCompressionType_GZIP,
		InputFormat: dynamodb.InputFormat_Csv(&CsvOptions{
			Delimiter: jsii.String(","),
			HeaderList: []*string{
				jsii.String("id"),
				jsii.String("name"),
			},
		}),
		Bucket: *Bucket,
		KeyPrefix: jsii.String("prefix"),
	},
})

func NestedStack_Of ¶

func NestedStack_Of(construct constructs.IConstruct) Stack

Looks up the first stack scope in which `construct` is defined.

Fails if there is no stack up the tree.

func NewStack ¶

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

Creates a new stack.

func Stack_Of ¶

func Stack_Of(construct constructs.IConstruct) Stack

Looks up the first stack scope in which `construct` is defined.

Fails if there is no stack up the tree.

type StackProps ¶

type StackProps struct {
	// Include runtime versioning information in this Stack.
	// Default: `analyticsReporting` setting of containing `App`, or value of
	// 'aws:cdk:version-reporting' context key.
	//
	AnalyticsReporting *bool `field:"optional" json:"analyticsReporting" yaml:"analyticsReporting"`
	// Enable this flag to allow native cross region stack references.
	//
	// Enabling this will create a CloudFormation custom resource
	// in both the producing stack and consuming stack in order to perform the export/import
	//
	// This feature is currently experimental.
	// Default: false.
	//
	CrossRegionReferences *bool `field:"optional" json:"crossRegionReferences" yaml:"crossRegionReferences"`
	// A description of the stack.
	// Default: - No description.
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The AWS environment (account/region) where this stack will be deployed.
	//
	// Set the `region`/`account` fields of `env` to either a concrete value to
	// select the indicated environment (recommended for production stacks), or to
	// the values of environment variables
	// `CDK_DEFAULT_REGION`/`CDK_DEFAULT_ACCOUNT` to let the target environment
	// depend on the AWS credentials/configuration that the CDK CLI is executed
	// under (recommended for development stacks).
	//
	// If the `Stack` is instantiated inside a `Stage`, any undefined
	// `region`/`account` fields from `env` will default to the same field on the
	// encompassing `Stage`, if configured there.
	//
	// If either `region` or `account` are not set nor inherited from `Stage`, the
	// Stack will be considered "*environment-agnostic*"". Environment-agnostic
	// stacks can be deployed to any environment but may not be able to take
	// advantage of all features of the CDK. For example, they will not be able to
	// use environmental context lookups such as `ec2.Vpc.fromLookup` and will not
	// automatically translate Service Principals to the right format based on the
	// environment's AWS partition, and other such enhancements.
	//
	// Example:
	//   // Use a concrete account and region to deploy this stack to:
	//   // `.account` and `.region` will simply return these values.
	//   // Use a concrete account and region to deploy this stack to:
	//   // `.account` and `.region` will simply return these values.
	//   awscdk.Newstack(app, jsii.String("Stack1"), &stackProps{
	//   	Env: &Environment{
	//   		Account: jsii.String("123456789012"),
	//   		Region: jsii.String("us-east-1"),
	//   	},
	//   })
	//
	//   // Use the CLI's current credentials to determine the target environment:
	//   // `.account` and `.region` will reflect the account+region the CLI
	//   // is configured to use (based on the user CLI credentials)
	//   // Use the CLI's current credentials to determine the target environment:
	//   // `.account` and `.region` will reflect the account+region the CLI
	//   // is configured to use (based on the user CLI credentials)
	//   awscdk.Newstack(app, jsii.String("Stack2"), &stackProps{
	//   	Env: &Environment{
	//   		Account: process.env.cDK_DEFAULT_ACCOUNT,
	//   		Region: process.env.cDK_DEFAULT_REGION,
	//   	},
	//   })
	//
	//   // Define multiple stacks stage associated with an environment
	//   myStage := awscdk.NewStage(app, jsii.String("MyStage"), &StageProps{
	//   	Env: &Environment{
	//   		Account: jsii.String("123456789012"),
	//   		Region: jsii.String("us-east-1"),
	//   	},
	//   })
	//
	//   // both of these stacks will use the stage's account/region:
	//   // `.account` and `.region` will resolve to the concrete values as above
	//   // both of these stacks will use the stage's account/region:
	//   // `.account` and `.region` will resolve to the concrete values as above
	//   NewMyStack(myStage, jsii.String("Stack1"))
	//   NewYourStack(myStage, jsii.String("Stack2"))
	//
	//   // Define an environment-agnostic stack:
	//   // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
	//   // which will only resolve to actual values by CloudFormation during deployment.
	//   // Define an environment-agnostic stack:
	//   // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
	//   // which will only resolve to actual values by CloudFormation during deployment.
	//   NewMyStack(app, jsii.String("Stack1"))
	//
	// Default: - The environment of the containing `Stage` if available,
	// otherwise create the stack will be environment-agnostic.
	//
	Env *Environment `field:"optional" json:"env" yaml:"env"`
	// Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
	// Default: - no permissions boundary is applied.
	//
	PermissionsBoundary PermissionsBoundary `field:"optional" json:"permissionsBoundary" yaml:"permissionsBoundary"`
	// Name to deploy the stack with.
	// Default: - Derived from construct path.
	//
	StackName *string `field:"optional" json:"stackName" yaml:"stackName"`
	// Enable this flag to suppress indentation in generated CloudFormation templates.
	//
	// If not specified, the value of the `@aws-cdk/core:suppressTemplateIndentation`
	// context key will be used. If that is not specified, then the
	// default value `false` will be used.
	// Default: - the value of `@aws-cdk/core:suppressTemplateIndentation`, or `false` if that is not set.
	//
	SuppressTemplateIndentation *bool `field:"optional" json:"suppressTemplateIndentation" yaml:"suppressTemplateIndentation"`
	// Synthesis method to use while deploying this stack.
	//
	// 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.
	//
	// If not specified, the `defaultStackSynthesizer` from `App` will be used.
	// If that is not specified, `DefaultStackSynthesizer` is used if
	// `@aws-cdk/core:newStyleStackSynthesis` is set to `true` or the CDK major
	// version is v2. In CDK v1 `LegacyStackSynthesizer` is the default if no
	// other synthesizer is specified.
	// Default: - The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise.
	//
	Synthesizer IStackSynthesizer `field:"optional" json:"synthesizer" yaml:"synthesizer"`
	// Stack tags that will be applied to all the taggable resources and the stack itself.
	// Default: {}.
	//
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// Whether to enable termination protection for this stack.
	// Default: false.
	//
	TerminationProtection *bool `field:"optional" json:"terminationProtection" yaml:"terminationProtection"`
}

Example:

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,
})

type StackSynthesizer ¶

type StackSynthesizer interface {
	IStackSynthesizer
	// The qualifier used to bootstrap this stack.
	BootstrapQualifier() *string
	// Retrieve the bound stack.
	//
	// Fails if the stack hasn't been bound yet.
	BoundStack() Stack
	// The role used to lookup for this stack.
	LookupRole() *string
	// 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)
	// Synthesize the associated stack to the session.
	Synthesize(session ISynthesisSession)
	// Have the stack write out its template.
	// Deprecated: Use `synthesizeTemplate` instead.
	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
}

Base class for implementing an IStackSynthesizer.

This class needs to exist to provide public surface area for external implementations of stack synthesizers. The protected methods give access to functions that are otherwise.

type Stage ¶

type Stage interface {
	constructs.Construct
	// 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
}

An abstract application modeling unit consisting of Stacks that should be deployed together.

Derive a subclass of `Stage` and use it to model a single instance of your application.

You can then instantiate your subclass multiple times to model multiple copies of your application which should be be deployed to different environments.

Example:

var pipeline codePipeline

preprod := NewMyApplicationStage(this, jsii.String("PreProd"))
prod := NewMyApplicationStage(this, jsii.String("Prod"))

pipeline.AddStage(preprod, &AddStageOpts{
	Post: []step{
		pipelines.NewShellStep(jsii.String("Validate Endpoint"), &ShellStepProps{
			Commands: []*string{
				jsii.String("curl -Ssf https://my.webservice.com/"),
			},
		}),
	},
})
pipeline.AddStage(prod, &AddStageOpts{
	Pre: []*step{
		pipelines.NewManualApprovalStep(jsii.String("PromoteToProd")),
	},
})

func App_Of ¶

func App_Of(construct constructs.IConstruct) Stage

Return the stage this construct is contained with, if available.

If called on a nested stage, returns its parent.

func NewStage ¶

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

func Stage_Of ¶

func Stage_Of(construct constructs.IConstruct) Stage

Return the stage this construct is contained with, if available.

If called on a nested stage, returns its parent.

type StageProps ¶

type StageProps struct {
	// Default AWS environment (account/region) for `Stack`s in this `Stage`.
	//
	// Stacks defined inside this `Stage` with either `region` or `account` missing
	// from its env will use the corresponding field given here.
	//
	// If either `region` or `account`is is not configured for `Stack` (either on
	// the `Stack` itself or on the containing `Stage`), the Stack will be
	// *environment-agnostic*.
	//
	// Environment-agnostic stacks can be deployed to any environment, may not be
	// able to take advantage of all features of the CDK. For example, they will
	// not be able to use environmental context lookups, will not automatically
	// translate Service Principals to the right format based on the environment's
	// AWS partition, and other such enhancements.
	//
	// Example:
	//   // Use a concrete account and region to deploy this Stage to
	//   // Use a concrete account and region to deploy this Stage to
	//   awscdk.NewStage(app, jsii.String("Stage1"), &StageProps{
	//   	Env: &Environment{
	//   		Account: jsii.String("123456789012"),
	//   		Region: jsii.String("us-east-1"),
	//   	},
	//   })
	//
	//   // Use the CLI's current credentials to determine the target environment
	//   // Use the CLI's current credentials to determine the target environment
	//   awscdk.NewStage(app, jsii.String("Stage2"), &StageProps{
	//   	Env: &Environment{
	//   		Account: process.env.cDK_DEFAULT_ACCOUNT,
	//   		Region: process.env.cDK_DEFAULT_REGION,
	//   	},
	//   })
	//
	// Default: - The environments should be configured on the `Stack`s.
	//
	Env *Environment `field:"optional" json:"env" yaml:"env"`
	// The output directory into which to emit synthesized artifacts.
	//
	// Can only be specified if this stage is the root stage (the app). If this is
	// specified and this stage is nested within another stage, an error will be
	// thrown.
	// Default: - for nested stages, outdir will be determined as a relative
	// directory to the outdir of the app. For apps, if outdir is not specified, a
	// temporary directory will be created.
	//
	Outdir *string `field:"optional" json:"outdir" yaml:"outdir"`
	// Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
	// Default: - no permissions boundary is applied.
	//
	PermissionsBoundary PermissionsBoundary `field:"optional" json:"permissionsBoundary" yaml:"permissionsBoundary"`
	// 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 `field:"optional" json:"policyValidationBeta1" yaml:"policyValidationBeta1"`
	// Name of this stage.
	// Default: - Derived from the id.
	//
	StageName *string `field:"optional" json:"stageName" yaml:"stageName"`
}

Initialization props for a stage.

Example:

var app app

awscdk.NewStage(app, jsii.String("DevStage"))

awscdk.NewStage(app, jsii.String("BetaStage"), &StageProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_FromName(jsii.String("beta-permissions-boundary")),
})

awscdk.NewStage(app, jsii.String("GammaStage"), &StageProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_*FromName(jsii.String("prod-permissions-boundary")),
})

awscdk.NewStage(app, jsii.String("ProdStage"), &StageProps{
	PermissionsBoundary: awscdk.PermissionsBoundary_*FromName(jsii.String("prod-permissions-boundary")),
})

type StageSynthesisOptions ¶

type StageSynthesisOptions struct {
	// Force a re-synth, even if the stage has already been synthesized.
	//
	// This is used by tests to allow for incremental verification of the output.
	// Do not use in production.
	// Default: false.
	//
	Force *bool `field:"optional" json:"force" yaml:"force"`
	// Should we skip construct validation.
	// Default: - false.
	//
	SkipValidation *bool `field:"optional" json:"skipValidation" yaml:"skipValidation"`
	// Whether the stack should be validated after synthesis to check for error metadata.
	// Default: - false.
	//
	ValidateOnSynthesis *bool `field:"optional" json:"validateOnSynthesis" yaml:"validateOnSynthesis"`
}

Options for assembly synthesis.

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"

stageSynthesisOptions := &StageSynthesisOptions{
	Force: jsii.Boolean(false),
	SkipValidation: jsii.Boolean(false),
	ValidateOnSynthesis: jsii.Boolean(false),
}

type StringConcat ¶

type StringConcat interface {
	IFragmentConcatenator
	// Join the fragment on the left and on the right.
	Join(left interface{}, right interface{}) interface{}
}

Converts all fragments to strings and concats those.

Drops 'undefined's.

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"

stringConcat := cdk.NewStringConcat()

func NewStringConcat ¶

func NewStringConcat() StringConcat

type SymlinkFollowMode ¶

type SymlinkFollowMode string

Determines how symlinks are followed.

const (
	// Never follow symlinks.
	SymlinkFollowMode_NEVER SymlinkFollowMode = "NEVER"
	// Materialize all symlinks, whether they are internal or external to the source directory.
	SymlinkFollowMode_ALWAYS SymlinkFollowMode = "ALWAYS"
	// Only follows symlinks that are external to the source directory.
	SymlinkFollowMode_EXTERNAL SymlinkFollowMode = "EXTERNAL"
	// Forbids source from having any symlinks pointing outside of the source tree.
	//
	// This is the safest mode of operation as it ensures that copy operations
	// won't materialize files from the user's file system. Internal symlinks are
	// not followed.
	//
	// If the copy operation runs into an external symlink, it will fail.
	SymlinkFollowMode_BLOCK_EXTERNAL SymlinkFollowMode = "BLOCK_EXTERNAL"
)

type SynthesizeStackArtifactOptions ¶

type SynthesizeStackArtifactOptions struct {
	// Identifiers of additional dependencies.
	// Default: - No additional dependencies.
	//
	AdditionalDependencies *[]*string `field:"optional" json:"additionalDependencies" yaml:"additionalDependencies"`
	// The role that needs to be assumed to deploy the stack.
	// Default: - No role is assumed (current credentials are used).
	//
	AssumeRoleArn *string `field:"optional" json:"assumeRoleArn" yaml:"assumeRoleArn"`
	// The externalID to use with the assumeRoleArn.
	// Default: - No externalID is used.
	//
	AssumeRoleExternalId *string `field:"optional" json:"assumeRoleExternalId" yaml:"assumeRoleExternalId"`
	// SSM parameter where the bootstrap stack version number can be found.
	//
	// Only used if `requiresBootstrapStackVersion` is set.
	//
	// - If this value is not set, the bootstrap stack name must be known at
	//   deployment time so the stack version can be looked up from the stack
	//   outputs.
	// - If this value is set, the bootstrap stack can have any name because
	//   we won't need to look it up.
	// Default: - Bootstrap stack version number looked up.
	//
	BootstrapStackVersionSsmParameter *string `field:"optional" json:"bootstrapStackVersionSsmParameter" yaml:"bootstrapStackVersionSsmParameter"`
	// The role that is passed to CloudFormation to execute the change set.
	// Default: - No role is passed (currently assumed role/credentials are used).
	//
	CloudFormationExecutionRoleArn *string `field:"optional" json:"cloudFormationExecutionRoleArn" yaml:"cloudFormationExecutionRoleArn"`
	// The role to use to look up values from the target AWS account.
	// Default: - None.
	//
	LookupRole *cloudassemblyschema.BootstrapRole `field:"optional" json:"lookupRole" yaml:"lookupRole"`
	// Values for CloudFormation stack parameters that should be passed when the stack is deployed.
	// Default: - No parameters.
	//
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// Version of bootstrap stack required to deploy this stack.
	// Default: - No bootstrap stack required.
	//
	RequiresBootstrapStackVersion *float64 `field:"optional" json:"requiresBootstrapStackVersion" yaml:"requiresBootstrapStackVersion"`
	// If the stack template has already been included in the asset manifest, its asset URL.
	// Default: - Not uploaded yet, upload just before deploying.
	//
	StackTemplateAssetObjectUrl *string `field:"optional" json:"stackTemplateAssetObjectUrl" yaml:"stackTemplateAssetObjectUrl"`
}

Stack artifact options.

A subset of `cxschema.AwsCloudFormationStackProperties` of optional settings that need to be configurable by synthesizers, plus `additionalDependencies`.

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"

synthesizeStackArtifactOptions := &SynthesizeStackArtifactOptions{
	AdditionalDependencies: []*string{
		jsii.String("additionalDependencies"),
	},
	AssumeRoleArn: jsii.String("assumeRoleArn"),
	AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
	BootstrapStackVersionSsmParameter: jsii.String("bootstrapStackVersionSsmParameter"),
	CloudFormationExecutionRoleArn: jsii.String("cloudFormationExecutionRoleArn"),
	LookupRole: &BootstrapRole{
		Arn: jsii.String("arn"),

		// the properties below are optional
		AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
		BootstrapStackVersionSsmParameter: jsii.String("bootstrapStackVersionSsmParameter"),
		RequiresBootstrapStackVersion: jsii.Number(123),
	},
	Parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	RequiresBootstrapStackVersion: jsii.Number(123),
	StackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
}

type Tag ¶

type Tag interface {
	IAspect
	// The string key for the tag.
	Key() *string
	Props() *TagProps
	// The string value of the tag.
	Value() *string
	ApplyTag(resource ITaggable)
	ApplyTagV2(resource ITaggableV2)
	// All aspects can visit an IConstruct.
	Visit(construct constructs.IConstruct)
}

The Tag Aspect will handle adding a tag to this node and cascading tags to children.

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"

tag := cdk.NewTag(jsii.String("key"), jsii.String("value"), &TagProps{
	ApplyToLaunchedInstances: jsii.Boolean(false),
	ExcludeResourceTypes: []*string{
		jsii.String("excludeResourceTypes"),
	},
	IncludeResourceTypes: []*string{
		jsii.String("includeResourceTypes"),
	},
	Priority: jsii.Number(123),
})

func NewTag ¶

func NewTag(key *string, value *string, props *TagProps) Tag

type TagManager ¶

type TagManager interface {
	// A lazy value that represents the rendered tags at synthesis time.
	//
	// If you need to make a custom construct taggable, use the value of this
	// property to pass to the `tags` property of the underlying construct.
	RenderedTags() IResolvable
	// The property name for tag values.
	//
	// Normally this is `tags` but some resources choose a different name. Cognito
	// UserPool uses UserPoolTags.
	TagPropertyName() *string
	// Determine if the aspect applies here.
	//
	// Looks at the include and exclude resourceTypeName arrays to determine if
	// the aspect applies here.
	ApplyTagAspectHere(include *[]*string, exclude *[]*string) *bool
	// Returns true if there are any tags defined.
	HasTags() *bool
	// Removes the specified tag from the array if it exists.
	RemoveTag(key *string, priority *float64)
	// Renders tags into the proper format based on TagType.
	//
	// This method will eagerly render the tags currently applied. In
	// most cases, you should be using `tagManager.renderedTags` instead,
	// which will return a `Lazy` value that will resolve to the correct
	// tags at synthesis time.
	RenderTags(combineWithTags interface{}) interface{}
	// Adds the specified tag to the array of tags.
	SetTag(key *string, value *string, priority *float64, applyToLaunchedInstances *bool)
	// Render the tags in a readable format.
	TagValues() *map[string]*string
}

TagManager facilitates a common implementation of tagging for Constructs.

Normally, you do not need to use this class, as the CloudFormation specification will indicate which resources are taggable. However, sometimes you will need this to make custom resources taggable. Used `tagManager.renderedTags` to obtain a value that will resolve to the tags at synthesis time.

Example:

type myConstruct struct {
	resource
	tags
}

func newMyConstruct(scope construct, id *string) *myConstruct {
	this := &myConstruct{}
	newResource_Override(this, scope, id)

	awscdk.NewCfnResource(this, jsii.String("Resource"), &cfnResourceProps{
		Type: jsii.String("Whatever::The::Type"),
		Properties: map[string]interface{}{
			// ...
			"Tags": this.tags.renderedTags,
		},
	})
	return this
}

func NewTagManager ¶

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

func TagManager_Of ¶ added in v2.81.0

func TagManager_Of(construct interface{}) TagManager

Return the TagManager associated with the given construct, if any.

type TagManagerOptions ¶

type TagManagerOptions struct {
	// The name of the property in CloudFormation for these tags.
	//
	// Normally this is `tags`, but Cognito UserPool uses UserPoolTags.
	// Default: "tags".
	//
	TagPropertyName *string `field:"optional" json:"tagPropertyName" yaml:"tagPropertyName"`
}

Options to configure TagManager behavior.

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"

tagManagerOptions := &TagManagerOptions{
	TagPropertyName: jsii.String("tagPropertyName"),
}

type TagProps ¶

type TagProps struct {
	// Whether the tag should be applied to instances in an AutoScalingGroup.
	// Default: true.
	//
	ApplyToLaunchedInstances *bool `field:"optional" json:"applyToLaunchedInstances" yaml:"applyToLaunchedInstances"`
	// An array of Resource Types that will not receive this tag.
	//
	// An empty array will allow this tag to be applied to all resources. A
	// non-empty array will apply this tag only if the Resource type is not in
	// this array.
	// Default: [].
	//
	ExcludeResourceTypes *[]*string `field:"optional" json:"excludeResourceTypes" yaml:"excludeResourceTypes"`
	// An array of Resource Types that will receive this tag.
	//
	// An empty array will match any Resource. A non-empty array will apply this
	// tag only to Resource types that are included in this array.
	// Default: [].
	//
	IncludeResourceTypes *[]*string `field:"optional" json:"includeResourceTypes" yaml:"includeResourceTypes"`
	// Priority of the tag operation.
	//
	// Higher or equal priority tags will take precedence.
	//
	// Setting priority will enable the user to control tags when they need to not
	// follow the default precedence pattern of last applied and closest to the
	// construct in the tree.
	// Default: Default priorities:
	//
	// - 100 for `SetTag`
	// - 200 for `RemoveTag`
	// - 50 for tags added directly to CloudFormation resources.
	//
	Priority *float64 `field:"optional" json:"priority" yaml:"priority"`
}

Properties for a tag.

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"

tagProps := &TagProps{
	ApplyToLaunchedInstances: jsii.Boolean(false),
	ExcludeResourceTypes: []*string{
		jsii.String("excludeResourceTypes"),
	},
	IncludeResourceTypes: []*string{
		jsii.String("includeResourceTypes"),
	},
	Priority: jsii.Number(123),
}

type TagType ¶

type TagType string

Example:

type myConstruct struct {
	resource
	tags
}

func newMyConstruct(scope construct, id *string) *myConstruct {
	this := &myConstruct{}
	newResource_Override(this, scope, id)

	awscdk.NewCfnResource(this, jsii.String("Resource"), &cfnResourceProps{
		Type: jsii.String("Whatever::The::Type"),
		Properties: map[string]interface{}{
			// ...
			"Tags": this.tags.renderedTags,
		},
	})
	return this
}
const (
	TagType_STANDARD          TagType = "STANDARD"
	TagType_AUTOSCALING_GROUP TagType = "AUTOSCALING_GROUP"
	TagType_MAP               TagType = "MAP"
	TagType_KEY_VALUE         TagType = "KEY_VALUE"
	TagType_NOT_TAGGABLE      TagType = "NOT_TAGGABLE"
)

type Tags ¶

type Tags interface {
	// add tags to the node of a construct and all its the taggable children.
	Add(key *string, value *string, props *TagProps)
	// remove tags to the node of a construct and all its the taggable children.
	Remove(key *string, props *TagProps)
}

Manages AWS tags for all resources within a construct scope.

Example:

var mesh mesh
var service service

node := appmesh.NewVirtualNode(this, jsii.String("node"), &VirtualNodeProps{
	Mesh: Mesh,
	ServiceDiscovery: appmesh.ServiceDiscovery_CloudMap(service),
	Listeners: []virtualNodeListener{
		appmesh.*virtualNodeListener_Http(&HttpVirtualNodeListenerOptions{
			Port: jsii.Number(8080),
			HealthCheck: appmesh.HealthCheck_Http(&HttpHealthCheckOptions{
				HealthyThreshold: jsii.Number(3),
				Interval: awscdk.Duration_Seconds(jsii.Number(5)),
				Path: jsii.String("/ping"),
				Timeout: awscdk.Duration_*Seconds(jsii.Number(2)),
				UnhealthyThreshold: jsii.Number(2),
			}),
			Timeout: &HttpTimeout{
				Idle: awscdk.Duration_*Seconds(jsii.Number(5)),
			},
		}),
	},
	BackendDefaults: &BackendDefaults{
		TlsClientPolicy: &TlsClientPolicy{
			Validation: &TlsValidation{
				Trust: appmesh.TlsValidationTrust_File(jsii.String("/keys/local_cert_chain.pem")),
			},
		},
	},
	AccessLog: appmesh.AccessLog_FromFilePath(jsii.String("/dev/stdout")),
})

cdk.Tags_Of(node).Add(jsii.String("Environment"), jsii.String("Dev"))

func Tags_Of ¶

func Tags_Of(scope constructs.IConstruct) Tags

Returns the tags API for this scope.

type TimeConversionOptions ¶

type TimeConversionOptions struct {
	// If `true`, conversions into a larger time unit (e.g. `Seconds` to `Minutes`) will fail if the result is not an integer.
	// Default: true.
	//
	Integral *bool `field:"optional" json:"integral" yaml:"integral"`
}

Options for how to convert time to a different unit.

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"

timeConversionOptions := &TimeConversionOptions{
	Integral: jsii.Boolean(false),
}

type TimeZone ¶ added in v2.65.0

type TimeZone interface {
	// The name of the timezone.
	TimezoneName() *string
}

Canonical names of the IANA time zones, derived from the IANA Time Zone Database.

For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.

Example:

var target lambdaInvoke

rateBasedSchedule := awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{
	Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(10))),
	Target: Target,
	Description: jsii.String("This is a test rate-based schedule"),
})

cronBasedSchedule := awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{
	Schedule: awscdkscheduleralpha.ScheduleExpression_Cron(&CronOptionsWithTimezone{
		Minute: jsii.String("0"),
		Hour: jsii.String("23"),
		Day: jsii.String("20"),
		Month: jsii.String("11"),
		TimeZone: awscdk.TimeZone_AMERICA_NEW_YORK(),
	}),
	Target: Target,
	Description: jsii.String("This is a test cron-based schedule that will run at 11:00 PM, on day 20 of the month, only in November in New York timezone"),
})

func TimeZone_AFRICA_ABIDJAN ¶ added in v2.65.0

func TimeZone_AFRICA_ABIDJAN() TimeZone

func TimeZone_AFRICA_ALGIERS ¶ added in v2.65.0

func TimeZone_AFRICA_ALGIERS() TimeZone

func TimeZone_AFRICA_BISSAU ¶ added in v2.65.0

func TimeZone_AFRICA_BISSAU() TimeZone

func TimeZone_AFRICA_CAIRO ¶ added in v2.65.0

func TimeZone_AFRICA_CAIRO() TimeZone

func TimeZone_AFRICA_CASABLANCA ¶ added in v2.65.0

func TimeZone_AFRICA_CASABLANCA() TimeZone

func TimeZone_AFRICA_CEUTA ¶ added in v2.65.0

func TimeZone_AFRICA_CEUTA() TimeZone

func TimeZone_AFRICA_EL_AAIUN ¶ added in v2.65.0

func TimeZone_AFRICA_EL_AAIUN() TimeZone

func TimeZone_AFRICA_JOHANNESBURG ¶ added in v2.65.0

func TimeZone_AFRICA_JOHANNESBURG() TimeZone

func TimeZone_AFRICA_JUBA ¶ added in v2.65.0

func TimeZone_AFRICA_JUBA() TimeZone

func TimeZone_AFRICA_KHARTOUM ¶ added in v2.65.0

func TimeZone_AFRICA_KHARTOUM() TimeZone

func TimeZone_AFRICA_LAGOS ¶ added in v2.65.0

func TimeZone_AFRICA_LAGOS() TimeZone

func TimeZone_AFRICA_MAPUTO ¶ added in v2.65.0

func TimeZone_AFRICA_MAPUTO() TimeZone

func TimeZone_AFRICA_MONROVIA ¶ added in v2.65.0

func TimeZone_AFRICA_MONROVIA() TimeZone

func TimeZone_AFRICA_NAIROBI ¶ added in v2.65.0

func TimeZone_AFRICA_NAIROBI() TimeZone

func TimeZone_AFRICA_NDJAMENA ¶ added in v2.65.0

func TimeZone_AFRICA_NDJAMENA() TimeZone

func TimeZone_AFRICA_SAO_TOME ¶ added in v2.65.0

func TimeZone_AFRICA_SAO_TOME() TimeZone

func TimeZone_AFRICA_TRIPOLI ¶ added in v2.65.0

func TimeZone_AFRICA_TRIPOLI() TimeZone

func TimeZone_AFRICA_TUNIS ¶ added in v2.65.0

func TimeZone_AFRICA_TUNIS() TimeZone

func TimeZone_AFRICA_WINDHOEK ¶ added in v2.65.0

func TimeZone_AFRICA_WINDHOEK() TimeZone

func TimeZone_AMERICA_ADAK ¶ added in v2.65.0

func TimeZone_AMERICA_ADAK() TimeZone

func TimeZone_AMERICA_ANCHORAGE ¶ added in v2.65.0

func TimeZone_AMERICA_ANCHORAGE() TimeZone

func TimeZone_AMERICA_ARAGUAINA ¶ added in v2.65.0

func TimeZone_AMERICA_ARAGUAINA() TimeZone

func TimeZone_AMERICA_ARGENTINA_BUENOS_AIRES ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_BUENOS_AIRES() TimeZone

func TimeZone_AMERICA_ARGENTINA_CATAMARCA ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_CATAMARCA() TimeZone

func TimeZone_AMERICA_ARGENTINA_CORDOBA ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_CORDOBA() TimeZone

func TimeZone_AMERICA_ARGENTINA_JUJUY ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_JUJUY() TimeZone

func TimeZone_AMERICA_ARGENTINA_LA_RIOJA ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_LA_RIOJA() TimeZone

func TimeZone_AMERICA_ARGENTINA_MENDOZA ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_MENDOZA() TimeZone

func TimeZone_AMERICA_ARGENTINA_RIO_GALLEGOS ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_RIO_GALLEGOS() TimeZone

func TimeZone_AMERICA_ARGENTINA_SALTA ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_SALTA() TimeZone

func TimeZone_AMERICA_ARGENTINA_SAN_JUAN ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_SAN_JUAN() TimeZone

func TimeZone_AMERICA_ARGENTINA_SAN_LUIS ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_SAN_LUIS() TimeZone

func TimeZone_AMERICA_ARGENTINA_TUCUMAN ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_TUCUMAN() TimeZone

func TimeZone_AMERICA_ARGENTINA_USHUAIA ¶ added in v2.65.0

func TimeZone_AMERICA_ARGENTINA_USHUAIA() TimeZone

func TimeZone_AMERICA_ASUNCION ¶ added in v2.65.0

func TimeZone_AMERICA_ASUNCION() TimeZone

func TimeZone_AMERICA_BAHIA ¶ added in v2.65.0

func TimeZone_AMERICA_BAHIA() TimeZone

func TimeZone_AMERICA_BAHIA_BANDERAS ¶ added in v2.65.0

func TimeZone_AMERICA_BAHIA_BANDERAS() TimeZone

func TimeZone_AMERICA_BARBADOS ¶ added in v2.65.0

func TimeZone_AMERICA_BARBADOS() TimeZone

func TimeZone_AMERICA_BELEM ¶ added in v2.65.0

func TimeZone_AMERICA_BELEM() TimeZone

func TimeZone_AMERICA_BELIZE ¶ added in v2.65.0

func TimeZone_AMERICA_BELIZE() TimeZone

func TimeZone_AMERICA_BOA_VISTA ¶ added in v2.65.0

func TimeZone_AMERICA_BOA_VISTA() TimeZone

func TimeZone_AMERICA_BOGOTA ¶ added in v2.65.0

func TimeZone_AMERICA_BOGOTA() TimeZone

func TimeZone_AMERICA_BOISE ¶ added in v2.65.0

func TimeZone_AMERICA_BOISE() TimeZone

func TimeZone_AMERICA_CAMBRIDGE_BAY ¶ added in v2.65.0

func TimeZone_AMERICA_CAMBRIDGE_BAY() TimeZone

func TimeZone_AMERICA_CAMPO_GRANDE ¶ added in v2.65.0

func TimeZone_AMERICA_CAMPO_GRANDE() TimeZone

func TimeZone_AMERICA_CANCUN ¶ added in v2.65.0

func TimeZone_AMERICA_CANCUN() TimeZone

func TimeZone_AMERICA_CARACAS ¶ added in v2.65.0

func TimeZone_AMERICA_CARACAS() TimeZone

func TimeZone_AMERICA_CAYENNE ¶ added in v2.65.0

func TimeZone_AMERICA_CAYENNE() TimeZone

func TimeZone_AMERICA_CHICAGO ¶ added in v2.65.0

func TimeZone_AMERICA_CHICAGO() TimeZone

func TimeZone_AMERICA_CHIHUAHUA ¶ added in v2.65.0

func TimeZone_AMERICA_CHIHUAHUA() TimeZone

func TimeZone_AMERICA_CIUDAD_JUAREZ ¶ added in v2.65.0

func TimeZone_AMERICA_CIUDAD_JUAREZ() TimeZone

func TimeZone_AMERICA_COSTA_RICA ¶ added in v2.65.0

func TimeZone_AMERICA_COSTA_RICA() TimeZone

func TimeZone_AMERICA_CUIABA ¶ added in v2.65.0

func TimeZone_AMERICA_CUIABA() TimeZone

func TimeZone_AMERICA_DANMARKSHAVN ¶ added in v2.65.0

func TimeZone_AMERICA_DANMARKSHAVN() TimeZone

func TimeZone_AMERICA_DAWSON ¶ added in v2.65.0

func TimeZone_AMERICA_DAWSON() TimeZone

func TimeZone_AMERICA_DAWSON_CREEK ¶ added in v2.65.0

func TimeZone_AMERICA_DAWSON_CREEK() TimeZone

func TimeZone_AMERICA_DENVER ¶ added in v2.65.0

func TimeZone_AMERICA_DENVER() TimeZone

func TimeZone_AMERICA_DETROIT ¶ added in v2.65.0

func TimeZone_AMERICA_DETROIT() TimeZone

func TimeZone_AMERICA_EDMONTON ¶ added in v2.65.0

func TimeZone_AMERICA_EDMONTON() TimeZone

func TimeZone_AMERICA_EIRUNEPE ¶ added in v2.65.0

func TimeZone_AMERICA_EIRUNEPE() TimeZone

func TimeZone_AMERICA_EL_SALVADOR ¶ added in v2.65.0

func TimeZone_AMERICA_EL_SALVADOR() TimeZone

func TimeZone_AMERICA_FORTALEZA ¶ added in v2.65.0

func TimeZone_AMERICA_FORTALEZA() TimeZone

func TimeZone_AMERICA_FORT_NELSON ¶ added in v2.65.0

func TimeZone_AMERICA_FORT_NELSON() TimeZone

func TimeZone_AMERICA_GLACE_BAY ¶ added in v2.65.0

func TimeZone_AMERICA_GLACE_BAY() TimeZone

func TimeZone_AMERICA_GOOSE_BAY ¶ added in v2.65.0

func TimeZone_AMERICA_GOOSE_BAY() TimeZone

func TimeZone_AMERICA_GRAND_TURK ¶ added in v2.65.0

func TimeZone_AMERICA_GRAND_TURK() TimeZone

func TimeZone_AMERICA_GUATEMALA ¶ added in v2.65.0

func TimeZone_AMERICA_GUATEMALA() TimeZone

func TimeZone_AMERICA_GUAYAQUIL ¶ added in v2.65.0

func TimeZone_AMERICA_GUAYAQUIL() TimeZone

func TimeZone_AMERICA_GUYANA ¶ added in v2.65.0

func TimeZone_AMERICA_GUYANA() TimeZone

func TimeZone_AMERICA_HALIFAX ¶ added in v2.65.0

func TimeZone_AMERICA_HALIFAX() TimeZone

func TimeZone_AMERICA_HAVANA ¶ added in v2.65.0

func TimeZone_AMERICA_HAVANA() TimeZone

func TimeZone_AMERICA_HERMOSILLO ¶ added in v2.65.0

func TimeZone_AMERICA_HERMOSILLO() TimeZone

func TimeZone_AMERICA_INDIANA_INDIANAPOLIS ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_INDIANAPOLIS() TimeZone

func TimeZone_AMERICA_INDIANA_KNOX ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_KNOX() TimeZone

func TimeZone_AMERICA_INDIANA_MARENGO ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_MARENGO() TimeZone

func TimeZone_AMERICA_INDIANA_PETERSBURG ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_PETERSBURG() TimeZone

func TimeZone_AMERICA_INDIANA_TELL_CITY ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_TELL_CITY() TimeZone

func TimeZone_AMERICA_INDIANA_VEVAY ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_VEVAY() TimeZone

func TimeZone_AMERICA_INDIANA_VINCENNES ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_VINCENNES() TimeZone

func TimeZone_AMERICA_INDIANA_WINAMAC ¶ added in v2.65.0

func TimeZone_AMERICA_INDIANA_WINAMAC() TimeZone

func TimeZone_AMERICA_INUVIK ¶ added in v2.65.0

func TimeZone_AMERICA_INUVIK() TimeZone

func TimeZone_AMERICA_IQALUIT ¶ added in v2.65.0

func TimeZone_AMERICA_IQALUIT() TimeZone

func TimeZone_AMERICA_JAMAICA ¶ added in v2.65.0

func TimeZone_AMERICA_JAMAICA() TimeZone

func TimeZone_AMERICA_JUNEAU ¶ added in v2.65.0

func TimeZone_AMERICA_JUNEAU() TimeZone

func TimeZone_AMERICA_KENTUCKY_LOUISVILLE ¶ added in v2.65.0

func TimeZone_AMERICA_KENTUCKY_LOUISVILLE() TimeZone

func TimeZone_AMERICA_KENTUCKY_MONTICELLO ¶ added in v2.65.0

func TimeZone_AMERICA_KENTUCKY_MONTICELLO() TimeZone

func TimeZone_AMERICA_LA_PAZ ¶ added in v2.65.0

func TimeZone_AMERICA_LA_PAZ() TimeZone

func TimeZone_AMERICA_LIMA ¶ added in v2.65.0

func TimeZone_AMERICA_LIMA() TimeZone

func TimeZone_AMERICA_LOS_ANGELES ¶ added in v2.65.0

func TimeZone_AMERICA_LOS_ANGELES() TimeZone

func TimeZone_AMERICA_MACEIO ¶ added in v2.65.0

func TimeZone_AMERICA_MACEIO() TimeZone

func TimeZone_AMERICA_MANAGUA ¶ added in v2.65.0

func TimeZone_AMERICA_MANAGUA() TimeZone

func TimeZone_AMERICA_MANAUS ¶ added in v2.65.0

func TimeZone_AMERICA_MANAUS() TimeZone

func TimeZone_AMERICA_MARTINIQUE ¶ added in v2.65.0

func TimeZone_AMERICA_MARTINIQUE() TimeZone

func TimeZone_AMERICA_MATAMOROS ¶ added in v2.65.0

func TimeZone_AMERICA_MATAMOROS() TimeZone

func TimeZone_AMERICA_MAZATLAN ¶ added in v2.65.0

func TimeZone_AMERICA_MAZATLAN() TimeZone

func TimeZone_AMERICA_MENOMINEE ¶ added in v2.65.0

func TimeZone_AMERICA_MENOMINEE() TimeZone

func TimeZone_AMERICA_MERIDA ¶ added in v2.65.0

func TimeZone_AMERICA_MERIDA() TimeZone

func TimeZone_AMERICA_METLAKATLA ¶ added in v2.65.0

func TimeZone_AMERICA_METLAKATLA() TimeZone

func TimeZone_AMERICA_MEXICO_CITY ¶ added in v2.65.0

func TimeZone_AMERICA_MEXICO_CITY() TimeZone

func TimeZone_AMERICA_MIQUELON ¶ added in v2.65.0

func TimeZone_AMERICA_MIQUELON() TimeZone

func TimeZone_AMERICA_MONCTON ¶ added in v2.65.0

func TimeZone_AMERICA_MONCTON() TimeZone

func TimeZone_AMERICA_MONTERREY ¶ added in v2.65.0

func TimeZone_AMERICA_MONTERREY() TimeZone

func TimeZone_AMERICA_MONTEVIDEO ¶ added in v2.65.0

func TimeZone_AMERICA_MONTEVIDEO() TimeZone

func TimeZone_AMERICA_NEW_YORK ¶ added in v2.65.0

func TimeZone_AMERICA_NEW_YORK() TimeZone

func TimeZone_AMERICA_NOME ¶ added in v2.65.0

func TimeZone_AMERICA_NOME() TimeZone

func TimeZone_AMERICA_NORONHA ¶ added in v2.65.0

func TimeZone_AMERICA_NORONHA() TimeZone

func TimeZone_AMERICA_NORTH_DAKOTA_BEULAH ¶ added in v2.65.0

func TimeZone_AMERICA_NORTH_DAKOTA_BEULAH() TimeZone

func TimeZone_AMERICA_NORTH_DAKOTA_CENTER ¶ added in v2.65.0

func TimeZone_AMERICA_NORTH_DAKOTA_CENTER() TimeZone

func TimeZone_AMERICA_NORTH_DAKOTA_NEW_SALEM ¶ added in v2.65.0

func TimeZone_AMERICA_NORTH_DAKOTA_NEW_SALEM() TimeZone

func TimeZone_AMERICA_NUUK ¶ added in v2.65.0

func TimeZone_AMERICA_NUUK() TimeZone

func TimeZone_AMERICA_OJINAGA ¶ added in v2.65.0

func TimeZone_AMERICA_OJINAGA() TimeZone

func TimeZone_AMERICA_PANAMA ¶ added in v2.65.0

func TimeZone_AMERICA_PANAMA() TimeZone

func TimeZone_AMERICA_PARAMARIBO ¶ added in v2.65.0

func TimeZone_AMERICA_PARAMARIBO() TimeZone

func TimeZone_AMERICA_PHOENIX ¶ added in v2.65.0

func TimeZone_AMERICA_PHOENIX() TimeZone

func TimeZone_AMERICA_PORTO_VELHO ¶ added in v2.65.0

func TimeZone_AMERICA_PORTO_VELHO() TimeZone

func TimeZone_AMERICA_PORT_MINUS_AU_MINUS_PRINCE ¶ added in v2.65.0

func TimeZone_AMERICA_PORT_MINUS_AU_MINUS_PRINCE() TimeZone

func TimeZone_AMERICA_PUERTO_RICO ¶ added in v2.65.0

func TimeZone_AMERICA_PUERTO_RICO() TimeZone

func TimeZone_AMERICA_PUNTA_ARENAS ¶ added in v2.65.0

func TimeZone_AMERICA_PUNTA_ARENAS() TimeZone

func TimeZone_AMERICA_RANKIN_INLET ¶ added in v2.65.0

func TimeZone_AMERICA_RANKIN_INLET() TimeZone

func TimeZone_AMERICA_RECIFE ¶ added in v2.65.0

func TimeZone_AMERICA_RECIFE() TimeZone

func TimeZone_AMERICA_REGINA ¶ added in v2.65.0

func TimeZone_AMERICA_REGINA() TimeZone

func TimeZone_AMERICA_RESOLUTE ¶ added in v2.65.0

func TimeZone_AMERICA_RESOLUTE() TimeZone

func TimeZone_AMERICA_RIO_BRANCO ¶ added in v2.65.0

func TimeZone_AMERICA_RIO_BRANCO() TimeZone

func TimeZone_AMERICA_SANTAREM ¶ added in v2.65.0

func TimeZone_AMERICA_SANTAREM() TimeZone

func TimeZone_AMERICA_SANTIAGO ¶ added in v2.65.0

func TimeZone_AMERICA_SANTIAGO() TimeZone

func TimeZone_AMERICA_SANTO_DOMINGO ¶ added in v2.65.0

func TimeZone_AMERICA_SANTO_DOMINGO() TimeZone

func TimeZone_AMERICA_SAO_PAULO ¶ added in v2.65.0

func TimeZone_AMERICA_SAO_PAULO() TimeZone

func TimeZone_AMERICA_SCORESBYSUND ¶ added in v2.65.0

func TimeZone_AMERICA_SCORESBYSUND() TimeZone

func TimeZone_AMERICA_SITKA ¶ added in v2.65.0

func TimeZone_AMERICA_SITKA() TimeZone

func TimeZone_AMERICA_ST_JOHNS ¶ added in v2.65.0

func TimeZone_AMERICA_ST_JOHNS() TimeZone

func TimeZone_AMERICA_SWIFT_CURRENT ¶ added in v2.65.0

func TimeZone_AMERICA_SWIFT_CURRENT() TimeZone

func TimeZone_AMERICA_TEGUCIGALPA ¶ added in v2.65.0

func TimeZone_AMERICA_TEGUCIGALPA() TimeZone

func TimeZone_AMERICA_THULE ¶ added in v2.65.0

func TimeZone_AMERICA_THULE() TimeZone

func TimeZone_AMERICA_TIJUANA ¶ added in v2.65.0

func TimeZone_AMERICA_TIJUANA() TimeZone

func TimeZone_AMERICA_TORONTO ¶ added in v2.65.0

func TimeZone_AMERICA_TORONTO() TimeZone

func TimeZone_AMERICA_VANCOUVER ¶ added in v2.65.0

func TimeZone_AMERICA_VANCOUVER() TimeZone

func TimeZone_AMERICA_WHITEHORSE ¶ added in v2.65.0

func TimeZone_AMERICA_WHITEHORSE() TimeZone

func TimeZone_AMERICA_WINNIPEG ¶ added in v2.65.0

func TimeZone_AMERICA_WINNIPEG() TimeZone

func TimeZone_AMERICA_YAKUTAT ¶ added in v2.65.0

func TimeZone_AMERICA_YAKUTAT() TimeZone

func TimeZone_AMERICA_YELLOWKNIFE ¶ added in v2.65.0

func TimeZone_AMERICA_YELLOWKNIFE() TimeZone

func TimeZone_ANTARCTICA_CASEY ¶ added in v2.65.0

func TimeZone_ANTARCTICA_CASEY() TimeZone

func TimeZone_ANTARCTICA_DAVIS ¶ added in v2.65.0

func TimeZone_ANTARCTICA_DAVIS() TimeZone

func TimeZone_ANTARCTICA_MACQUARIE ¶ added in v2.65.0

func TimeZone_ANTARCTICA_MACQUARIE() TimeZone

func TimeZone_ANTARCTICA_MAWSON ¶ added in v2.65.0

func TimeZone_ANTARCTICA_MAWSON() TimeZone

func TimeZone_ANTARCTICA_PALMER ¶ added in v2.65.0

func TimeZone_ANTARCTICA_PALMER() TimeZone

func TimeZone_ANTARCTICA_ROTHERA ¶ added in v2.65.0

func TimeZone_ANTARCTICA_ROTHERA() TimeZone

func TimeZone_ANTARCTICA_TROLL ¶ added in v2.65.0

func TimeZone_ANTARCTICA_TROLL() TimeZone

func TimeZone_ASIA_ALMATY ¶ added in v2.65.0

func TimeZone_ASIA_ALMATY() TimeZone

func TimeZone_ASIA_AMMAN ¶ added in v2.65.0

func TimeZone_ASIA_AMMAN() TimeZone

func TimeZone_ASIA_ANADYR ¶ added in v2.65.0

func TimeZone_ASIA_ANADYR() TimeZone

func TimeZone_ASIA_AQTAU ¶ added in v2.65.0

func TimeZone_ASIA_AQTAU() TimeZone

func TimeZone_ASIA_AQTOBE ¶ added in v2.65.0

func TimeZone_ASIA_AQTOBE() TimeZone

func TimeZone_ASIA_ASHGABAT ¶ added in v2.65.0

func TimeZone_ASIA_ASHGABAT() TimeZone

func TimeZone_ASIA_ATYRAU ¶ added in v2.65.0

func TimeZone_ASIA_ATYRAU() TimeZone

func TimeZone_ASIA_BAGHDAD ¶ added in v2.65.0

func TimeZone_ASIA_BAGHDAD() TimeZone

func TimeZone_ASIA_BAKU ¶ added in v2.65.0

func TimeZone_ASIA_BAKU() TimeZone

func TimeZone_ASIA_BANGKOK ¶ added in v2.65.0

func TimeZone_ASIA_BANGKOK() TimeZone

func TimeZone_ASIA_BARNAUL ¶ added in v2.65.0

func TimeZone_ASIA_BARNAUL() TimeZone

func TimeZone_ASIA_BEIRUT ¶ added in v2.65.0

func TimeZone_ASIA_BEIRUT() TimeZone

func TimeZone_ASIA_BISHKEK ¶ added in v2.65.0

func TimeZone_ASIA_BISHKEK() TimeZone

func TimeZone_ASIA_CHITA ¶ added in v2.65.0

func TimeZone_ASIA_CHITA() TimeZone

func TimeZone_ASIA_CHOIBALSAN ¶ added in v2.65.0

func TimeZone_ASIA_CHOIBALSAN() TimeZone

func TimeZone_ASIA_COLOMBO ¶ added in v2.65.0

func TimeZone_ASIA_COLOMBO() TimeZone

func TimeZone_ASIA_DAMASCUS ¶ added in v2.65.0

func TimeZone_ASIA_DAMASCUS() TimeZone

func TimeZone_ASIA_DHAKA ¶ added in v2.65.0

func TimeZone_ASIA_DHAKA() TimeZone

func TimeZone_ASIA_DILI ¶ added in v2.65.0

func TimeZone_ASIA_DILI() TimeZone

func TimeZone_ASIA_DUBAI ¶ added in v2.65.0

func TimeZone_ASIA_DUBAI() TimeZone

func TimeZone_ASIA_DUSHANBE ¶ added in v2.65.0

func TimeZone_ASIA_DUSHANBE() TimeZone

func TimeZone_ASIA_FAMAGUSTA ¶ added in v2.65.0

func TimeZone_ASIA_FAMAGUSTA() TimeZone

func TimeZone_ASIA_GAZA ¶ added in v2.65.0

func TimeZone_ASIA_GAZA() TimeZone

func TimeZone_ASIA_HEBRON ¶ added in v2.65.0

func TimeZone_ASIA_HEBRON() TimeZone

func TimeZone_ASIA_HONG_KONG ¶ added in v2.65.0

func TimeZone_ASIA_HONG_KONG() TimeZone

func TimeZone_ASIA_HOVD ¶ added in v2.65.0

func TimeZone_ASIA_HOVD() TimeZone

func TimeZone_ASIA_HO_CHI_MINH ¶ added in v2.65.0

func TimeZone_ASIA_HO_CHI_MINH() TimeZone

func TimeZone_ASIA_IRKUTSK ¶ added in v2.65.0

func TimeZone_ASIA_IRKUTSK() TimeZone

func TimeZone_ASIA_JAKARTA ¶ added in v2.65.0

func TimeZone_ASIA_JAKARTA() TimeZone

func TimeZone_ASIA_JAYAPURA ¶ added in v2.65.0

func TimeZone_ASIA_JAYAPURA() TimeZone

func TimeZone_ASIA_JERUSALEM ¶ added in v2.65.0

func TimeZone_ASIA_JERUSALEM() TimeZone

func TimeZone_ASIA_KABUL ¶ added in v2.65.0

func TimeZone_ASIA_KABUL() TimeZone

func TimeZone_ASIA_KAMCHATKA ¶ added in v2.65.0

func TimeZone_ASIA_KAMCHATKA() TimeZone

func TimeZone_ASIA_KARACHI ¶ added in v2.65.0

func TimeZone_ASIA_KARACHI() TimeZone

func TimeZone_ASIA_KATHMANDU ¶ added in v2.65.0

func TimeZone_ASIA_KATHMANDU() TimeZone

func TimeZone_ASIA_KHANDYGA ¶ added in v2.65.0

func TimeZone_ASIA_KHANDYGA() TimeZone

func TimeZone_ASIA_KOLKATA ¶ added in v2.65.0

func TimeZone_ASIA_KOLKATA() TimeZone

func TimeZone_ASIA_KRASNOYARSK ¶ added in v2.65.0

func TimeZone_ASIA_KRASNOYARSK() TimeZone

func TimeZone_ASIA_KUCHING ¶ added in v2.65.0

func TimeZone_ASIA_KUCHING() TimeZone

func TimeZone_ASIA_MACAU ¶ added in v2.65.0

func TimeZone_ASIA_MACAU() TimeZone

func TimeZone_ASIA_MAGADAN ¶ added in v2.65.0

func TimeZone_ASIA_MAGADAN() TimeZone

func TimeZone_ASIA_MAKASSAR ¶ added in v2.65.0

func TimeZone_ASIA_MAKASSAR() TimeZone

func TimeZone_ASIA_MANILA ¶ added in v2.65.0

func TimeZone_ASIA_MANILA() TimeZone

func TimeZone_ASIA_NICOSIA ¶ added in v2.65.0

func TimeZone_ASIA_NICOSIA() TimeZone

func TimeZone_ASIA_NOVOKUZNETSK ¶ added in v2.65.0

func TimeZone_ASIA_NOVOKUZNETSK() TimeZone

func TimeZone_ASIA_NOVOSIBIRSK ¶ added in v2.65.0

func TimeZone_ASIA_NOVOSIBIRSK() TimeZone

func TimeZone_ASIA_OMSK ¶ added in v2.65.0

func TimeZone_ASIA_OMSK() TimeZone

func TimeZone_ASIA_ORAL ¶ added in v2.65.0

func TimeZone_ASIA_ORAL() TimeZone

func TimeZone_ASIA_PONTIANAK ¶ added in v2.65.0

func TimeZone_ASIA_PONTIANAK() TimeZone

func TimeZone_ASIA_PYONGYANG ¶ added in v2.65.0

func TimeZone_ASIA_PYONGYANG() TimeZone

func TimeZone_ASIA_QATAR ¶ added in v2.65.0

func TimeZone_ASIA_QATAR() TimeZone

func TimeZone_ASIA_QOSTANAY ¶ added in v2.65.0

func TimeZone_ASIA_QOSTANAY() TimeZone

func TimeZone_ASIA_QYZYLORDA ¶ added in v2.65.0

func TimeZone_ASIA_QYZYLORDA() TimeZone

func TimeZone_ASIA_RIYADH ¶ added in v2.65.0

func TimeZone_ASIA_RIYADH() TimeZone

func TimeZone_ASIA_SAKHALIN ¶ added in v2.65.0

func TimeZone_ASIA_SAKHALIN() TimeZone

func TimeZone_ASIA_SAMARKAND ¶ added in v2.65.0

func TimeZone_ASIA_SAMARKAND() TimeZone

func TimeZone_ASIA_SEOUL ¶ added in v2.65.0

func TimeZone_ASIA_SEOUL() TimeZone

func TimeZone_ASIA_SHANGHAI ¶ added in v2.65.0

func TimeZone_ASIA_SHANGHAI() TimeZone

func TimeZone_ASIA_SINGAPORE ¶ added in v2.65.0

func TimeZone_ASIA_SINGAPORE() TimeZone

func TimeZone_ASIA_SREDNEKOLYMSK ¶ added in v2.65.0

func TimeZone_ASIA_SREDNEKOLYMSK() TimeZone

func TimeZone_ASIA_TAIPEI ¶ added in v2.65.0

func TimeZone_ASIA_TAIPEI() TimeZone

func TimeZone_ASIA_TASHKENT ¶ added in v2.65.0

func TimeZone_ASIA_TASHKENT() TimeZone

func TimeZone_ASIA_TBILISI ¶ added in v2.65.0

func TimeZone_ASIA_TBILISI() TimeZone

func TimeZone_ASIA_TEHRAN ¶ added in v2.65.0

func TimeZone_ASIA_TEHRAN() TimeZone

func TimeZone_ASIA_THIMPHU ¶ added in v2.65.0

func TimeZone_ASIA_THIMPHU() TimeZone

func TimeZone_ASIA_TOKYO ¶ added in v2.65.0

func TimeZone_ASIA_TOKYO() TimeZone

func TimeZone_ASIA_TOMSK ¶ added in v2.65.0

func TimeZone_ASIA_TOMSK() TimeZone

func TimeZone_ASIA_ULAANBAATAR ¶ added in v2.65.0

func TimeZone_ASIA_ULAANBAATAR() TimeZone

func TimeZone_ASIA_URUMQI ¶ added in v2.65.0

func TimeZone_ASIA_URUMQI() TimeZone

func TimeZone_ASIA_UST_MINUS_NERA ¶ added in v2.65.0

func TimeZone_ASIA_UST_MINUS_NERA() TimeZone

func TimeZone_ASIA_VLADIVOSTOK ¶ added in v2.65.0

func TimeZone_ASIA_VLADIVOSTOK() TimeZone

func TimeZone_ASIA_YAKUTSK ¶ added in v2.65.0

func TimeZone_ASIA_YAKUTSK() TimeZone

func TimeZone_ASIA_YANGON ¶ added in v2.65.0

func TimeZone_ASIA_YANGON() TimeZone

func TimeZone_ASIA_YEKATERINBURG ¶ added in v2.65.0

func TimeZone_ASIA_YEKATERINBURG() TimeZone

func TimeZone_ASIA_YEREVAN ¶ added in v2.65.0

func TimeZone_ASIA_YEREVAN() TimeZone

func TimeZone_ATLANTIC_AZORES ¶ added in v2.65.0

func TimeZone_ATLANTIC_AZORES() TimeZone

func TimeZone_ATLANTIC_BERMUDA ¶ added in v2.65.0

func TimeZone_ATLANTIC_BERMUDA() TimeZone

func TimeZone_ATLANTIC_CANARY ¶ added in v2.65.0

func TimeZone_ATLANTIC_CANARY() TimeZone

func TimeZone_ATLANTIC_CAPE_VERDE ¶ added in v2.65.0

func TimeZone_ATLANTIC_CAPE_VERDE() TimeZone

func TimeZone_ATLANTIC_FAROE ¶ added in v2.65.0

func TimeZone_ATLANTIC_FAROE() TimeZone

func TimeZone_ATLANTIC_MADEIRA ¶ added in v2.65.0

func TimeZone_ATLANTIC_MADEIRA() TimeZone

func TimeZone_ATLANTIC_SOUTH_GEORGIA ¶ added in v2.65.0

func TimeZone_ATLANTIC_SOUTH_GEORGIA() TimeZone

func TimeZone_ATLANTIC_STANLEY ¶ added in v2.65.0

func TimeZone_ATLANTIC_STANLEY() TimeZone

func TimeZone_AUSTRALIA_ADELAIDE ¶ added in v2.65.0

func TimeZone_AUSTRALIA_ADELAIDE() TimeZone

func TimeZone_AUSTRALIA_BRISBANE ¶ added in v2.65.0

func TimeZone_AUSTRALIA_BRISBANE() TimeZone

func TimeZone_AUSTRALIA_BROKEN_HILL ¶ added in v2.65.0

func TimeZone_AUSTRALIA_BROKEN_HILL() TimeZone

func TimeZone_AUSTRALIA_DARWIN ¶ added in v2.65.0

func TimeZone_AUSTRALIA_DARWIN() TimeZone

func TimeZone_AUSTRALIA_EUCLA ¶ added in v2.65.0

func TimeZone_AUSTRALIA_EUCLA() TimeZone

func TimeZone_AUSTRALIA_HOBART ¶ added in v2.65.0

func TimeZone_AUSTRALIA_HOBART() TimeZone

func TimeZone_AUSTRALIA_LINDEMAN ¶ added in v2.65.0

func TimeZone_AUSTRALIA_LINDEMAN() TimeZone

func TimeZone_AUSTRALIA_LORD_HOWE ¶ added in v2.65.0

func TimeZone_AUSTRALIA_LORD_HOWE() TimeZone

func TimeZone_AUSTRALIA_MELBOURNE ¶ added in v2.65.0

func TimeZone_AUSTRALIA_MELBOURNE() TimeZone

func TimeZone_AUSTRALIA_PERTH ¶ added in v2.65.0

func TimeZone_AUSTRALIA_PERTH() TimeZone

func TimeZone_AUSTRALIA_SYDNEY ¶ added in v2.65.0

func TimeZone_AUSTRALIA_SYDNEY() TimeZone

func TimeZone_CET ¶ added in v2.65.0

func TimeZone_CET() TimeZone

func TimeZone_CST6CDT ¶ added in v2.65.0

func TimeZone_CST6CDT() TimeZone

func TimeZone_EET ¶ added in v2.65.0

func TimeZone_EET() TimeZone

func TimeZone_EST ¶ added in v2.65.0

func TimeZone_EST() TimeZone

func TimeZone_EST5EDT ¶ added in v2.65.0

func TimeZone_EST5EDT() TimeZone

func TimeZone_ETC_GMT ¶ added in v2.65.0

func TimeZone_ETC_GMT() TimeZone

func TimeZone_ETC_GMT_MINUS_1 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_1() TimeZone

func TimeZone_ETC_GMT_MINUS_10 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_10() TimeZone

func TimeZone_ETC_GMT_MINUS_11 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_11() TimeZone

func TimeZone_ETC_GMT_MINUS_12 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_12() TimeZone

func TimeZone_ETC_GMT_MINUS_13 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_13() TimeZone

func TimeZone_ETC_GMT_MINUS_14 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_14() TimeZone

func TimeZone_ETC_GMT_MINUS_2 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_2() TimeZone

func TimeZone_ETC_GMT_MINUS_3 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_3() TimeZone

func TimeZone_ETC_GMT_MINUS_4 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_4() TimeZone

func TimeZone_ETC_GMT_MINUS_5 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_5() TimeZone

func TimeZone_ETC_GMT_MINUS_6 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_6() TimeZone

func TimeZone_ETC_GMT_MINUS_7 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_7() TimeZone

func TimeZone_ETC_GMT_MINUS_8 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_8() TimeZone

func TimeZone_ETC_GMT_MINUS_9 ¶ added in v2.65.0

func TimeZone_ETC_GMT_MINUS_9() TimeZone

func TimeZone_ETC_GMT_PLUS_1 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_1() TimeZone

func TimeZone_ETC_GMT_PLUS_10 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_10() TimeZone

func TimeZone_ETC_GMT_PLUS_11 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_11() TimeZone

func TimeZone_ETC_GMT_PLUS_12 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_12() TimeZone

func TimeZone_ETC_GMT_PLUS_2 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_2() TimeZone

func TimeZone_ETC_GMT_PLUS_3 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_3() TimeZone

func TimeZone_ETC_GMT_PLUS_4 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_4() TimeZone

func TimeZone_ETC_GMT_PLUS_5 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_5() TimeZone

func TimeZone_ETC_GMT_PLUS_6 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_6() TimeZone

func TimeZone_ETC_GMT_PLUS_7 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_7() TimeZone

func TimeZone_ETC_GMT_PLUS_8 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_8() TimeZone

func TimeZone_ETC_GMT_PLUS_9 ¶ added in v2.65.0

func TimeZone_ETC_GMT_PLUS_9() TimeZone

func TimeZone_ETC_UTC ¶ added in v2.65.0

func TimeZone_ETC_UTC() TimeZone

func TimeZone_EUROPE_ANDORRA ¶ added in v2.65.0

func TimeZone_EUROPE_ANDORRA() TimeZone

func TimeZone_EUROPE_ASTRAKHAN ¶ added in v2.65.0

func TimeZone_EUROPE_ASTRAKHAN() TimeZone

func TimeZone_EUROPE_ATHENS ¶ added in v2.65.0

func TimeZone_EUROPE_ATHENS() TimeZone

func TimeZone_EUROPE_BELGRADE ¶ added in v2.65.0

func TimeZone_EUROPE_BELGRADE() TimeZone

func TimeZone_EUROPE_BERLIN ¶ added in v2.65.0

func TimeZone_EUROPE_BERLIN() TimeZone

func TimeZone_EUROPE_BRUSSELS ¶ added in v2.65.0

func TimeZone_EUROPE_BRUSSELS() TimeZone

func TimeZone_EUROPE_BUCHAREST ¶ added in v2.65.0

func TimeZone_EUROPE_BUCHAREST() TimeZone

func TimeZone_EUROPE_BUDAPEST ¶ added in v2.65.0

func TimeZone_EUROPE_BUDAPEST() TimeZone

func TimeZone_EUROPE_CHISINAU ¶ added in v2.65.0

func TimeZone_EUROPE_CHISINAU() TimeZone

func TimeZone_EUROPE_DUBLIN ¶ added in v2.65.0

func TimeZone_EUROPE_DUBLIN() TimeZone

func TimeZone_EUROPE_GIBRALTAR ¶ added in v2.65.0

func TimeZone_EUROPE_GIBRALTAR() TimeZone

func TimeZone_EUROPE_HELSINKI ¶ added in v2.65.0

func TimeZone_EUROPE_HELSINKI() TimeZone

func TimeZone_EUROPE_ISTANBUL ¶ added in v2.65.0

func TimeZone_EUROPE_ISTANBUL() TimeZone

func TimeZone_EUROPE_KALININGRAD ¶ added in v2.65.0

func TimeZone_EUROPE_KALININGRAD() TimeZone

func TimeZone_EUROPE_KIROV ¶ added in v2.65.0

func TimeZone_EUROPE_KIROV() TimeZone

func TimeZone_EUROPE_KYIV ¶ added in v2.65.0

func TimeZone_EUROPE_KYIV() TimeZone

func TimeZone_EUROPE_LISBON ¶ added in v2.65.0

func TimeZone_EUROPE_LISBON() TimeZone

func TimeZone_EUROPE_LONDON ¶ added in v2.65.0

func TimeZone_EUROPE_LONDON() TimeZone

func TimeZone_EUROPE_MADRID ¶ added in v2.65.0

func TimeZone_EUROPE_MADRID() TimeZone

func TimeZone_EUROPE_MALTA ¶ added in v2.65.0

func TimeZone_EUROPE_MALTA() TimeZone

func TimeZone_EUROPE_MINSK ¶ added in v2.65.0

func TimeZone_EUROPE_MINSK() TimeZone

func TimeZone_EUROPE_MOSCOW ¶ added in v2.65.0

func TimeZone_EUROPE_MOSCOW() TimeZone

func TimeZone_EUROPE_PARIS ¶ added in v2.65.0

func TimeZone_EUROPE_PARIS() TimeZone

func TimeZone_EUROPE_PRAGUE ¶ added in v2.65.0

func TimeZone_EUROPE_PRAGUE() TimeZone

func TimeZone_EUROPE_RIGA ¶ added in v2.65.0

func TimeZone_EUROPE_RIGA() TimeZone

func TimeZone_EUROPE_ROME ¶ added in v2.65.0

func TimeZone_EUROPE_ROME() TimeZone

func TimeZone_EUROPE_SAMARA ¶ added in v2.65.0

func TimeZone_EUROPE_SAMARA() TimeZone

func TimeZone_EUROPE_SARATOV ¶ added in v2.65.0

func TimeZone_EUROPE_SARATOV() TimeZone

func TimeZone_EUROPE_SIMFEROPOL ¶ added in v2.65.0

func TimeZone_EUROPE_SIMFEROPOL() TimeZone

func TimeZone_EUROPE_SOFIA ¶ added in v2.65.0

func TimeZone_EUROPE_SOFIA() TimeZone

func TimeZone_EUROPE_TALLINN ¶ added in v2.65.0

func TimeZone_EUROPE_TALLINN() TimeZone

func TimeZone_EUROPE_TIRANE ¶ added in v2.65.0

func TimeZone_EUROPE_TIRANE() TimeZone

func TimeZone_EUROPE_ULYANOVSK ¶ added in v2.65.0

func TimeZone_EUROPE_ULYANOVSK() TimeZone

func TimeZone_EUROPE_VIENNA ¶ added in v2.65.0

func TimeZone_EUROPE_VIENNA() TimeZone

func TimeZone_EUROPE_VILNIUS ¶ added in v2.65.0

func TimeZone_EUROPE_VILNIUS() TimeZone

func TimeZone_EUROPE_VOLGOGRAD ¶ added in v2.65.0

func TimeZone_EUROPE_VOLGOGRAD() TimeZone

func TimeZone_EUROPE_WARSAW ¶ added in v2.65.0

func TimeZone_EUROPE_WARSAW() TimeZone

func TimeZone_EUROPE_ZURICH ¶ added in v2.65.0

func TimeZone_EUROPE_ZURICH() TimeZone

func TimeZone_FACTORY ¶ added in v2.65.0

func TimeZone_FACTORY() TimeZone

func TimeZone_HST ¶ added in v2.65.0

func TimeZone_HST() TimeZone

func TimeZone_INDIAN_CHAGOS ¶ added in v2.65.0

func TimeZone_INDIAN_CHAGOS() TimeZone

func TimeZone_INDIAN_MALDIVES ¶ added in v2.65.0

func TimeZone_INDIAN_MALDIVES() TimeZone

func TimeZone_INDIAN_MAURITIUS ¶ added in v2.65.0

func TimeZone_INDIAN_MAURITIUS() TimeZone

func TimeZone_MET ¶ added in v2.65.0

func TimeZone_MET() TimeZone

func TimeZone_MST ¶ added in v2.65.0

func TimeZone_MST() TimeZone

func TimeZone_MST7MDT ¶ added in v2.65.0

func TimeZone_MST7MDT() TimeZone

func TimeZone_Of ¶ added in v2.65.0

func TimeZone_Of(timezoneName *string) TimeZone

Use this to add a timezone not in this class.

Returns: a new Timezone.

func TimeZone_PACIFIC_APIA ¶ added in v2.65.0

func TimeZone_PACIFIC_APIA() TimeZone

func TimeZone_PACIFIC_AUCKLAND ¶ added in v2.65.0

func TimeZone_PACIFIC_AUCKLAND() TimeZone

func TimeZone_PACIFIC_BOUGAINVILLE ¶ added in v2.65.0

func TimeZone_PACIFIC_BOUGAINVILLE() TimeZone

func TimeZone_PACIFIC_CHATHAM ¶ added in v2.65.0

func TimeZone_PACIFIC_CHATHAM() TimeZone

func TimeZone_PACIFIC_EASTER ¶ added in v2.65.0

func TimeZone_PACIFIC_EASTER() TimeZone

func TimeZone_PACIFIC_EFATE ¶ added in v2.65.0

func TimeZone_PACIFIC_EFATE() TimeZone

func TimeZone_PACIFIC_FAKAOFO ¶ added in v2.65.0

func TimeZone_PACIFIC_FAKAOFO() TimeZone

func TimeZone_PACIFIC_FIJI ¶ added in v2.65.0

func TimeZone_PACIFIC_FIJI() TimeZone

func TimeZone_PACIFIC_GALAPAGOS ¶ added in v2.65.0

func TimeZone_PACIFIC_GALAPAGOS() TimeZone

func TimeZone_PACIFIC_GAMBIER ¶ added in v2.65.0

func TimeZone_PACIFIC_GAMBIER() TimeZone

func TimeZone_PACIFIC_GUADALCANAL ¶ added in v2.65.0

func TimeZone_PACIFIC_GUADALCANAL() TimeZone

func TimeZone_PACIFIC_GUAM ¶ added in v2.65.0

func TimeZone_PACIFIC_GUAM() TimeZone

func TimeZone_PACIFIC_HONOLULU ¶ added in v2.65.0

func TimeZone_PACIFIC_HONOLULU() TimeZone

func TimeZone_PACIFIC_KANTON ¶ added in v2.65.0

func TimeZone_PACIFIC_KANTON() TimeZone

func TimeZone_PACIFIC_KIRITIMATI ¶ added in v2.65.0

func TimeZone_PACIFIC_KIRITIMATI() TimeZone

func TimeZone_PACIFIC_KOSRAE ¶ added in v2.65.0

func TimeZone_PACIFIC_KOSRAE() TimeZone

func TimeZone_PACIFIC_KWAJALEIN ¶ added in v2.65.0

func TimeZone_PACIFIC_KWAJALEIN() TimeZone

func TimeZone_PACIFIC_MARQUESAS ¶ added in v2.65.0

func TimeZone_PACIFIC_MARQUESAS() TimeZone

func TimeZone_PACIFIC_NAURU ¶ added in v2.65.0

func TimeZone_PACIFIC_NAURU() TimeZone

func TimeZone_PACIFIC_NIUE ¶ added in v2.65.0

func TimeZone_PACIFIC_NIUE() TimeZone

func TimeZone_PACIFIC_NORFOLK ¶ added in v2.65.0

func TimeZone_PACIFIC_NORFOLK() TimeZone

func TimeZone_PACIFIC_NOUMEA ¶ added in v2.65.0

func TimeZone_PACIFIC_NOUMEA() TimeZone

func TimeZone_PACIFIC_PAGO_PAGO ¶ added in v2.65.0

func TimeZone_PACIFIC_PAGO_PAGO() TimeZone

func TimeZone_PACIFIC_PALAU ¶ added in v2.65.0

func TimeZone_PACIFIC_PALAU() TimeZone

func TimeZone_PACIFIC_PITCAIRN ¶ added in v2.65.0

func TimeZone_PACIFIC_PITCAIRN() TimeZone

func TimeZone_PACIFIC_PORT_MORESBY ¶ added in v2.65.0

func TimeZone_PACIFIC_PORT_MORESBY() TimeZone

func TimeZone_PACIFIC_RAROTONGA ¶ added in v2.65.0

func TimeZone_PACIFIC_RAROTONGA() TimeZone

func TimeZone_PACIFIC_TAHITI ¶ added in v2.65.0

func TimeZone_PACIFIC_TAHITI() TimeZone

func TimeZone_PACIFIC_TARAWA ¶ added in v2.65.0

func TimeZone_PACIFIC_TARAWA() TimeZone

func TimeZone_PACIFIC_TONGATAPU ¶ added in v2.65.0

func TimeZone_PACIFIC_TONGATAPU() TimeZone

func TimeZone_PST8PDT ¶ added in v2.65.0

func TimeZone_PST8PDT() TimeZone

func TimeZone_WET ¶ added in v2.65.0

func TimeZone_WET() TimeZone

type Token ¶

type Token interface {
}

Represents a special or lazily-evaluated value.

Can be used to delay evaluation of a certain value in case, for example, that it requires some context or late-bound data. Can also be used to mark values that need special processing at document rendering time.

Tokens can be embedded into strings while retaining their original semantics.

type TokenComparison ¶

type TokenComparison interface {
}

An enum-like class that represents the result of comparing two Tokens.

The return type of `Token.compareStrings`.

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"

tokenComparison := cdk.TokenComparison_BOTH_UNRESOLVED()

func TokenComparison_BOTH_UNRESOLVED ¶

func TokenComparison_BOTH_UNRESOLVED() TokenComparison

func TokenComparison_DIFFERENT ¶

func TokenComparison_DIFFERENT() TokenComparison

func TokenComparison_ONE_UNRESOLVED ¶

func TokenComparison_ONE_UNRESOLVED() TokenComparison

func TokenComparison_SAME ¶

func TokenComparison_SAME() TokenComparison

func Token_CompareStrings ¶

func Token_CompareStrings(possibleToken1 *string, possibleToken2 *string) TokenComparison

Compare two strings that might contain Tokens with each other.

type Tokenization ¶

type Tokenization interface {
}

Less oft-needed functions to manipulate Tokens.

type TokenizedStringFragments ¶

type TokenizedStringFragments interface {
	FirstToken() IResolvable
	FirstValue() interface{}
	Length() *float64
	// Return all Tokens from this string.
	Tokens() *[]IResolvable
	AddIntrinsic(value interface{})
	AddLiteral(lit interface{})
	AddToken(token IResolvable)
	// Combine the string fragments using the given joiner.
	//
	// If there are any.
	Join(concat IFragmentConcatenator) interface{}
	// Apply a transformation function to all tokens in the string.
	MapTokens(mapper ITokenMapper) TokenizedStringFragments
}

Fragments of a concatenated string containing stringified Tokens.

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"

tokenizedStringFragments := cdk.NewTokenizedStringFragments()

func NewTokenizedStringFragments ¶

func NewTokenizedStringFragments() TokenizedStringFragments

func Tokenization_ReverseString ¶

func Tokenization_ReverseString(s *string) TokenizedStringFragments

Un-encode a string potentially containing encoded tokens.

type TreeInspector ¶

type TreeInspector interface {
	// Represents the bag of attributes as key-value pairs.
	Attributes() *map[string]interface{}
	// Adds attribute to bag.
	//
	// Keys should be added by convention to prevent conflicts
	// i.e. L1 constructs will contain attributes with keys prefixed with aws:cdk:cloudformation
	AddAttribute(key *string, value interface{})
}

Inspector that maintains an attribute bag.

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"

treeInspector := cdk.NewTreeInspector()

func NewTreeInspector ¶

func NewTreeInspector() TreeInspector

type UniqueResourceNameOptions ¶ added in v2.29.0

type UniqueResourceNameOptions struct {
	// Non-alphanumeric characters allowed in the unique resource name.
	// Default: - none.
	//
	AllowedSpecialCharacters *string `field:"optional" json:"allowedSpecialCharacters" yaml:"allowedSpecialCharacters"`
	// The maximum length of the unique resource name.
	// Default: - 256.
	//
	MaxLength *float64 `field:"optional" json:"maxLength" yaml:"maxLength"`
	// The separator used between the path components.
	// Default: - none.
	//
	Separator *string `field:"optional" json:"separator" yaml:"separator"`
}

Options for creating a unique resource name.

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"

uniqueResourceNameOptions := &UniqueResourceNameOptions{
	AllowedSpecialCharacters: jsii.String("allowedSpecialCharacters"),
	MaxLength: jsii.Number(123),
	Separator: jsii.String("separator"),
}

type ValidationResult ¶

type ValidationResult interface {
	ErrorMessage() *string
	IsSuccess() *bool
	Results() ValidationResults
	// Turn a failed validation into an exception.
	AssertSuccess()
	// Return a string rendering of the tree of validation failures.
	ErrorTree() *string
	// Wrap this result with an error message, if it concerns an error.
	Prefix(message *string) ValidationResult
}

Representation of validation results.

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

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 validationResults validationResults

validationResult := cdk.NewValidationResult(jsii.String("errorMessage"), validationResults)

func NewValidationResult ¶

func NewValidationResult(errorMessage *string, results ValidationResults) ValidationResult

type ValidationResults ¶

type ValidationResults interface {
	IsSuccess() *bool
	Results() *[]ValidationResult
	SetResults(val *[]ValidationResult)
	Collect(result ValidationResult)
	ErrorTreeList() *string
	// Wrap up all validation results into a single tree node.
	//
	// If there are failures in the collection, add a message, otherwise
	// return a success.
	Wrap(message *string) ValidationResult
}

A collection of validation results.

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 validationResult validationResult

validationResults := cdk.NewValidationResults([]validationResult{
	validationResult,
})

func NewValidationResults ¶

func NewValidationResults(results *[]ValidationResult) ValidationResults

Source Files ¶

Directories ¶

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL