toCloudWatchRegion method

CloudWatchRegion toCloudWatchRegion()

Implementation

CloudWatchRegion toCloudWatchRegion() {
  switch (this) {
    case 'us-east-1':
      return CloudWatchRegion.usEast_1;
    case 'us-east-2':
      return CloudWatchRegion.usEast_2;
    case 'us-west-1':
      return CloudWatchRegion.usWest_1;
    case 'us-west-2':
      return CloudWatchRegion.usWest_2;
    case 'ca-central-1':
      return CloudWatchRegion.caCentral_1;
    case 'eu-central-1':
      return CloudWatchRegion.euCentral_1;
    case 'eu-west-1':
      return CloudWatchRegion.euWest_1;
    case 'eu-west-2':
      return CloudWatchRegion.euWest_2;
    case 'eu-west-3':
      return CloudWatchRegion.euWest_3;
    case 'ap-east-1':
      return CloudWatchRegion.apEast_1;
    case 'me-south-1':
      return CloudWatchRegion.meSouth_1;
    case 'ap-south-1':
      return CloudWatchRegion.apSouth_1;
    case 'ap-southeast-1':
      return CloudWatchRegion.apSoutheast_1;
    case 'ap-southeast-2':
      return CloudWatchRegion.apSoutheast_2;
    case 'ap-northeast-1':
      return CloudWatchRegion.apNortheast_1;
    case 'ap-northeast-2':
      return CloudWatchRegion.apNortheast_2;
    case 'ap-northeast-3':
      return CloudWatchRegion.apNortheast_3;
    case 'eu-north-1':
      return CloudWatchRegion.euNorth_1;
    case 'sa-east-1':
      return CloudWatchRegion.saEast_1;
    case 'cn-northwest-1':
      return CloudWatchRegion.cnNorthwest_1;
    case 'cn-north-1':
      return CloudWatchRegion.cnNorth_1;
    case 'af-south-1':
      return CloudWatchRegion.afSouth_1;
    case 'eu-south-1':
      return CloudWatchRegion.euSouth_1;
    case 'us-gov-west-1':
      return CloudWatchRegion.usGovWest_1;
    case 'us-gov-east-1':
      return CloudWatchRegion.usGovEast_1;
    case 'us-iso-east-1':
      return CloudWatchRegion.usIsoEast_1;
    case 'us-isob-east-1':
      return CloudWatchRegion.usIsobEast_1;
  }
  throw Exception('$this is not known in enum CloudWatchRegion');
}