Skip to content

Commit 94721d0

Browse files
Add Code Repository Scanning as part of AWS InspectorV2
1 parent ae520b9 commit 94721d0

File tree

150 files changed

+23077
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+23077
-333
lines changed

generator/ServiceModels/inspector2/inspector2-2020-06-08.api.json

Lines changed: 1107 additions & 14 deletions
Large diffs are not rendered by default.

generator/ServiceModels/inspector2/inspector2-2020-06-08.docs.json

Lines changed: 705 additions & 9 deletions
Large diffs are not rendered by default.

generator/ServiceModels/inspector2/inspector2-2020-06-08.normal.json

Lines changed: 1627 additions & 35 deletions
Large diffs are not rendered by default.

sdk/code-analysis/ServiceAnalysis/Inspector2/Generated/PropertyValueRules.xml

Lines changed: 265 additions & 4 deletions
Large diffs are not rendered by default.

sdk/src/Services/Inspector2/Generated/Model/AccessDeniedException.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ namespace Amazon.Inspector2.Model
3131
{
3232
/// <summary>
3333
/// You do not have sufficient access to perform this action.
34+
///
35+
///
36+
/// <para>
37+
/// For <c>Enable</c>, you receive this error if you attempt to use a feature in an unsupported
38+
/// Amazon Web Services Region.
39+
/// </para>
3440
/// </summary>
3541
#if !NETSTANDARD
3642
[Serializable]

sdk/src/Services/Inspector2/Generated/Model/AggregationRequest.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class AggregationRequest
3737
private AccountAggregation _accountAggregation;
3838
private AmiAggregation _amiAggregation;
3939
private AwsEcrContainerAggregation _awsEcrContainerAggregation;
40+
private CodeRepositoryAggregation _codeRepositoryAggregation;
4041
private Ec2InstanceAggregation _ec2InstanceAggregation;
4142
private FindingTypeAggregation _findingTypeAggregation;
4243
private ImageLayerAggregation _imageLayerAggregation;
@@ -103,6 +104,24 @@ internal bool IsSetAwsEcrContainerAggregation()
103104
return this._awsEcrContainerAggregation != null;
104105
}
105106

107+
/// <summary>
108+
/// Gets and sets the property CodeRepositoryAggregation.
109+
/// <para>
110+
/// An object that contains details about an aggregation request based on code repositories.
111+
/// </para>
112+
/// </summary>
113+
public CodeRepositoryAggregation CodeRepositoryAggregation
114+
{
115+
get { return this._codeRepositoryAggregation; }
116+
set { this._codeRepositoryAggregation = value; }
117+
}
118+
119+
// Check to see if CodeRepositoryAggregation property is set
120+
internal bool IsSetCodeRepositoryAggregation()
121+
{
122+
return this._codeRepositoryAggregation != null;
123+
}
124+
106125
/// <summary>
107126
/// Gets and sets the property Ec2InstanceAggregation.
108127
/// <para>

sdk/src/Services/Inspector2/Generated/Model/AggregationResponse.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class AggregationResponse
3737
private AccountAggregationResponse _accountAggregation;
3838
private AmiAggregationResponse _amiAggregation;
3939
private AwsEcrContainerAggregationResponse _awsEcrContainerAggregation;
40+
private CodeRepositoryAggregationResponse _codeRepositoryAggregation;
4041
private Ec2InstanceAggregationResponse _ec2InstanceAggregation;
4142
private FindingTypeAggregationResponse _findingTypeAggregation;
4243
private ImageLayerAggregationResponse _imageLayerAggregation;
@@ -103,6 +104,24 @@ internal bool IsSetAwsEcrContainerAggregation()
103104
return this._awsEcrContainerAggregation != null;
104105
}
105106

107+
/// <summary>
108+
/// Gets and sets the property CodeRepositoryAggregation.
109+
/// <para>
110+
/// An object that contains details about an aggregation response based on code repositories.
111+
/// </para>
112+
/// </summary>
113+
public CodeRepositoryAggregationResponse CodeRepositoryAggregation
114+
{
115+
get { return this._codeRepositoryAggregation; }
116+
set { this._codeRepositoryAggregation = value; }
117+
}
118+
119+
// Check to see if CodeRepositoryAggregation property is set
120+
internal bool IsSetCodeRepositoryAggregation()
121+
{
122+
return this._codeRepositoryAggregation != null;
123+
}
124+
106125
/// <summary>
107126
/// Gets and sets the property Ec2InstanceAggregation.
108127
/// <para>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the inspector2-2020-06-08.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.Inspector2.Model
31+
{
32+
/// <summary>
33+
/// Contains details about a request to associate a code repository with a scan configuration.
34+
/// </summary>
35+
public partial class AssociateConfigurationRequest
36+
{
37+
private CodeSecurityResource _resource;
38+
private string _scanConfigurationArn;
39+
40+
/// <summary>
41+
/// Gets and sets the property Resource.
42+
/// </summary>
43+
[AWSProperty(Required=true)]
44+
public CodeSecurityResource Resource
45+
{
46+
get { return this._resource; }
47+
set { this._resource = value; }
48+
}
49+
50+
// Check to see if Resource property is set
51+
internal bool IsSetResource()
52+
{
53+
return this._resource != null;
54+
}
55+
56+
/// <summary>
57+
/// Gets and sets the property ScanConfigurationArn.
58+
/// <para>
59+
/// The Amazon Resource Name (ARN) of the scan configuration.
60+
/// </para>
61+
/// </summary>
62+
[AWSProperty(Required=true)]
63+
public string ScanConfigurationArn
64+
{
65+
get { return this._scanConfigurationArn; }
66+
set { this._scanConfigurationArn = value; }
67+
}
68+
69+
// Check to see if ScanConfigurationArn property is set
70+
internal bool IsSetScanConfigurationArn()
71+
{
72+
return this._scanConfigurationArn != null;
73+
}
74+
75+
}
76+
}

sdk/src/Services/Inspector2/Generated/Model/AutoEnable.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,31 @@ namespace Amazon.Inspector2.Model
3535
/// </summary>
3636
public partial class AutoEnable
3737
{
38+
private bool? _codeRepository;
3839
private bool? _ec2;
3940
private bool? _ecr;
4041
private bool? _lambda;
4142
private bool? _lambdaCode;
4243

44+
/// <summary>
45+
/// Gets and sets the property CodeRepository.
46+
/// <para>
47+
/// Represents whether code repository scans are automatically enabled for new members
48+
/// of your Amazon Inspector organization.
49+
/// </para>
50+
/// </summary>
51+
public bool? CodeRepository
52+
{
53+
get { return this._codeRepository; }
54+
set { this._codeRepository = value; }
55+
}
56+
57+
// Check to see if CodeRepository property is set
58+
internal bool IsSetCodeRepository()
59+
{
60+
return this._codeRepository.HasValue;
61+
}
62+
4363
/// <summary>
4464
/// Gets and sets the property Ec2.
4565
/// <para>
@@ -103,7 +123,8 @@ internal bool IsSetLambda()
103123
/// Gets and sets the property LambdaCode.
104124
/// <para>
105125
/// Represents whether Lambda code scans are automatically enabled for new members of
106-
/// your Amazon Inspector organization. <pre><c> &lt;/p&gt; </c></pre>
126+
/// your Amazon Inspector organization.
127+
/// </para>
107128
/// </summary>
108129
public bool? LambdaCode
109130
{
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the inspector2-2020-06-08.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.Inspector2.Model
31+
{
32+
/// <summary>
33+
/// Container for the parameters to the BatchAssociateCodeSecurityScanConfiguration operation.
34+
/// Associates multiple code repositories with an Amazon Inspector code security scan
35+
/// configuration.
36+
/// </summary>
37+
public partial class BatchAssociateCodeSecurityScanConfigurationRequest : AmazonInspector2Request
38+
{
39+
private List<AssociateConfigurationRequest> _associateConfigurationRequests = AWSConfigs.InitializeCollections ? new List<AssociateConfigurationRequest>() : null;
40+
41+
/// <summary>
42+
/// Gets and sets the property AssociateConfigurationRequests.
43+
/// <para>
44+
/// A list of code repositories to associate with the specified scan configuration.
45+
/// </para>
46+
/// <para />
47+
/// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
48+
/// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
49+
/// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
50+
/// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
51+
/// </summary>
52+
[AWSProperty(Required=true, Min=1, Max=25)]
53+
public List<AssociateConfigurationRequest> AssociateConfigurationRequests
54+
{
55+
get { return this._associateConfigurationRequests; }
56+
set { this._associateConfigurationRequests = value; }
57+
}
58+
59+
// Check to see if AssociateConfigurationRequests property is set
60+
internal bool IsSetAssociateConfigurationRequests()
61+
{
62+
return this._associateConfigurationRequests != null && (this._associateConfigurationRequests.Count > 0 || !AWSConfigs.InitializeCollections);
63+
}
64+
65+
}
66+
}

0 commit comments

Comments
 (0)