cxapi

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 4

README

Cloud Executable API

This module is part of the AWS Cloud Development Kit project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetManifestArtifact_IsAssetManifestArtifact added in v2.19.0

func AssetManifestArtifact_IsAssetManifestArtifact(art interface{}) *bool

Checks if `art` is an instance of this class.

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

Explanation: in JavaScript, multiple copies of the `cx-api` library on disk are seen as independent, completely different libraries. As a consequence, the class `AssetManifestArtifact` in each copy of the `cx-api` 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 `cx-api` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

func EnvironmentPlaceholders_CURRENT_ACCOUNT

func EnvironmentPlaceholders_CURRENT_ACCOUNT() *string

func EnvironmentPlaceholders_CURRENT_PARTITION

func EnvironmentPlaceholders_CURRENT_PARTITION() *string

func EnvironmentPlaceholders_CURRENT_REGION

func EnvironmentPlaceholders_CURRENT_REGION() *string

func EnvironmentPlaceholders_Replace

func EnvironmentPlaceholders_Replace(object interface{}, values *EnvironmentPlaceholderValues) interface{}

Replace the environment placeholders in all strings found in a complex object.

Duplicated between cdk-assets and aws-cdk CLI because we don't have a good single place to put it (they're nominally independent tools).

func EnvironmentPlaceholders_ReplaceAsync

func EnvironmentPlaceholders_ReplaceAsync(object interface{}, provider IEnvironmentPlaceholderProvider) interface{}

Like 'replace', but asynchronous.

func EnvironmentUtils_Format

func EnvironmentUtils_Format(account *string, region *string) *string

Format an environment string from an account and region.

func NewAssetManifestArtifact_Override

func NewAssetManifestArtifact_Override(a AssetManifestArtifact, assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest)

func NewCloudArtifact_Override

func NewCloudArtifact_Override(c CloudArtifact, assembly CloudAssembly, id *string, manifest *cloudassemblyschema.ArtifactManifest)

func NewCloudAssemblyBuilder_Override

func NewCloudAssemblyBuilder_Override(c CloudAssemblyBuilder, outdir *string, props *CloudAssemblyBuilderProps)

Initializes a cloud assembly builder.

func NewCloudAssembly_Override

func NewCloudAssembly_Override(c CloudAssembly, directory *string, loadOptions *cloudassemblyschema.LoadManifestOptions)

Reads a cloud assembly from the specified directory.

func NewCloudFormationStackArtifact_Override

func NewCloudFormationStackArtifact_Override(c CloudFormationStackArtifact, assembly CloudAssembly, artifactId *string, artifact *cloudassemblyschema.ArtifactManifest)

func NewEnvironmentPlaceholders_Override

func NewEnvironmentPlaceholders_Override(e EnvironmentPlaceholders)

func NewEnvironmentUtils_Override

func NewEnvironmentUtils_Override(e EnvironmentUtils)

func NewNestedCloudAssemblyArtifact_Override

func NewNestedCloudAssemblyArtifact_Override(n NestedCloudAssemblyArtifact, assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest)

func NewTreeCloudArtifact_Override

func NewTreeCloudArtifact_Override(t TreeCloudArtifact, assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest)

Types

type AssemblyBuildOptions

type AssemblyBuildOptions struct {
}

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"

assemblyBuildOptions := &assemblyBuildOptions{
}

type AssetManifestArtifact

type AssetManifestArtifact interface {
	CloudArtifact
	Assembly() CloudAssembly
	// Name of SSM parameter with bootstrap stack version.
	BootstrapStackVersionSsmParameter() *string
	// Returns all the artifacts that this artifact depends on.
	Dependencies() *[]CloudArtifact
	// The file name of the asset manifest.
	File() *string
	// An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
	//
	// Defaults to the normal
	// id. Should only be used in user interfaces.
	HierarchicalId() *string
	Id() *string
	// The artifact's manifest.
	Manifest() *cloudassemblyschema.ArtifactManifest
	// The set of messages extracted from the artifact's metadata.
	Messages() *[]*SynthesisMessage
	// Version of bootstrap stack required to deploy this stack.
	RequiresBootstrapStackVersion() *float64
	// Returns: all the metadata entries of a specific type in this artifact.
	FindMetadataByType(type_ *string) *[]*MetadataEntryResult
}

Asset manifest is a description of a set of assets which need to be built and published.

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

var cloudAssembly cloudAssembly

