(apiName string, jobStatus status.BatchJobStatus)
| 134 | } |
| 135 | |
| 136 | func BatchJobLogURL(apiName string, jobStatus status.BatchJobStatus) (string, error) { |
| 137 | partition := "aws.amazon" |
| 138 | region := config.ClusterConfig.Region |
| 139 | if awslib.PartitionFromRegion(region) == "aws-us-gov" { |
| 140 | partition = "amazonaws-us-gov" |
| 141 | } |
| 142 | logGroup := config.ClusterConfig.ClusterName |
| 143 | |
| 144 | if jobStatus.EndTime != nil { |
| 145 | endTime := *jobStatus.EndTime |
| 146 | endTime = endTime.Add(60 * time.Second) |
| 147 | return completedBatchJobLogsURL(completedJobLogURLTemplateArgs{ |
| 148 | Partition: partition, |
| 149 | Region: region, |
| 150 | StartTime: timeString(jobStatus.StartTime), |
| 151 | EndTime: timeString(endTime), |
| 152 | LogGroup: logGroup, |
| 153 | APIName: apiName, |
| 154 | JobID: jobStatus.ID, |
| 155 | }) |
| 156 | } |
| 157 | return inProgressBatchJobLogsURL(inProgressJobLogURLTemplateArgs{ |
| 158 | Partition: partition, |
| 159 | Region: region, |
| 160 | LogGroup: logGroup, |
| 161 | APIName: apiName, |
| 162 | JobID: jobStatus.ID, |
| 163 | }) |
| 164 | } |
| 165 | |
| 166 | func TaskJobLogURL(apiName string, jobStatus status.TaskJobStatus) (string, error) { |
| 167 | partition := "aws.amazon" |
no test coverage detected