From a44e6d92c006f1c03451a306a9e578f7ca48a862 Mon Sep 17 00:00:00 2001 From: Sokratis Papadopoulos Date: Sun, 24 Mar 2024 22:37:18 +0100 Subject: [PATCH] Add notifications API specs (#169) * Add notifications configs API Signed-off-by: Sokratis Papadopoulos * Separate xOperationGroup for get_configs, create_config Signed-off-by: Sokratis Papadopoulos * revert openapi json Signed-off-by: Sokratis Papadopoulos * add get notifications features API Signed-off-by: Sokratis Papadopoulos * create _plugins folder and place notifications there Signed-off-by: Sokratis Papadopoulos * add notifications delete_config API Signed-off-by: Sokratis Papadopoulos * add multiple delete APIs for notification channels Signed-off-by: Sokratis Papadopoulos * rename parameter of config_id on delete api Signed-off-by: Sokratis Papadopoulos * refactor structure Signed-off-by: Sokratis Papadopoulos * add all notifications related operations Signed-off-by: Sokratis Papadopoulos * Revert "add all notifications related operations" This reverts commit b4c3f11945f464a88c739bf11c625da1f41a92a1. Signed-off-by: Sokratis Papadopoulos * add all notifications related operations Signed-off-by: Sokratis Papadopoulos * add PUT call for creating a new notification channel Signed-off-by: Sokratis Papadopoulos * add update notifications channel configuration as separate folder Signed-off-by: Sokratis Papadopoulos * add test feature API Signed-off-by: Sokratis Papadopoulos * add test feature API Signed-off-by: Sokratis Papadopoulos * Add NotificationsConfigs_Delete operation Signed-off-by: Sokratis Papadopoulos * Utilize anchor links for API references Signed-off-by: Sokratis Papadopoulos * refactor text Signed-off-by: Sokratis Papadopoulos * refactor text Signed-off-by: Sokratis Papadopoulos * Update delete notifications channel API operations naming Signed-off-by: Sokratis Papadopoulos * change notifications versionAdded to 2.0 Signed-off-by: Sokratis Papadopoulos * change notifications versionAdded to 2.0 Signed-off-by: Sokratis Papadopoulos * add documentation for query params Signed-off-by: Sokratis Papadopoulos * refactor features items as enum Signed-off-by: Sokratis Papadopoulos * add all notification config types Signed-off-by: Sokratis Papadopoulos * add a union for notification config details Signed-off-by: Sokratis Papadopoulos * refactor Signed-off-by: Sokratis Papadopoulos * Update model/_plugins/notifications/config.smithy remove name field from NotificationsConfig Co-authored-by: Thomas Farr Signed-off-by: Sokratis Papadopoulos * Add @required and @deprecated tags wherever applicable Signed-off-by: Sokratis Papadopoulos * Make config_type an enum Signed-off-by: Sokratis Papadopoulos * Put slack,chime,etc. at the same level as other fields in NotificationConfigType Signed-off-by: Sokratis Papadopoulos * Set method field as enum of ssl/start_tls,none instead of string Signed-off-by: Sokratis Papadopoulos * total_hit_relation should be an enum of eq and gte Signed-off-by: Sokratis Papadopoulos * Accept optional email_group_id_list field on Email Signed-off-by: Sokratis Papadopoulos * Accept method and header_params on webhook Signed-off-by: Sokratis Papadopoulos * Reuse NotificationConfigType enum Signed-off-by: Sokratis Papadopoulos * Fill in NotificationsFeatureTest_Output Signed-off-by: Sokratis Papadopoulos * Fill in NotificationsConfigs_Delete_Output Signed-off-by: Sokratis Papadopoulos * fix structure Signed-off-by: Sokratis Papadopoulos * Fill in NotificationsConfigs_Get_Input Signed-off-by: Sokratis Papadopoulos * Turned plugin_features field into a map Signed-off-by: Sokratis Papadopoulos * rename xOperationGroup to notifications.send_test Co-authored-by: Thomas Farr Signed-off-by: Sokratis Papadopoulos * add HttpMethodSemantics.UnexpectedPayload suppress Co-authored-by: Thomas Farr Signed-off-by: Sokratis Papadopoulos --------- Signed-off-by: Sokratis Papadopoulos Signed-off-by: Sokratis Papadopoulos Co-authored-by: Sokratis Papadopoulos Co-authored-by: Thomas Farr --- model/_plugins/notifications/config.smithy | 133 ++++++++++++++ .../create_config/operations.smithy | 22 +++ .../create_config/structures.smithy | 20 +++ .../delete_config/operations.smithy | 34 ++++ .../delete_config/structures.smithy | 55 ++++++ .../get_configs/operations.smithy | 34 ++++ .../get_configs/structures.smithy | 165 ++++++++++++++++++ .../get_features/operations.smithy | 23 +++ .../get_features/structures.smithy | 27 +++ .../test_feature/operations.smithy | 37 ++++ .../test_feature/structures.smithy | 62 +++++++ .../update_config/operations.smithy | 23 +++ .../update_config/structures.smithy | 24 +++ model/opensearch.smithy | 9 + 14 files changed, 668 insertions(+) create mode 100644 model/_plugins/notifications/config.smithy create mode 100644 model/_plugins/notifications/create_config/operations.smithy create mode 100644 model/_plugins/notifications/create_config/structures.smithy create mode 100644 model/_plugins/notifications/delete_config/operations.smithy create mode 100644 model/_plugins/notifications/delete_config/structures.smithy create mode 100644 model/_plugins/notifications/get_configs/operations.smithy create mode 100644 model/_plugins/notifications/get_configs/structures.smithy create mode 100644 model/_plugins/notifications/get_features/operations.smithy create mode 100644 model/_plugins/notifications/get_features/structures.smithy create mode 100644 model/_plugins/notifications/test_feature/operations.smithy create mode 100644 model/_plugins/notifications/test_feature/structures.smithy create mode 100644 model/_plugins/notifications/update_config/operations.smithy create mode 100644 model/_plugins/notifications/update_config/structures.smithy diff --git a/model/_plugins/notifications/config.smithy b/model/_plugins/notifications/config.smithy new file mode 100644 index 000000000..d87e5b696 --- /dev/null +++ b/model/_plugins/notifications/config.smithy @@ -0,0 +1,133 @@ +// 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 + +structure NotificationsConfig { + config_id: String, + @required + config: NotificationsConfigItem +} + +@documentation("Type of notification configuration.") +enum NotificationConfigType { + SLACK = "slack", + CHIME = "chime", + MICROSOFT_TEAMS = "microsoft_teams", + WEBHOOK = "webhook", + EMAIL = "email", + SNS = "sns", + SES_ACCOUNT = "ses_account", + SMTP_ACCOUNT = "smtp_account", + EMAIL_GROUP = "email_group" +} + +structure NotificationsConfigItem { + @required + name: String, + description: String + @required + config_type: NotificationConfigType, + is_enabled: Boolean, + sns: SnsItem, + slack: SlackItem, + chime: Chime, + webhook: Webhook, + smtp_account: SmtpAccount, + ses_account: SesAccount, + email_group: EmailGroup, + email: Email, + microsoft_teams: MicrosoftTeamsItem +} + +structure MicrosoftTeamsItem { + @required + url: String +} + +structure SlackItem { + @required + url: String +} + +structure SnsItem { + @required + topic_arn: String, + role_arn: String +} + +structure Chime { + @required + url: String +} + +enum HttpMethodType { + POST = "POST", + PUT = "PUT", + PATCH = "PATCH" +} + +map HeaderParamsMap { + key: String + value: Integer +} + +structure Webhook { + @required + url: String, + method: HttpMethodType, + header_params: HeaderParamsMap, +} + +enum EmailEncryptionMethod { + SSL = "ssl", + START_TLS = "start_tls", + NONE = "none" +} + +structure SmtpAccount { + @required + host: String, + @required + port: Integer, + @required + method: EmailEncryptionMethod, + @required + from_addess: String +} + +structure SesAccount { + @required + region: String, + role_arn: String, + @required + from_addess: String +} + +list EmailGroupIdList { + member: String +} + +list RecipientList { + member: RecipientListItem +} + +structure RecipientListItem { + recipient: String +} + +structure EmailGroup { + @required + recipient_list: RecipientList, + email_group_id_list: EmailGroupIdList +} + +structure Email { + @required + email_account_id: String, + recipient_list: RecipientList +} diff --git a/model/_plugins/notifications/create_config/operations.smithy b/model/_plugins/notifications/create_config/operations.smithy new file mode 100644 index 000000000..1933e75f0 --- /dev/null +++ b/model/_plugins/notifications/create_config/operations.smithy @@ -0,0 +1,22 @@ +// 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/#create-channel-configuration" +) + +@xOperationGroup("notifications.create_config") +@xVersionAdded("2.0") +@suppress(["HttpUriConflict"]) +@http(method: "POST", uri: "/_plugins/_notifications/configs") +@documentation("Create channel configuration.") +operation NotificationsConfigs_Post { + input: NotificationsConfigs_Post_Input, + output: NotificationsConfigs_Post_Output +} diff --git a/model/_plugins/notifications/create_config/structures.smithy b/model/_plugins/notifications/create_config/structures.smithy new file mode 100644 index 000000000..f269f14e7 --- /dev/null +++ b/model/_plugins/notifications/create_config/structures.smithy @@ -0,0 +1,20 @@ +// 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 NotificationsConfigs_Post_Input { + @required + @httpPayload + content: NotificationsConfig +} + +@output +structure NotificationsConfigs_Post_Output { + config_id: String +} diff --git a/model/_plugins/notifications/delete_config/operations.smithy b/model/_plugins/notifications/delete_config/operations.smithy new file mode 100644 index 000000000..8c880d91e --- /dev/null +++ b/model/_plugins/notifications/delete_config/operations.smithy @@ -0,0 +1,34 @@ +// 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/#delete-channel-configuration" +) + +@xOperationGroup("notifications.delete_config") +@xVersionAdded("2.0") +@idempotent +@suppress(["HttpUriConflict"]) +@http(method: "DELETE", uri: "/_plugins/_notifications/configs/{config_id}") +@documentation("Delete channel configuration.") +operation NotificationsConfigs_Delete_WithPathParams { + input: NotificationsConfigs_Delete_WithPathParams_Input, + output: NotificationsConfigs_Delete_Output +} + +@xOperationGroup("notifications.delete_config") +@xVersionAdded("2.2") +@idempotent +@suppress(["HttpUriConflict"]) +@http(method: "DELETE", uri: "/_plugins/_notifications/configs") +@documentation("Delete channel configuration.") +operation NotificationsConfigs_Delete_WithQueryParams { + input: NotificationsConfigs_Delete_WithQueryParams_Input, + output: NotificationsConfigs_Delete_Output +} diff --git a/model/_plugins/notifications/delete_config/structures.smithy b/model/_plugins/notifications/delete_config/structures.smithy new file mode 100644 index 000000000..f2cb544fb --- /dev/null +++ b/model/_plugins/notifications/delete_config/structures.smithy @@ -0,0 +1,55 @@ +// 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 NotificationsConfigs_Delete_WithPathParams_Input { + @required + @httpLabel + config_id: String +} + +@input +structure NotificationsConfigs_Delete_WithQueryParams_Input { + @httpQuery("config_id") + @documentation("A channel ID.") + config_id: String, + + @httpQuery("config_id_list") + @documentation("A comma-separated list of channel IDs.") + config_id_list: String +} + +structure NotificationsConfigs_Delete_Output { + delete_response_list: DeleteResponseList +} + +map DeleteResponseList { + key: String + value: RestStatus +} + +enum RestStatus { + CONTINUE = "continue", + SWITCHING_PROTOCOLS = "switching_protocols", + OK = "ok", + CREATED = "created", + ACCEPTED = "accepted", + NON_AUTHORITATIVE_INFORMATION = "non_authoritative_information", + NO_CONTENT = "no_content", + RESET_CONTENT = "reset_content", + PARTIAL_CONTENT = "partial_content", + MULTI_STATUS = "multi_status", + MULTIPLE_CHOICES = "multiple_choices", + MOVED_PERMANENTLY = "moved_permanently", + FOUND = "found", + SEE_OTHER = "see_other", + NOT_MODIFIED = "not_modified", + USE_PROXY = "use_proxy", + TEMPORARY_REDIRECT = "temporary_redirect" +} diff --git a/model/_plugins/notifications/get_configs/operations.smithy b/model/_plugins/notifications/get_configs/operations.smithy new file mode 100644 index 000000000..2a2c8e52d --- /dev/null +++ b/model/_plugins/notifications/get_configs/operations.smithy @@ -0,0 +1,34 @@ +// 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/#get-channel-configuration" +) + +@xOperationGroup("notifications.get_config") +@xVersionAdded("2.0") +@readonly +@suppress(["HttpUriConflict", "HttpMethodSemantics.UnexpectedPayload"]) +@http(method: "GET", uri: "/_plugins/_notifications/configs") +@documentation("Get channel configuration.") +operation NotificationsConfigs_Get { + input: NotificationsConfigs_Get_Input, + output: NotificationsConfigs_Get_Output +} + +@xOperationGroup("notifications.get_config") +@xVersionAdded("2.0") +@readonly +@suppress(["HttpUriConflict"]) +@http(method: "GET", uri: "/_plugins/_notifications/configs/{config_id}") +@documentation("Get channel configuration.") +operation NotificationsConfigsItem_Get { + input: NotificationsConfigsItem_Get_Input, + output: NotificationsConfigs_Get_Output +} diff --git a/model/_plugins/notifications/get_configs/structures.smithy b/model/_plugins/notifications/get_configs/structures.smithy new file mode 100644 index 000000000..7669b15df --- /dev/null +++ b/model/_plugins/notifications/get_configs/structures.smithy @@ -0,0 +1,165 @@ +// 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 NotificationsConfigs_Get_Input { + config_id_list: ConfigIdList, + sort_field: String, + sort_order: String, + from_index: Integer, + max_items: Integer, + + @httpQuery("last_updated_time_ms") + lastUpdatedTimeMs: Long, + + @httpQuery("created_time_ms") + createdTimeMs: Long, + + @httpQuery("config_type") + configType: NotificationConfigType, + + @httpQuery("email.email_account_id") + emailAccountId: String, + + @httpQuery("email.email_group_id_list") + emailGroupIdList: String, + + @httpQuery("smtp_account.method") + smtpAccountMethod: String, + + @httpQuery("ses_account.region") + sesAccountRegion: String, + + @httpQuery("name") + name: String, + + @httpQuery("name.keyword") + nameKeyword: String, + + @httpQuery("description") + description: String, + + @httpQuery("description.keyword") + descriptionKeyword: String, + + @httpQuery("slack.url") + slackUrl: String, + + @httpQuery("slack.url.keyword") + slackUrlKeyword: String, + + @httpQuery("chime.url") + chimeUrl: String, + + @httpQuery("chime.url.keyword") + chimeUrlKeyword: String, + + @httpQuery("microsoft_teams.url") + microsoftTeamsUrl: String, + + @httpQuery("microsoft_teams.url.keyword") + microsoftTeamsUrlKeyword: String, + + @httpQuery("webhook.url") + webhookUrl: String, + + @httpQuery("webhook.url.keyword") + webhookUrlKeyword: String, + + @httpQuery("smtp_account.host") + smtpAccountHost: String, + + @httpQuery("smtp_account.host.keyword") + smtpAccountHostKeyword: String, + + @httpQuery("smtp_account.from_address") + smtpAccountFromAddress: String, + + @httpQuery("smtp_account.from_address.keyword") + smtpAccountFromAddressKeyword: String, + + @httpQuery("sns.topic_arn") + snsTopicArn: String, + + @httpQuery("sns.topic_arn.keyword") + snsTopicArnKeyword: String, + + @httpQuery("sns.role_arn") + snsRoleArn: String, + + @httpQuery("sns.role_arn.keyword") + snsRoleArnKeyword: String, + + @httpQuery("ses_account.role_arn") + sesAccountRoleArn: String, + + @httpQuery("ses_account.role_arn.keyword") + sesAccountRoleArnKeyword: String, + + @httpQuery("ses_account.from_address") + sesAccountFromAddress: String, + + @httpQuery("ses_account.from_address.keyword") + sesAccountFromAddressKeyword: String, + + @httpQuery("is_enabled") + isEnabled: Boolean, + + @httpQuery("email.recipient_list.recipient") + emailRecipientListRecipient: String, + + @httpQuery("email.recipient_list.recipient.keyword") + emailRecipientListRecipientKeyword: String, + + @httpQuery("email_group.recipient_list.recipient") + emailGroupRecipientListRecipient: String, + + @httpQuery("email_group.recipient_list.recipient.keyword") + emailGroupRecipientListRecipientKeyword: String, + + @httpQuery("query") + query: String, + + @httpQuery("text_query") + textQuery: String +} + +list ConfigIdList { + member: String +} + +@input +structure NotificationsConfigsItem_Get_Input { + @required + @httpLabel + config_id: String +} + +enum TotalHitRelation { + EQ = "eq", + GTE = "gte" +} + +structure NotificationsConfigs_Get_Output { + start_index: Long, + total_hits: Long, + total_hit_relation: TotalHitRelation, + config_list: NotificationsConfigsList +} + +list NotificationsConfigsList { + member: NotificationsConfigsOutputItem +} + +structure NotificationsConfigsOutputItem { + config_id: String, + last_updated_time_ms: Long, + created_time_ms: Long, + config: NotificationsConfigItem +} diff --git a/model/_plugins/notifications/get_features/operations.smithy b/model/_plugins/notifications/get_features/operations.smithy new file mode 100644 index 000000000..723e85e0b --- /dev/null +++ b/model/_plugins/notifications/get_features/operations.smithy @@ -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/#list-supported-channel-configurations" +) + +@xOperationGroup("notifications.list_features") +@xVersionAdded("2.0") +@readonly +@suppress(["HttpUriConflict"]) +@http(method: "GET", uri: "/_plugins/_notifications/features") +@documentation("List supported channel configurations.") +operation NotificationsFeatures_Get { + input: NotificationsFeatures_Get_Input, + output: NotificationsFeatures_Get_Output +} diff --git a/model/_plugins/notifications/get_features/structures.smithy b/model/_plugins/notifications/get_features/structures.smithy new file mode 100644 index 000000000..3397290a3 --- /dev/null +++ b/model/_plugins/notifications/get_features/structures.smithy @@ -0,0 +1,27 @@ +// 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: NotificationsPluginFeaturesMap +} + +list NotificationsFeaturesList { + member: NotificationConfigType +} + +map NotificationsPluginFeaturesMap { + key: String, + value: String +} diff --git a/model/_plugins/notifications/test_feature/operations.smithy b/model/_plugins/notifications/test_feature/operations.smithy new file mode 100644 index 000000000..7f735dc5e --- /dev/null +++ b/model/_plugins/notifications/test_feature/operations.smithy @@ -0,0 +1,37 @@ +// 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/#send-test-notification" +) + +@xOperationGroup("notifications.send_test") +@xVersionAdded("2.0") +@readonly +@suppress(["HttpUriConflict"]) +@deprecated +@xDeprecationMessage("Use the POST method instead.") +@xVersionDeprecated("2.3") +@http(method: "GET", uri: "/_plugins/_notifications/feature/test/{config_id}") +@documentation("Send a test notification.") +operation NotificationsFeatureTest_Get { + input: NotificationsFeatureTest_Input, + output: NotificationsFeatureTest_Output +} + +@xOperationGroup("notifications.send_test") +@xVersionAdded("2.0") +@readonly +@suppress(["HttpUriConflict"]) +@http(method: "POST", uri: "/_plugins/_notifications/feature/test/{config_id}") +@documentation("Send a test notification.") +operation NotificationsFeatureTest_Post { + input: NotificationsFeatureTest_Input, + output: NotificationsFeatureTest_Output +} diff --git a/model/_plugins/notifications/test_feature/structures.smithy b/model/_plugins/notifications/test_feature/structures.smithy new file mode 100644 index 000000000..29ac40ca2 --- /dev/null +++ b/model/_plugins/notifications/test_feature/structures.smithy @@ -0,0 +1,62 @@ +// 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 + +structure NotificationsFeatureTest_Input { + @required + @httpLabel + config_id: String +} + +structure NotificationsFeatureTest_Output { + event_source: EventSource, + status_list: StatusList +} + +structure EventSource { + title: String, + reference_id: String, + severity: SeverityType, + tags: TagsList +} + +enum SeverityType { + HIGH = "high", + INFO = "info", + CRITICAL = "critical" +} + +list TagsList { + member: String +} + +list StatusList { + member: EventStatus +} + +structure EventStatus { + config_id: String, + config_name: String, + config_type: NotificationConfigType, + email_recipient_status: EmailRecipientStatusList, + delivery_status: DeliveryStatus +} + +list EmailRecipientStatusList { + member: EmailRecipientStatus +} + +structure EmailRecipientStatus { + recipient: String, + delivery_status: DeliveryStatus +} + +structure DeliveryStatus { + status_code: String, + status_text: String +} diff --git a/model/_plugins/notifications/update_config/operations.smithy b/model/_plugins/notifications/update_config/operations.smithy new file mode 100644 index 000000000..5f5206d82 --- /dev/null +++ b/model/_plugins/notifications/update_config/operations.smithy @@ -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/#update-channel-configuration" +) + +@xOperationGroup("notifications.update_config") +@xVersionAdded("2.0") +@idempotent +@suppress(["HttpUriConflict"]) +@http(method: "PUT", uri: "/_plugins/_notifications/configs/{config_id}") +@documentation("Update channel configuration.") +operation NotificationsConfigs_Put { + input: NotificationsConfigs_Put_Input, + output: NotificationsConfigs_Put_Output +} diff --git a/model/_plugins/notifications/update_config/structures.smithy b/model/_plugins/notifications/update_config/structures.smithy new file mode 100644 index 000000000..4e28a8110 --- /dev/null +++ b/model/_plugins/notifications/update_config/structures.smithy @@ -0,0 +1,24 @@ +// 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 NotificationsConfigs_Put_Input { + @required + @httpLabel + config_id: String, + + @required + @httpPayload + content: NotificationsConfig +} + +@output +structure NotificationsConfigs_Put_Output { + config_id: String +} diff --git a/model/opensearch.smithy b/model/opensearch.smithy index 92aa87f90..94b08cdb3 100644 --- a/model/opensearch.smithy +++ b/model/opensearch.smithy @@ -306,6 +306,15 @@ service OpenSearch { NodesUsage_WithMetric, NodesUsage_WithMetricNodeId, NodesUsage_WithNodeId, + NotificationsConfigs_Delete_WithPathParams, + NotificationsConfigs_Delete_WithQueryParams + NotificationsConfigs_Get, + NotificationsConfigsItem_Get + NotificationsConfigs_Post, + NotificationsConfigs_Put, + NotificationsFeatures_Get, + NotificationsFeatureTest_Get, + NotificationsFeatureTest_Post, PatchActionGroup, PatchActionGroups, PatchAuditConfiguration,