amazonka-cloudwatch-logs-1.6.0: Amazon CloudWatch Logs SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CloudWatchLogs.PutSubscriptionFilter

Contents

Description

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. 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 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 AWS Lambda function that belongs to the same account as the subscription filter, for same-account delivery.

There can only be one subscription filter associated with a log group. If you are updating an existing filter, you must specify the correct name in filterName . Otherwise, the call fails because you cannot associate a second filter with a log group.

Synopsis

Creating a Request

putSubscriptionFilter #

Creates a value of PutSubscriptionFilter with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • psfDistribution - 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.
  • psfRoleARN - 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.
  • psfLogGroupName - The name of the log group.
  • psfFilterName - A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName . Otherwise, the call fails because you cannot associate a second filter with a log group. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters .
  • psfFilterPattern - A filter pattern for subscribing to a filtered stream of log events.
  • psfDestinationARN - 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. * An Amazon Kinesis Firehose delivery stream belonging to the same account as the subscription filter, for same-account delivery. * An AWS Lambda function belonging to the same account as the subscription filter, for same-account delivery.

data PutSubscriptionFilter #

See: putSubscriptionFilter smart constructor.

Instances

Eq PutSubscriptionFilter # 
Data PutSubscriptionFilter # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutSubscriptionFilter -> c PutSubscriptionFilter #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutSubscriptionFilter #

toConstr :: PutSubscriptionFilter -> Constr #

dataTypeOf :: PutSubscriptionFilter -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutSubscriptionFilter) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutSubscriptionFilter) #

gmapT :: (forall b. Data b => b -> b) -> PutSubscriptionFilter -> PutSubscriptionFilter #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutSubscriptionFilter -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutSubscriptionFilter -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutSubscriptionFilter -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutSubscriptionFilter -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutSubscriptionFilter -> m PutSubscriptionFilter #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSubscriptionFilter -> m PutSubscriptionFilter #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSubscriptionFilter -> m PutSubscriptionFilter #

Read PutSubscriptionFilter # 
Show PutSubscriptionFilter # 
Generic PutSubscriptionFilter # 
Hashable PutSubscriptionFilter # 
ToJSON PutSubscriptionFilter # 
NFData PutSubscriptionFilter # 

Methods

rnf :: PutSubscriptionFilter -> () #

AWSRequest PutSubscriptionFilter # 
ToHeaders PutSubscriptionFilter # 
ToPath PutSubscriptionFilter # 
ToQuery PutSubscriptionFilter # 
type Rep PutSubscriptionFilter # 
type Rep PutSubscriptionFilter = D1 * (MetaData "PutSubscriptionFilter" "Network.AWS.CloudWatchLogs.PutSubscriptionFilter" "amazonka-cloudwatch-logs-1.6.0-HKcajwmKjdx6seMLJU2od6" False) (C1 * (MetaCons "PutSubscriptionFilter'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_psfDistribution") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Distribution))) ((:*:) * (S1 * (MetaSel (Just Symbol "_psfRoleARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_psfLogGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_psfFilterName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "_psfFilterPattern") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_psfDestinationARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))))
type Rs PutSubscriptionFilter # 

Request Lenses

psfDistribution :: Lens' PutSubscriptionFilter (Maybe Distribution) #

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.

psfRoleARN :: Lens' PutSubscriptionFilter (Maybe Text) #

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.

psfLogGroupName :: Lens' PutSubscriptionFilter Text #

The name of the log group.

psfFilterName :: Lens' PutSubscriptionFilter Text #

A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName . Otherwise, the call fails because you cannot associate a second filter with a log group. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters .

psfFilterPattern :: Lens' PutSubscriptionFilter Text #

A filter pattern for subscribing to a filtered stream of log events.

psfDestinationARN :: Lens' PutSubscriptionFilter Text #

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. * An Amazon Kinesis Firehose delivery stream belonging to the same account as the subscription filter, for same-account delivery. * An AWS Lambda function belonging to the same account as the subscription filter, for same-account delivery.

Destructuring the Response

putSubscriptionFilterResponse :: PutSubscriptionFilterResponse #

Creates a value of PutSubscriptionFilterResponse with the minimum fields required to make a request.

data PutSubscriptionFilterResponse #

See: putSubscriptionFilterResponse smart constructor.

Instances

Eq PutSubscriptionFilterResponse # 
Data PutSubscriptionFilterResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutSubscriptionFilterResponse -> c PutSubscriptionFilterResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutSubscriptionFilterResponse #

toConstr :: PutSubscriptionFilterResponse -> Constr #

dataTypeOf :: PutSubscriptionFilterResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutSubscriptionFilterResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutSubscriptionFilterResponse) #

gmapT :: (forall b. Data b => b -> b) -> PutSubscriptionFilterResponse -> PutSubscriptionFilterResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutSubscriptionFilterResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutSubscriptionFilterResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutSubscriptionFilterResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutSubscriptionFilterResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutSubscriptionFilterResponse -> m PutSubscriptionFilterResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSubscriptionFilterResponse -> m PutSubscriptionFilterResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutSubscriptionFilterResponse -> m PutSubscriptionFilterResponse #

Read PutSubscriptionFilterResponse # 
Show PutSubscriptionFilterResponse # 
Generic PutSubscriptionFilterResponse # 
NFData PutSubscriptionFilterResponse # 
type Rep PutSubscriptionFilterResponse # 
type Rep PutSubscriptionFilterResponse = D1 * (MetaData "PutSubscriptionFilterResponse" "Network.AWS.CloudWatchLogs.PutSubscriptionFilter" "amazonka-cloudwatch-logs-1.6.0-HKcajwmKjdx6seMLJU2od6" False) (C1 * (MetaCons "PutSubscriptionFilterResponse'" PrefixI False) (U1 *))