assetManifestArtifact := awscdk.Cx_api.NewAssetManifestArtifact(cloudAssembly, jsii.String("name"), &artifactManifest{
	type: awscdk.Cloud_assembly_schema.artifactType_NONE,

	// the properties below are optional
	dependencies: []*string{
		jsii.String("dependencies"),
	},
	displayName: jsii.String("displayName"),
	environment: jsii.String("environment"),
	metadata: map[string][]metadataEntry{
		"metadataKey": []*metadataEntry{
			&metadataEntry{
				"type": jsii.String("type"),

				// the properties below are optional
				"data": jsii.String("data"),
				"trace": []*string{
					jsii.String("trace"),
				},
			},
		},
	},
	properties: &awsCloudFormationStackProperties{
		templateFile: jsii.String("templateFile"),

		// the properties below are optional
		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),
		stackName: jsii.String("stackName"),
		stackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
		tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		terminationProtection: jsii.Boolean(false),
		validateOnSynth: jsii.Boolean(false),
	},
})

func NewAssetManifestArtifact

func NewAssetManifestArtifact(assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest) AssetManifestArtifact

type AwsCloudFormationStackProperties

type AwsCloudFormationStackProperties struct {
	// A file relative to the assembly root which contains the CloudFormation template for this stack.
	TemplateFile *string `field:"required" json:"templateFile" yaml:"templateFile"`
	// Values for CloudFormation stack parameters that should be passed when the stack is deployed.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// The name to use for the CloudFormation stack.
	StackName *string `field:"optional" json:"stackName" yaml:"stackName"`
	// Whether to enable termination protection for this stack.
	TerminationProtection *bool `field:"optional" json:"terminationProtection" yaml:"terminationProtection"`
}

Artifact properties for CloudFormation stacks.

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"

awsCloudFormationStackProperties := &awsCloudFormationStackProperties{
	templateFile: jsii.String("templateFile"),

	// the properties below are optional
	parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	stackName: jsii.String("stackName"),
	terminationProtection: jsii.Boolean(false),
}

type CloudArtifact

type CloudArtifact interface {
	Assembly() CloudAssembly
	// Returns all the artifacts that this artifact depends on.
	Dependencies() *[]CloudArtifact
	// An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
	//
	// Defaults to the normal
	// id. Should only be used in user interfaces.
	HierarchicalId() *string
	Id() *string
	// The artifact's manifest.
	Manifest() *cloudassemblyschema.ArtifactManifest
	// The set of messages extracted from the artifact's metadata.
	Messages() *[]*SynthesisMessage
	// Returns: all the metadata entries of a specific type in this artifact.
	FindMetadataByType(type_ *string) *[]*MetadataEntryResult
}

Represents an artifact within a cloud assembly.

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

var cloudAssembly cloudAssembly

cloudArtifact := awscdk.Cx_api.cloudArtifact.fromManifest(cloudAssembly, jsii.String("MyCloudArtifact"), &artifactManifest{
	type: awscdk.Cloud_assembly_schema.artifactType_NONE,

	// the properties below are optional
	dependencies: []*string{
		jsii.String("dependencies"),
	},
	displayName: jsii.String("displayName"),
	environment: jsii.String("environment"),
	metadata: map[string][]metadataEntry{
		"metadataKey": []*metadataEntry{
			&metadataEntry{
				"type": jsii.String("type"),

				// the properties below are optional
				"data": jsii.String("data"),
				"trace": []*string{
					jsii.String("trace"),
				},
			},
		},
	},
	properties: &awsCloudFormationStackProperties{
		templateFile: jsii.String("templateFile"),

		// the properties below are optional
		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),
		stackName: jsii.String("stackName"),
		stackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
		tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		terminationProtection: jsii.Boolean(false),
		validateOnSynth: jsii.Boolean(false),
	},
})

func AssetManifestArtifact_FromManifest

func AssetManifestArtifact_FromManifest(assembly CloudAssembly, id *string, artifact *cloudassemblyschema.ArtifactManifest) CloudArtifact

Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest.

Returns: the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.

func CloudArtifact_FromManifest

func CloudArtifact_FromManifest(assembly CloudAssembly, id *string, artifact *cloudassemblyschema.ArtifactManifest) CloudArtifact

Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest.

Returns: the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.

func CloudFormationStackArtifact_FromManifest

func CloudFormationStackArtifact_FromManifest(assembly CloudAssembly, id *string, artifact *cloudassemblyschema.ArtifactManifest) CloudArtifact

Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest.

Returns: the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.

func NestedCloudAssemblyArtifact_FromManifest

func NestedCloudAssemblyArtifact_FromManifest(assembly CloudAssembly, id *string, artifact *cloudassemblyschema.ArtifactManifest) CloudArtifact

Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest.

Returns: the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.

func NewCloudArtifact

func NewCloudArtifact(assembly CloudAssembly, id *string, manifest *cloudassemblyschema.ArtifactManifest) CloudArtifact

func TreeCloudArtifact_FromManifest

func TreeCloudArtifact_FromManifest(assembly CloudAssembly, id *string, artifact *cloudassemblyschema.ArtifactManifest) CloudArtifact

Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest.

Returns: the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.

type CloudAssembly

type CloudAssembly interface {
	// All artifacts included in this assembly.
	Artifacts() *[]CloudArtifact
	// The root directory of the cloud assembly.
	Directory() *string
	// The raw assembly manifest.
	Manifest() *cloudassemblyschema.AssemblyManifest
	// The nested assembly artifacts in this assembly.
	NestedAssemblies() *[]NestedCloudAssemblyArtifact
	// Runtime information such as module versions used to synthesize this assembly.
	Runtime() *cloudassemblyschema.RuntimeInfo
	// Returns: all the CloudFormation stack artifacts that are included in this assembly.
	Stacks() *[]CloudFormationStackArtifact
	// Returns all the stacks, including the ones in nested assemblies.
	StacksRecursively() *[]CloudFormationStackArtifact
	// The schema version of the assembly manifest.
	Version() *string
	// Returns a nested assembly.
	GetNestedAssembly(artifactId *string) CloudAssembly
	// Returns a nested assembly artifact.
	GetNestedAssemblyArtifact(artifactId *string) NestedCloudAssemblyArtifact
	// Returns a CloudFormation stack artifact from this assembly.
	//
	// Returns: a `CloudFormationStackArtifact` object.
	GetStackArtifact(artifactId *string) CloudFormationStackArtifact
	// Returns a CloudFormation stack artifact from this assembly.
	//
	// Will only search the current assembly.
	//
	// Returns: a `CloudFormationStackArtifact` object.
	GetStackByName(stackName *string) CloudFormationStackArtifact
	// Returns the tree metadata artifact from this assembly.
	//
	// Returns: a `TreeCloudArtifact` object if there is one defined in the manifest, `undefined` otherwise.
	Tree() TreeCloudArtifact
	// Attempts to find an artifact with a specific identity.
	//
	// Returns: A `CloudArtifact` object or `undefined` if the artifact does not exist in this assembly.
	TryGetArtifact(id *string) CloudArtifact
}

Represents a deployable cloud application.

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"

cloudAssembly := awscdk.Cx_api.NewCloudAssembly(jsii.String("directory"), &loadManifestOptions{
	skipEnumCheck: jsii.Boolean(false),
	skipVersionCheck: jsii.Boolean(false),
})

func NewCloudAssembly

func NewCloudAssembly(directory *string, loadOptions *cloudassemblyschema.LoadManifestOptions) CloudAssembly

Reads a cloud assembly from the specified directory.

type CloudAssemblyBuilder

type CloudAssemblyBuilder interface {
	// The directory where assets of this Cloud Assembly should be stored.
	AssetOutdir() *string
	// The root directory of the resulting cloud assembly.
	Outdir() *string
	// Adds an artifact into the cloud assembly.
	AddArtifact(id *string, manifest *cloudassemblyschema.ArtifactManifest)
	// Reports that some context is missing in order for this cloud assembly to be fully synthesized.
	AddMissing(missing *cloudassemblyschema.MissingContext)
	// Finalizes the cloud assembly into the output directory returns a `CloudAssembly` object that can be used to inspect the assembly.
	BuildAssembly(options *AssemblyBuildOptions) CloudAssembly
	// Creates a nested cloud assembly.
	CreateNestedAssembly(artifactId *string, displayName *string) CloudAssemblyBuilder
}

Can be used to build a cloud assembly.

Example:

// Example automatically generated from non-compiling source. May contain errors.
// 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 cloudAssemblyBuilder cloudAssemblyBuilder

cloudAssemblyBuilder := awscdk.Cx_api.NewCloudAssemblyBuilder(jsii.String("outdir"), &cloudAssemblyBuilderProps{
	assetOutdir: jsii.String("assetOutdir"),
	parentBuilder: cloudAssemblyBuilder,
})

func NewCloudAssemblyBuilder

func NewCloudAssemblyBuilder(outdir *string, props *CloudAssemblyBuilderProps) CloudAssemblyBuilder

Initializes a cloud assembly builder.

type CloudAssemblyBuilderProps

type CloudAssemblyBuilderProps struct {
	// Use the given asset output directory.
	AssetOutdir *string `field:"optional" json:"assetOutdir" yaml:"assetOutdir"`
	// If this builder is for a nested assembly, the parent assembly builder.
	ParentBuilder CloudAssemblyBuilder `field:"optional" json:"parentBuilder" yaml:"parentBuilder"`
}

Construction properties for CloudAssemblyBuilder.

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

cloudAssemblyBuilderProps := &cloudAssemblyBuilderProps{
	assetOutdir: jsii.String("assetOutdir"),
	parentBuilder: cloudAssemblyBuilder,
}

type CloudFormationStackArtifact

