aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 4.04 kB
JavaScript
;var __decorate=exports&&exports.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},_a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SigningProfile=exports.Platform=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var signer_generated_1=()=>{var tmp=require("./signer.generated");return signer_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},metadata_resource_1=()=>{var tmp=require("../../core/lib/metadata-resource");return metadata_resource_1=()=>tmp,tmp},prop_injectable_1=()=>{var tmp=require("../../core/lib/prop-injectable");return prop_injectable_1=()=>tmp,tmp};class Platform{static of(platformId){return new Platform(platformId)}constructor(platformId){this.platformId=platformId,this.platformId=platformId}}exports.Platform=Platform,_a=JSII_RTTI_SYMBOL_1,Platform[_a]={fqn:"aws-cdk-lib.aws_signer.Platform",version:"2.210.0"},Platform.AWS_IOT_DEVICE_MANAGEMENT_SHA256_ECDSA=Platform.of("AWSIoTDeviceManagement-SHA256-ECDSA"),Platform.AWS_LAMBDA_SHA384_ECDSA=Platform.of("AWSLambda-SHA384-ECDSA"),Platform.AMAZON_FREE_RTOS_TI_CC3220SF=Platform.of("AmazonFreeRTOS-TI-CC3220SF"),Platform.AMAZON_FREE_RTOS_DEFAULT=Platform.of("AmazonFreeRTOS-Default"),Platform.NOTATION_OCI_SHA384_ECDSA=Platform.of("Notation-OCI-SHA384-ECDSA");let SigningProfile=class SigningProfile2 extends core_1().Resource{static fromSigningProfileAttributes(scope,id,attrs){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_signer_SigningProfileAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSigningProfileAttributes),error}class Import extends core_1().Resource{constructor(signingProfileArn2,signingProfileProfileVersionArn){super(scope,id),this.signingProfileName=attrs.signingProfileName,this.signingProfileVersion=attrs.signingProfileVersion,this.signingProfileArn=signingProfileArn2,this.signingProfileVersionArn=signingProfileProfileVersionArn}}const signingProfileArn=core_1().Stack.of(scope).formatArn({service:"signer",resource:"",resourceName:`/signing-profiles/${attrs.signingProfileName}`}),SigningProfileVersionArn=core_1().Stack.of(scope).formatArn({service:"signer",resource:"",resourceName:`/signing-profiles/${attrs.signingProfileName}/${attrs.signingProfileVersion}`});return new Import(signingProfileArn,SigningProfileVersionArn)}constructor(scope,id,props){super(scope,id,{physicalName:props.signingProfileName});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_signer_SigningProfileProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SigningProfile2),error}(0,metadata_resource_1().addConstructMetadata)(this,props);const resource=new(signer_generated_1()).CfnSigningProfile(this,"Resource",{platformId:props.platform.platformId,signatureValidityPeriod:props.signatureValidity?{type:"DAYS",value:props.signatureValidity?.toDays()}:{type:"MONTHS",value:135}});this.signingProfileArn=resource.attrArn,this.signingProfileName=resource.attrProfileName,this.signingProfileVersion=resource.attrProfileVersion,this.signingProfileVersionArn=resource.attrProfileVersionArn}};exports.SigningProfile=SigningProfile,_b=JSII_RTTI_SYMBOL_1,SigningProfile[_b]={fqn:"aws-cdk-lib.aws_signer.SigningProfile",version:"2.210.0"},SigningProfile.PROPERTY_INJECTION_ID="aws-cdk-lib.aws-signer.SigningProfile",exports.SigningProfile=SigningProfile=__decorate([prop_injectable_1().propertyInjectable],SigningProfile);