private renderGetAtt()

in src/cfn-resource-generator.ts [160:173]


  private renderGetAtt(prop: string): string {
    const attributeType = this.getTypeOfProperty(prop);
    const constructorArguments = `this.getAtt('${prop}')`;
    if (attributeType === 'string') {
      return `cdk.Token.asString(${constructorArguments})`;
    }
    if (attributeType === 'string[]') {
      return `cdk.Token.asList(${constructorArguments})`;
    }
    if (attributeType === 'number') {
      return `cdk.Token.asNumber(${constructorArguments})`;
    }
    return constructorArguments;
  }