toErrorCode method
Implementation
ErrorCode toErrorCode() {
switch (this) {
case 'AGENT_ISSUE':
return ErrorCode.agentIssue;
case 'ALARM_ACTIVE':
return ErrorCode.alarmActive;
case 'APPLICATION_MISSING':
return ErrorCode.applicationMissing;
case 'AUTOSCALING_VALIDATION_ERROR':
return ErrorCode.autoscalingValidationError;
case 'AUTO_SCALING_CONFIGURATION':
return ErrorCode.autoScalingConfiguration;
case 'AUTO_SCALING_IAM_ROLE_PERMISSIONS':
return ErrorCode.autoScalingIamRolePermissions;
case 'CODEDEPLOY_RESOURCE_CANNOT_BE_FOUND':
return ErrorCode.codedeployResourceCannotBeFound;
case 'CUSTOMER_APPLICATION_UNHEALTHY':
return ErrorCode.customerApplicationUnhealthy;
case 'DEPLOYMENT_GROUP_MISSING':
return ErrorCode.deploymentGroupMissing;
case 'ECS_UPDATE_ERROR':
return ErrorCode.ecsUpdateError;
case 'ELASTIC_LOAD_BALANCING_INVALID':
return ErrorCode.elasticLoadBalancingInvalid;
case 'ELB_INVALID_INSTANCE':
return ErrorCode.elbInvalidInstance;
case 'HEALTH_CONSTRAINTS':
return ErrorCode.healthConstraints;
case 'HEALTH_CONSTRAINTS_INVALID':
return ErrorCode.healthConstraintsInvalid;
case 'HOOK_EXECUTION_FAILURE':
return ErrorCode.hookExecutionFailure;
case 'IAM_ROLE_MISSING':
return ErrorCode.iamRoleMissing;
case 'IAM_ROLE_PERMISSIONS':
return ErrorCode.iamRolePermissions;
case 'INTERNAL_ERROR':
return ErrorCode.internalError;
case 'INVALID_ECS_SERVICE':
return ErrorCode.invalidEcsService;
case 'INVALID_LAMBDA_CONFIGURATION':
return ErrorCode.invalidLambdaConfiguration;
case 'INVALID_LAMBDA_FUNCTION':
return ErrorCode.invalidLambdaFunction;
case 'INVALID_REVISION':
return ErrorCode.invalidRevision;
case 'MANUAL_STOP':
return ErrorCode.manualStop;
case 'MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION':
return ErrorCode.missingBlueGreenDeploymentConfiguration;
case 'MISSING_ELB_INFORMATION':
return ErrorCode.missingElbInformation;
case 'MISSING_GITHUB_TOKEN':
return ErrorCode.missingGithubToken;
case 'NO_EC2_SUBSCRIPTION':
return ErrorCode.noEc2Subscription;
case 'NO_INSTANCES':
return ErrorCode.noInstances;
case 'OVER_MAX_INSTANCES':
return ErrorCode.overMaxInstances;
case 'RESOURCE_LIMIT_EXCEEDED':
return ErrorCode.resourceLimitExceeded;
case 'REVISION_MISSING':
return ErrorCode.revisionMissing;
case 'THROTTLED':
return ErrorCode.throttled;
case 'TIMEOUT':
return ErrorCode.timeout;
case 'CLOUDFORMATION_STACK_FAILURE':
return ErrorCode.cloudformationStackFailure;
}
throw Exception('$this is not known in enum ErrorCode');
}