protected getUpdateTypeForPropertyPath()

in packages/@aws-c2a/engine/lib/platform-mapping/cloudformation/cf-resource.ts [44:55]


  protected getUpdateTypeForPropertyPath(propertyPath: string[]): ComponentUpdateType {
    const resourceType = this.resourceType;
    if(propertyPath[0] === 'Properties' && resourceType) {
      const resourceSpec = cfSpec.ResourceTypes[resourceType];
      if(!resourceSpec || !resourceSpec.Properties)
        return super.getUpdateTypeForPropertyPath(propertyPath);
      const property = resourceSpec.Properties[propertyPath[1]];
      if(property && propertyPath.length >= 2)
        return this.getUpdateTypeFromPropertySpec(property, propertyPath.slice(1));
    }
    return ComponentUpdateType.NONE;
  }