Skip to content

Commit 29a91ef

Browse files
committed
feat(IAM Identity): add filter parameter for search api
Signed-off-by: Somanath Chavan <somanath.chavan@ibm.com>
1 parent 5d63873 commit 29a91ef

File tree

12 files changed

+262
-6
lines changed

12 files changed

+262
-6
lines changed

modules/iam-identity/src/main/java/com/ibm/cloud/platform_services/iam_identity/v1/IamIdentity.java

+31-3
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ public ServiceCall<ApiKeyList> listApiKeys(ListApiKeysOptions listApiKeysOptions
234234
if (listApiKeysOptions.includeHistory() != null) {
235235
builder.query("include_history", String.valueOf(listApiKeysOptions.includeHistory()));
236236
}
237+
if (listApiKeysOptions.filter() != null) {
238+
builder.query("filter", String.valueOf(listApiKeysOptions.filter()));
239+
}
237240
ResponseConverter<ApiKeyList> responseConverter =
238241
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ApiKeyList>() { }.getType());
239242
return createServiceCall(builder.build(), responseConverter);
@@ -573,6 +576,9 @@ public ServiceCall<ServiceIdList> listServiceIds(ListServiceIdsOptions listServi
573576
if (listServiceIdsOptions.includeHistory() != null) {
574577
builder.query("include_history", String.valueOf(listServiceIdsOptions.includeHistory()));
575578
}
579+
if (listServiceIdsOptions.filter() != null) {
580+
builder.query("filter", String.valueOf(listServiceIdsOptions.filter()));
581+
}
576582
ResponseConverter<ServiceIdList> responseConverter =
577583
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ServiceIdList>() { }.getType());
578584
return createServiceCall(builder.build(), responseConverter);
@@ -839,6 +845,9 @@ public ServiceCall<TrustedProfilesList> listProfiles(ListProfilesOptions listPro
839845
if (listProfilesOptions.pagetoken() != null) {
840846
builder.query("pagetoken", String.valueOf(listProfilesOptions.pagetoken()));
841847
}
848+
if (listProfilesOptions.filter() != null) {
849+
builder.query("filter", String.valueOf(listProfilesOptions.filter()));
850+
}
842851
ResponseConverter<TrustedProfilesList> responseConverter =
843852
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<TrustedProfilesList>() { }.getType());
844853
return createServiceCall(builder.build(), responseConverter);
@@ -1251,7 +1260,9 @@ public ServiceCall<ProfileIdentitiesResponse> setProfileIdentities(SetProfileIde
12511260
/**
12521261
* Add a specific identity that can assume the trusted profile.
12531262
*
1254-
* Add a specific identity that can assume the trusted profile.
1263+
* Add a specific identity that can assume the trusted profile. This API will update the trusted profile itself, thus
1264+
* calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call
1265+
* this API only once in a few seconds for the same trusted profile.
12551266
*
12561267
* @param setProfileIdentityOptions the {@link SetProfileIdentityOptions} containing the options for the call
12571268
* @return a {@link ServiceCall} with a result of type {@link ProfileIdentityResponse}
@@ -1310,7 +1321,7 @@ public ServiceCall<ProfileIdentityResponse> getProfileIdentity(GetProfileIdentit
13101321
}
13111322

13121323
/**
1313-
* Delete the identity that can assume the trusted profile.
1324+
* Delete the identity that can assume the trusted profile. This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
13141325
*
13151326
* Delete the identity that can assume the trusted profile.
13161327
*
@@ -2101,7 +2112,24 @@ public ServiceCall<EffectiveAccountSettingsResponse> getEffectiveAccountSettings
21012112
/**
21022113
* Update Identity Preference on scope account.
21032114
*
2104-
* Update one Identity Preference on scope 'account'.
2115+
* Update one Identity Preference on scope 'account'. supported preferences:
2116+
* The following preferences are storing values for identities inside an account,
2117+
* i.e. for each account that an identity is member of, the value stored might be different.
2118+
* This means, users who might be member of multiple accounts can have multiple preferences, one per account.
2119+
* Identities like Service Ids or Trusted Profiles can only exist in one account,
2120+
* therefore they can only have one preference inside their related account.
2121+
* preference: console/landing_page
2122+
* service: console
2123+
* preferenceId: landing_page
2124+
* supportedIdentityType: Trusted Profiles, Users
2125+
* type: string
2126+
* validation: valid URL (without host part), e.g. /billing or /iam
2127+
* preference: console/global_left_navigation
2128+
* service: console
2129+
* preferenceId: global_left_navigation
2130+
* supportedIdentityType: Trusted Profiles, Users
2131+
* type: list of strings
2132+
* validation: each entry in the list of strings must match the identifier of one navigation entry in the console.
21052133
*
21062134
* @param updatePreferenceOnScopeAccountOptions the {@link UpdatePreferenceOnScopeAccountOptions} containing the options for the call
21072135
* @return a {@link ServiceCall} with a result of type {@link IdentityPreferenceResponse}

modules/iam-identity/src/main/java/com/ibm/cloud/platform_services/iam_identity/v1/model/ApiKey.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ public String getName() {
169169
/**
170170
* Gets the supportSessions.
171171
*
172-
* Defines if the API key supports sessions. Sessions are only supported for user apikeys.
172+
* Defines whether you can manage CLI login sessions for the API key. When `true`, sessions are created and can be
173+
* reviewed or revoked. When `false`, no sessions are tracked. To block access, delete or rotate the API key.
174+
* Available only for user API keys.
173175
*
174176
* @return the supportSessions
175177
*/

modules/iam-identity/src/main/java/com/ibm/cloud/platform_services/iam_identity/v1/model/CreateApiKeyOptions.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,9 @@ public Boolean storeValue() {
306306
/**
307307
* Gets the supportSessions.
308308
*
309-
* Defines if the API key supports sessions. Sessions are only supported for user apikeys.
309+
* Defines whether you can manage CLI login sessions for the API key. When `true`, sessions are created and can be
310+
* reviewed or revoked. When `false`, no sessions are tracked. To block access, delete or rotate the API key.
311+
* Available only for user API keys.
310312
*
311313
* @return the supportSessions
312314
*/

modules/iam-identity/src/main/java/com/ibm/cloud/platform_services/iam_identity/v1/model/ListApiKeysOptions.java

+27
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public interface Order {
5959
protected String sort;
6060
protected String order;
6161
protected Boolean includeHistory;
62+
protected String filter;
6263

6364
/**
6465
* Builder.
@@ -73,6 +74,7 @@ public static class Builder {
7374
private String sort;
7475
private String order;
7576
private Boolean includeHistory;
77+
private String filter;
7678

7779
/**
7880
* Instantiates a new Builder from an existing ListApiKeysOptions instance.
@@ -89,6 +91,7 @@ private Builder(ListApiKeysOptions listApiKeysOptions) {
8991
this.sort = listApiKeysOptions.sort;
9092
this.order = listApiKeysOptions.order;
9193
this.includeHistory = listApiKeysOptions.includeHistory;
94+
this.filter = listApiKeysOptions.filter;
9295
}
9396

9497
/**
@@ -204,6 +207,17 @@ public Builder includeHistory(Boolean includeHistory) {
204207
this.includeHistory = includeHistory;
205208
return this;
206209
}
210+
211+
/**
212+
* Set the filter.
213+
*
214+
* @param filter the filter
215+
* @return the ListApiKeysOptions builder
216+
*/
217+
public Builder filter(String filter) {
218+
this.filter = filter;
219+
return this;
220+
}
207221
}
208222

209223
protected ListApiKeysOptions() { }
@@ -218,6 +232,7 @@ protected ListApiKeysOptions(Builder builder) {
218232
sort = builder.sort;
219233
order = builder.order;
220234
includeHistory = builder.includeHistory;
235+
filter = builder.filter;
221236
}
222237

223238
/**
@@ -331,5 +346,17 @@ public String order() {
331346
public Boolean includeHistory() {
332347
return includeHistory;
333348
}
349+
350+
/**
351+
* Gets the filter.
352+
*
353+
* An optional filter query parameter used to refine the results of the search operation. For more information see
354+
* [Filtering list results](#filter-list-results) section.
355+
*
356+
* @return the filter
357+
*/
358+
public String filter() {
359+
return filter;
360+
}
334361
}
335362

modules/iam-identity/src/main/java/com/ibm/cloud/platform_services/iam_identity/v1/model/ListProfilesOptions.java

+27
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public interface Order {
3737
protected String order;
3838
protected Boolean includeHistory;
3939
protected String pagetoken;
40+
protected String filter;
4041

4142
/**
4243
* Builder.
@@ -49,6 +50,7 @@ public static class Builder {
4950
private String order;
5051
private Boolean includeHistory;
5152
private String pagetoken;
53+
private String filter;
5254

5355
/**
5456
* Instantiates a new Builder from an existing ListProfilesOptions instance.
@@ -63,6 +65,7 @@ private Builder(ListProfilesOptions listProfilesOptions) {
6365
this.order = listProfilesOptions.order;
6466
this.includeHistory = listProfilesOptions.includeHistory;
6567
this.pagetoken = listProfilesOptions.pagetoken;
68+
this.filter = listProfilesOptions.filter;
6669
}
6770

6871
/**
@@ -165,6 +168,17 @@ public Builder pagetoken(String pagetoken) {
165168
this.pagetoken = pagetoken;
166169
return this;
167170
}
171+
172+
/**
173+
* Set the filter.
174+
*
175+
* @param filter the filter
176+
* @return the ListProfilesOptions builder
177+
*/
178+
public Builder filter(String filter) {
179+
this.filter = filter;
180+
return this;
181+
}
168182
}
169183

170184
protected ListProfilesOptions() { }
@@ -179,6 +193,7 @@ protected ListProfilesOptions(Builder builder) {
179193
order = builder.order;
180194
includeHistory = builder.includeHistory;
181195
pagetoken = builder.pagetoken;
196+
filter = builder.filter;
182197
}
183198

184199
/**
@@ -267,5 +282,17 @@ public Boolean includeHistory() {
267282
public String pagetoken() {
268283
return pagetoken;
269284
}
285+
286+
/**
287+
* Gets the filter.
288+
*
289+
* An optional filter query parameter used to refine the results of the search operation. For more information see
290+
* [Filtering list results](#filter-list-results) section.
291+
*
292+
* @return the filter
293+
*/
294+
public String filter() {
295+
return filter;
296+
}
270297
}
271298

modules/iam-identity/src/main/java/com/ibm/cloud/platform_services/iam_identity/v1/model/ListServiceIdsOptions.java

+27
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public interface Order {
3737
protected String sort;
3838
protected String order;
3939
protected Boolean includeHistory;
40+
protected String filter;
4041

4142
/**
4243
* Builder.
@@ -49,6 +50,7 @@ public static class Builder {
4950
private String sort;
5051
private String order;
5152
private Boolean includeHistory;
53+
private String filter;
5254

5355
/**
5456
* Instantiates a new Builder from an existing ListServiceIdsOptions instance.
@@ -63,6 +65,7 @@ private Builder(ListServiceIdsOptions listServiceIdsOptions) {
6365
this.sort = listServiceIdsOptions.sort;
6466
this.order = listServiceIdsOptions.order;
6567
this.includeHistory = listServiceIdsOptions.includeHistory;
68+
this.filter = listServiceIdsOptions.filter;
6669
}
6770

6871
/**
@@ -156,6 +159,17 @@ public Builder includeHistory(Boolean includeHistory) {
156159
this.includeHistory = includeHistory;
157160
return this;
158161
}
162+
163+
/**
164+
* Set the filter.
165+
*
166+
* @param filter the filter
167+
* @return the ListServiceIdsOptions builder
168+
*/
169+
public Builder filter(String filter) {
170+
this.filter = filter;
171+
return this;
172+
}
159173
}
160174

