Skip to content

Commit

Permalink
Adds support for child enabled baselines which allow you to see the e…
Browse files Browse the repository at this point in the history
…nabled baseline status for individual accounts.
  • Loading branch information
aws-sdk-dotnet-automation committed Nov 20, 2024
1 parent a4c8ca5 commit 3df920a
Show file tree
Hide file tree
Showing 12 changed files with 180 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,10 @@
"type":"list",
"member":{"shape":"BaselineSummary"}
},
"Boolean":{
"type":"boolean",
"box":true
},
"ConflictException":{
"type":"structure",
"required":["message"],
Expand Down Expand Up @@ -831,6 +835,7 @@
"baselineIdentifier":{"shape":"String"},
"baselineVersion":{"shape":"String"},
"parameters":{"shape":"EnabledBaselineParameterSummaries"},
"parentIdentifier":{"shape":"Arn"},
"statusSummary":{"shape":"EnablementStatusSummary"},
"targetIdentifier":{"shape":"String"}
}
Expand All @@ -839,6 +844,7 @@
"type":"structure",
"members":{
"baselineIdentifiers":{"shape":"EnabledBaselineBaselineIdentifiers"},
"parentIdentifiers":{"shape":"EnabledBaselineParentIdentifiers"},
"targetIdentifiers":{"shape":"EnabledBaselineTargetIdentifiers"}
}
},
Expand Down Expand Up @@ -878,6 +884,12 @@
"type":"list",
"member":{"shape":"EnabledBaselineParameter"}
},
"EnabledBaselineParentIdentifiers":{
"type":"list",
"member":{"shape":"Arn"},
"max":5,
"min":1
},
"EnabledBaselineSummary":{
"type":"structure",
"required":[
Expand All @@ -890,6 +902,7 @@
"arn":{"shape":"Arn"},
"baselineIdentifier":{"shape":"String"},
"baselineVersion":{"shape":"String"},
"parentIdentifier":{"shape":"Arn"},
"statusSummary":{"shape":"EnablementStatusSummary"},
"targetIdentifier":{"shape":"String"}
}
Expand Down Expand Up @@ -1270,6 +1283,7 @@
"type":"structure",
"members":{
"filter":{"shape":"EnabledBaselineFilter"},
"includeChildren":{"shape":"Boolean"},
"maxResults":{"shape":"ListEnabledBaselinesMaxResults"},
"nextToken":{"shape":"ListEnabledBaselinesNextToken"}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@
"EnableControlOutput$arn": "<p>The ARN of the <code>EnabledControl</code> resource.</p>",
"EnabledBaselineBaselineIdentifiers$member": null,
"EnabledBaselineDetails$arn": "<p>The ARN of the <code>EnabledBaseline</code> resource.</p>",
"EnabledBaselineDetails$parentIdentifier": "<p>An ARN that represents the parent <code>EnabledBaseline</code> at the Organizational Unit (OU) level, from which the child <code>EnabledBaseline</code> inherits its configuration. The value is returned by <code>GetEnabledBaseline</code>.</p>",
"EnabledBaselineParentIdentifiers$member": null,
"EnabledBaselineSummary$arn": "<p>The ARN of the <code>EnabledBaseline</code> resource</p>",
"EnabledBaselineSummary$parentIdentifier": "<p>An ARN that represents an object returned by <code>ListEnabledBaseline</code>, to describe an enabled baseline.</p>",
"EnabledBaselineTargetIdentifiers$member": null,
"EnabledControlDetails$arn": "<p>The ARN of the enabled control.</p>",
"EnabledControlIdentifiers$member": null,
Expand Down Expand Up @@ -112,6 +115,12 @@
"ListBaselinesOutput$baselines": "<p>A list of <code>Baseline</code> object details.</p>"
}
},
"Boolean": {
"base": null,
"refs": {
"ListEnabledBaselinesInput$includeChildren": "<p>A value that can be set to include the child enabled baselines in responses. The default value is false.</p>"
}
},
"ConflictException": {
"base": "<p>Updating or deleting the resource can cause an inconsistent state.</p>",
"refs": {
Expand Down Expand Up @@ -325,6 +334,12 @@
"UpdateEnabledBaselineInput$parameters": "<p>Parameters to apply when making an update.</p>"
}
},
"EnabledBaselineParentIdentifiers": {
"base": null,
"refs": {
"EnabledBaselineFilter$parentIdentifiers": "<p>An optional filter that sets up a list of <code>parentIdentifiers</code> to filter the results of the <code>ListEnabledBaseline</code> output.</p>"
}
},
"EnabledBaselineSummary": {
"base": "<p>Returns a summary of information about an <code>EnabledBaseline</code> object.</p>",
"refs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,10 @@
"type":"list",
"member":{"shape":"BaselineSummary"}
},
"Boolean":{
"type":"boolean",
"box":true
},
"ConflictException":{
"type":"structure",
"required":["message"],
Expand Down Expand Up @@ -1053,6 +1057,10 @@
"shape":"EnabledBaselineParameterSummaries",
"documentation":"<p>Shows the parameters that are applied when enabling this <code>Baseline</code>.</p>"
},
"parentIdentifier":{
"shape":"Arn",
"documentation":"<p>An ARN that represents the parent <code>EnabledBaseline</code> at the Organizational Unit (OU) level, from which the child <code>EnabledBaseline</code> inherits its configuration. The value is returned by <code>GetEnabledBaseline</code>.</p>"
},
"statusSummary":{"shape":"EnablementStatusSummary"},
"targetIdentifier":{
"shape":"String",
Expand All @@ -1068,6 +1076,10 @@
"shape":"EnabledBaselineBaselineIdentifiers",
"documentation":"<p>Identifiers for the <code>Baseline</code> objects returned as part of the filter operation.</p>"
},
"parentIdentifiers":{
"shape":"EnabledBaselineParentIdentifiers",
"documentation":"<p>An optional filter that sets up a list of <code>parentIdentifiers</code> to filter the results of the <code>ListEnabledBaseline</code> output.</p>"
},
"targetIdentifiers":{
"shape":"EnabledBaselineTargetIdentifiers",
"documentation":"<p>Identifiers for the targets of the <code>Baseline</code> filter operation.</p>"
Expand Down Expand Up @@ -1125,6 +1137,12 @@
"type":"list",
"member":{"shape":"EnabledBaselineParameter"}
},
"EnabledBaselineParentIdentifiers":{
"type":"list",
"member":{"shape":"Arn"},
"max":5,
"min":1
},
"EnabledBaselineSummary":{
"type":"structure",
"required":[
Expand All @@ -1146,6 +1164,10 @@
"shape":"String",
"documentation":"<p>The enabled version of the baseline.</p>"
},
"parentIdentifier":{
"shape":"Arn",
"documentation":"<p>An ARN that represents an object returned by <code>ListEnabledBaseline</code>, to describe an enabled baseline.</p>"
},
"statusSummary":{"shape":"EnablementStatusSummary"},
"targetIdentifier":{
"shape":"String",
Expand Down Expand Up @@ -1741,6 +1763,10 @@
"shape":"EnabledBaselineFilter",
"documentation":"<p>A filter applied on the <code>ListEnabledBaseline</code> operation. Allowed filters are <code>baselineIdentifiers</code> and <code>targetIdentifiers</code>. The filter can be applied for either, or both.</p>"
},
"includeChildren":{
"shape":"Boolean",
"documentation":"<p>A value that can be set to include the child enabled baselines in responses. The default value is false.</p>"
},
"maxResults":{
"shape":"ListEnabledBaselinesMaxResults",
"documentation":"<p>The maximum number of results to be shown.</p>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,24 @@
<max>2048</max>
<pattern>^arn:aws[0-9a-zA-Z_\-:\/]+$</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.ControlTower.Model.EnabledBaselineDetails.ParentIdentifier</property>
<min>20</min>
<max>2048</max>
<pattern>^arn:aws[0-9a-zA-Z_\-:\/]+$</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.ControlTower.Model.EnabledBaselineSummary.Arn</property>
<min>20</min>
<max>2048</max>
<pattern>^arn:aws[0-9a-zA-Z_\-:\/]+$</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.ControlTower.Model.EnabledBaselineSummary.ParentIdentifier</property>
<min>20</min>
<max>2048</max>
<pattern>^arn:aws[0-9a-zA-Z_\-:\/]+$</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.ControlTower.Model.EnabledControlDetails.Arn</property>
<min>20</min>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public partial class EnabledBaselineDetails
private string _baselineIdentifier;
private string _baselineVersion;
private List<EnabledBaselineParameterSummary> _parameters = AWSConfigs.InitializeCollections ? new List<EnabledBaselineParameterSummary>() : null;
private string _parentIdentifier;
private EnablementStatusSummary _statusSummary;
private string _targetIdentifier;

Expand Down Expand Up @@ -115,6 +116,27 @@ internal bool IsSetParameters()
return this._parameters != null && (this._parameters.Count > 0 || !AWSConfigs.InitializeCollections);
}

/// <summary>
/// Gets and sets the property ParentIdentifier.
/// <para>
/// An ARN that represents the parent <c>EnabledBaseline</c> at the Organizational Unit
/// (OU) level, from which the child <c>EnabledBaseline</c> inherits its configuration.
/// The value is returned by <c>GetEnabledBaseline</c>.
/// </para>
/// </summary>
[AWSProperty(Min=20, Max=2048)]
public string ParentIdentifier
{
get { return this._parentIdentifier; }
set { this._parentIdentifier = value; }
}

// Check to see if ParentIdentifier property is set
internal bool IsSetParentIdentifier()
{
return this._parentIdentifier != null;
}

/// <summary>
/// Gets and sets the property StatusSummary.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace Amazon.ControlTower.Model
public partial class EnabledBaselineFilter
{
private List<string> _baselineIdentifiers = AWSConfigs.InitializeCollections ? new List<string>() : null;
private List<string> _parentIdentifiers = AWSConfigs.InitializeCollections ? new List<string>() : null;
private List<string> _targetIdentifiers = AWSConfigs.InitializeCollections ? new List<string>() : null;

/// <summary>
Expand All @@ -58,6 +59,26 @@ internal bool IsSetBaselineIdentifiers()
return this._baselineIdentifiers != null && (this._baselineIdentifiers.Count > 0 || !AWSConfigs.InitializeCollections);
}

/// <summary>
/// Gets and sets the property ParentIdentifiers.
/// <para>
/// An optional filter that sets up a list of <c>parentIdentifiers</c> to filter the results
/// of the <c>ListEnabledBaseline</c> output.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=5)]
public List<string> ParentIdentifiers
{
get { return this._parentIdentifiers; }
set { this._parentIdentifiers = value; }
}

// Check to see if ParentIdentifiers property is set
internal bool IsSetParentIdentifiers()
{
return this._parentIdentifiers != null && (this._parentIdentifiers.Count > 0 || !AWSConfigs.InitializeCollections);
}

/// <summary>
/// Gets and sets the property TargetIdentifiers.
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public partial class EnabledBaselineSummary
private string _arn;
private string _baselineIdentifier;
private string _baselineVersion;
private string _parentIdentifier;
private EnablementStatusSummary _statusSummary;
private string _targetIdentifier;

Expand Down Expand Up @@ -96,6 +97,26 @@ internal bool IsSetBaselineVersion()
return this._baselineVersion != null;
}

