1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p> Information about notification channels you have configured with DevOps Guru. The one supported notification channel is Amazon Simple Notification Service (Amazon SNS).</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct NotificationChannelConfig {
/// <p> Information about a notification channel configured in DevOps Guru to send notifications when insights are created. </p>
/// <p>If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission to send it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. DevOps Guru only supports standard SNS topics. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-required-permissions.html">Permissions for Amazon SNS topics</a>.</p>
/// <p>If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions to the CMK. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-kms-permissions.html">Permissions for Amazon Web Services KMS–encrypted Amazon SNS topics</a>.</p>
pub sns: ::std::option::Option<crate::types::SnsChannelConfig>,
/// <p> The filter configurations for the Amazon SNS notification topic you use with DevOps Guru. If you do not provide filter configurations, the default configurations are to receive notifications for all message types of <code>High</code> or <code>Medium</code> severity. </p>
pub filters: ::std::option::Option<crate::types::NotificationFilterConfig>,
}
impl NotificationChannelConfig {
/// <p> Information about a notification channel configured in DevOps Guru to send notifications when insights are created. </p>
/// <p>If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission to send it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. DevOps Guru only supports standard SNS topics. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-required-permissions.html">Permissions for Amazon SNS topics</a>.</p>
/// <p>If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions to the CMK. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-kms-permissions.html">Permissions for Amazon Web Services KMS–encrypted Amazon SNS topics</a>.</p>
pub fn sns(&self) -> ::std::option::Option<&crate::types::SnsChannelConfig> {
self.sns.as_ref()
}
/// <p> The filter configurations for the Amazon SNS notification topic you use with DevOps Guru. If you do not provide filter configurations, the default configurations are to receive notifications for all message types of <code>High</code> or <code>Medium</code> severity. </p>
pub fn filters(&self) -> ::std::option::Option<&crate::types::NotificationFilterConfig> {
self.filters.as_ref()
}
}
impl NotificationChannelConfig {
/// Creates a new builder-style object to manufacture [`NotificationChannelConfig`](crate::types::NotificationChannelConfig).
pub fn builder() -> crate::types::builders::NotificationChannelConfigBuilder {
crate::types::builders::NotificationChannelConfigBuilder::default()
}
}
/// A builder for [`NotificationChannelConfig`](crate::types::NotificationChannelConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct NotificationChannelConfigBuilder {
pub(crate) sns: ::std::option::Option<crate::types::SnsChannelConfig>,
pub(crate) filters: ::std::option::Option<crate::types::NotificationFilterConfig>,
}
impl NotificationChannelConfigBuilder {
/// <p> Information about a notification channel configured in DevOps Guru to send notifications when insights are created. </p>
/// <p>If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission to send it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. DevOps Guru only supports standard SNS topics. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-required-permissions.html">Permissions for Amazon SNS topics</a>.</p>
/// <p>If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions to the CMK. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-kms-permissions.html">Permissions for Amazon Web Services KMS–encrypted Amazon SNS topics</a>.</p>
/// This field is required.
pub fn sns(mut self, input: crate::types::SnsChannelConfig) -> Self {
self.sns = ::std::option::Option::Some(input);
self
}
/// <p> Information about a notification channel configured in DevOps Guru to send notifications when insights are created. </p>
/// <p>If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission to send it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. DevOps Guru only supports standard SNS topics. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-required-permissions.html">Permissions for Amazon SNS topics</a>.</p>
/// <p>If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions to the CMK. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-kms-permissions.html">Permissions for Amazon Web Services KMS–encrypted Amazon SNS topics</a>.</p>
pub fn set_sns(mut self, input: ::std::option::Option<crate::types::SnsChannelConfig>) -> Self {
self.sns = input;
self
}
/// <p> Information about a notification channel configured in DevOps Guru to send notifications when insights are created. </p>
/// <p>If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission to send it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. DevOps Guru only supports standard SNS topics. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-required-permissions.html">Permissions for Amazon SNS topics</a>.</p>
/// <p>If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions to the CMK. For more information, see <a href="https://docs.aws.amazon.com/devops-guru/latest/userguide/sns-kms-permissions.html">Permissions for Amazon Web Services KMS–encrypted Amazon SNS topics</a>.</p>
pub fn get_sns(&self) -> &::std::option::Option<crate::types::SnsChannelConfig> {
&self.sns
}
/// <p> The filter configurations for the Amazon SNS notification topic you use with DevOps Guru. If you do not provide filter configurations, the default configurations are to receive notifications for all message types of <code>High</code> or <code>Medium</code> severity. </p>
pub fn filters(mut self, input: crate::types::NotificationFilterConfig) -> Self {
self.filters = ::std::option::Option::Some(input);
self
}
/// <p> The filter configurations for the Amazon SNS notification topic you use with DevOps Guru. If you do not provide filter configurations, the default configurations are to receive notifications for all message types of <code>High</code> or <code>Medium</code> severity. </p>
pub fn set_filters(mut self, input: ::std::option::Option<crate::types::NotificationFilterConfig>) -> Self {
self.filters = input;
self
}
/// <p> The filter configurations for the Amazon SNS notification topic you use with DevOps Guru. If you do not provide filter configurations, the default configurations are to receive notifications for all message types of <code>High</code> or <code>Medium</code> severity. </p>
pub fn get_filters(&self) -> &::std::option::Option<crate::types::NotificationFilterConfig> {
&self.filters
}
/// Consumes the builder and constructs a [`NotificationChannelConfig`](crate::types::NotificationChannelConfig).
pub fn build(self) -> crate::types::NotificationChannelConfig {
crate::types::NotificationChannelConfig {
sns: self.sns,
filters: self.filters,
}
}
}