Socket
Socket
Sign inDemoInstall

@aws-cdk/cx-api

Package Overview
Dependencies
0
Maintainers
5
Versions
532
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/cx-api


Version published
Weekly downloads
848K
increased by1.85%
Maintainers
5
Created
Weekly downloads
 

Package description

What is @aws-cdk/cx-api?

@aws-cdk/cx-api is a part of the AWS Cloud Development Kit (CDK) that provides a set of APIs for interacting with the Cloud Assembly, which is the output of the CDK synthesis process. It allows developers to programmatically access and manipulate the synthesized cloud infrastructure stacks, assets, and metadata.

What are @aws-cdk/cx-api's main functionalities?

Accessing Cloud Assembly

This feature allows you to load and interact with a Cloud Assembly, which is the output directory of a CDK app synthesis. The code sample demonstrates how to load a Cloud Assembly from a specified path and log the stacks it contains.

const cxapi = require('@aws-cdk/cx-api');
const assembly = new cxapi.CloudAssembly('/path/to/cloud-assembly');
console.log(assembly.stacks);

Reading Stack Metadata

This feature allows you to read metadata from a specific stack within the Cloud Assembly. The code sample shows how to get a stack by its name and log its metadata.

const cxapi = require('@aws-cdk/cx-api');
const assembly = new cxapi.CloudAssembly('/path/to/cloud-assembly');
const stack = assembly.getStackByName('MyStack');
console.log(stack.metadata);

Listing Assets

This feature allows you to list all the assets included in the Cloud Assembly. The code sample demonstrates how to log all the assets in the Cloud Assembly.

const cxapi = require('@aws-cdk/cx-api');
const assembly = new cxapi.CloudAssembly('/path/to/cloud-assembly');
console.log(assembly.assets);

Other packages similar to @aws-cdk/cx-api

Changelog

Source

0.32.0 (2019-05-24)

