Skip to content

feat: Update Views API for PR #164#6657

Open
Suruthi-G-K wants to merge 2 commits intoIBM-Cloud:masterfrom
observability-c:update-viewsapi
Open

feat: Update Views API for PR #164#6657
Suruthi-G-K wants to merge 2 commits intoIBM-Cloud:masterfrom
observability-c:update-viewsapi

Conversation

@Suruthi-G-K
Copy link
Contributor

Summary

Updates the IBM Cloud Logs Views API to implement changes from dragonlog-openapi PR #164.

Changes

API Schema Updates (PR #164)

  • syntax_type: Made required with enum validation (lucene, dataprime)
  • tier: Added optional field with enum validation (all_logs, all_logs_templates, priority_insights, priority_insights_templates)
  • selected_values: Ensured required in filters

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TEST=./ibm/service/logs TESTARGS='-run=TestAccIbmLogsView'

=== RUN   TestAccIbmLogsViewFolderDataSourceBasic
--- PASS: TestAccIbmLogsViewFolderDataSourceBasic (19.14s)
=== RUN   TestAccIbmLogsViewFoldersDataSourceBasic
--- PASS: TestAccIbmLogsViewFoldersDataSourceBasic (17.18s)
=== RUN   TestAccIbmLogsViewDataSourceBasic
--- PASS: TestAccIbmLogsViewDataSourceBasic (18.20s)
=== RUN   TestAccIbmLogsViewDataSourceAllArgs
--- PASS: TestAccIbmLogsViewDataSourceAllArgs (16.54s)
=== RUN   TestAccIbmLogsViewsDataSourceBasic
--- PASS: TestAccIbmLogsViewsDataSourceBasic (16.38s)
=== RUN   TestAccIbmLogsViewsDataSourceAllArgs
--- PASS: TestAccIbmLogsViewsDataSourceAllArgs (17.34s)
=== RUN   TestAccIbmLogsViewFolderBasic
--- PASS: TestAccIbmLogsViewFolderBasic (16.58s)
=== RUN   TestAccIbmLogsViewBasic
--- PASS: TestAccIbmLogsViewBasic (28.28s)
=== RUN   TestAccIbmLogsViewAllFields
--- PASS: TestAccIbmLogsViewAllFields (28.55s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logs	180.185s
...

- syntax_type now required with enum validation
- Added tier field with enum validation
@@ -75,27 +77,31 @@ Nested schema for **filters**:
* Constraints: The maximum length is `4096` items. The minimum length is `1` item.
Nested schema for **filters**:
* `name` - (Required, String) Filter name.
* Constraints: The maximum length is `4096` characters. The minimum length is `1` character. The value must match regular expression `^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$`.
* Constraints: The maximum length is `4096` characters. The minimum length is `1` character. The value must match regular expression `/^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$/`.
* `selected_values` - (Required, Map) Filter selected values.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is optional according to new API spec.

@Suruthi-G-K Suruthi-G-K requested a review from kavya498 February 12, 2026 08:19
return diag.FromErr(err)
}
replaceViewOptions.SetSearchQuery(searchQueryModel)
searchQuery, err := ResourceIbmLogsViewMapToApisViewsV1SearchQuery(d.Get("search_query.0").(map[string]interface{}))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is search query optional?
If so, lets please have the if condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants