UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 2.09 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpNamespace=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),core_1=require("../../core"),namespace_1=require("./namespace"),service_1=require("./service"),servicediscovery_generated_1=require("./servicediscovery.generated");class HttpNamespace extends core_1.Resource{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_HttpNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpNamespace),error}const ns=new servicediscovery_generated_1.CfnHttpNamespace(this,"Resource",{name:props.name,description:props.description});this.namespaceName=props.name,this.namespaceId=ns.attrId,this.namespaceArn=ns.attrArn,this.type=namespace_1.NamespaceType.HTTP}static fromHttpNamespaceAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_HttpNamespaceAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromHttpNamespaceAttributes),error}class Import extends core_1.Resource{constructor(){super(...arguments),this.namespaceName=attrs.namespaceName,this.namespaceId=attrs.namespaceId,this.namespaceArn=attrs.namespaceArn,this.type=namespace_1.NamespaceType.HTTP}}return new Import(scope,id)}get httpNamespaceArn(){return this.namespaceArn}get httpNamespaceName(){return this.namespaceName}get httpNamespaceId(){return this.namespaceId}createService(id,props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_BaseServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.createService),error}return new service_1.Service(this,id,{namespace:this,...props})}}exports.HttpNamespace=HttpNamespace,_a=JSII_RTTI_SYMBOL_1,HttpNamespace[_a]={fqn:"aws-cdk-lib.aws_servicediscovery.HttpNamespace",version:"2.70.0"};