aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 17.3 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnInvestigationGroup=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cdk=()=>{var tmp=require("../../core/lib");return cdk=()=>tmp,tmp},cfn_parse=()=>{var tmp=require("../../core/lib/helpers-internal");return cfn_parse=()=>tmp,tmp},cdk_errors=()=>{var tmp=require("../../core/lib/errors");return cdk_errors=()=>tmp,tmp};class CfnInvestigationGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_aiops.CfnInvestigationGroup",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::AIOps::InvestigationGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnInvestigationGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnInvestigationGroup(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnInvestigationGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnInvestigationGroup.CFN_RESOURCE_TYPE_NAME}static arnForInvestigationGroup(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_aiops_IInvestigationGroupRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForInvestigationGroup),error}return resource.investigationGroupRef.investigationGroupArn}cdkTagManager;_chatbotNotificationChannels;_crossAccountConfigurations;_encryptionConfig;_investigationGroupPolicy;_isCloudTrailEventHistoryEnabled;_name;_retentionInDays;_roleArn;_tagKeyBoundaries;_tags;constructor(scope,id,props){super(scope,id,{type:CfnInvestigationGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_aiops_CfnInvestigationGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnInvestigationGroup),error}cdk().requireProperty(props,"name",this),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::AIOps::InvestigationGroup",void 0,{tagPropertyName:"tags"}),this._chatbotNotificationChannels=props.chatbotNotificationChannels,this._crossAccountConfigurations=props.crossAccountConfigurations,this._encryptionConfig=props.encryptionConfig,this._investigationGroupPolicy=props.investigationGroupPolicy,this._isCloudTrailEventHistoryEnabled=props.isCloudTrailEventHistoryEnabled,this._name=props.name,this._retentionInDays=props.retentionInDays,this._roleArn=props.roleArn,this._tagKeyBoundaries=props.tagKeyBoundaries,this._tags=props.tags}get investigationGroupRef(){return{investigationGroupArn:this.ref}}get chatbotNotificationChannels(){return this._chatbotNotificationChannels}set chatbotNotificationChannels(value){cdk().traceProperty(this.node,"ChatbotNotificationChannels"),this._chatbotNotificationChannels=value}get crossAccountConfigurations(){return this._crossAccountConfigurations}set crossAccountConfigurations(value){cdk().traceProperty(this.node,"CrossAccountConfigurations"),this._crossAccountConfigurations=value}get encryptionConfig(){return this._encryptionConfig}set encryptionConfig(value){cdk().traceProperty(this.node,"EncryptionConfig"),this._encryptionConfig=value}get investigationGroupPolicy(){return this._investigationGroupPolicy}set investigationGroupPolicy(value){cdk().traceProperty(this.node,"InvestigationGroupPolicy"),this._investigationGroupPolicy=value}get isCloudTrailEventHistoryEnabled(){return this._isCloudTrailEventHistoryEnabled}set isCloudTrailEventHistoryEnabled(value){cdk().traceProperty(this.node,"IsCloudTrailEventHistoryEnabled"),this._isCloudTrailEventHistoryEnabled=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get retentionInDays(){return this._retentionInDays}set retentionInDays(value){cdk().traceProperty(this.node,"RetentionInDays"),this._retentionInDays=value}get roleArn(){return this._roleArn}set roleArn(value){cdk().traceProperty(this.node,"RoleArn"),this._roleArn=value}get tagKeyBoundaries(){return this._tagKeyBoundaries}set tagKeyBoundaries(value){cdk().traceProperty(this.node,"TagKeyBoundaries"),this._tagKeyBoundaries=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrCreatedAt(){return cdk().Token.asString(this.getAtt("CreatedAt",cdk().ResolutionTypeHint.STRING))}get attrCreatedBy(){return cdk().Token.asString(this.getAtt("CreatedBy",cdk().ResolutionTypeHint.STRING))}get attrLastModifiedAt(){return cdk().Token.asString(this.getAtt("LastModifiedAt",cdk().ResolutionTypeHint.STRING))}get attrLastModifiedBy(){return cdk().Token.asString(this.getAtt("LastModifiedBy",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this._tags),chatbotNotificationChannels:this._chatbotNotificationChannels,crossAccountConfigurations:this._crossAccountConfigurations,encryptionConfig:this._encryptionConfig,investigationGroupPolicy:this._investigationGroupPolicy,isCloudTrailEventHistoryEnabled:this._isCloudTrailEventHistoryEnabled,name:this._name,retentionInDays:this._retentionInDays,roleArn:this._roleArn,tagKeyBoundaries:this._tagKeyBoundaries}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnInvestigationGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnInvestigationGroupPropsToCloudFormation(props)}}exports.CfnInvestigationGroup=CfnInvestigationGroup;function CfnInvestigationGroupEncryptionConfigMapPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("encryptionConfigurationType",cdk().validateString)(properties.encryptionConfigurationType)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.wrap('supplied properties not correct for "EncryptionConfigMapProperty"')}function convertCfnInvestigationGroupEncryptionConfigMapPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInvestigationGroupEncryptionConfigMapPropertyValidator(properties).assertSuccess(),{EncryptionConfigurationType:cdk().stringToCloudFormation(properties.encryptionConfigurationType),KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId)}):properties}function CfnInvestigationGroupEncryptionConfigMapPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("encryptionConfigurationType","EncryptionConfigurationType",properties.EncryptionConfigurationType!=null?cfn_parse().FromCloudFormation.getString(properties.EncryptionConfigurationType):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInvestigationGroupChatbotNotificationChannelPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("chatConfigurationArns",cdk().listValidator(cdk().validateString))(properties.chatConfigurationArns)),errors.collect(cdk().propertyValidator("snsTopicArn",cdk().validateString)(properties.snsTopicArn)),errors.wrap('supplied properties not correct for "ChatbotNotificationChannelProperty"')}function convertCfnInvestigationGroupChatbotNotificationChannelPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInvestigationGroupChatbotNotificationChannelPropertyValidator(properties).assertSuccess(),{ChatConfigurationArns:cdk().listMapper(cdk().stringToCloudFormation)(properties.chatConfigurationArns),SNSTopicArn:cdk().stringToCloudFormation(properties.snsTopicArn)}):properties}function CfnInvestigationGroupChatbotNotificationChannelPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("chatConfigurationArns","ChatConfigurationArns",properties.ChatConfigurationArns!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ChatConfigurationArns):void 0),ret.addPropertyResult("snsTopicArn","SNSTopicArn",properties.SNSTopicArn!=null?cfn_parse().FromCloudFormation.getString(properties.SNSTopicArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInvestigationGroupCrossAccountConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("sourceRoleArn",cdk().validateString)(properties.sourceRoleArn)),errors.wrap('supplied properties not correct for "CrossAccountConfigurationProperty"')}function convertCfnInvestigationGroupCrossAccountConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInvestigationGroupCrossAccountConfigurationPropertyValidator(properties).assertSuccess(),{SourceRoleArn:cdk().stringToCloudFormation(properties.sourceRoleArn)}):properties}function CfnInvestigationGroupCrossAccountConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("sourceRoleArn","SourceRoleArn",properties.SourceRoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.SourceRoleArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInvestigationGroupPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("chatbotNotificationChannels",cdk().listValidator(CfnInvestigationGroupChatbotNotificationChannelPropertyValidator))(properties.chatbotNotificationChannels)),errors.collect(cdk().propertyValidator("crossAccountConfigurations",cdk().listValidator(CfnInvestigationGroupCrossAccountConfigurationPropertyValidator))(properties.crossAccountConfigurations)),errors.collect(cdk().propertyValidator("encryptionConfig",CfnInvestigationGroupEncryptionConfigMapPropertyValidator)(properties.encryptionConfig)),errors.collect(cdk().propertyValidator("investigationGroupPolicy",cdk().validateString)(properties.investigationGroupPolicy)),errors.collect(cdk().propertyValidator("isCloudTrailEventHistoryEnabled",cdk().validateBoolean)(properties.isCloudTrailEventHistoryEnabled)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("retentionInDays",cdk().validateNumber)(properties.retentionInDays)),errors.collect(cdk().propertyValidator("roleArn",cdk().validateString)(properties.roleArn)),errors.collect(cdk().propertyValidator("tagKeyBoundaries",cdk().listValidator(cdk().validateString))(properties.tagKeyBoundaries)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnInvestigationGroupProps"')}function convertCfnInvestigationGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInvestigationGroupPropsValidator(properties).assertSuccess(),{ChatbotNotificationChannels:cdk().listMapper(convertCfnInvestigationGroupChatbotNotificationChannelPropertyToCloudFormation)(properties.chatbotNotificationChannels),CrossAccountConfigurations:cdk().listMapper(convertCfnInvestigationGroupCrossAccountConfigurationPropertyToCloudFormation)(properties.crossAccountConfigurations),EncryptionConfig:convertCfnInvestigationGroupEncryptionConfigMapPropertyToCloudFormation(properties.encryptionConfig),InvestigationGroupPolicy:cdk().stringToCloudFormation(properties.investigationGroupPolicy),IsCloudTrailEventHistoryEnabled:cdk().booleanToCloudFormation(properties.isCloudTrailEventHistoryEnabled),Name:cdk().stringToCloudFormation(properties.name),RetentionInDays:cdk().numberToCloudFormation(properties.retentionInDays),RoleArn:cdk().stringToCloudFormation(properties.roleArn),TagKeyBoundaries:cdk().listMapper(cdk().stringToCloudFormation)(properties.tagKeyBoundaries),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnInvestigationGroupPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("chatbotNotificationChannels","ChatbotNotificationChannels",properties.ChatbotNotificationChannels!=null?cfn_parse().FromCloudFormation.getArray(CfnInvestigationGroupChatbotNotificationChannelPropertyFromCloudFormation)(properties.ChatbotNotificationChannels):void 0),ret.addPropertyResult("crossAccountConfigurations","CrossAccountConfigurations",properties.CrossAccountConfigurations!=null?cfn_parse().FromCloudFormation.getArray(CfnInvestigationGroupCrossAccountConfigurationPropertyFromCloudFormation)(properties.CrossAccountConfigurations):void 0),ret.addPropertyResult("encryptionConfig","EncryptionConfig",properties.EncryptionConfig!=null?CfnInvestigationGroupEncryptionConfigMapPropertyFromCloudFormation(properties.EncryptionConfig):void 0),ret.addPropertyResult("investigationGroupPolicy","InvestigationGroupPolicy",properties.InvestigationGroupPolicy!=null?cfn_parse().FromCloudFormation.getString(properties.InvestigationGroupPolicy):void 0),ret.addPropertyResult("isCloudTrailEventHistoryEnabled","IsCloudTrailEventHistoryEnabled",properties.IsCloudTrailEventHistoryEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IsCloudTrailEventHistoryEnabled):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("retentionInDays","RetentionInDays",properties.RetentionInDays!=null?cfn_parse().FromCloudFormation.getNumber(properties.RetentionInDays):void 0),ret.addPropertyResult("roleArn","RoleArn",properties.RoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.RoleArn):void 0),ret.addPropertyResult("tagKeyBoundaries","TagKeyBoundaries",properties.TagKeyBoundaries!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.TagKeyBoundaries):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}