# Cloud Assembly Schema

This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

## Cloud Assembly

The _Cloud Assembly_ is the output of the synthesis operation. It is produced as part of the
[`cdk synth`](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk#cdk-synthesize)
command, or the [`app.synth()`](https://github.com/aws/aws-cdk/blob/main/packages/@aws-cdk/core/lib/app.ts#L135) method invocation.

Its essentially a set of files and directories, one of which is the `manifest.json` file. It defines the set of instructions that are
needed in order to deploy the assembly directory.

> For example, when `cdk deploy` is executed, the CLI reads this file and performs its instructions:
>
> - Build container images.
> - Upload assets.
> - Deploy CloudFormation templates.

Therefore, the assembly is how the CDK class library and CDK CLI (or any other consumer) communicate. To ensure compatibility
between the assembly and its consumers, we treat the manifest file as a well defined, versioned schema.

## Schema

This module contains the typescript structs that comprise the `manifest.json` file, as well as the
generated _json-schema_.

## Versioning

The schema version is specified my the major version of the package release. It follows semantic versioning, but with a small twist.

When we add instructions to the assembly, they are reflected in the manifest file and the _json-schema_ accordingly.
Every such instruction, is crucial for ensuring the correct deployment behavior. This means that to properly deploy a cloud assembly,
consumers must be aware of every such instruction modification.

For this reason, every change to the schema, even though it might not strictly break validation of the _json-schema_ format,
is considered `major` version bump. All changes that do not impact the schema are considered a `minor` version bump.

## How to consume

If you'd like to consume the schema file in order to do validations on `manifest.json` files,
simply download it from this repo and run it against standard _json-schema_ validators, such as [jsonschema](https://www.npmjs.com/package/jsonschema).

Consumers must take into account the `major` version of the schema they are consuming. They should reject cloud assemblies
with a `major` version that is higher than what they expect. While schema validation might pass on such assemblies, the deployment integrity
cannot be guaranteed because some instructions will be ignored.

> For example, if your consumer was built when the schema version was 2.0.0, you should reject deploying cloud assemblies with a
> manifest version of 3.0.0.

## Contributing

The source code for this file has been moved to CDKLabs.

See [Contribution Guide](https://github.com/cdklabs/cloud-assembly-schema/blob/main/CONTRIBUTING.md)

## Types

### Structs

- [`AmiContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AmiContextQuery.html) Struct Query to AMI context provider.
- [`ArtifactManifest`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ArtifactManifest.html) Struct A manifest for a single artifact within the cloud assembly.
- [`AssemblyManifest`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AssemblyManifest.html) Struct A manifest which describes the cloud assembly.
- [`AssetManifest`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AssetManifest.html) Struct Definitions for the asset manifest.
- [`AssetManifestOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AssetManifestOptions.html) Struct Configuration options for the Asset Manifest.
- [`AssetManifestProperties`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AssetManifestProperties.html) Struct Artifact properties for the Asset Manifest.
- [`AvailabilityZonesContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AvailabilityZonesContextQuery.html) Struct Query to availability zone context provider.
- [`AwsCloudFormationStackProperties`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AwsCloudFormationStackProperties.html) Struct Artifact properties for CloudFormation stacks.
- [`AwsDestination`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.AwsDestination.html) Struct Destination for assets that need to be uploaded to AWS.
- [`BootstrapRole`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.BootstrapRole.html) Struct Information needed to access an IAM role created as part of the bootstrap process.
- [`CcApiContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.CcApiContextQuery.html) Struct Query input for lookup up CloudFormation resources using CC API.
- [`CdkCommand`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.CdkCommand.html) Struct Represents a cdk command i.e. `synth`, `deploy`, & `destroy`.
- [`CdkCommands`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.CdkCommands.html) Struct Options for specific cdk commands that are run as part of the integration test workflow.
- [`CloudFormationResourceJson`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.CloudFormationResourceJson.html) Struct A node in the construct creation stack trace.
- [`ContainerImageAssetCacheOption`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ContainerImageAssetCacheOption.html) Struct Options for configuring the Docker cache backend.
- [`ContainerImageAssetMetadataEntry`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ContainerImageAssetMetadataEntry.html) Struct Metadata Entry spec for container images.
- [`ContextLookupRoleOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ContextLookupRoleOptions.html) Struct Options for context lookup roles.
- [`DefaultCdkOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DefaultCdkOptions.html) Struct Default CDK CLI options that apply to all commands.
- [`DeployCommand`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DeployCommand.html) Struct Represents a cdk deploy command.
- [`DeployOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DeployOptions.html) Struct Options to use with cdk deploy.
- [`DestroyCommand`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DestroyCommand.html) Struct Represents a cdk destroy command.
- [`DestroyOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DestroyOptions.html) Struct Options to use with cdk destroy.
- [`DockerCacheOption`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DockerCacheOption.html) Struct Options for configuring the Docker cache backend.
- [`DockerImageAsset`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DockerImageAsset.html) Struct A file asset.
- [`DockerImageDestination`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DockerImageDestination.html) Struct Where to publish docker images.
- [`DockerImageSource`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.DockerImageSource.html) Struct Properties for how to produce a Docker image from a source.
- [`EndpointServiceAvailabilityZonesContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.EndpointServiceAvailabilityZonesContextQuery.html) Struct Query to endpoint service context provider.
- [`FeatureFlag`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FeatureFlag.html) Struct A single feature flag.
- [`FeatureFlagReportProperties`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FeatureFlagReportProperties.html) Struct Artifact properties for a feature flag report.
- [`FileAsset`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FileAsset.html) Struct A file asset.
- [`FileAssetMetadataEntry`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FileAssetMetadataEntry.html) Struct Metadata Entry spec for files.
- [`FileDestination`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FileDestination.html) Struct Where in S3 a file asset needs to be published.
- [`FileSource`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FileSource.html) Struct Describe the source of a file asset.
- [`Hooks`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.Hooks.html) Struct Commands to run at predefined points during the integration test workflow.
- [`HostedZoneContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.HostedZoneContextQuery.html) Struct Query to hosted zone context provider.
- [`IntegManifest`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.IntegManifest.html) Struct Definitions for the integration testing manifest.
- [`KeyContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.KeyContextQuery.html) Struct Query input for looking up a KMS Key.
- [`LoadBalancerContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.LoadBalancerContextQuery.html) Struct Query input for looking up a load balancer.
- [`LoadBalancerFilter`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.LoadBalancerFilter.html) Struct Filters for selecting load balancers.
- [`LoadBalancerListenerContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.LoadBalancerListenerContextQuery.html) Struct Query input for looking up a load balancer listener.
- [`LoadManifestOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.LoadManifestOptions.html) Struct Options for the loadManifest operation.
- [`MetadataEntry`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.MetadataEntry.html) Struct A metadata entry in a cloud assembly artifact.
- [`MissingContext`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.MissingContext.html) Struct Represents a missing piece of context.
- [`NestedCloudAssemblyProperties`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.NestedCloudAssemblyProperties.html) Struct Artifact properties for nested cloud assemblies.
- [`PluginContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.PluginContextQuery.html) Struct Query input for plugins.
- [`PluginReportJson`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.PluginReportJson.html) Struct A report from a single validation plugin.
- [`PolicyValidationReportJson`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.PolicyValidationReportJson.html) Struct The top-level structure of the policy validation report file.
- [`PolicyViolationJson`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.PolicyViolationJson.html) Struct A single policy violation found by a validation plugin.
- [`PropertyMutationMetadataEntry`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.PropertyMutationMetadataEntry.html) Struct Metadata type of a PropertyMutation.
- [`RuntimeInfo`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.RuntimeInfo.html) Struct Information about the application's runtime components.
- [`SecurityGroupContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.SecurityGroupContextQuery.html) Struct Query input for looking up a security group.
- [`SSMParameterContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.SSMParameterContextQuery.html) Struct Query to SSM Parameter Context Provider.
- [`SuppressedViolationJson`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.SuppressedViolationJson.html) Struct A violation that was acknowledged/suppressed and excluded from the active violation set.
- [`Tag`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.Tag.html) Struct Metadata Entry spec for stack tag.
- [`TestCase`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.TestCase.html) Struct Represents an integration test case.
- [`TestOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.TestOptions.html) Struct The set of options to control the workflow of the test runner.
- [`TreeArtifactProperties`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.TreeArtifactProperties.html) Struct Artifact properties for the Construct Tree Artifact.
- [`UnconfiguredBehavesLike`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.UnconfiguredBehavesLike.html) Struct
- [`ViolatingConstructJson`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ViolatingConstructJson.html) Struct A construct that violated a policy rule.
- [`VpcContextQuery`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.VpcContextQuery.html) Struct Query input for looking up a VPC.

### Enums

- [`ArtifactMetadataEntryType`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ArtifactMetadataEntryType.html) Enum Type of artifact metadata entry.
- [`ArtifactType`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ArtifactType.html) Enum Type of cloud artifact.
- [`ContextProvider`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ContextProvider.html) Enum Identifier for the context provider.
- [`FileAssetPackaging`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FileAssetPackaging.html) Enum Packaging strategy for file assets.
- [`LoadBalancerListenerProtocol`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.LoadBalancerListenerProtocol.html) Enum The protocol for connections from clients to the load balancer.
- [`LoadBalancerType`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.LoadBalancerType.html) Enum Type of load balancer.
- [`RequireApproval`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.RequireApproval.html) Enum Specify what changes require manual approval.

### Interfaces

- [`ICloudAssembly`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ICloudAssembly.html) Interface Interoperable representation of a deployable cloud application.

### Classes

- [`Manifest`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.Manifest.html) Class Protocol utility class.