161175
protected ListServiceIdsOptions() { }
@@ -168,6 +182,7 @@ protected ListServiceIdsOptions(Builder builder) {
168182
sort = builder.sort;
169183
order = builder.order;
170184
includeHistory = builder.includeHistory;
185+
filter = builder.filter;
171186
}
172187

173188
/**
@@ -256,5 +271,17 @@ public String order() {
256271
public Boolean includeHistory() {
257272
return includeHistory;
258273
}
274+
275+
/**
276+
* Gets the filter.
277+
*
278+
* An optional filter query parameter used to refine the results of the search operation. For more information see
279+
* [Filtering list results](#filter-list-results) section.
280+
*
281+
* @return the filter
282+
*/
283+
public String filter() {
284+
return filter;
285+
}
259286
}
260287

modules/iam-identity/src/main/java/com/ibm/cloud/platform_services/iam_identity/v1/model/UpdateApiKeyOptions.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ public String description() {
220220
/**
221221
* Gets the supportSessions.
222222
*
223-
* Defines if the API key supports sessions. Sessions are only supported for user apikeys.
223+
* Defines whether you can manage CLI login sessions for the API key. When `true`, sessions are created and can be
224+
* reviewed or revoked. When `false`, no sessions are tracked. To block access, delete or rotate the API key.
225+
* Available only for user API keys.
224226
*
225227
* @return the supportSessions
226228
*/

0 commit comments

Comments
 (0)