cxapi

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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:

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

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

var cloudAssembly cloudAssembly
assetManifestArtifact := cx_api.NewAssetManifestArtifact(cloudAssembly, jsii.String("name"), &artifactManifest{
	type: 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 `json:"templateFile" yaml:"templateFile"`
	// Values for CloudFormation stack parameters that should be passed when the stack is deployed.
	Parameters *map[string]*string `json:"parameters" yaml:"parameters"`
	// The name to use for the CloudFormation stack.
	StackName *string `json:"stackName" yaml:"stackName"`
	// Whether to enable termination protection for this stack.
	TerminationProtection *bool `json:"terminationProtection" yaml:"terminationProtection"`
}

Artifact properties for CloudFormation stacks.

Example:

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

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

var cloudAssembly cloudAssembly
cloudArtifact := cx_api.cloudArtifact.fromManifest(cloudAssembly, jsii.String("MyCloudArtifact"), &artifactManifest{
	type: 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:

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

var cloudAssemblyBuilder cloudAssemblyBuilder
cloudAssemblyBuilder := 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 `json:"assetOutdir" yaml:"assetOutdir"`
	// If this builder is for a nested assembly, the parent assembly builder.
	ParentBuilder CloudAssemblyBuilder `json:"parentBuilder" yaml:"parentBuilder"`
}

Construction properties for CloudAssemblyBuilder.

Example:

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

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:

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

var cloudAssembly cloudAssembly
cloudFormationStackArtifact := cx_api.NewCloudFormationStackArtifact(cloudAssembly, jsii.String("artifactId"), &artifactManifest{
	type: 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 `json:"account" yaml:"account"`
	// Query region.
	Region *string `json:"region" yaml:"region"`
	// Query service name.
	ServiceName *string `json:"serviceName" yaml:"serviceName"`
}

Query to hosted zone context provider.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
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 `json:"account" yaml:"account"`
	// The arbitrary name of this environment (user-set, or at least user-meaningful).
	Name *string `json:"name" yaml:"name"`
	// The AWS region name where this environment deploys into.
	Region *string `json:"region" yaml:"region"`
}

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

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
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 `json:"accountId" yaml:"accountId"`
	// Return the partition.
	Partition *string `json:"partition" yaml:"partition"`
	// Return the region.
	Region *string `json:"region" yaml:"region"`
}

Return the appropriate values for the environment placeholders.

Example:

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

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
environmentPlaceholders := cx_api.NewEnvironmentPlaceholders()

func NewEnvironmentPlaceholders

func NewEnvironmentPlaceholders() EnvironmentPlaceholders

type EnvironmentUtils

type EnvironmentUtils interface {
}

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
environmentUtils := 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 `json:"keyId" yaml:"keyId"`
}

Properties of a discovered key.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
keyContextResponse := &keyContextResponse{
	keyId: jsii.String("keyId"),
}

type LoadBalancerContextResponse

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

Properties of a discovered load balancer.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
loadBalancerContextResponse := &loadBalancerContextResponse{
	ipAddressType: 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 `json:"listenerArn" yaml:"listenerArn"`
	// The port the listener is listening on.
	ListenerPort *float64 `json:"listenerPort" yaml:"listenerPort"`
	// The security groups of the load balancer.
	SecurityGroupIds *[]*string `json:"securityGroupIds" yaml:"securityGroupIds"`
}

Properties of a discovered load balancer listener.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
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 `json:"type" yaml:"type"`
	// The data.
	Data interface{} `json:"data" yaml:"data"`
	// A stack trace for when the entry was created.
	Trace *[]*string `json:"trace" yaml:"trace"`
	// The path in which this entry was defined.
	Path *string `json:"path" yaml:"path"`
}

Example:

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

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