Bug Fixes

  • update all 'onXxx' methods to be CloudWatch Events (#2609) (28942d2), closes #2278
  • appscaling: fix StepScaling (#2522) (1f004f6)
  • aws-ecs: allow linux parameters to be settable (#2397) (417e5e8), closes #2380
  • aws-glue: fix glue tableArn and integer schema name (#2585) (99e173e)
  • cdk: CfnMapping.findInMap with tokens (#2531) (756e2b6), closes #1363
  • cloudfront: Use regional endpoint for S3 bucket origins (64c3c6b)
  • codebuild: correctly pass the VPC subnet IDs to the Policy Statement's condition when using a VPC. (#2506) (145da28), closes #2335
  • codecommit: add a Repository.fromRepositoryName() method. (#2515) (6fc3718), closes #2514
  • codedeploy: change the load balancer API in server Deployment Group. (#2548) (8e05d49), closes #2449
  • codepipeline: correctly validate Artifacts used by Actions in the same Stage. (#2558) (cfe46f6), closes #2549
  • core: Correctly search for loaded modules in node 12 (#2612) (286866a), closes nodejs/node#27583
  • ec2: allow disabling privateDnsEnabled on VPCs (#2596) (4d2fbe9), closes #2556
  • ec2: fix VPC endpoint name for SageMaker Notebooks (#2598) (aec8ec2)
  • iam: allow CompositePrincipal construction with spread (#2507) (eb13741)
  • lambda: compare Runtimes by value instead of identity (#2543) (584579e)
  • lambda: deprecate old Lambda runtimes (#2594) (20f4ec1)
  • route53-targets: move Alias Targets into their own package (#2617) (f40fe98), closes #2448
  • s3: Make IBucket.arnForObject accept only (exactly) one key pattern (5ac6e77)

Code Refactoring

Features

BREAKING CHANGES TO EXPERIMENTAL FEATURES

  • route53-targets: using a CloudFront Distribution or an ELBv2 Load Balancer as an Alias Record Target now requires an integration object from the @aws-cdk/aws-route53-targets package.
  • s3: The IBucket.arnForObject method no longer concatenates path fragments on your behalf. Pass the /-concatenated key pattern instead.
  • All export methods from all AWS resources have been removed. CloudFormation Exports are now automatically created when attributes are referenced across stacks within the same app. To export resources manually, you can explicitly define a CfnOutput.
  • kms: kms.EncryptionKey renamed to kms.Key
  • ec2: ec2.VpcNetwork renamed to ec2.Vpc
  • ec2: ec2.VpcSubnet renamed to ec2.Subnet
  • cloudtrail: cloudtrail.CloudTrail renamed to cloudtrail.Trail`
  • Deleted a few XxxAttribute and XxxImportProps interfaces which were no longer in used after their corresponding export method was deleted and there was no use for them in imports.
  • ecs: ecs.ClusterAttributes now accepts IVpc and ISecurityGroup instead of attributes. You can use their corresponding fromXxx methods to import them as needed.
  • servicediscovery: servicediscovery.CnameInstance.instanceCname renamed to cname.
  • glue: glue.IDatabase.locationUrl is now only in glue.Database (not on the interface)
  • ec2: ec2.TcpPortFromAttribute and UdpPortFromAttribute removed. Use TcpPort and UdpPort with new Token(x).toNumber instead.
  • ec2: ec2.VpcNetwork.importFromContext renamed to ec2.Vpc.fromLookup
  • iam: iam.IRole.roleId has been removed from the interface, but Role.roleId is still available for owned resources.
  • codedeploy: the type of the loadBalancer property in ServerDeploymentGroupProps has been changed.
  • apigateway: apigateway.ResourceBase.trackChild is now internal.
  • cloudfront: cloudfront.S3OriginConfig.originAccessIdentity is now originAccessIdentityId
  • codedeploy: codedeploy.LambdaDeploymentGroup.alarms is now cloudwatch.IAlarm[] (previously cloudwatch.Alarm[])
  • codepipeline: codepipeline.crossRegionScaffoldingStacks renamed to crossRegionScaffolding
  • codepipeline: codepipeline.CrossRegionScaffoldingStack renamed to codepipeline.CrossRegionScaffolding and cannot be instantiated (abstract)
  • ec2: ec2.VpcSubnet.addDefaultRouteToNAT renamed to addDefaultNatRoute and made public
  • ec2: ec2.VpcSubnet.addDefaultRouteToIGW renamed to addDefaultInternetRoute, made public and first argument is the gateway ID (string) and not the CFN L1 class
  • ecs: ecs.Ec2EventRuleTarget.taskDefinition is now ITaskDefinition (previously TaskDefinition)
  • lambda: lambda.IEventSource.bind now accepts IFunction instead of FunctionBase. Use IFunction.addEventSourceMapping to add an event source mapping under the function.
  • lambda: lambda.Layer.grantUsage renamed to lambda.layer.addPermission and returns void
  • stepfunctions: stepfunctions.StateMachine.role is now iam.IRole (previously iam.Role)
  • cloudwatch-events: the events API has been significantly re-worked
    • ⚠️ This new API is still being discussed (see #2609) and might change again in the next release!
    • All onXxx() CloudWatch Event methods now have the signature:
      resource.onEvent('SomeId', {
          target: new SomeTarget(...),
          // options
      });
      
    • CloudWatch:
      • onAlarm was renamed to addAlarmAction
      • onOk was renamed to addOkAction
      • onInsufficientData was renamed to addInsufficientDataAction
    • AutoScaling:
      • onLifecycleTransition was renamed to addLifecycleHook
    • LambdaDeploymentGroup
      • onPreHook was renamed to addPreHook
      • onPostHook was renamed to addPostHook
    • UserPool:
      • all onXxx were renamed to addXxxTrigger
    • Repository:
      • onImagePushed was renamed to onCloudTrailImagePushed
    • Bucket:
      • onEvent was renamed to addEventNotification
      • onObjectCreated was renamed to addObjectCreatedNotification
      • onObjectRemoved was renamed to addObjectRemovedNotification
      • onPutObject was renamed to onCloudTrailPutObject

Readme

Source

Cloud Executable protocol

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

Keywords

FAQs

Last updated on 24 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc