0.0.53 • Published 10 months ago

@aws-cdk/service-spec-importers v0.0.53

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

Service Spec Importers

Imports various service specification sources into a service database.

Usage

Programmatic

declare const db: SpecDatabase;

new DatabaseBuilder(db, options)
  // Import (modern) CloudFormation Registry Resources from a directory structure: <region>/<resource>.json
  .importCloudFormationRegistryResources('data/CloudFormationSchema/')

  // Import the (modern) JSON schema spec from SAM
  .importSamJsonSchema('data/sam.schema.json')

  // Import (legacy) CloudFormation Resource Specification from a directory structure containing a patch set: <region>/000_cloudformation/*.json
  .importCloudFormationResourceSpec('data/CloudFormationResourceSpecification/')

  // Import (legacy) SAM Resource Specification from a directory structure containing a patch set: *.json
  .importSamResourceSpec('data/SAMResourceSpecification/')

  // Import GetAtt'able attributes with the same name as properties
  .importGetAttAllowList('data/GetAttAllowlist/GetAttAllowlist.json')

  // Import various model enhancements
  .importCloudFormationDocs('data/CloudFormationDocumentation.json')
  .importStatefulResources('data/StatefulResources/StatefulResources.json')
  .importCannedMetrics('data/CloudWatchConsoleServiceDirectory.json'),

  // Apply the imports to the database
  .build();

CLI

Usage: import-db [options] [database]

Import service specification sources into a service model database

Arguments:
  database                         The database file (default: "db.json")

Options:
  -s, --source <definition...>     Import sources into the database. Use the format <source>:<path> to define sources.
  -l, --load <database>            Load an existing database as base, imported sources become additive
  -c, --gzip                       Compress the database file using gzip
  -f, --force                      Force overwriting an existing file (default: false)
  -d, --debug                      Print additional debug output during import (default: false)
  -r, --report <report-directory>  Create a detailed build report in the specified directory
  -v, --validate                   Validate imported sources and fail if any data is invalid (default: false)
  -h, --help                       display help for command

Sources

CLI source nameDatabaseBuilder methodPath parameter
cfnSchemaDirimportCloudFormationRegistryResourcesDirectory of structure <region>/<resource>.json
samSchemaimportSamJsonSchemaSAM Registry Schema file
cfnSpecDirimportCloudFormationResourceSpecDirectory structure containing a patch set <region>/000_cloudformation/*.json
samSpecimportSamResourceSpecSAM Resource Specification file file
cfnDocsimportCloudFormationDocsCloudFormation Documentation file file
statefulResourcesimportStatefulResourcesStateful Resources file
cannedMetricsimportCannedMetricsCloudWatch Console Service Directory file

CloudFormation Registry Schema

CLI: cfnSchemaDir\ Code: importCloudFormationRegistryResources(schemaDir: string)

Import (modern) CloudFormation Registry Resources from a directory structure. The directory MUST contain a directory for per region, each containing a registry schema file per resource.

CloudFormationSchema/
├─ us-east-1/
│  ├─ aws-s3-bucket.json
├─ eu-west-1/
│  ├─ aws-s3-bucket.json

SAM Registry Schema

CLI: samSchema\ Code: importSamJsonSchema(filePath: string)

Import the (modern) JSON schema spec from SAM. Path to a single file containing a SAM Registry Schema.

0.0.53

10 months ago

0.0.51

10 months ago

0.0.52

10 months ago

0.0.50

10 months ago

0.0.49

10 months ago

0.0.47

11 months ago

0.0.48

11 months ago

0.0.40

1 year ago

0.0.41

1 year ago

0.0.42

1 year ago

0.0.43

1 year ago

0.0.44

1 year ago

0.0.45

12 months ago

0.0.46

12 months ago

0.0.37

1 year ago

0.0.38

1 year ago

0.0.39

1 year ago

0.0.35

1 year ago

0.0.36

1 year ago

0.0.34

1 year ago

0.0.33

1 year ago

0.0.31

1 year ago

0.0.30

1 year ago

0.0.29

1 year ago

0.0.28

1 year ago

0.0.27

1 year ago

0.0.26

1 year ago

0.0.25

1 year ago

0.0.24

1 year ago

0.0.23

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago