Skip to content

Commit ae03019

Browse files
Add SortBy parameter to ListSecrets
1 parent 2e98cee commit ae03019

File tree

6 files changed

+113
-1
lines changed

6 files changed

+113
-1
lines changed

generator/ServiceModels/secretsmanager/secretsmanager-2017-10-17.api.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,8 @@
823823
},
824824
"NextToken":{"shape":"NextTokenType"},
825825
"Filters":{"shape":"FiltersListType"},
826-
"SortOrder":{"shape":"SortOrderType"}
826+
"SortOrder":{"shape":"SortOrderType"},
827+
"SortBy":{"shape":"SortByType"}
827828
}
828829
},
829830
"ListSecretsResponse":{
@@ -1249,6 +1250,15 @@
12491250
"key":{"shape":"SecretVersionIdType"},
12501251
"value":{"shape":"SecretVersionStagesType"}
12511252
},
1253+
"SortByType":{
1254+
"type":"string",
1255+
"enum":[
1256+
"created-date",
1257+
"last-accessed-date",
1258+
"last-changed-date",
1259+
"name"
1260+
]
1261+
},
12521262
"SortOrderType":{
12531263
"type":"string",
12541264
"enum":[

generator/ServiceModels/secretsmanager/secretsmanager-2017-10-17.docs.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,12 @@
795795
"SecretListEntry$SecretVersionsToStages": "<p>A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> attached to each one. Staging labels are used to keep track of the different versions during the rotation process.</p> <note> <p>A version that does not have any <code>SecretVersionStage</code> is considered deprecated and subject to deletion. Such versions are not included in this list.</p> </note>"
796796
}
797797
},
798+
"SortByType": {
799+
"base": null,
800+
"refs": {
801+
"ListSecretsRequest$SortBy": "<p>If not specified, secrets are listed by <code>CreatedDate</code>.</p>"
802+
}
803+
},
798804
"SortOrderType": {
799805
"base": null,
800806
"refs": {

generator/ServiceModels/secretsmanager/secretsmanager-2017-10-17.normal.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,10 @@
11071107
"SortOrder":{
11081108
"shape":"SortOrderType",
11091109
"documentation":"<p>Secrets are listed by <code>CreatedDate</code>. </p>"
1110+
},
1111+
"SortBy":{
1112+
"shape":"SortByType",
1113+
"documentation":"<p>If not specified, secrets are listed by <code>CreatedDate</code>.</p>"
11101114
}
11111115
}
11121116
},
@@ -1759,6 +1763,15 @@
17591763
"key":{"shape":"SecretVersionIdType"},
17601764
"value":{"shape":"SecretVersionStagesType"}
17611765
},
1766+
"SortByType":{
1767+
"type":"string",
1768+
"enum":[
1769+
"created-date",
1770+
"last-accessed-date",
1771+
"last-changed-date",
1772+
"name"
1773+
]
1774+
},
17621775
"SortOrderType":{
17631776
"type":"string",
17641777
"enum":[

sdk/src/Services/SecretsManager/Generated/Model/Internal/MarshallTransformations/ListSecretsRequestMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ public IRequest Marshall(ListSecretsRequest publicRequest)
109109
context.Writer.WriteStringValue(publicRequest.NextToken);
110110
}
111111

112+
if(publicRequest.IsSetSortBy())
113+
{
114+
context.Writer.WritePropertyName("SortBy");
115+
context.Writer.WriteStringValue(publicRequest.SortBy);
116+
}
117+
112118
if(publicRequest.IsSetSortOrder())
113119
{
114120
context.Writer.WritePropertyName("SortOrder");

sdk/src/Services/SecretsManager/Generated/Model/ListSecretsRequest.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public partial class ListSecretsRequest : AmazonSecretsManagerRequest
7575
private bool? _includePlannedDeletion;
7676
private int? _maxResults;
7777
private string _nextToken;
78+
private SortByType _sortBy;
7879
private SortOrderType _sortOrder;
7980

8081
/// <summary>
@@ -165,6 +166,24 @@ internal bool IsSetNextToken()
165166
return this._nextToken != null;
166167
}
167168

169+
/// <summary>
170+
/// Gets and sets the property SortBy.
171+
/// <para>
172+
/// If not specified, secrets are listed by <c>CreatedDate</c>.
173+
/// </para>
174+
/// </summary>
175+
public SortByType SortBy
176+
{
177+
get { return this._sortBy; }
178+
set { this._sortBy = value; }
179+
}
180+
181+
// Check to see if SortBy property is set
182+
internal bool IsSetSortBy()
183+
{
184+
return this._sortBy != null;
185+
}
186+
168187
/// <summary>
169188
/// Gets and sets the property SortOrder.
170189
/// <para>

sdk/src/Services/SecretsManager/Generated/ServiceEnumerations.cs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,64 @@ public static implicit operator FilterNameStringType(string value)
9494
}
9595

9696

97+
/// <summary>
98+
/// Constants used for properties of type SortByType.
99+
/// </summary>
100+
public class SortByType : ConstantClass
101+
{
102+
103+
/// <summary>
104+
/// Constant CreatedDate for SortByType
105+
/// </summary>
106+
public static readonly SortByType CreatedDate = new SortByType("created-date");
107+
/// <summary>
108+
/// Constant LastAccessedDate for SortByType
109+
/// </summary>
110+
public static readonly SortByType LastAccessedDate = new SortByType("last-accessed-date");
111+
/// <summary>
112+
/// Constant LastChangedDate for SortByType
113+
/// </summary>
114+
public static readonly SortByType LastChangedDate = new SortByType("last-changed-date");
115+
/// <summary>
116+
/// Constant Name for SortByType
117+
/// </summary>
118+
public static readonly SortByType Name = new SortByType("name");
119+
120+
/// <summary>
121+
/// This constant constructor does not need to be called if the constant
122+
/// you are attempting to use is already defined as a static instance of
123+
/// this class.
124+
/// This constructor should be used to construct constants that are not
125+
/// defined as statics, for instance if attempting to use a feature that is
126+
/// newer than the current version of the SDK.
127+
/// </summary>
128+
public SortByType(string value)
129+
: base(value)
130+
{
131+
}
132+
133+
/// <summary>
134+
/// Finds the constant for the unique value.
135+
/// </summary>
136+
/// <param name="value">The unique value for the constant</param>
137+
/// <returns>The constant for the unique value</returns>
138+
public static SortByType FindValue(string value)
139+
{
140+
return FindValue<SortByType>(value);
141+
}
142+
143+
/// <summary>
144+
/// Utility method to convert strings to the constant class.
145+
/// </summary>
146+
/// <param name="value">The string value to convert to the constant class.</param>
147+
/// <returns></returns>
148+
public static implicit operator SortByType(string value)
149+
{
150+
return FindValue(value);
151+
}
152+
}
153+
154+
97155
/// <summary>
98156
/// Constants used for properties of type SortOrderType.
99157
/// </summary>

0 commit comments

Comments
 (0)