How to use the @aws-cdk/cfnspec.propertySpecification function in @aws-cdk/cfnspec

To help you get started, we’ve selected a few @aws-cdk/cfnspec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / cloudformation-diff / lib / diff / types.ts View on Github external
private scrutinizablePropertyChanges(scrutinyTypes: cfnspec.schema.PropertyScrutinyType[]): PropertyChange[] {
    const ret = new Array();

    for (const [resourceLogicalId, resourceChange] of Object.entries(this.resources.changes)) {
      if (!resourceChange) { continue; }

      const props = cfnspec.scrutinizablePropertyNames(resourceChange.newResourceType!, scrutinyTypes);
      for (const propertyName of props) {
        ret.push({
          resourceLogicalId, propertyName,
          resourceType: resourceChange.resourceType,
          scrutinyType: cfnspec.propertySpecification(resourceChange.resourceType, propertyName).ScrutinyType!,
          oldValue: resourceChange.oldProperties && resourceChange.oldProperties[propertyName],
          newValue: resourceChange.newProperties && resourceChange.newProperties[propertyName],
        });
      }
    }

    return ret;
  }