public class PutSubscriptionFilterRequest extends AmazonWebServiceRequest implements java.io.Serializable
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.
Constructor and Description |
---|
PutSubscriptionFilterRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDestinationArn()
The ARN of the destination to deliver matching log events to.
|
java.lang.String |
getDistribution()
The method used to distribute log data to the destination.
|
java.lang.String |
getFilterName()
A name for the subscription filter.
|
java.lang.String |
getFilterPattern()
A filter pattern for subscribing to a filtered stream of log events.
|
java.lang.String |
getLogGroupName()
The name of the log group.
|
java.lang.String |
getRoleArn()
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver
ingested log events to the destination stream.
|
int |
hashCode() |
void |
setDestinationArn(java.lang.String destinationArn)
The ARN of the destination to deliver matching log events to.
|
void |
setDistribution(Distribution distribution)
The method used to distribute log data to the destination.
|
void |
setDistribution(java.lang.String distribution)
The method used to distribute log data to the destination.
|
void |
setFilterName(java.lang.String filterName)
A name for the subscription filter.
|
void |
setFilterPattern(java.lang.String filterPattern)
A filter pattern for subscribing to a filtered stream of log events.
|
void |
setLogGroupName(java.lang.String logGroupName)
The name of the log group.
|
void |
setRoleArn(java.lang.String roleArn)
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver
ingested log events to the destination stream.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutSubscriptionFilterRequest |
withDestinationArn(java.lang.String destinationArn)
The ARN of the destination to deliver matching log events to.
|
PutSubscriptionFilterRequest |
withDistribution(Distribution distribution)
The method used to distribute log data to the destination.
|
PutSubscriptionFilterRequest |
withDistribution(java.lang.String distribution)
The method used to distribute log data to the destination.
|
PutSubscriptionFilterRequest |
withFilterName(java.lang.String filterName)
A name for the subscription filter.
|
PutSubscriptionFilterRequest |
withFilterPattern(java.lang.String filterPattern)
A filter pattern for subscribing to a filtered stream of log events.
|
PutSubscriptionFilterRequest |
withLogGroupName(java.lang.String logGroupName)
The name of the log group.
|
PutSubscriptionFilterRequest |
withRoleArn(java.lang.String roleArn)
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver
ingested log events to the destination stream.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getLogGroupName()
The name of the log group.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
The name of the log group.
public void setLogGroupName(java.lang.String logGroupName)
The name of the log group.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName
- The name of the log group.
public PutSubscriptionFilterRequest withLogGroupName(java.lang.String logGroupName)
The name of the log group.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName
- The name of the log group.
public java.lang.String getFilterName()
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.
Constraints:
Length: 1 - 512
Pattern: [^:*]*
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.
public void setFilterName(java.lang.String filterName)
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.
Constraints:
Length: 1 - 512
Pattern: [^:*]*
filterName
-
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.
public PutSubscriptionFilterRequest withFilterName(java.lang.String filterName)
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: [^:*]*
filterName
-
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.
public java.lang.String getFilterPattern()
A filter pattern for subscribing to a filtered stream of log events.
Constraints:
Length: 0 - 1024
A filter pattern for subscribing to a filtered stream of log events.
public void setFilterPattern(java.lang.String filterPattern)
A filter pattern for subscribing to a filtered stream of log events.
Constraints:
Length: 0 - 1024
filterPattern
- A filter pattern for subscribing to a filtered stream of log events.
public PutSubscriptionFilterRequest withFilterPattern(java.lang.String filterPattern)
A filter pattern for subscribing to a filtered stream of log events.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 1024
filterPattern
- A filter pattern for subscribing to a filtered stream of log events.
public java.lang.String getDestinationArn()
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.
Constraints:
Length: 1 -
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.
public void setDestinationArn(java.lang.String destinationArn)
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.
Constraints:
Length: 1 -
destinationArn
- 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.
public PutSubscriptionFilterRequest withDestinationArn(java.lang.String destinationArn)
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
destinationArn
- 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.
public java.lang.String getRoleArn()
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.
Constraints:
Length: 1 -
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.
public void setRoleArn(java.lang.String roleArn)
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.
Constraints:
Length: 1 -
roleArn
- 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.
public PutSubscriptionFilterRequest withRoleArn(java.lang.String roleArn)
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
roleArn
- 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.
public java.lang.String getDistribution()
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.
Constraints:
Allowed Values: Random, ByLogStream
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.
Distribution
public void setDistribution(java.lang.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.
Constraints:
Allowed Values: Random, ByLogStream
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.
Distribution
public PutSubscriptionFilterRequest withDistribution(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Random, ByLogStream
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.
Distribution
public void setDistribution(Distribution 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.
Constraints:
Allowed Values: Random, ByLogStream
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.
Distribution
public PutSubscriptionFilterRequest withDistribution(Distribution 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Random, ByLogStream
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.
Distribution
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.