Skip to content

Commit

Permalink
add get notifications features API
Browse files Browse the repository at this point in the history
  • Loading branch information
Sokratis Papadopoulos committed Jan 12, 2024
1 parent 25bd8cb commit b3d34bd
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
23 changes: 23 additions & 0 deletions model/notifications/config.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,26 @@ structure NotificationsConfigsOutputItem {
list NotificationsConfigsList {
member: NotificationsConfigsOutputItem
}

@xDataType("array")
@xEnumOptions([
"slack",
"chime",
"microsoft_teams",
"webhook",
"email",
"sns",
"ses_account",
"smtp_account",
"email_group"
])
@documentation("Limit the information for notifications features list.")
string NotificationsFeaturesListItem

list NotificationsFeaturesList {
member: NotificationsFeaturesListItem
}

structure NotificationsPluginFeatures {
tooltip_support: Boolean
}
23 changes: 23 additions & 0 deletions model/notifications/features/operations.smithy
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: Apache-2.0
//
// The OpenSearch Contributors require contributions made to
// this file be licensed under the Apache-2.0 license or a
// compatible open source license.

$version: "2"
namespace OpenSearch

@externalDocumentation(
"API Reference": "https://opensearch.org/docs/latest/observing-your-data/notifications/api/"
)

@xOperationGroup("notifications.features")
@xVersionAdded("2.2")
@readonly
@suppress(["HttpUriConflict"])
@http(method: "GET", uri: "/_plugins/_notifications/features")
@documentation("Retrieve a list of all supported notification configuration types.")
operation NotificationsFeatures_Get {
input: NotificationsFeatures_Get_Input,
output: NotificationsFeatures_Get_Output
}
18 changes: 18 additions & 0 deletions model/notifications/features/structures.smithy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: Apache-2.0
//
// The OpenSearch Contributors require contributions made to
// this file be licensed under the Apache-2.0 license or a
// compatible open source license.

$version: "2"
namespace OpenSearch

@input
structure NotificationsFeatures_Get_Input {
}

@output
structure NotificationsFeatures_Get_Output {
allowed_config_type_list: NotificationsFeaturesList,
plugin_features: NotificationsPluginFeatures
}
1 change: 1 addition & 0 deletions model/opensearch.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ service OpenSearch {
NodesUsage_WithNodeId,
NotificationsConfigs_Get,
NotificationsConfigs_Post,
NotificationsFeatures_Get,
PatchActionGroup,
PatchActionGroups,
PatchAuditConfiguration,
Expand Down

0 comments on commit b3d34bd

Please sign in to comment.