/// <summary>
/// Gets and sets the property ParentIdentifier.
/// <para>
/// An ARN that represents an object returned by <c>ListEnabledBaseline</c>, to describe
/// an enabled baseline.
/// </para>
/// </summary>
[AWSProperty(Min=20, Max=2048)]
public string ParentIdentifier
{
get { return this._parentIdentifier; }
set { this._parentIdentifier = value; }
}

// Check to see if ParentIdentifier property is set
internal bool IsSetParentIdentifier()
{
return this._parentIdentifier != null;
}

/// <summary>
/// Gets and sets the property StatusSummary.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ public EnabledBaselineDetails Unmarshall(JsonUnmarshallerContext context)
unmarshalledObject.Parameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("parentIdentifier", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ParentIdentifier = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("statusSummary", targetDepth))
{
var unmarshaller = EnablementStatusSummaryUnmarshaller.Instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ public void Marshall(EnabledBaselineFilter requestObject, JsonMarshallerContext
context.Writer.WriteArrayEnd();
}

if(requestObject.IsSetParentIdentifiers())
{
context.Writer.WritePropertyName("parentIdentifiers");
context.Writer.WriteArrayStart();
foreach(var requestObjectParentIdentifiersListValue in requestObject.ParentIdentifiers)
{
context.Writer.Write(requestObjectParentIdentifiersListValue);
}
context.Writer.WriteArrayEnd();
}

if(requestObject.IsSetTargetIdentifiers())
{
context.Writer.WritePropertyName("targetIdentifiers");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public EnabledBaselineSummary Unmarshall(JsonUnmarshallerContext context)
unmarshalledObject.BaselineVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("parentIdentifier", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ParentIdentifier = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("statusSummary", targetDepth))
{
var unmarshaller = EnablementStatusSummaryUnmarshaller.Instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ public IRequest Marshall(ListEnabledBaselinesRequest publicRequest)
context.Writer.WriteObjectEnd();
}

if(publicRequest.IsSetIncludeChildren())
{
context.Writer.WritePropertyName("includeChildren");
context.Writer.Write(publicRequest.IncludeChildren);
}

if(publicRequest.IsSetMaxResults())
{
context.Writer.WritePropertyName("maxResults");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace Amazon.ControlTower.Model
public partial class ListEnabledBaselinesRequest : AmazonControlTowerRequest
{
private EnabledBaselineFilter _filter;
private bool? _includeChildren;
private int? _maxResults;
private string _nextToken;

Expand All @@ -62,6 +63,25 @@ internal bool IsSetFilter()
return this._filter != null;
}

/// <summary>
/// Gets and sets the property IncludeChildren.
/// <para>
/// A value that can be set to include the child enabled baselines in responses. The default
/// value is false.
/// </para>
/// </summary>
public bool IncludeChildren
{
get { return this._includeChildren.GetValueOrDefault(); }
set { this._includeChildren = value; }
}

// Check to see if IncludeChildren property is set
internal bool IsSetIncludeChildren()
{
return this._includeChildren.HasValue;
}

/// <summary>
/// Gets and sets the property MaxResults.
/// <para>
Expand Down

0 comments on commit 3df920a

Please sign in to comment.