Skip to content

Commit 2fae9cc

Browse files
committed
CL-522 | include more job properties available for filters
Signed-off-by: Gabriela S. Soria <[email protected]>
1 parent ac274c9 commit 2fae9cc

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

resources/signer.signingjobs.go

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package resources
22

33
import (
44
"fmt"
5+
"time"
56

67
"github.com/aws/aws-sdk-go/aws"
78
"github.com/aws/aws-sdk-go/aws/session"
@@ -10,10 +11,17 @@ import (
1011
)
1112

1213
type SignerSigningJob struct {
13-
svc *signer.Signer
14-
jobId *string
15-
reason string
16-
isRevoked *bool
14+
svc *signer.Signer
15+
jobId *string
16+
reason string
17+
isRevoked *bool
18+
createdAt time.Time
19+
profileName *string
20+
profileVersion *string
21+
platformId *string
22+
platformDisplayName *string
23+
jobOwner *string
24+
jobInvoker *string
1725
}
1826

1927
func init() {
@@ -30,10 +38,17 @@ func ListSignerSigningJobs(sess *session.Session) ([]Resource, error) {
3038
err := svc.ListSigningJobsPages(listJobsInput, func(page *signer.ListSigningJobsOutput, lastPage bool) bool {
3139
for _, job := range page.Jobs {
3240
resources = append(resources, &SignerSigningJob{
33-
svc: svc,
34-
jobId: job.JobId,
35-
reason: reason,
36-
isRevoked: job.IsRevoked,
41+
svc: svc,
42+
jobId: job.JobId,
43+
reason: reason,
44+
isRevoked: job.IsRevoked,
45+
createdAt: *job.CreatedAt,
46+
profileName: job.ProfileName,
47+
profileVersion: job.ProfileVersion,
48+
platformId: job.PlatformId,
49+
platformDisplayName: job.PlatformDisplayName,
50+
jobOwner: job.JobOwner,
51+
jobInvoker: job.JobInvoker,
3752
})
3853
}
3954
return true // continue iterating over pages
@@ -67,5 +82,12 @@ func (j *SignerSigningJob) Remove() error {
6782
func (j *SignerSigningJob) Properties() types.Properties {
6883
properties := types.NewProperties()
6984
properties.Set("JobId", j.jobId)
85+
properties.Set("CreatedAt", j.createdAt.Format(time.RFC3339))
86+
properties.Set("ProfileName", j.profileName)
87+
properties.Set("ProfileVersion", j.profileVersion)
88+
properties.Set("PlatformId", j.platformId)
89+
properties.Set("PlatformDisplayName", j.platformDisplayName)
90+
properties.Set("JobOwner", j.jobOwner)
91+
properties.Set("JobInvoker", j.jobInvoker)
7092
return properties
7193
}

0 commit comments

Comments
 (0)