var cloudAssembly cloudAssembly
nestedCloudAssemblyArtifact := cx_api.NewNestedCloudAssemblyArtifact(cloudAssembly, jsii.String("name"), &artifactManifest{
	type: 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 `json:"allowAllOutbound" yaml:"allowAllOutbound"`
	// The security group's id.
	SecurityGroupId *string `json:"securityGroupId" yaml:"securityGroupId"`
}

Properties of a discovered SecurityGroup.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
securityGroupContextResponse := &securityGroupContextResponse{
	allowAllOutbound: jsii.Boolean(false),
	securityGroupId: jsii.String("securityGroupId"),
}

type SynthesisMessage

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

Example:

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

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

var cloudAssembly cloudAssembly
treeCloudArtifact := cx_api.NewTreeCloudArtifact(cloudAssembly, jsii.String("name"), &artifactManifest{
	type: 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 `json:"availabilityZones" yaml:"availabilityZones"`
	// VPC id.
	VpcId *string `json:"vpcId" yaml:"vpcId"`
	// IDs of all isolated subnets.
	//
	// Element count: #(availabilityZones) · #(isolatedGroups).
	IsolatedSubnetIds *[]*string `json:"isolatedSubnetIds" yaml:"isolatedSubnetIds"`
	// Name of isolated subnet groups.
	//
	// Element count: #(isolatedGroups).
	IsolatedSubnetNames *[]*string `json:"isolatedSubnetNames" yaml:"isolatedSubnetNames"`
	// Route Table IDs of isolated subnet groups.
	//
	// Element count: #(availabilityZones) · #(isolatedGroups).
	IsolatedSubnetRouteTableIds *[]*string `json:"isolatedSubnetRouteTableIds" yaml:"isolatedSubnetRouteTableIds"`
	// IDs of all private subnets.
	//
	// Element count: #(availabilityZones) · #(privateGroups).
	PrivateSubnetIds *[]*string `json:"privateSubnetIds" yaml:"privateSubnetIds"`
	// Name of private subnet groups.
	//
	// Element count: #(privateGroups).
	PrivateSubnetNames *[]*string `json:"privateSubnetNames" yaml:"privateSubnetNames"`
	// Route Table IDs of private subnet groups.
	//
	// Element count: #(availabilityZones) · #(privateGroups).
	PrivateSubnetRouteTableIds *[]*string `json:"privateSubnetRouteTableIds" yaml:"privateSubnetRouteTableIds"`
	// IDs of all public subnets.
	//
	// Element count: #(availabilityZones) · #(publicGroups).
	PublicSubnetIds *[]*string `json:"publicSubnetIds" yaml:"publicSubnetIds"`
	// Name of public subnet groups.
	//
	// Element count: #(publicGroups).
	PublicSubnetNames *[]*string `json:"publicSubnetNames" yaml:"publicSubnetNames"`
	// Route Table IDs of public subnet groups.
	//
	// Element count: #(availabilityZones) · #(publicGroups).
	PublicSubnetRouteTableIds *[]*string `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 `json:"subnetGroups" yaml:"subnetGroups"`
	// VPC cidr.
	VpcCidrBlock *string `json:"vpcCidrBlock" yaml:"vpcCidrBlock"`
	// The VPN gateway ID.
	VpnGatewayId *string `json:"vpnGatewayId" yaml:"vpnGatewayId"`
}

Properties of a discovered VPC.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
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: 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 `json:"availabilityZone" yaml:"availabilityZone"`
	// The identifier of the route table for this subnet.
	RouteTableId *string `json:"routeTableId" yaml:"routeTableId"`
	// The identifier of the subnet.
	SubnetId *string `json:"subnetId" yaml:"subnetId"`
	// CIDR range of the subnet.
	Cidr *string `json:"cidr" yaml:"cidr"`
}

A subnet representation that the VPC provider uses.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import cx_api "github.com/aws/aws-cdk-go/awscdk/cx_api"
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 `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 `json:"subnets" yaml:"subnets"`
	// The type of the subnet group.
	Type VpcSubnetGroupType `json:"type" yaml:"type"`
}

A group of subnets returned by the VPC provider.

The included subnets do NOT have to be symmetric!

Example:

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