type CloudFormationStackArtifact interface {
	CloudArtifact
	Assembly() CloudAssembly
	// Any assets associated with this stack.
	Assets() *[]interface{}
	// The role that needs to be assumed to deploy the stack.
	AssumeRoleArn() *string
	// External ID to use when assuming role for cloudformation deployments.
	AssumeRoleExternalId() *string
	// Name of SSM parameter with bootstrap stack version.
	BootstrapStackVersionSsmParameter() *string
	// The role that is passed to CloudFormation to execute the change set.
	CloudFormationExecutionRoleArn() *string
	// Returns all the artifacts that this artifact depends on.
	Dependencies() *[]CloudArtifact
	// A string that represents this stack.
	//
	// Should only be used in user
	// interfaces. If the stackName has not been set explicitly, or has been set
	// to artifactId, it will return the hierarchicalId of the stack. Otherwise,
	// it will return something like "<hierarchicalId> (<stackName>)".
	DisplayName() *string
	// The environment into which to deploy this artifact.
	Environment() *Environment
	// An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
	//
	// Defaults to the normal
	// id. Should only be used in user interfaces.
	HierarchicalId() *string
	Id() *string
	// The role to use to look up values from the target AWS account.
	LookupRole() *cloudassemblyschema.BootstrapRole
	// The artifact's manifest.
	Manifest() *cloudassemblyschema.ArtifactManifest
	// The set of messages extracted from the artifact's metadata.
	Messages() *[]*SynthesisMessage
	// The original name as defined in the CDK app.
	OriginalName() *string
	// CloudFormation parameters to pass to the stack.
	Parameters() *map[string]*string
	// Version of bootstrap stack required to deploy this stack.
	RequiresBootstrapStackVersion() *float64
	// The physical name of this stack.
	StackName() *string
	// If the stack template has already been included in the asset manifest, its asset URL.
	StackTemplateAssetObjectUrl() *string
	// CloudFormation tags to pass to the stack.
	Tags() *map[string]*string
	// The CloudFormation template for this stack.
	Template() interface{}
	// The file name of the template.
	TemplateFile() *string
	// Full path to the template file.
	TemplateFullPath() *string
	// Whether termination protection is enabled for this stack.
	TerminationProtection() *bool
	// Whether this stack should be validated by the CLI after synthesis.
	ValidateOnSynth() *bool
	// Returns: all the metadata entries of a specific type in this artifact.
	FindMetadataByType(type_ *string) *[]*MetadataEntryResult
}

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

var cloudAssembly cloudAssembly

cloudFormationStackArtifact := awscdk.Cx_api.NewCloudFormationStackArtifact(cloudAssembly, jsii.String("artifactId"), &artifactManifest{
	type: awscdk.Cloud_assembly_schema.artifactType_NONE,

	// the properties below are optional
	dependencies: []*string{
		jsii.String("dependencies"),
	},
	displayName: jsii.String("displayName"),
	environment: jsii.String("environment"),
	metadata: map[string][]metadataEntry{
		"metadataKey": []*metadataEntry{
			&metadataEntry{
				"type": jsii.String("type"),

				// the properties below are optional
				"data": jsii.String("data"),
				"trace": []*string{
					jsii.String("trace"),
				},
			},
		},
	},
	properties: &awsCloudFormationStackProperties{
		templateFile: jsii.String("templateFile"),

		// the properties below are optional
		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),
		stackName: jsii.String("stackName"),
		stackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
		tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		terminationProtection: jsii.Boolean(false),
		validateOnSynth: jsii.Boolean(false),
	},
})

func NewCloudFormationStackArtifact

func NewCloudFormationStackArtifact(assembly CloudAssembly, artifactId *string, artifact *cloudassemblyschema.ArtifactManifest) CloudFormationStackArtifact

type EndpointServiceAvailabilityZonesContextQuery

type EndpointServiceAvailabilityZonesContextQuery struct {
	// Query account.
	Account *string `field:"optional" json:"account" yaml:"account"`
	// Query region.
	Region *string `field:"optional" json:"region" yaml:"region"`
	// Query service name.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
}

Query to hosted zone context provider.

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"

endpointServiceAvailabilityZonesContextQuery := &endpointServiceAvailabilityZonesContextQuery{
	account: jsii.String("account"),
	region: jsii.String("region"),
	serviceName: jsii.String("serviceName"),
}

type Environment

type Environment struct {
	// The AWS account this environment deploys into.
	Account *string `field:"required" json:"account" yaml:"account"`
	// The arbitrary name of this environment (user-set, or at least user-meaningful).
	Name *string `field:"required" json:"name" yaml:"name"`
	// The AWS region name where this environment deploys into.
	Region *string `field:"required" json:"region" yaml:"region"`
}

Models an AWS execution environment, for use within the CDK toolkit.

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"

environment := &environment{
	account: jsii.String("account"),
	name: jsii.String("name"),
	region: jsii.String("region"),
}

