ILogGroup Interface
Properties
envResourceEnvironmentenvResourceEnvironmentenvResourceEnvironmentEnvResourceEnvironmentEnvResourceEnvironmentrequired#notes
For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.
logGroupRefLogGroupReferencelog_group_refLogGroupReferencelogGroupRefLogGroupReferenceLogGroupRefLogGroupReferenceLogGroupRefLogGroupReferencerequired#Methods
addMetricFilter(id: string, props: MetricFilterOptions): MetricFilterdef add_metric_filter(self, id: str, props: MetricFilterOptions) -> MetricFilterpublic MetricFilter addMetricFilter(String id, MetricFilterOptions props)public MetricFilter AddMetricFilter(string id, MetricFilterOptions props)func AddMetricFilter(Id *string, Props MetricFilterOptions) MetricFilter#2 parameters
Parameters
ididididId— Unique identifier for the construct in its parent.propspropspropspropsProps— Properties for creating the MetricFilter.
addStream(id: string, props?: StreamOptions): LogStreamdef add_stream(self, id: str, props: typing.Optional[StreamOptions] = None) -> LogStreampublic LogStream addStream(String id, StreamOptions props)public LogStream AddStream(string id, StreamOptions? props = null)func AddStream(Id *string, Props StreamOptions) LogStream#2 parameters
Parameters
ididididId— Unique identifier for the construct in its parent.propspropspropspropsProps— Properties for creating the LogStream.
addSubscriptionFilter(id: string, props: SubscriptionFilterOptions): SubscriptionFilterdef add_subscription_filter(self, id: str, props: SubscriptionFilterOptions) -> SubscriptionFilterpublic SubscriptionFilter addSubscriptionFilter(String id, SubscriptionFilterOptions props)public SubscriptionFilter AddSubscriptionFilter(string id, SubscriptionFilterOptions props)func AddSubscriptionFilter(Id *string, Props SubscriptionFilterOptions) SubscriptionFilter#2 parameters
Parameters
ididididId— Unique identifier for the construct in its parent.propspropspropspropsProps— Properties for creating the SubscriptionFilter.
addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResultdef add_to_resource_policy(self, statement: PolicyStatement) -> AddToResourcePolicyResultpublic AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement)public AddToResourcePolicyResult AddToResourcePolicy(PolicyStatement statement)func AddToResourcePolicy(Statement PolicyStatement) AddToResourcePolicyResult#addTransformer(id: string, props: TransformerOptions): Transformerdef add_transformer(self, id: str, props: TransformerOptions) -> Transformerpublic Transformer addTransformer(String id, TransformerOptions props)public Transformer AddTransformer(string id, TransformerOptions props)func AddTransformer(Id *string, Props TransformerOptions) Transformer#2 parameters
Parameters
ididididId— Unique identifier for the construct in its parent.propspropspropspropsProps— Properties for creating the Transformer.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).
extractMetric(jsonField: string, metricNamespace: string, metricName: string): Metricdef extract_metric(self, json_field: str, metric_namespace: str, metric_name: str) -> Metricpublic Metric extractMetric(String jsonField, String metricNamespace, String metricName)public Metric ExtractMetric(string jsonField, string metricNamespace, string metricName)func ExtractMetric(JsonField *string, MetricNamespace *string, MetricName *string) Metric#Creates a MetricFilter on this LogGroup that will extract the value of the indicated JSON field in all records where it occurs.
The metric will be available in CloudWatch Metrics under the indicated namespace and name.
3 parameters · returns
Parameters
jsonFieldjson_fieldjsonFieldjsonFieldJsonField— JSON field to extract (example: '$.myfield').metricNamespacemetric_namespacemetricNamespacemetricNamespaceMetricNamespace— Namespace to emit the metric under.metricNamemetric_namemetricNamemetricNameMetricName— Name to emit the metric under.
Returns: A Metric object representing the extracted metric
grant(grantee: IGrantable, ...actions: string[]): Grantdef grant(self, grantee: IGrantable, actions: str) -> Grantpublic Grant grant(IGrantable grantee, String actions)public Grant Grant(IGrantable grantee, string actions)func Grant(Grantee IGrantable, Actions *string) Grant#grantRead(grantee: IGrantable): Grantdef grant_read(self, grantee: IGrantable) -> Grantpublic Grant grantRead(IGrantable grantee)public Grant GrantRead(IGrantable grantee)func GrantRead(Grantee IGrantable) Grant#grantWrite(grantee: IGrantable): Grantdef grant_write(self, grantee: IGrantable) -> Grantpublic Grant grantWrite(IGrantable grantee)public Grant GrantWrite(IGrantable grantee)func GrantWrite(Grantee IGrantable) Grant#logGroupPhysicalName(): stringdef log_group_physical_name(self, ) -> strpublic String logGroupPhysicalName()public string LogGroupPhysicalName()func LogGroupPhysicalName() *string#metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric#2 parameters
Parameters
metricNamemetric_namemetricNamemetricNameMetricName— The name of the metric.propspropspropspropsProps— Properties for the metric.
metricIncomingBytes(props?: MetricOptions): Metricdef metric_incoming_bytes(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricIncomingBytes(MetricOptions props)public Metric MetricIncomingBytes(MetricOptions? props = null)func MetricIncomingBytes(Props MetricOptions) Metric#When used with the LogGroupName dimension, this is the volume of log events in uncompressed bytes uploaded to the log group.
1 parameter
Parameters
propspropspropspropsProps— Properties for the Cloudwatch metric.
metricIncomingLogEvents(props?: MetricOptions): Metricdef metric_incoming_log_events(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricIncomingLogEvents(MetricOptions props)public Metric MetricIncomingLogEvents(MetricOptions? props = null)func MetricIncomingLogEvents(Props MetricOptions) Metric#When used with the LogGroupName dimension, this is the number of log events uploaded to the log group.
1 parameter
Parameters
propspropspropspropsProps— Properties for the Cloudwatch metric.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining