UNPKG

@altostra/core

Version:

Core library for shared types and logic

1 lines 1.05 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAwsCustomResourcesUtilities=exports.getDefaultAwsCustomResourceProperties=void 0;const ServiceToMetadataMap_1=require("../../../aws/CloudFormation/ServiceToMetadataMap"),CloudFormationResourceType_1=require("../../../aws/CloudFormationResourceType");function getDefaultAwsCustomResourceProperties(e){switch(e){case"AWS::EC2::Instance":return{ImageId:"arn:aws:imagebuilder:us-east-1:aws:image/amazon-linux-2-kernel-5-x86/2022.10.13"};default:return{}}}function getAwsCustomResourcesUtilities(e){return{templateByAWSType(t,s){const o=e.resource;s&&(o.name=s),o.displayType=t,o.resources={[e.id]:{Type:(0,CloudFormationResourceType_1.cloudFormationResourceType)(t),Properties:getDefaultAwsCustomResourceProperties(t)}}},getIcon(){const{displayType:t}=e.resource;if(t)return(0,ServiceToMetadataMap_1.iconByType)(t)}}}exports.getDefaultAwsCustomResourceProperties=getDefaultAwsCustomResourceProperties,exports.getAwsCustomResourcesUtilities=getAwsCustomResourcesUtilities;