func EnvironmentUtils_Make

func EnvironmentUtils_Make(account *string, region *string) *Environment

Build an environment object from an account and region.

func EnvironmentUtils_Parse

func EnvironmentUtils_Parse(environment *string) *Environment

type EnvironmentPlaceholderValues

type EnvironmentPlaceholderValues struct {
	// Return the account.
	AccountId *string `field:"required" json:"accountId" yaml:"accountId"`
	// Return the partition.
	Partition *string `field:"required" json:"partition" yaml:"partition"`
	// Return the region.
	Region *string `field:"required" json:"region" yaml:"region"`
}

Return the appropriate values for the environment placeholders.

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"

environmentPlaceholderValues := &environmentPlaceholderValues{
	accountId: jsii.String("accountId"),
	partition: jsii.String("partition"),
	region: jsii.String("region"),
}

type EnvironmentPlaceholders

type EnvironmentPlaceholders interface {
}

Placeholders which can be used manifests.

These can occur both in the Asset Manifest as well as the general Cloud Assembly manifest.

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"

environmentPlaceholders := awscdk.Cx_api.NewEnvironmentPlaceholders()

func NewEnvironmentPlaceholders

func NewEnvironmentPlaceholders() EnvironmentPlaceholders

type EnvironmentUtils

type EnvironmentUtils interface {
}

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"

environmentUtils := awscdk.Cx_api.NewEnvironmentUtils()

func NewEnvironmentUtils

func NewEnvironmentUtils() EnvironmentUtils

type IEnvironmentPlaceholderProvider

type IEnvironmentPlaceholderProvider interface {
	// Return the account.
	AccountId() *string
	// Return the partition.
	Partition() *string
	// Return the region.
	Region() *string
}

Return the appropriate values for the environment placeholders.

type KeyContextResponse

type KeyContextResponse struct {
	// Id of the key.
	KeyId *string `field:"required" json:"keyId" yaml:"keyId"`
}

Properties of a discovered key.

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"

keyContextResponse := &keyContextResponse{
	keyId: jsii.String("keyId"),
}

type LoadBalancerContextResponse

type LoadBalancerContextResponse struct {
	// Type of IP address.
	IpAddressType LoadBalancerIpAddressType `field:"required" json:"ipAddressType" yaml:"ipAddressType"`
	// The ARN of the load balancer.
	LoadBalancerArn *string `field:"required" json:"loadBalancerArn" yaml:"loadBalancerArn"`
	// The hosted zone ID of the load balancer's name.
	LoadBalancerCanonicalHostedZoneId *string `field:"required" json:"loadBalancerCanonicalHostedZoneId" yaml:"loadBalancerCanonicalHostedZoneId"`
	// Load balancer's DNS name.
	LoadBalancerDnsName *string `field:"required" json:"loadBalancerDnsName" yaml:"loadBalancerDnsName"`
	// Load balancer's security groups.
	SecurityGroupIds *[]*string `field:"required" json:"securityGroupIds" yaml:"securityGroupIds"`
	// Load balancer's VPC.
	VpcId *string `field:"required" json:"vpcId" yaml:"vpcId"`
}

Properties of a discovered load balancer.

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"

loadBalancerContextResponse := &loadBalancerContextResponse{
	ipAddressType: awscdk.Cx_api.loadBalancerIpAddressType_IPV4,
	loadBalancerArn: jsii.String("loadBalancerArn"),
	loadBalancerCanonicalHostedZoneId: jsii.String("loadBalancerCanonicalHostedZoneId"),
	loadBalancerDnsName: jsii.String("loadBalancerDnsName"),
	securityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	vpcId: jsii.String("vpcId"),
}

type LoadBalancerIpAddressType

type LoadBalancerIpAddressType string

Load balancer ip address type.

const (
	// IPV4 ip address.
	LoadBalancerIpAddressType_IPV4 LoadBalancerIpAddressType = "IPV4"
	// Dual stack address.
	LoadBalancerIpAddressType_DUAL_STACK LoadBalancerIpAddressType = "DUAL_STACK"
)

type LoadBalancerListenerContextResponse

type LoadBalancerListenerContextResponse struct {
	// The ARN of the listener.
	ListenerArn *string `field:"required" json:"listenerArn" yaml:"listenerArn"`
	// The port the listener is listening on.
	ListenerPort *float64 `field:"required" json:"listenerPort" yaml:"listenerPort"`
	// The security groups of the load balancer.
	SecurityGroupIds *[]*string `field:"required" json:"securityGroupIds" yaml:"securityGroupIds"`
}

Properties of a discovered load balancer listener.

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"

loadBalancerListenerContextResponse := &loadBalancerListenerContextResponse{
	listenerArn: jsii.String("listenerArn"),
	listenerPort: jsii.Number(123),
	securityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
}

