Skip to content

feat(IAM Identity): add filter parameter for search api #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ public ServiceCall<ApiKeyList> listApiKeys(ListApiKeysOptions listApiKeysOptions
if (listApiKeysOptions.includeHistory() != null) {
builder.query("include_history", String.valueOf(listApiKeysOptions.includeHistory()));
}
if (listApiKeysOptions.filter() != null) {
builder.query("filter", String.valueOf(listApiKeysOptions.filter()));
}
ResponseConverter<ApiKeyList> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ApiKeyList>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
Expand Down Expand Up @@ -573,6 +576,9 @@ public ServiceCall<ServiceIdList> listServiceIds(ListServiceIdsOptions listServi
if (listServiceIdsOptions.includeHistory() != null) {
builder.query("include_history", String.valueOf(listServiceIdsOptions.includeHistory()));
}
if (listServiceIdsOptions.filter() != null) {
builder.query("filter", String.valueOf(listServiceIdsOptions.filter()));
}
ResponseConverter<ServiceIdList> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ServiceIdList>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
Expand Down Expand Up @@ -839,6 +845,9 @@ public ServiceCall<TrustedProfilesList> listProfiles(ListProfilesOptions listPro
if (listProfilesOptions.pagetoken() != null) {
builder.query("pagetoken", String.valueOf(listProfilesOptions.pagetoken()));
}
if (listProfilesOptions.filter() != null) {
builder.query("filter", String.valueOf(listProfilesOptions.filter()));
}
ResponseConverter<TrustedProfilesList> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<TrustedProfilesList>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
Expand Down Expand Up @@ -1251,7 +1260,9 @@ public ServiceCall<ProfileIdentitiesResponse> setProfileIdentities(SetProfileIde
/**
* Add a specific identity that can assume the trusted profile.
*
* Add a specific identity that can assume the trusted profile.
* Add a specific 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.
*
* @param setProfileIdentityOptions the {@link SetProfileIdentityOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link ProfileIdentityResponse}
Expand Down Expand Up @@ -1310,7 +1321,7 @@ public ServiceCall<ProfileIdentityResponse> getProfileIdentity(GetProfileIdentit
}

/**
* Delete the identity that can assume the trusted profile.
* 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.
*
* Delete the identity that can assume the trusted profile.
*
Expand Down Expand Up @@ -2101,7 +2112,24 @@ public ServiceCall<EffectiveAccountSettingsResponse> getEffectiveAccountSettings
/**
* Update Identity Preference on scope account.
*
* Update one Identity Preference on scope 'account'.
* Update one Identity Preference on scope 'account'. supported preferences:
* The following preferences are storing values for identities inside an account,
* i.e. for each account that an identity is member of, the value stored might be different.
* This means, users who might be member of multiple accounts can have multiple preferences, one per account.
* Identities like Service Ids or Trusted Profiles can only exist in one account,
* therefore they can only have one preference inside their related account.
* preference: console/landing_page
* service: console
* preferenceId: landing_page
* supportedIdentityType: Trusted Profiles, Users
* type: string
* validation: valid URL (without host part), e.g. /billing or /iam
* preference: console/global_left_navigation
* service: console
* preferenceId: global_left_navigation
* supportedIdentityType: Trusted Profiles, Users
* type: list of strings
* validation: each entry in the list of strings must match the identifier of one navigation entry in the console.
*
* @param updatePreferenceOnScopeAccountOptions the {@link UpdatePreferenceOnScopeAccountOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link IdentityPreferenceResponse}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ public String getName() {
/**
* Gets the supportSessions.
*
* Defines if the API key supports sessions. Sessions are only supported for user apikeys.
* Defines whether you can manage CLI login sessions for the API key. When `true`, sessions are created and can be
* reviewed or revoked. When `false`, no sessions are tracked. To block access, delete or rotate the API key.
* Available only for user API keys.
*
* @return the supportSessions
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ public Boolean storeValue() {
/**
* Gets the supportSessions.
*
* Defines if the API key supports sessions. Sessions are only supported for user apikeys.
* Defines whether you can manage CLI login sessions for the API key. When `true`, sessions are created and can be
* reviewed or revoked. When `false`, no sessions are tracked. To block access, delete or rotate the API key.
* Available only for user API keys.
*
* @return the supportSessions
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public interface Order {
protected String sort;
protected String order;
protected Boolean includeHistory;
protected String filter;

/**
* Builder.
Expand All @@ -73,6 +74,7 @@ public static class Builder {
private String sort;
private String order;
private Boolean includeHistory;
private String filter;

/**
* Instantiates a new Builder from an existing ListApiKeysOptions instance.
Expand All @@ -89,6 +91,7 @@ private Builder(ListApiKeysOptions listApiKeysOptions) {
this.sort = listApiKeysOptions.sort;
this.order = listApiKeysOptions.order;
this.includeHistory = listApiKeysOptions.includeHistory;
this.filter = listApiKeysOptions.filter;
}

/**
Expand Down Expand Up @@ -204,6 +207,17 @@ public Builder includeHistory(Boolean includeHistory) {
this.includeHistory = includeHistory;
return this;
}

/**
* Set the filter.
*
* @param filter the filter
* @return the ListApiKeysOptions builder
*/
public Builder filter(String filter) {
this.filter = filter;
return this;
}
}

protected ListApiKeysOptions() { }
Expand All @@ -218,6 +232,7 @@ protected ListApiKeysOptions(Builder builder) {
sort = builder.sort;
order = builder.order;
includeHistory = builder.includeHistory;
filter = builder.filter;
}

/**
Expand Down Expand Up @@ -331,5 +346,17 @@ public String order() {
public Boolean includeHistory() {
return includeHistory;
}

/**
* Gets the filter.
*
* An optional filter query parameter used to refine the results of the search operation. For more information see
* [Filtering list results](#filter-list-results) section.
*
* @return the filter
*/
public String filter() {
return filter;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public interface Order {
protected String order;
protected Boolean includeHistory;
protected String pagetoken;
protected String filter;

/**
* Builder.
Expand All @@ -49,6 +50,7 @@ public static class Builder {
private String order;
private Boolean includeHistory;
private String pagetoken;
private String filter;

/**
* Instantiates a new Builder from an existing ListProfilesOptions instance.
Expand All @@ -63,6 +65,7 @@ private Builder(ListProfilesOptions listProfilesOptions) {
this.order = listProfilesOptions.order;
this.includeHistory = listProfilesOptions.includeHistory;
this.pagetoken = listProfilesOptions.pagetoken;
this.filter = listProfilesOptions.filter;
}

/**
Expand Down Expand Up @@ -165,6 +168,17 @@ public Builder pagetoken(String pagetoken) {
this.pagetoken = pagetoken;
return this;
}

/**
* Set the filter.
*
* @param filter the filter
* @return the ListProfilesOptions builder
*/
public Builder filter(String filter) {
this.filter = filter;
return this;
}
}

protected ListProfilesOptions() { }
Expand All @@ -179,6 +193,7 @@ protected ListProfilesOptions(Builder builder) {
order = builder.order;
includeHistory = builder.includeHistory;
pagetoken = builder.pagetoken;
filter = builder.filter;
}

/**
Expand Down Expand Up @@ -267,5 +282,17 @@ public Boolean includeHistory() {
public String pagetoken() {
return pagetoken;
}

/**
* Gets the filter.
*
* An optional filter query parameter used to refine the results of the search operation. For more information see
* [Filtering list results](#filter-list-results) section.
*
* @return the filter
*/
public String filter() {
return filter;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public interface Order {
protected String sort;
protected String order;
protected Boolean includeHistory;
protected String filter;

/**
* Builder.
Expand All @@ -49,6 +50,7 @@ public static class Builder {
private String sort;
private String order;
private Boolean includeHistory;
private String filter;

/**
* Instantiates a new Builder from an existing ListServiceIdsOptions instance.
Expand All @@ -63,6 +65,7 @@ private Builder(ListServiceIdsOptions listServiceIdsOptions) {
this.sort = listServiceIdsOptions.sort;
this.order = listServiceIdsOptions.order;
this.includeHistory = listServiceIdsOptions.includeHistory;
this.filter = listServiceIdsOptions.filter;
}

/**
Expand Down Expand Up @@ -156,6 +159,17 @@ public Builder includeHistory(Boolean includeHistory) {
this.includeHistory = includeHistory;
return this;
}

/**
* Set the filter.
*
* @param filter the filter
* @return the ListServiceIdsOptions builder
*/
public Builder filter(String filter) {
this.filter = filter;
return this;
}
}

protected ListServiceIdsOptions() { }
Expand All @@ -168,6 +182,7 @@ protected ListServiceIdsOptions(Builder builder) {
sort = builder.sort;
order = builder.order;
includeHistory = builder.includeHistory;
filter = builder.filter;
}

/**
Expand Down Expand Up @@ -256,5 +271,17 @@ public String order() {
public Boolean includeHistory() {
return includeHistory;
}

/**
* Gets the filter.
*
* An optional filter query parameter used to refine the results of the search operation. For more information see
* [Filtering list results](#filter-list-results) section.
*
* @return the filter
*/
public String filter() {
return filter;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ public String description() {
/**
* Gets the supportSessions.
*
* Defines if the API key supports sessions. Sessions are only supported for user apikeys.
* Defines whether you can manage CLI login sessions for the API key. When `true`, sessions are created and can be
* reviewed or revoked. When `false`, no sessions are tracked. To block access, delete or rotate the API key.
* Available only for user API keys.
*
* @return the supportSessions
*/
Expand Down
Loading