toResourceType method

ResourceType toResourceType()

Implementation

ResourceType toResourceType() {
  switch (this) {
    case 'AWS::S3::Bucket':
      return ResourceType.awsS3Bucket;
    case 'AWS::IAM::Role':
      return ResourceType.awsIamRole;
    case 'AWS::SQS::Queue':
      return ResourceType.awsSqsQueue;
    case 'AWS::Lambda::Function':
      return ResourceType.awsLambdaFunction;
    case 'AWS::Lambda::LayerVersion':
      return ResourceType.awsLambdaLayerVersion;
    case 'AWS::KMS::Key':
      return ResourceType.awsKmsKey;
  }
  throw Exception('$this is not known in enum ResourceType');
}