type MetadataEntryResult

type MetadataEntryResult struct {
	// The type of the metadata entry.
	Type *string `field:"required" json:"type" yaml:"type"`
	// The data.
	Data interface{} `field:"optional" json:"data" yaml:"data"`
	// A stack trace for when the entry was created.
	Trace *[]*string `field:"optional" json:"trace" yaml:"trace"`
	// The path in which this entry was defined.
	Path *string `field:"required" json:"path" yaml:"path"`
}

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"

metadataEntryResult := &metadataEntryResult{
	path: jsii.String("path"),
	type: jsii.String("type"),

	// the properties below are optional
	data: jsii.String("data"),
	trace: []*string{
		jsii.String("trace"),
	},
}

type NestedCloudAssemblyArtifact

type NestedCloudAssemblyArtifact interface {
	CloudArtifact
	Assembly() CloudAssembly
	// Returns all the artifacts that this artifact depends on.
	Dependencies() *[]CloudArtifact
	// The relative directory name of the asset manifest.
	DirectoryName() *string
	// Display name.
	DisplayName() *string
	// Full path to the nested assembly directory.
	FullPath() *string
	// An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
	//
	// Defaults to the normal
	// id. Should only be used in user interfaces.
	HierarchicalId() *string
	Id() *string
	// The artifact's manifest.
	Manifest() *cloudassemblyschema.ArtifactManifest
	// The set of messages extracted from the artifact's metadata.
	Messages() *[]*SynthesisMessage
	// The nested Assembly.
	NestedAssembly() CloudAssembly
	// Returns: all the metadata entries of a specific type in this artifact.
	FindMetadataByType(type_ *string) *[]*MetadataEntryResult
}

Asset manifest is a description of a set of assets which need to be built and published.

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

var cloudAssembly cloudAssembly

nestedCloudAssemblyArtifact := awscdk.Cx_api.NewNestedCloudAssemblyArtifact(cloudAssembly, jsii.String("name"), &artifactManifest{
	type: awscdk.Cloud_assembly_schema.artifactType_NONE,

	// the properties below are optional
	dependencies: []*string{
		jsii.String("dependencies"),
	},
	displayName: jsii.String("displayName"),
	environment: jsii.String("environment"),
	metadata: map[string][]metadataEntry{
		"metadataKey": []*metadataEntry{
			&metadataEntry{
				"type": jsii.String("type"),

				// the properties below are optional
				"data": jsii.String("data"),
				"trace": []*string{
					jsii.String("trace"),
				},
			},
		},
	},
	properties: &awsCloudFormationStackProperties{
		templateFile: jsii.String("templateFile"),

		// the properties below are optional
		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),
		stackName: jsii.String("stackName"),
		stackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
		tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		terminationProtection: jsii.Boolean(false),
		validateOnSynth: jsii.Boolean(false),
	},
})

func NewNestedCloudAssemblyArtifact

func NewNestedCloudAssemblyArtifact(assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest) NestedCloudAssemblyArtifact

type SecurityGroupContextResponse

type SecurityGroupContextResponse struct {
	// Whether the security group allows all outbound traffic.
	//
	// This will be true
	// when the security group has all-protocol egress permissions to access both
	// `0.0.0.0/0` and `::/0`.
	AllowAllOutbound *bool `field:"required" json:"allowAllOutbound" yaml:"allowAllOutbound"`
	// The security group's id.
	SecurityGroupId *string `field:"required" json:"securityGroupId" yaml:"securityGroupId"`
}

Properties of a discovered SecurityGroup.

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"

securityGroupContextResponse := &securityGroupContextResponse{
	allowAllOutbound: jsii.Boolean(false),
	securityGroupId: jsii.String("securityGroupId"),
}

type SynthesisMessage

type SynthesisMessage struct {
	Entry *cloudassemblyschema.MetadataEntry `field:"required" json:"entry" yaml:"entry"`
	Id    *string                            `field:"required" json:"id" yaml:"id"`
	Level SynthesisMessageLevel              `field:"required" json:"level" yaml:"level"`
}

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"

synthesisMessage := &synthesisMessage{
	entry: &metadataEntry{
		type: jsii.String("type"),

		// the properties below are optional
		data: jsii.String("data"),
		trace: []*string{
			jsii.String("trace"),
		},
	},
	id: jsii.String("id"),
	level: awscdk.Cx_api.synthesisMessageLevel_INFO,
}

type SynthesisMessageLevel

type SynthesisMessageLevel string
const (
	SynthesisMessageLevel_INFO    SynthesisMessageLevel = "INFO"
	SynthesisMessageLevel_WARNING SynthesisMessageLevel = "WARNING"
	SynthesisMessageLevel_ERROR   SynthesisMessageLevel = "ERROR"
)

