Class LogSubscriptionFilter
Provides a CloudWatch Logs subscription filter resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var testLambdafunctionLogfilter = new Aws.CloudWatch.LogSubscriptionFilter("testLambdafunctionLogfilter", new Aws.CloudWatch.LogSubscriptionFilterArgs
{
DestinationArn = aws_kinesis_stream.Test_logstream.Arn,
Distribution = "Random",
FilterPattern = "logtype test",
LogGroup = "/aws/lambda/example_lambda_name",
RoleArn = aws_iam_role.Iam_for_lambda.Arn,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.CloudWatch
Assembly: Pulumi.Aws.dll
Syntax
public class LogSubscriptionFilter : CustomResource
Constructors
View SourceLogSubscriptionFilter(String, LogSubscriptionFilterArgs, CustomResourceOptions)
Create a LogSubscriptionFilter resource with the given unique name, arguments, and options.
Declaration
public LogSubscriptionFilter(string name, LogSubscriptionFilterArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| LogSubscriptionFilterArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDestinationArn
The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
Declaration
public Output<string> DestinationArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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. Valid values are "Random" and "ByLogStream".
Declaration
public Output<string> Distribution { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
FilterPattern
A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events.
Declaration
public Output<string> FilterPattern { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LogGroup
The name of the log group to associate the subscription filter with
Declaration
public Output<string> LogGroup { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
A name for the subscription filter
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RoleArn
The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to deliver ingested log events to the destination. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
Declaration
public Output<string> RoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, LogSubscriptionFilterState, CustomResourceOptions)
Get an existing LogSubscriptionFilter resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static LogSubscriptionFilter Get(string name, Input<string> id, LogSubscriptionFilterState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| LogSubscriptionFilterState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| LogSubscriptionFilter |