Skip to content

Commit 2f922fd

Browse files
authored
feat(IAM Identity): add filter parameter for search api (#381)
Signed-off-by: Somanath Chavan <[email protected]>
1 parent 17141a3 commit 2f922fd

File tree

3 files changed

+82
-12
lines changed

3 files changed

+82
-12
lines changed

iamidentityv1/iam_identity_v1.go

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/*
18-
* IBM OpenAPI SDK Code Generator Version: 3.98.0-8be2046a-20241205-162752
18+
* IBM OpenAPI SDK Code Generator Version: 3.103.0-e8b84313-20250402-201816
1919
*/
2020

2121
// Package iamidentityv1 : Operations and models for the IamIdentityV1 service
@@ -234,6 +234,9 @@ func (iamIdentity *IamIdentityV1) ListAPIKeysWithContext(ctx context.Context, li
234234
if listAPIKeysOptions.IncludeHistory != nil {
235235
builder.AddQuery("include_history", fmt.Sprint(*listAPIKeysOptions.IncludeHistory))
236236
}
237+
if listAPIKeysOptions.Filter != nil {
238+
builder.AddQuery("filter", fmt.Sprint(*listAPIKeysOptions.Filter))
239+
}
237240

238241
request, err := builder.Build()
239242
if err != nil {
@@ -962,6 +965,9 @@ func (iamIdentity *IamIdentityV1) ListServiceIdsWithContext(ctx context.Context,
962965
if listServiceIdsOptions.IncludeHistory != nil {
963966
builder.AddQuery("include_history", fmt.Sprint(*listServiceIdsOptions.IncludeHistory))
964967
}
968+
if listServiceIdsOptions.Filter != nil {
969+
builder.AddQuery("filter", fmt.Sprint(*listServiceIdsOptions.Filter))
970+
}
965971

966972
request, err := builder.Build()
967973
if err != nil {
@@ -1575,6 +1581,9 @@ func (iamIdentity *IamIdentityV1) ListProfilesWithContext(ctx context.Context, l
15751581
if listProfilesOptions.Pagetoken != nil {
15761582
builder.AddQuery("pagetoken", fmt.Sprint(*listProfilesOptions.Pagetoken))
15771583
}
1584+
if listProfilesOptions.Filter != nil {
1585+
builder.AddQuery("filter", fmt.Sprint(*listProfilesOptions.Filter))
1586+
}
15781587

15791588
request, err := builder.Build()
15801589
if err != nil {
@@ -2661,7 +2670,9 @@ func (iamIdentity *IamIdentityV1) SetProfileIdentitiesWithContext(ctx context.Co
26612670
}
26622671

26632672
// SetProfileIdentity : Add a specific identity that can assume the trusted profile
2664-
// Add a specific identity that can assume the trusted profile.
2673+
// Add a specific identity that can assume the trusted profile. This API will update the trusted profile itself, thus
2674+
// calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this
2675+
// API only once in a few seconds for the same trusted profile.
26652676
func (iamIdentity *IamIdentityV1) SetProfileIdentity(setProfileIdentityOptions *SetProfileIdentityOptions) (result *ProfileIdentityResponse, response *core.DetailedResponse, err error) {
26662677
result, response, err = iamIdentity.SetProfileIdentityWithContext(context.Background(), setProfileIdentityOptions)
26672678
err = core.RepurposeSDKProblem(err, "")
@@ -2821,7 +2832,7 @@ func (iamIdentity *IamIdentityV1) GetProfileIdentityWithContext(ctx context.Cont
28212832
return
28222833
}
28232834

2824-
// DeleteProfileIdentity : Delete the identity that can assume the trusted profile
2835+
// DeleteProfileIdentity : 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
28252836
// Delete the identity that can assume the trusted profile.
28262837
func (iamIdentity *IamIdentityV1) DeleteProfileIdentity(deleteProfileIdentityOptions *DeleteProfileIdentityOptions) (response *core.DetailedResponse, err error) {
28272838
response, err = iamIdentity.DeleteProfileIdentityWithContext(context.Background(), deleteProfileIdentityOptions)
@@ -11073,6 +11084,10 @@ type ListAPIKeysOptions struct {
1107311084
// Defines if the entity history is included in the response.
1107411085
IncludeHistory *bool `json:"include_history,omitempty"`
1107511086

11087+
// An optional filter query parameter used to refine the results of the search operation. For more information see
11088+
// [Filtering list results](#filter-list-results) section.
11089+
Filter *string `json:"filter,omitempty"`
11090+
1107611091
// Allows users to set headers on API requests.
1107711092
Headers map[string]string
1107811093
}
@@ -11157,6 +11172,12 @@ func (_options *ListAPIKeysOptions) SetIncludeHistory(includeHistory bool) *List
1115711172
return _options
1115811173
}
1115911174

11175+
// SetFilter : Allow user to set Filter
11176+
func (_options *ListAPIKeysOptions) SetFilter(filter string) *ListAPIKeysOptions {
11177+
_options.Filter = core.StringPtr(filter)
11178+
return _options
11179+
}
11180+
1116011181
// SetHeaders : Allow user to set Headers
1116111182
func (options *ListAPIKeysOptions) SetHeaders(param map[string]string) *ListAPIKeysOptions {
1116211183
options.Headers = param
@@ -11329,6 +11350,10 @@ type ListProfilesOptions struct {
1132911350
// Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
1133011351
Pagetoken *string `json:"pagetoken,omitempty"`
1133111352

11353+
// An optional filter query parameter used to refine the results of the search operation. For more information see
11354+
// [Filtering list results](#filter-list-results) section.
11355+
Filter *string `json:"filter,omitempty"`
11356+
1133211357
// Allows users to set headers on API requests.
1133311358
Headers map[string]string
1133411359
}
@@ -11389,6 +11414,12 @@ func (_options *ListProfilesOptions) SetPagetoken(pagetoken string) *ListProfile
1138911414
return _options
1139011415
}
1139111416

11417+
// SetFilter : Allow user to set Filter
11418+
func (_options *ListProfilesOptions) SetFilter(filter string) *ListProfilesOptions {
11419+
_options.Filter = core.StringPtr(filter)
11420+
return _options
11421+
}
11422+
1139211423
// SetHeaders : Allow user to set Headers
1139311424
func (options *ListProfilesOptions) SetHeaders(param map[string]string) *ListProfilesOptions {
1139411425
options.Headers = param
@@ -11419,6 +11450,10 @@ type ListServiceIdsOptions struct {
1141911450
// Defines if the entity history is included in the response.
1142011451
IncludeHistory *bool `json:"include_history,omitempty"`
1142111452

11453+
// An optional filter query parameter used to refine the results of the search operation. For more information see
11454+
// [Filtering list results](#filter-list-results) section.
11455+
Filter *string `json:"filter,omitempty"`
11456+
1142211457
// Allows users to set headers on API requests.
1142311458
Headers map[string]string
1142411459
}
@@ -11477,6 +11512,12 @@ func (_options *ListServiceIdsOptions) SetIncludeHistory(includeHistory bool) *L
1147711512
return _options
1147811513
}
1147911514

11515+
// SetFilter : Allow user to set Filter
11516+
func (_options *ListServiceIdsOptions) SetFilter(filter string) *ListServiceIdsOptions {
11517+
_options.Filter = core.StringPtr(filter)
11518+
return _options
11519+
}
11520+
1148011521
// SetHeaders : Allow user to set Headers
1148111522
func (options *ListServiceIdsOptions) SetHeaders(param map[string]string) *ListServiceIdsOptions {
1148211523
options.Headers = param

iamidentityv1/iam_identity_v1_integration_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ var _ = Describe(`IamIdentityV1 Integration Tests`, func() {
107107
valueString string = "/billing"
108108
preferenceID1 string = "landing_page"
109109
iamIDForPreferences string
110+
filter string = "name co \"Go\""
110111
)
111112

112113
var shouldSkipTest = func() {
@@ -311,6 +312,7 @@ var _ = Describe(`IamIdentityV1 Integration Tests`, func() {
311312
IamID: &iamID,
312313
Pagetoken: pageToken,
313314
Pagesize: core.Int64Ptr(int64(1)),
315+
Filter: &filter,
314316
}
315317

316318
apiKeyList, response, err := iamIdentityService.ListAPIKeys(listAPIKeysOptions)

0 commit comments

Comments
 (0)