type TreeCloudArtifact

type TreeCloudArtifact interface {
	CloudArtifact
	Assembly() CloudAssembly
	// Returns all the artifacts that this artifact depends on.
	Dependencies() *[]CloudArtifact
	File() *string
	// An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
	//
	// Defaults to the normal
	// id. Should only be used in user interfaces.
	HierarchicalId() *string
	Id() *string
	// The artifact's manifest.
	Manifest() *cloudassemblyschema.ArtifactManifest
	// The set of messages extracted from the artifact's metadata.
	Messages() *[]*SynthesisMessage
	// Returns: all the metadata entries of a specific type in this artifact.
	FindMetadataByType(type_ *string) *[]*MetadataEntryResult
}

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

var cloudAssembly cloudAssembly

treeCloudArtifact := awscdk.Cx_api.NewTreeCloudArtifact(cloudAssembly, jsii.String("name"), &artifactManifest{
	type: awscdk.Cloud_assembly_schema.artifactType_NONE,

	// the properties below are optional
	dependencies: []*string{
		jsii.String("dependencies"),
	},
	displayName: jsii.String("displayName"),
	environment: jsii.String("environment"),
	metadata: map[string][]metadataEntry{
		"metadataKey": []*metadataEntry{
			&metadataEntry{
				"type": jsii.String("type"),

				// the properties below are optional
				"data": jsii.String("data"),
				"trace": []*string{
					jsii.String("trace"),
				},
			},
		},
	},
	properties: &awsCloudFormationStackProperties{
		templateFile: jsii.String("templateFile"),

		// the properties below are optional
		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),
		stackName: jsii.String("stackName"),
		stackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
		tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		terminationProtection: jsii.Boolean(false),
		validateOnSynth: jsii.Boolean(false),
	},
})

func NewTreeCloudArtifact

func NewTreeCloudArtifact(assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest) TreeCloudArtifact

type VpcContextResponse

type VpcContextResponse struct {
	// AZs.
	AvailabilityZones *[]*string `field:"required" json:"availabilityZones" yaml:"availabilityZones"`
	// VPC id.
	VpcId *string `field:"required" json:"vpcId" yaml:"vpcId"`
	// IDs of all isolated subnets.
	//
	// Element count: #(availabilityZones) · #(isolatedGroups).
	IsolatedSubnetIds *[]*string `field:"optional" json:"isolatedSubnetIds" yaml:"isolatedSubnetIds"`
	// Name of isolated subnet groups.
	//
	// Element count: #(isolatedGroups).
	IsolatedSubnetNames *[]*string `field:"optional" json:"isolatedSubnetNames" yaml:"isolatedSubnetNames"`
	// Route Table IDs of isolated subnet groups.
	//
	// Element count: #(availabilityZones) · #(isolatedGroups).
	IsolatedSubnetRouteTableIds *[]*string `field:"optional" json:"isolatedSubnetRouteTableIds" yaml:"isolatedSubnetRouteTableIds"`
	// IDs of all private subnets.
	//
	// Element count: #(availabilityZones) · #(privateGroups).
	PrivateSubnetIds *[]*string `field:"optional" json:"privateSubnetIds" yaml:"privateSubnetIds"`
	// Name of private subnet groups.
	//
	// Element count: #(privateGroups).
	PrivateSubnetNames *[]*string `field:"optional" json:"privateSubnetNames" yaml:"privateSubnetNames"`
	// Route Table IDs of private subnet groups.
	//
	// Element count: #(availabilityZones) · #(privateGroups).
	PrivateSubnetRouteTableIds *[]*string `field:"optional" json:"privateSubnetRouteTableIds" yaml:"privateSubnetRouteTableIds"`
	// IDs of all public subnets.
	//
	// Element count: #(availabilityZones) · #(publicGroups).
	PublicSubnetIds *[]*string `field:"optional" json:"publicSubnetIds" yaml:"publicSubnetIds"`
	// Name of public subnet groups.
	//
	// Element count: #(publicGroups).
	PublicSubnetNames *[]*string `field:"optional" json:"publicSubnetNames" yaml:"publicSubnetNames"`
	// Route Table IDs of public subnet groups.
	//
	// Element count: #(availabilityZones) · #(publicGroups).
	PublicSubnetRouteTableIds *[]*string `field:"optional" json:"publicSubnetRouteTableIds" yaml:"publicSubnetRouteTableIds"`
	// The subnet groups discovered for the given VPC.
	//
	// Unlike the above properties, this will include asymmetric subnets,
	// if the VPC has any.
	// This property will only be populated if {@link VpcContextQuery.returnAsymmetricSubnets}
	// is true.
	SubnetGroups *[]*VpcSubnetGroup `field:"optional" json:"subnetGroups" yaml:"subnetGroups"`
	// VPC cidr.
	VpcCidrBlock *string `field:"optional" json:"vpcCidrBlock" yaml:"vpcCidrBlock"`
	// The VPN gateway ID.
	VpnGatewayId *string `field:"optional" json:"vpnGatewayId" yaml:"vpnGatewayId"`
}

