pub struct PutSubscriptionFilter { /* private fields */ }
Expand description
Fluent builder constructing a request to PutSubscriptionFilter
.
Creates or updates a subscription filter and associates it with the specified log group. Subscription filters allow you to subscribe to a real-time stream of log events ingested through PutLogEvents and have them delivered to a specific destination. When log events are sent to the receiving service, they are Base64 encoded and compressed with the gzip format.
The following destinations are supported for subscription filters:
-
An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.
-
A logical destination that belongs to a different account, for cross-account delivery.
-
An Amazon Kinesis Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery.
-
An Lambda function that belongs to the same account as the subscription filter, for same-account delivery.
Each log group can have up to two subscription filters associated with it. If you are updating an existing filter, you must specify the correct name in filterName
.
To perform a PutSubscriptionFilter
operation, you must also have the iam:PassRole
permission.
Implementations
sourceimpl PutSubscriptionFilter
impl PutSubscriptionFilter
sourcepub async fn send(
self
) -> Result<PutSubscriptionFilterOutput, SdkError<PutSubscriptionFilterError>>
pub async fn send(
self
) -> Result<PutSubscriptionFilterOutput, SdkError<PutSubscriptionFilterError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn log_group_name(self, input: impl Into<String>) -> Self
pub fn log_group_name(self, input: impl Into<String>) -> Self
The name of the log group.
sourcepub fn set_log_group_name(self, input: Option<String>) -> Self
pub fn set_log_group_name(self, input: Option<String>) -> Self
The name of the log group.
sourcepub fn filter_name(self, input: impl Into<String>) -> Self
pub fn filter_name(self, input: impl Into<String>) -> Self
A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName
. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters.
sourcepub fn set_filter_name(self, input: Option<String>) -> Self
pub fn set_filter_name(self, input: Option<String>) -> Self
A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName
. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters.
sourcepub fn filter_pattern(self, input: impl Into<String>) -> Self
pub fn filter_pattern(self, input: impl Into<String>) -> Self
A filter pattern for subscribing to a filtered stream of log events.
sourcepub fn set_filter_pattern(self, input: Option<String>) -> Self
pub fn set_filter_pattern(self, input: Option<String>) -> Self
A filter pattern for subscribing to a filtered stream of log events.
sourcepub fn destination_arn(self, input: impl Into<String>) -> Self
pub fn destination_arn(self, input: impl Into<String>) -> Self
The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:
-
An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.
-
A logical destination (specified using an ARN) belonging to a different account, for cross-account delivery.
If you are setting up a cross-account subscription, the destination must have an IAM policy associated with it that allows the sender to send logs to the destination. For more information, see PutDestinationPolicy.
-
An Amazon Kinesis Firehose delivery stream belonging to the same account as the subscription filter, for same-account delivery.
-
A Lambda function belonging to the same account as the subscription filter, for same-account delivery.
sourcepub fn set_destination_arn(self, input: Option<String>) -> Self
pub fn set_destination_arn(self, input: Option<String>) -> Self
The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:
-
An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.
-
A logical destination (specified using an ARN) belonging to a different account, for cross-account delivery.
If you are setting up a cross-account subscription, the destination must have an IAM policy associated with it that allows the sender to send logs to the destination. For more information, see PutDestinationPolicy.
-
An Amazon Kinesis Firehose delivery stream belonging to the same account as the subscription filter, for same-account delivery.
-
A Lambda function belonging to the same account as the subscription filter, for same-account delivery.
sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
sourcepub fn distribution(self, input: Distribution) -> Self
pub fn distribution(self, input: Distribution) -> Self
The method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream.
sourcepub fn set_distribution(self, input: Option<Distribution>) -> Self
pub fn set_distribution(self, input: Option<Distribution>) -> Self
The method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream.
Trait Implementations
sourceimpl Clone for PutSubscriptionFilter
impl Clone for PutSubscriptionFilter
sourcefn clone(&self) -> PutSubscriptionFilter
fn clone(&self) -> PutSubscriptionFilter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PutSubscriptionFilter
impl Send for PutSubscriptionFilter
impl Sync for PutSubscriptionFilter
impl Unpin for PutSubscriptionFilter
impl !UnwindSafe for PutSubscriptionFilter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more