// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`generate ai-health.json 1`] = ` "// Generated by cdk-import import * as cdk from 'aws-cdk-lib'; import * as constructs from 'constructs'; import * as sc from 'aws-cdk-lib/aws-servicecatalog'; export interface IAiPoweredHealthDataMasking extends cdk.IResource { readonly provisionedProductId: string; readonly cloudFormationStackArn: string; readonly recordId: string; readonly apiGatewayInvokeURL: string; readonly apiGatewayId: string; readonly apiGatewayStage: string; readonly imageBucketName: string; readonly logBucketName: string; readonly imageResourceId: string; readonly imageTextResourceId: string; readonly imagePhiResourceId: string; readonly imageMaskResourceId: string; readonly textPhiResourceId: string; readonly textMaskResourceId: string; } abstract class AiPoweredHealthDataMaskingBase extends cdk.Resource implements IAiPoweredHealthDataMasking { public abstract readonly provisionedProductId: string; public abstract readonly cloudFormationStackArn: string; public abstract readonly recordId: string; public abstract readonly apiGatewayInvokeURL: string; public abstract readonly apiGatewayId: string; public abstract readonly apiGatewayStage: string; public abstract readonly imageBucketName: string; public abstract readonly logBucketName: string; public abstract readonly imageResourceId: string; public abstract readonly imageTextResourceId: string; public abstract readonly imagePhiResourceId: string; public abstract readonly imageMaskResourceId: string; public abstract readonly textPhiResourceId: string; public abstract readonly textMaskResourceId: string; } /** * AIPoweredHealthDataMasking * * The AI-Powered Health Data Masking solution helps healthcare organizations identify and mask health data in images or text. This solution uses Amazon Comprehend Medical to detect health data in a body of text, Amazon Rekognition to identify text in an image, Amazon API Gateway and AWS Lambda to provide an API interface for this functionality, and AWS Identity and Access Management (IAM) to authorize API requests. * * [Service Catalog Reference Architectures] Copyright 2018-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the 'License'); You may not use this product template except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. * Support Url: https://aws.amazon.com/solutions/ai-powered-health-data-masking * Owner: AWS Solutions */ export class AiPoweredHealthDataMasking extends AiPoweredHealthDataMaskingBase { public readonly provisionedProductId: string; public readonly cloudFormationStackArn: string; public readonly recordId: string; /** * The URL to invoke the API Gateway Endpoint */ public readonly apiGatewayInvokeURL: string; /** * The ID of the API Gateway */ public readonly apiGatewayId: string; /** * The Stage of the API Gateway */ public readonly apiGatewayStage: string; /** * The name of the bucket containing the image */ public readonly imageBucketName: string; /** * The name of the bucket containing the logs */ public readonly logBucketName: string; /** * The ID of the image resource */ public readonly imageResourceId: string; /** * The ID of the image text resource */ public readonly imageTextResourceId: string; /** * The ID of the image Phi resource */ public readonly imagePhiResourceId: string; /** * The ID of the image mask resource */ public readonly imageMaskResourceId: string; /** * The ID of the text Phi resource */ public readonly textPhiResourceId: string; /** * The ID of the text mask resource */ public readonly textMaskResourceId: string; private readonly provisionedProduct: sc.CfnCloudFormationProvisionedProduct; /** * Create a new Service Catalog \`AIPoweredHealthDataMasking\` product. * * @param scope - scope in which this resource is defined * @param id - scoped id of the resource */ constructor(scope: constructs.Construct, id: string) { super(scope, id); const synthesizer: cdk.IStackSynthesizer = cdk.Stack.of(this).synthesizer; const supportedSynthesizers = [cdk.CliCredentialsStackSynthesizer, cdk.LegacyStackSynthesizer, cdk.BootstraplessSynthesizer]; if (!supportedSynthesizers.some(supportedSynthesizer => synthesizer instanceof supportedSynthesizer)) { throw Error(\`\${synthesizer.constructor.name} not supported. Please use one of the supported synthesizers: \${supportedSynthesizers.map(synth => synth.name)}\`); } this.provisionedProduct = new sc.CfnCloudFormationProvisionedProduct(this, 'Resource', { provisionedProductName: this.node.id, provisioningArtifactName: 'v1.0', productName: 'AI-Powered Health Data Masking', pathName: 'DevTools', }); this.provisionedProductId = this.provisionedProduct.ref; this.cloudFormationStackArn = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'CloudformationStackArn')); this.recordId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'RecordId')); this.apiGatewayInvokeURL = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ApiGatewayInvokeURL')); this.apiGatewayId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ApiGatewayId')); this.apiGatewayStage = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ApiGatewayStage')); this.imageBucketName = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ImageBucketName')); this.logBucketName = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.LogBucketName')); this.imageResourceId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ImageResourceId')); this.imageTextResourceId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ImageTextResourceId')); this.imagePhiResourceId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ImagePhiResourceId')); this.imageMaskResourceId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.ImageMaskResourceId')); this.textPhiResourceId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.TextPhiResourceId')); this.textMaskResourceId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.TextMaskResourceId')); } }" `; exports[`generate bucket.json 1`] = ` "// Generated by cdk-import import * as cdk from 'aws-cdk-lib'; import * as constructs from 'constructs'; import * as sc from 'aws-cdk-lib/aws-servicecatalog'; export interface IBucketProduct extends cdk.IResource { readonly provisionedProductId: string; readonly cloudFormationStackArn: string; readonly recordId: string; } abstract class BucketProductBase extends cdk.Resource implements IBucketProduct { public abstract readonly provisionedProductId: string; public abstract readonly cloudFormationStackArn: string; public abstract readonly recordId: string; } /** * BucketProduct * * Simple S3 Bucket for storage * * Owner: IT */ export class BucketProduct extends BucketProductBase { public readonly provisionedProductId: string; public readonly cloudFormationStackArn: string; public readonly recordId: string; private readonly provisionedProduct: sc.CfnCloudFormationProvisionedProduct; /** * Create a new Service Catalog \`BucketProduct\` product. * * @param scope - scope in which this resource is defined * @param id - scoped id of the resource */ constructor(scope: constructs.Construct, id: string) { super(scope, id); const synthesizer: cdk.IStackSynthesizer = cdk.Stack.of(this).synthesizer; const supportedSynthesizers = [cdk.CliCredentialsStackSynthesizer, cdk.LegacyStackSynthesizer, cdk.BootstraplessSynthesizer]; if (!supportedSynthesizers.some(supportedSynthesizer => synthesizer instanceof supportedSynthesizer)) { throw Error(\`\${synthesizer.constructor.name} not supported. Please use one of the supported synthesizers: \${supportedSynthesizers.map(synth => synth.name)}\`); } this.provisionedProduct = new sc.CfnCloudFormationProvisionedProduct(this, 'Resource', { provisionedProductName: this.node.id, provisioningArtifactName: 'BucketProduct', productName: 'BucketProduct', pathName: 'DevTools', }); this.provisionedProductId = this.provisionedProduct.ref; this.cloudFormationStackArn = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'CloudformationStackArn')); this.recordId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'RecordId')); } }" `; exports[`generate ec2.json 1`] = ` "// Generated by cdk-import import * as cdk from 'aws-cdk-lib'; import * as constructs from 'constructs'; import * as sc from 'aws-cdk-lib/aws-servicecatalog'; export interface IEc2ComputeInstance extends cdk.IResource { readonly provisionedProductId: string; readonly cloudFormationStackArn: string; readonly recordId: string; readonly iPAddress: string; readonly downloadKeyCommand: string; readonly sshcommand: string; } abstract class Ec2ComputeInstanceBase extends cdk.Resource implements IEc2ComputeInstance { public abstract readonly provisionedProductId: string; public abstract readonly cloudFormationStackArn: string; public abstract readonly recordId: string; public abstract readonly iPAddress: string; public abstract readonly downloadKeyCommand: string; public abstract readonly sshcommand: string; } enum ParameterKeys { ssmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter = 'SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter', instanceType = 'InstanceType', numbers = 'Numbers', } namespace ParameterKeys { const reverseMap = new Map(); Object.keys(ParameterKeys).forEach((s: string) => { const e = (ParameterKeys)[s]; reverseMap.set(s, e); }); export function valueOf(str: string) { return reverseMap.get(str); } } export interface Ec2ComputeInstanceProps { /** * SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter * * @default /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2 */ readonly ssmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter?: string; /** * InstanceType * * The instance type of an EC2 instance. * * Must be t2 micro or small. * * @default t2.micro */ readonly instanceType?: Ec2ComputeInstance.InstanceType; /** * Numbers * * A number to be selected. * * These are the allowed numbers. * * @default 5 */ readonly numbers?: Ec2ComputeInstance.Numbers; } /** * Ec2ComputeInstance * * Compute instance to be used for experiments, does NOT contain DB access * * Owner: IT */ export class Ec2ComputeInstance extends Ec2ComputeInstanceBase { public readonly provisionedProductId: string; public readonly cloudFormationStackArn: string; public readonly recordId: string; public readonly iPAddress: string; /** * The command to download the key */ public readonly downloadKeyCommand: string; public readonly sshcommand: string; private readonly provisionedProduct: sc.CfnCloudFormationProvisionedProduct; /** * Create a new Service Catalog \`Ec2ComputeInstance\` product. * * @param scope - scope in which this resource is defined * @param id - scoped id of the resource * @param props - resource properties */ constructor(scope: constructs.Construct, id: string, props: Ec2ComputeInstanceProps) { super(scope, id); const synthesizer: cdk.IStackSynthesizer = cdk.Stack.of(this).synthesizer; const supportedSynthesizers = [cdk.CliCredentialsStackSynthesizer, cdk.LegacyStackSynthesizer, cdk.BootstraplessSynthesizer]; if (!supportedSynthesizers.some(supportedSynthesizer => synthesizer instanceof supportedSynthesizer)) { throw Error(\`\${synthesizer.constructor.name} not supported. Please use one of the supported synthesizers: \${supportedSynthesizers.map(synth => synth.name)}\`); } this.provisionedProduct = new sc.CfnCloudFormationProvisionedProduct(this, 'Resource', { provisionedProductName: this.node.id, provisioningArtifactName: 'EC2LargeInstance', productName: 'Ec2ComputeInstance', pathName: 'DevTools', provisioningParameters: Object.entries(props).map(([k, v]) => { return { key: ParameterKeys.valueOf(k) as string, value: v as string, } }), }); this.provisionedProductId = this.provisionedProduct.ref; this.cloudFormationStackArn = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'CloudformationStackArn')); this.recordId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'RecordId')); this.iPAddress = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.IPAddress')); this.downloadKeyCommand = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.DownloadKeyCommand')); this.sshcommand = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.sshcommand')); } } export namespace Ec2ComputeInstance { export enum InstanceType { /** * t2.micro */ T2_MICRO = 't2.micro', /** * t2.small */ T2_SMALL = 't2.small', } export enum Numbers { /** * 1 */ VALUE_1 = '1', /** * 2 */ VALUE_2 = '2', /** * 3 */ VALUE_3 = '3', /** * 4 */ VALUE_4 = '4', /** * 5 */ VALUE_5 = '5', } } " `;