Properties of a discovered VPC.

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"

vpcContextResponse := &vpcContextResponse{
	availabilityZones: []*string{
		jsii.String("availabilityZones"),
	},
	vpcId: jsii.String("vpcId"),

	// the properties below are optional
	isolatedSubnetIds: []*string{
		jsii.String("isolatedSubnetIds"),
	},
	isolatedSubnetNames: []*string{
		jsii.String("isolatedSubnetNames"),
	},
	isolatedSubnetRouteTableIds: []*string{
		jsii.String("isolatedSubnetRouteTableIds"),
	},
	privateSubnetIds: []*string{
		jsii.String("privateSubnetIds"),
	},
	privateSubnetNames: []*string{
		jsii.String("privateSubnetNames"),
	},
	privateSubnetRouteTableIds: []*string{
		jsii.String("privateSubnetRouteTableIds"),
	},
	publicSubnetIds: []*string{
		jsii.String("publicSubnetIds"),
	},
	publicSubnetNames: []*string{
		jsii.String("publicSubnetNames"),
	},
	publicSubnetRouteTableIds: []*string{
		jsii.String("publicSubnetRouteTableIds"),
	},
	subnetGroups: []vpcSubnetGroup{
		&vpcSubnetGroup{
			name: jsii.String("name"),
			subnets: []vpcSubnet{
				&vpcSubnet{
					availabilityZone: jsii.String("availabilityZone"),
					routeTableId: jsii.String("routeTableId"),
					subnetId: jsii.String("subnetId"),

					// the properties below are optional
					cidr: jsii.String("cidr"),
				},
			},
			type: awscdk.Cx_api.vpcSubnetGroupType_PUBLIC,
		},
	},
	vpcCidrBlock: jsii.String("vpcCidrBlock"),
	vpnGatewayId: jsii.String("vpnGatewayId"),
}

type VpcSubnet

type VpcSubnet struct {
	// The code of the availability zone this subnet is in (for example, 'us-west-2a').
	AvailabilityZone *string `field:"required" json:"availabilityZone" yaml:"availabilityZone"`
	// The identifier of the route table for this subnet.
	RouteTableId *string `field:"required" json:"routeTableId" yaml:"routeTableId"`
	// The identifier of the subnet.
	SubnetId *string `field:"required" json:"subnetId" yaml:"subnetId"`
	// CIDR range of the subnet.
	Cidr *string `field:"optional" json:"cidr" yaml:"cidr"`
}

A subnet representation that the VPC provider uses.

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"

vpcSubnet := &vpcSubnet{
	availabilityZone: jsii.String("availabilityZone"),
	routeTableId: jsii.String("routeTableId"),
	subnetId: jsii.String("subnetId"),

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

type VpcSubnetGroup

type VpcSubnetGroup struct {
	// The name of the subnet group, determined by looking at the tags of of the subnets that belong to it.
	Name *string `field:"required" json:"name" yaml:"name"`
	// The subnets that are part of this group.
	//
	// There is no condition that the subnets have to be symmetric
	// in the group.
	Subnets *[]*VpcSubnet `field:"required" json:"subnets" yaml:"subnets"`
	// The type of the subnet group.
	Type VpcSubnetGroupType `field:"required" json:"type" yaml:"type"`
}

A group of subnets returned by the VPC provider.

The included subnets do NOT have to be symmetric!

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"

vpcSubnetGroup := &vpcSubnetGroup{
	name: jsii.String("name"),
	subnets: []vpcSubnet{
		&vpcSubnet{
			availabilityZone: jsii.String("availabilityZone"),
			routeTableId: jsii.String("routeTableId"),
			subnetId: jsii.String("subnetId"),

			// the properties below are optional
			cidr: jsii.String("cidr"),
		},
	},
	type: awscdk.Cx_api.vpcSubnetGroupType_PUBLIC,
}

type VpcSubnetGroupType

type VpcSubnetGroupType string

The type of subnet group.

Same as SubnetType in the @aws-cdk/aws-ec2 package, but we can't use that because of cyclical dependencies.

const (
	// Public subnet group type.
	VpcSubnetGroupType_PUBLIC VpcSubnetGroupType = "PUBLIC"
	// Private subnet group type.
	VpcSubnetGroupType_PRIVATE VpcSubnetGroupType = "PRIVATE"
	// Isolated subnet group type.
	VpcSubnetGroupType_ISOLATED VpcSubnetGroupType = "ISOLATED"
)

Jump to

Keyboard shortcuts

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