File: types.go

package info (click to toggle)
golang-github-aws-aws-sdk-go-v2 1.30.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 662,428 kB
  • sloc: java: 16,875; makefile: 432; sh: 175
file content (416 lines) | stat: -rw-r--r-- 10,618 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
// Code generated by smithy-go-codegen DO NOT EDIT.

package types

import (
	smithydocument "github.com/aws/smithy-go/document"
	"time"
)

// A summary of findings metrics for an account on a specified date.
type AccountFindingsMetric struct {

	// The number of closed findings of each severity on the specified date.
	ClosedFindings *FindingMetricsValuePerSeverity

	// The date from which the findings metrics were retrieved.
	Date *time.Time

	// The average time in days it takes to close findings of each severity as of a
	// specified date.
	MeanTimeToClose *FindingMetricsValuePerSeverity

	// The number of new findings of each severity on the specified date.
	NewFindings *FindingMetricsValuePerSeverity

	// The number of open findings of each severity as of the specified date.
	OpenFindings *FindingMetricsValuePerSeverity

	noSmithyDocumentSerde
}

// Contains information about the error that caused a finding to fail to be
// retrieved.
type BatchGetFindingsError struct {

	// A code associated with the type of error.
	//
	// This member is required.
	ErrorCode ErrorCode

	// The finding ID of the finding that was not fetched.
	//
	// This member is required.
	FindingId *string

	// Describes the error.
	//
	// This member is required.
	Message *string

	// The name of the scan that generated the finding.
	//
	// This member is required.
	ScanName *string

	noSmithyDocumentSerde
}

// Information about a finding category with open findings.
type CategoryWithFindingNum struct {

	// The name of the finding category. A finding category is determined by the
	// detector that detected the finding.
	CategoryName *string

	// The number of open findings in the category.
	FindingNumber *int32

	noSmithyDocumentSerde
}

// The line of code where a finding was detected.
type CodeLine struct {

	// The code that contains a vulnerability.
	Content *string

	// The code line number.
	Number *int32

	noSmithyDocumentSerde
}

// Information about the encryption configuration for an account. Required to call
// UpdateAccountConfiguration .
type EncryptionConfig struct {

	// The KMS key ARN that is used for encryption. If an AWS-managed key is used for
	// encryption, returns empty.
	KmsKeyArn *string

	noSmithyDocumentSerde
}

// Information about the location of security vulnerabilities that Amazon CodeGuru
// Security detected in your code.
type FilePath struct {

	// A list of CodeLine objects that describe where the security vulnerability
	// appears in your code.
	CodeSnippet []CodeLine

	// The last line number of the code snippet where the security vulnerability
	// appears in your code.
	EndLine *int32

	// The name of the file.
	Name *string

	// The path to the resource with the security vulnerability.
	Path *string

	// The first line number of the code snippet where the security vulnerability
	// appears in your code.
	StartLine *int32

	noSmithyDocumentSerde
}

// Information about a finding that was detected in your code.
type Finding struct {

	// The time when the finding was created.
	CreatedAt *time.Time

	// A description of the finding.
	Description *string

	// The identifier for the detector that detected the finding in your code. A
	// detector is a defined rule based on industry standards and AWS best practices.
	DetectorId *string

	// The name of the detector that identified the security vulnerability in your
	// code.
	DetectorName *string

	// One or more tags or categorizations that are associated with a detector. These
	// tags are defined by type, programming language, or other classification such as
	// maintainability or consistency.
	DetectorTags []string

	// The identifier for the component that generated a finding such as
	// AmazonCodeGuruSecurity.
	GeneratorId *string

	// The identifier for a finding.
	Id *string

	// An object that contains the details about how to remediate a finding.
	Remediation *Remediation

	// The resource where Amazon CodeGuru Security detected a finding.
	Resource *Resource

	// The identifier for the rule that generated the finding.
	RuleId *string

	// The severity of the finding. Severity can be critical, high, medium, low, or
	// informational. For information on severity levels, see [Finding severity]in the Amazon CodeGuru
	// Security User Guide.
	//
	// [Finding severity]: https://docs.aws.amazon.com/codeguru/latest/security-ug/findings-overview.html#severity-distribution
	Severity Severity

	// The status of the finding. A finding status can be open or closed.
	Status Status

	// The title of the finding.
	Title *string

	// The type of finding.
	Type *string

	// The time when the finding was last updated. Findings are updated when you
	// remediate them or when the finding code location changes.
	UpdatedAt *time.Time

	// An object that describes the detected security vulnerability.
	Vulnerability *Vulnerability

	noSmithyDocumentSerde
}

// An object that contains information about a finding and the scan that generated
// it.
type FindingIdentifier struct {

	// The identifier for a finding.
	//
	// This member is required.
	FindingId *string

	// The name of the scan that generated the finding.
	//
	// This member is required.
	ScanName *string

	noSmithyDocumentSerde
}

// A numeric value corresponding to the severity of a finding, such as the number
// of open findings or the average time it takes to close findings of a given
// severity.
type FindingMetricsValuePerSeverity struct {

	// A numeric value corresponding to a critical finding.
	Critical *float64

	// A numeric value corresponding to a high severity finding.
	High *float64

	// A numeric value corresponding to an informational finding.
	Info *float64

	// A numeric value corresponding to a low severity finding.
	Low *float64

	// A numeric value corresponding to a medium severity finding.
	Medium *float64

	noSmithyDocumentSerde
}

// A summary of metrics for an account as of a specified date.
type MetricsSummary struct {

	// A list of CategoryWithFindingNum objects for the top 5 finding categories with
	// the most findings.
	CategoriesWithMostFindings []CategoryWithFindingNum

	// The date from which the metrics summary information was retrieved.
	Date *time.Time

	// The number of open findings of each severity.
	OpenFindings *FindingMetricsValuePerSeverity

	// A list of ScanNameWithFindingNum objects for the top 3 scans with the most
	// number of open critical findings.
	ScansWithMostOpenCriticalFindings []ScanNameWithFindingNum

	// A list of ScanNameWithFindingNum objects for the top 3 scans with the most
	// number of open findings.
	ScansWithMostOpenFindings []ScanNameWithFindingNum

	noSmithyDocumentSerde
}

// Information about the recommended course of action to remediate a finding.
type Recommendation struct {

	// The recommended course of action to remediate the finding.
	Text *string

	// The URL address to the recommendation for remediating the finding.
	Url *string

	noSmithyDocumentSerde
}

// Information about how to remediate a finding.
type Remediation struct {

	// An object that contains information about the recommended course of action to
	// remediate a finding.
	Recommendation *Recommendation

	// A list of SuggestedFix objects. Each object contains information about a
	// suggested code fix to remediate the finding.
	SuggestedFixes []SuggestedFix

	noSmithyDocumentSerde
}

// Information about a resource that contains a finding.
type Resource struct {

	// The scanName of the scan that was run on the resource.
	Id *string

	// The identifier for a section of the resource.
	SubResourceId *string

	noSmithyDocumentSerde
}

// The identifier for a resource object that contains resources to scan.
// Specifying a codeArtifactId is required to create a scan.
//
// The following types satisfy this interface:
//
//	ResourceIdMemberCodeArtifactId
type ResourceId interface {
	isResourceId()
}

// The identifier for the code file uploaded to the resource object. Returned by
// CreateUploadUrl when you upload resources to be scanned.
type ResourceIdMemberCodeArtifactId struct {
	Value string

	noSmithyDocumentSerde
}

func (*ResourceIdMemberCodeArtifactId) isResourceId() {}

// Information about the number of findings generated by a scan.
type ScanNameWithFindingNum struct {

	// The number of findings generated by a scan.
	FindingNumber *int32

	// The name of the scan.
	ScanName *string

	noSmithyDocumentSerde
}

// Information about a scan.
type ScanSummary struct {

	//  The time when the scan was created.
	//
	// This member is required.
	CreatedAt *time.Time

	// The identifier for the scan run.
	//
	// This member is required.
	RunId *string

	// The name of the scan.
	//
	// This member is required.
	ScanName *string

	// The state of the scan. A scan can be In Progress , Complete , or Failed .
	//
	// This member is required.
	ScanState ScanState

	// The ARN for the scan name.
	ScanNameArn *string

	// The time the scan was last updated. A scan is updated when it is re-run.
	UpdatedAt *time.Time

	noSmithyDocumentSerde
}

// Information about the suggested code fix to remediate a finding.
type SuggestedFix struct {

	// The suggested code fix. If applicable, includes code patch to replace your
	// source code.
	Code *string

	// A description of the suggested code fix and why it is being suggested.
	Description *string

	noSmithyDocumentSerde
}

// Information about a validation exception.
type ValidationExceptionField struct {

	// Describes the exception.
	//
	// This member is required.
	Message *string

	// The name of the exception.
	//
	// This member is required.
	Name *string

	noSmithyDocumentSerde
}

// Information about a security vulnerability that Amazon CodeGuru Security
// detected.
type Vulnerability struct {

	//  An object that describes the location of the detected security vulnerability
	// in your code.
	FilePath *FilePath

	// The identifier for the vulnerability.
	Id *string

	// The number of times the vulnerability appears in your code.
	//
	// Deprecated: This shape is not used.
	ItemCount *int32

	// One or more URL addresses that contain details about a vulnerability.
	ReferenceUrls []string

	// One or more vulnerabilities that are related to the vulnerability being
	// described.
	RelatedVulnerabilities []string

	noSmithyDocumentSerde
}

type noSmithyDocumentSerde = smithydocument.NoSerde

// UnknownUnionMember is returned when a union member is returned over the wire,
// but has an unknown tag.
type UnknownUnionMember struct {
	Tag   string
	Value []byte

	noSmithyDocumentSerde
}

func (*UnknownUnionMember) isResourceId() {}