| 110 | } |
| 111 | |
| 112 | func APILogURL(api spec.API) (string, error) { |
| 113 | partition := "aws.amazon" |
| 114 | region := config.ClusterConfig.Region |
| 115 | if awslib.PartitionFromRegion(region) == "aws-us-gov" { |
| 116 | partition = "amazonaws-us-gov" |
| 117 | } |
| 118 | logGroup := config.ClusterConfig.ClusterName |
| 119 | |
| 120 | args := apiLogURLTemplateArgs{ |
| 121 | Partition: partition, |
| 122 | Region: region, |
| 123 | LogGroup: logGroup, |
| 124 | APIName: api.Name, |
| 125 | } |
| 126 | |
| 127 | buf := &bytes.Buffer{} |
| 128 | err := _apiLogURLTemplate.Execute(buf, args) |
| 129 | if err != nil { |
| 130 | return "", err |
| 131 | } |
| 132 | |
| 133 | return strings.TrimSpace(buf.String()), nil |
| 134 | } |
| 135 | |
| 136 | func BatchJobLogURL(apiName string, jobStatus status.BatchJobStatus) (string, error) { |
| 137 | partition := "aws.amazon" |