Documentation ¶
Index ¶
- func CfnDestination_CFN_RESOURCE_TYPE_NAME() *string
- func CfnDestination_IsCfnElement(x interface{}) *bool
- func CfnDestination_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnDestination_IsConstruct(x interface{}) *bool
- func CfnLogGroup_CFN_RESOURCE_TYPE_NAME() *string
- func CfnLogGroup_IsCfnElement(x interface{}) *bool
- func CfnLogGroup_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnLogGroup_IsConstruct(x interface{}) *bool
- func CfnLogStream_CFN_RESOURCE_TYPE_NAME() *string
- func CfnLogStream_IsCfnElement(x interface{}) *bool
- func CfnLogStream_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnLogStream_IsConstruct(x interface{}) *bool
- func CfnMetricFilter_CFN_RESOURCE_TYPE_NAME() *string
- func CfnMetricFilter_IsCfnElement(x interface{}) *bool
- func CfnMetricFilter_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnMetricFilter_IsConstruct(x interface{}) *bool
- func CfnQueryDefinition_CFN_RESOURCE_TYPE_NAME() *string
- func CfnQueryDefinition_IsCfnElement(x interface{}) *bool
- func CfnQueryDefinition_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnQueryDefinition_IsConstruct(x interface{}) *bool
- func CfnResourcePolicy_CFN_RESOURCE_TYPE_NAME() *string
- func CfnResourcePolicy_IsCfnElement(x interface{}) *bool
- func CfnResourcePolicy_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnResourcePolicy_IsConstruct(x interface{}) *bool
- func CfnSubscriptionFilter_CFN_RESOURCE_TYPE_NAME() *string
- func CfnSubscriptionFilter_IsCfnElement(x interface{}) *bool
- func CfnSubscriptionFilter_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnSubscriptionFilter_IsConstruct(x interface{}) *bool
- func CrossAccountDestination_IsConstruct(x interface{}) *bool
- func CrossAccountDestination_IsResource(construct awscdk.IConstruct) *bool
- func LogGroup_IsConstruct(x interface{}) *bool
- func LogGroup_IsResource(construct awscdk.IConstruct) *bool
- func LogRetention_IsConstruct(x interface{}) *bool
- func LogStream_IsConstruct(x interface{}) *bool
- func LogStream_IsResource(construct awscdk.IConstruct) *bool
- func MetricFilter_IsConstruct(x interface{}) *bool
- func MetricFilter_IsResource(construct awscdk.IConstruct) *bool
- func NewCfnDestination_Override(c CfnDestination, scope awscdk.Construct, id *string, ...)
- func NewCfnLogGroup_Override(c CfnLogGroup, scope awscdk.Construct, id *string, props *CfnLogGroupProps)
- func NewCfnLogStream_Override(c CfnLogStream, scope awscdk.Construct, id *string, props *CfnLogStreamProps)
- func NewCfnMetricFilter_Override(c CfnMetricFilter, scope awscdk.Construct, id *string, ...)
- func NewCfnQueryDefinition_Override(c CfnQueryDefinition, scope awscdk.Construct, id *string, ...)
- func NewCfnResourcePolicy_Override(c CfnResourcePolicy, scope awscdk.Construct, id *string, ...)
- func NewCfnSubscriptionFilter_Override(c CfnSubscriptionFilter, scope awscdk.Construct, id *string, ...)
- func NewCrossAccountDestination_Override(c CrossAccountDestination, scope constructs.Construct, id *string, ...)
- func NewFilterPattern_Override(f FilterPattern)
- func NewJsonPattern_Override(j JsonPattern, jsonPatternString *string)
- func NewLogGroup_Override(l LogGroup, scope constructs.Construct, id *string, props *LogGroupProps)
- func NewLogRetention_Override(l LogRetention, scope constructs.Construct, id *string, ...)
- func NewLogStream_Override(l LogStream, scope constructs.Construct, id *string, props *LogStreamProps)
- func NewMetricFilter_Override(m MetricFilter, scope constructs.Construct, id *string, ...)
- func NewResourcePolicy_Override(r ResourcePolicy, scope constructs.Construct, id *string, ...)
- func NewSpaceDelimitedTextPattern_Override(s SpaceDelimitedTextPattern, columns *[]*string, ...)
- func NewSubscriptionFilter_Override(s SubscriptionFilter, scope constructs.Construct, id *string, ...)
- func ResourcePolicy_IsConstruct(x interface{}) *bool
- func ResourcePolicy_IsResource(construct awscdk.IConstruct) *bool
- func SubscriptionFilter_IsConstruct(x interface{}) *bool
- func SubscriptionFilter_IsResource(construct awscdk.IConstruct) *bool
- type CfnDestination
- type CfnDestinationProps
- type CfnLogGroup
- type CfnLogGroupProps
- type CfnLogStream
- type CfnLogStreamProps
- type CfnMetricFilter
- type CfnMetricFilterProps
- type CfnMetricFilter_MetricTransformationProperty
- type CfnQueryDefinition
- type CfnQueryDefinitionProps
- type CfnResourcePolicy
- type CfnResourcePolicyProps
- type CfnSubscriptionFilter
- type CfnSubscriptionFilterProps
- type ColumnRestriction
- type CrossAccountDestination
- type CrossAccountDestinationProps
- type FilterPattern
- type IFilterPattern
- func FilterPattern_AllEvents() IFilterPattern
- func FilterPattern_AllTerms(terms ...*string) IFilterPattern
- func FilterPattern_AnyTerm(terms ...*string) IFilterPattern
- func FilterPattern_AnyTermGroup(termGroups ...*[]*string) IFilterPattern
- func FilterPattern_Literal(logPatternString *string) IFilterPattern
- type ILogGroup
- type ILogStream
- type ILogSubscriptionDestination
- type JsonPattern
- func FilterPattern_All(patterns ...JsonPattern) JsonPattern
- func FilterPattern_Any(patterns ...JsonPattern) JsonPattern
- func FilterPattern_BooleanValue(jsonField *string, value *bool) JsonPattern
- func FilterPattern_Exists(jsonField *string) JsonPattern
- func FilterPattern_IsNull(jsonField *string) JsonPattern
- func FilterPattern_NotExists(jsonField *string) JsonPattern
- func FilterPattern_NumberValue(jsonField *string, comparison *string, value *float64) JsonPattern
- func FilterPattern_StringValue(jsonField *string, comparison *string, value *string) JsonPattern
- type LogGroup
- type LogGroupProps
- type LogRetention
- type LogRetentionProps
- type LogRetentionRetryOptions
- type LogStream
- type LogStreamProps
- type LogSubscriptionDestinationConfig
- type MetricFilter
- type MetricFilterOptions
- type MetricFilterProps
- type ResourcePolicy
- type ResourcePolicyProps
- type RetentionDays
- type SpaceDelimitedTextPattern
- type StreamOptions
- type SubscriptionFilter
- type SubscriptionFilterOptions
- type SubscriptionFilterProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CfnDestination_CFN_RESOURCE_TYPE_NAME ¶
func CfnDestination_CFN_RESOURCE_TYPE_NAME() *string
func CfnDestination_IsCfnElement ¶
func CfnDestination_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnDestination_IsCfnResource ¶
func CfnDestination_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnDestination_IsConstruct ¶
func CfnDestination_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnLogGroup_CFN_RESOURCE_TYPE_NAME ¶
func CfnLogGroup_CFN_RESOURCE_TYPE_NAME() *string
func CfnLogGroup_IsCfnElement ¶
func CfnLogGroup_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnLogGroup_IsCfnResource ¶
func CfnLogGroup_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnLogGroup_IsConstruct ¶
func CfnLogGroup_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnLogStream_CFN_RESOURCE_TYPE_NAME ¶
func CfnLogStream_CFN_RESOURCE_TYPE_NAME() *string
func CfnLogStream_IsCfnElement ¶
func CfnLogStream_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnLogStream_IsCfnResource ¶
func CfnLogStream_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnLogStream_IsConstruct ¶
func CfnLogStream_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnMetricFilter_CFN_RESOURCE_TYPE_NAME ¶
func CfnMetricFilter_CFN_RESOURCE_TYPE_NAME() *string
func CfnMetricFilter_IsCfnElement ¶
func CfnMetricFilter_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnMetricFilter_IsCfnResource ¶
func CfnMetricFilter_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnMetricFilter_IsConstruct ¶
func CfnMetricFilter_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnQueryDefinition_CFN_RESOURCE_TYPE_NAME ¶
func CfnQueryDefinition_CFN_RESOURCE_TYPE_NAME() *string
func CfnQueryDefinition_IsCfnElement ¶
func CfnQueryDefinition_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnQueryDefinition_IsCfnResource ¶
func CfnQueryDefinition_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnQueryDefinition_IsConstruct ¶
func CfnQueryDefinition_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnResourcePolicy_CFN_RESOURCE_TYPE_NAME ¶
func CfnResourcePolicy_CFN_RESOURCE_TYPE_NAME() *string
func CfnResourcePolicy_IsCfnElement ¶
func CfnResourcePolicy_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnResourcePolicy_IsCfnResource ¶
func CfnResourcePolicy_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnResourcePolicy_IsConstruct ¶
func CfnResourcePolicy_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnSubscriptionFilter_CFN_RESOURCE_TYPE_NAME ¶
func CfnSubscriptionFilter_CFN_RESOURCE_TYPE_NAME() *string
func CfnSubscriptionFilter_IsCfnElement ¶
func CfnSubscriptionFilter_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnSubscriptionFilter_IsCfnResource ¶
func CfnSubscriptionFilter_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnSubscriptionFilter_IsConstruct ¶
func CfnSubscriptionFilter_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CrossAccountDestination_IsConstruct ¶
func CrossAccountDestination_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CrossAccountDestination_IsResource ¶
func CrossAccountDestination_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func LogGroup_IsConstruct ¶
func LogGroup_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func LogGroup_IsResource ¶
func LogGroup_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func LogRetention_IsConstruct ¶
func LogRetention_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func LogStream_IsConstruct ¶
func LogStream_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func LogStream_IsResource ¶
func LogStream_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func MetricFilter_IsConstruct ¶
func MetricFilter_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func MetricFilter_IsResource ¶
func MetricFilter_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func NewCfnDestination_Override ¶
func NewCfnDestination_Override(c CfnDestination, scope awscdk.Construct, id *string, props *CfnDestinationProps)
Create a new `AWS::Logs::Destination`.
func NewCfnLogGroup_Override ¶
func NewCfnLogGroup_Override(c CfnLogGroup, scope awscdk.Construct, id *string, props *CfnLogGroupProps)
Create a new `AWS::Logs::LogGroup`.
func NewCfnLogStream_Override ¶
func NewCfnLogStream_Override(c CfnLogStream, scope awscdk.Construct, id *string, props *CfnLogStreamProps)
Create a new `AWS::Logs::LogStream`.
func NewCfnMetricFilter_Override ¶
func NewCfnMetricFilter_Override(c CfnMetricFilter, scope awscdk.Construct, id *string, props *CfnMetricFilterProps)
Create a new `AWS::Logs::MetricFilter`.
func NewCfnQueryDefinition_Override ¶
func NewCfnQueryDefinition_Override(c CfnQueryDefinition, scope awscdk.Construct, id *string, props *CfnQueryDefinitionProps)
Create a new `AWS::Logs::QueryDefinition`.
func NewCfnResourcePolicy_Override ¶
func NewCfnResourcePolicy_Override(c CfnResourcePolicy, scope awscdk.Construct, id *string, props *CfnResourcePolicyProps)
Create a new `AWS::Logs::ResourcePolicy`.
func NewCfnSubscriptionFilter_Override ¶
func NewCfnSubscriptionFilter_Override(c CfnSubscriptionFilter, scope awscdk.Construct, id *string, props *CfnSubscriptionFilterProps)
Create a new `AWS::Logs::SubscriptionFilter`.
func NewCrossAccountDestination_Override ¶
func NewCrossAccountDestination_Override(c CrossAccountDestination, scope constructs.Construct, id *string, props *CrossAccountDestinationProps)
Experimental.
func NewJsonPattern_Override ¶
func NewJsonPattern_Override(j JsonPattern, jsonPatternString *string)
Experimental.
func NewLogGroup_Override ¶
func NewLogGroup_Override(l LogGroup, scope constructs.Construct, id *string, props *LogGroupProps)
Experimental.
func NewLogRetention_Override ¶
func NewLogRetention_Override(l LogRetention, scope constructs.Construct, id *string, props *LogRetentionProps)
Experimental.
func NewLogStream_Override ¶
func NewLogStream_Override(l LogStream, scope constructs.Construct, id *string, props *LogStreamProps)
Experimental.
func NewMetricFilter_Override ¶
func NewMetricFilter_Override(m MetricFilter, scope constructs.Construct, id *string, props *MetricFilterProps)
Experimental.
func NewResourcePolicy_Override ¶
func NewResourcePolicy_Override(r ResourcePolicy, scope constructs.Construct, id *string, props *ResourcePolicyProps)
Experimental.
func NewSpaceDelimitedTextPattern_Override ¶
func NewSpaceDelimitedTextPattern_Override(s SpaceDelimitedTextPattern, columns *[]*string, restrictions *map[string]*[]*ColumnRestriction)
Experimental.
func NewSubscriptionFilter_Override ¶
func NewSubscriptionFilter_Override(s SubscriptionFilter, scope constructs.Construct, id *string, props *SubscriptionFilterProps)
Experimental.
func ResourcePolicy_IsConstruct ¶
func ResourcePolicy_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func ResourcePolicy_IsResource ¶
func ResourcePolicy_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func SubscriptionFilter_IsConstruct ¶
func SubscriptionFilter_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func SubscriptionFilter_IsResource ¶
func SubscriptionFilter_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
Types ¶
type CfnDestination ¶
type CfnDestination interface { awscdk.CfnResource awscdk.IInspectable AttrArn() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string DestinationName() *string SetDestinationName(val *string) DestinationPolicy() *string SetDestinationPolicy(val *string) LogicalId() *string Node() awscdk.ConstructNode Ref() *string RoleArn() *string SetRoleArn(val *string) Stack() awscdk.Stack TargetArn() *string SetTargetArn(val *string) UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Logs::Destination`.
The AWS::Logs::Destination resource specifies a CloudWatch Logs destination. A destination encapsulates a physical resource (such as an Amazon Kinesis data stream) and enables you to subscribe that resource to a stream of log events.
TODO: EXAMPLE
func NewCfnDestination ¶
func NewCfnDestination(scope awscdk.Construct, id *string, props *CfnDestinationProps) CfnDestination
Create a new `AWS::Logs::Destination`.
type CfnDestinationProps ¶
type CfnDestinationProps struct { // The name of the destination. DestinationName *string `json:"destinationName" yaml:"destinationName"` // An IAM policy document that governs which AWS accounts can create subscription filters against this destination. DestinationPolicy *string `json:"destinationPolicy" yaml:"destinationPolicy"` // The ARN of an IAM role that permits CloudWatch Logs to send data to the specified AWS resource. RoleArn *string `json:"roleArn" yaml:"roleArn"` // The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream). TargetArn *string `json:"targetArn" yaml:"targetArn"` }
Properties for defining a `CfnDestination`.
TODO: EXAMPLE
type CfnLogGroup ¶
type CfnLogGroup interface { awscdk.CfnResource awscdk.IInspectable AttrArn() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string KmsKeyId() *string SetKmsKeyId(val *string) LogGroupName() *string SetLogGroupName(val *string) LogicalId() *string Node() awscdk.ConstructNode Ref() *string RetentionInDays() *float64 SetRetentionInDays(val *float64) Stack() awscdk.Stack Tags() awscdk.TagManager UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Logs::LogGroup`.
The `AWS::Logs::LogGroup` resource specifies a log group. A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.
You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:
- Log group names must be unique within a Region for an AWS account. - Log group names can be between 1 and 512 characters long. - Log group names consist of the following characters: a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
TODO: EXAMPLE
func NewCfnLogGroup ¶
func NewCfnLogGroup(scope awscdk.Construct, id *string, props *CfnLogGroupProps) CfnLogGroup
Create a new `AWS::Logs::LogGroup`.
type CfnLogGroupProps ¶
type CfnLogGroupProps struct { // The Amazon Resource Name (ARN) of the AWS KMS key to use when encrypting log data. // // To associate an AWS KMS key with the log group, specify the ARN of that KMS key here. If you do so, ingested data is encrypted using this key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs . This enables CloudWatch Logs to decrypt this data whenever it is requested. // // If you attempt to associate a KMS key with the log group but the KMS key doesn't exist or is deactivated, you will receive an `InvalidParameterException` error. // // Log group data is always encrypted in CloudWatch Logs . If you omit this key, the encryption does not use AWS KMS . For more information, see [Encrypt log data in CloudWatch Logs using AWS Key Management Service](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html) KmsKeyId *string `json:"kmsKeyId" yaml:"kmsKeyId"` // The name of the log group. // // If you don't specify a name, AWS CloudFormation generates a unique ID for the log group. LogGroupName *string `json:"logGroupName" yaml:"logGroupName"` // The number of days to retain the log events in the specified log group. // // Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. // // To set a log group to never have log events expire, use [DeleteRetentionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html) . RetentionInDays *float64 `json:"retentionInDays" yaml:"retentionInDays"` // An array of key-value pairs to apply to the log group. // // For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) . Tags *[]*awscdk.CfnTag `json:"tags" yaml:"tags"` }
Properties for defining a `CfnLogGroup`.
TODO: EXAMPLE
type CfnLogStream ¶
type CfnLogStream interface { awscdk.CfnResource awscdk.IInspectable CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string LogGroupName() *string SetLogGroupName(val *string) LogicalId() *string LogStreamName() *string SetLogStreamName(val *string) Node() awscdk.ConstructNode Ref() *string Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Logs::LogStream`.
The `AWS::Logs::LogStream` resource specifies an Amazon CloudWatch Logs log stream in a specific log group. A log stream represents the sequence of events coming from an application instance or resource that you are monitoring.
There is no limit on the number of log streams that you can create for a log group.
You must use the following guidelines when naming a log stream:
- Log stream names must be unique within the log group. - Log stream names can be between 1 and 512 characters long. - The ':' (colon) and '*' (asterisk) characters are not allowed.
TODO: EXAMPLE
func NewCfnLogStream ¶
func NewCfnLogStream(scope awscdk.Construct, id *string, props *CfnLogStreamProps) CfnLogStream
Create a new `AWS::Logs::LogStream`.
type CfnLogStreamProps ¶
type CfnLogStreamProps struct { // The name of the log group where the log stream is created. LogGroupName *string `json:"logGroupName" yaml:"logGroupName"` // The name of the log stream. // // The name must be unique within the log group. LogStreamName *string `json:"logStreamName" yaml:"logStreamName"` }
Properties for defining a `CfnLogStream`.
TODO: EXAMPLE
type CfnMetricFilter ¶
type CfnMetricFilter interface { awscdk.CfnResource awscdk.IInspectable CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string FilterPattern() *string SetFilterPattern(val *string) LogGroupName() *string SetLogGroupName(val *string) LogicalId() *string MetricTransformations() interface{} SetMetricTransformations(val interface{}) Node() awscdk.ConstructNode Ref() *string Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Logs::MetricFilter`.
The `AWS::Logs::MetricFilter` resource specifies a metric filter that describes how CloudWatch Logs extracts information from logs and transforms it into Amazon CloudWatch metrics. If you have multiple metric filters that are associated with a log group, all the filters are applied to the log streams in that group.
The maximum number of metric filters that can be associated with a log group is 100.
TODO: EXAMPLE
func NewCfnMetricFilter ¶
func NewCfnMetricFilter(scope awscdk.Construct, id *string, props *CfnMetricFilterProps) CfnMetricFilter
Create a new `AWS::Logs::MetricFilter`.
type CfnMetricFilterProps ¶
type CfnMetricFilterProps struct { // A filter pattern for extracting metric data out of ingested log events. // // For more information, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) . FilterPattern *string `json:"filterPattern" yaml:"filterPattern"` // The name of an existing log group that you want to associate with this metric filter. LogGroupName *string `json:"logGroupName" yaml:"logGroupName"` // The metric transformations. MetricTransformations interface{} `json:"metricTransformations" yaml:"metricTransformations"` }
Properties for defining a `CfnMetricFilter`.
TODO: EXAMPLE
type CfnMetricFilter_MetricTransformationProperty ¶
type CfnMetricFilter_MetricTransformationProperty struct { // The name of the CloudWatch metric. MetricName *string `json:"metricName" yaml:"metricName"` // A custom namespace to contain your metric in CloudWatch. // // Use namespaces to group together metrics that are similar. For more information, see [Namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace) . MetricNamespace *string `json:"metricNamespace" yaml:"metricNamespace"` // The value that is published to the CloudWatch metric. // // For example, if you're counting the occurrences of a particular term like `Error` , specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $ followed by the name of the field that you specified in the filter pattern, such as `$.size` . MetricValue *string `json:"metricValue" yaml:"metricValue"` // (Optional) The value to emit when a filter pattern does not match a log event. // // This value can be null. DefaultValue *float64 `json:"defaultValue" yaml:"defaultValue"` }
`MetricTransformation` is a property of the `AWS::Logs::MetricFilter` resource that describes how to transform log streams into a CloudWatch metric.
TODO: EXAMPLE
type CfnQueryDefinition ¶
type CfnQueryDefinition interface { awscdk.CfnResource awscdk.IInspectable AttrQueryDefinitionId() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string LogGroupNames() *[]*string SetLogGroupNames(val *[]*string) LogicalId() *string Name() *string SetName(val *string) Node() awscdk.ConstructNode QueryString() *string SetQueryString(val *string) Ref() *string Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Logs::QueryDefinition`.
Creates a query definition for CloudWatch Logs Insights. For more information, see [Analyzing Log Data with CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html) .
TODO: EXAMPLE
func NewCfnQueryDefinition ¶
func NewCfnQueryDefinition(scope awscdk.Construct, id *string, props *CfnQueryDefinitionProps) CfnQueryDefinition
Create a new `AWS::Logs::QueryDefinition`.
type CfnQueryDefinitionProps ¶
type CfnQueryDefinitionProps struct { // A name for the query definition. Name *string `json:"name" yaml:"name"` // The query string to use for this query definition. // // For more information, see [CloudWatch Logs Insights Query Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html) . QueryString *string `json:"queryString" yaml:"queryString"` // Use this parameter if you want the query to query only certain log groups. LogGroupNames *[]*string `json:"logGroupNames" yaml:"logGroupNames"` }
Properties for defining a `CfnQueryDefinition`.
TODO: EXAMPLE
type CfnResourcePolicy ¶
type CfnResourcePolicy interface { awscdk.CfnResource awscdk.IInspectable CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string LogicalId() *string Node() awscdk.ConstructNode PolicyDocument() *string SetPolicyDocument(val *string) PolicyName() *string SetPolicyName(val *string) Ref() *string Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Logs::ResourcePolicy`.
Creates or updates a resource policy that allows other AWS services to put log events to this account. An account can have up to 10 resource policies per AWS Region.
TODO: EXAMPLE
func NewCfnResourcePolicy ¶
func NewCfnResourcePolicy(scope awscdk.Construct, id *string, props *CfnResourcePolicyProps) CfnResourcePolicy
Create a new `AWS::Logs::ResourcePolicy`.
type CfnResourcePolicyProps ¶
type CfnResourcePolicyProps struct { // The details of the policy. // // It must be formatted in JSON, and you must use backslashes to escape characters that need to be escaped in JSON strings, such as double quote marks. PolicyDocument *string `json:"policyDocument" yaml:"policyDocument"` // The name of the resource policy. PolicyName *string `json:"policyName" yaml:"policyName"` }
Properties for defining a `CfnResourcePolicy`.
TODO: EXAMPLE
type CfnSubscriptionFilter ¶
type CfnSubscriptionFilter interface { awscdk.CfnResource awscdk.IInspectable CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string DestinationArn() *string SetDestinationArn(val *string) FilterPattern() *string SetFilterPattern(val *string) LogGroupName() *string SetLogGroupName(val *string) LogicalId() *string Node() awscdk.ConstructNode Ref() *string RoleArn() *string SetRoleArn(val *string) Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Logs::SubscriptionFilter`.
The `AWS::Logs::SubscriptionFilter` resource specifies 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 and have them delivered to a specific destination. Currently, the supported destinations are:
- An Amazon Kinesis data 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 as many as two subscription filters associated with a log group.
TODO: EXAMPLE
func NewCfnSubscriptionFilter ¶
func NewCfnSubscriptionFilter(scope awscdk.Construct, id *string, props *CfnSubscriptionFilterProps) CfnSubscriptionFilter
Create a new `AWS::Logs::SubscriptionFilter`.
type CfnSubscriptionFilterProps ¶
type CfnSubscriptionFilterProps struct { // The Amazon Resource Name (ARN) of the destination. DestinationArn *string `json:"destinationArn" yaml:"destinationArn"` // The filtering expressions that restrict what gets delivered to the destination AWS resource. // // For more information about the filter pattern syntax, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) . FilterPattern *string `json:"filterPattern" yaml:"filterPattern"` // The log group to associate with the subscription filter. // // All log events that are uploaded to this log group are filtered and delivered to the specified AWS resource if the filter pattern matches the log events. LogGroupName *string `json:"logGroupName" yaml:"logGroupName"` // 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. RoleArn *string `json:"roleArn" yaml:"roleArn"` }
Properties for defining a `CfnSubscriptionFilter`.
TODO: EXAMPLE
type ColumnRestriction ¶
type ColumnRestriction struct { // Comparison operator to use. // Experimental. Comparison *string `json:"comparison" yaml:"comparison"` // Number value to compare to. // // Exactly one of 'stringValue' and 'numberValue' must be set. // Experimental. NumberValue *float64 `json:"numberValue" yaml:"numberValue"` // String value to compare to. // // Exactly one of 'stringValue' and 'numberValue' must be set. // Experimental. StringValue *string `json:"stringValue" yaml:"stringValue"` }
TODO: EXAMPLE
Experimental.
type CrossAccountDestination ¶
type CrossAccountDestination interface { awscdk.Resource ILogSubscriptionDestination DestinationArn() *string DestinationName() *string Env() *awscdk.ResourceEnvironment Node() awscdk.ConstructNode PhysicalName() *string PolicyDocument() awsiam.PolicyDocument Stack() awscdk.Stack AddToPolicy(statement awsiam.PolicyStatement) ApplyRemovalPolicy(policy awscdk.RemovalPolicy) Bind(_scope awscdk.Construct, _sourceLogGroup ILogGroup) *LogSubscriptionDestinationConfig GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
A new CloudWatch Logs Destination for use in cross-account scenarios.
CrossAccountDestinations are used to subscribe a Kinesis stream in a different account to a CloudWatch Subscription.
Consumers will hardly ever need to use this class. Instead, directly subscribe a Kinesis stream using the integration class in the `@aws-cdk/aws-logs-destinations` package; if necessary, a `CrossAccountDestination` will be created automatically.
TODO: EXAMPLE
Experimental.
func NewCrossAccountDestination ¶
func NewCrossAccountDestination(scope constructs.Construct, id *string, props *CrossAccountDestinationProps) CrossAccountDestination
Experimental.
type CrossAccountDestinationProps ¶
type CrossAccountDestinationProps struct { // The role to assume that grants permissions to write to 'target'. // // The role must be assumable by 'logs.{REGION}.amazonaws.com'. // Experimental. Role awsiam.IRole `json:"role" yaml:"role"` // The log destination target's ARN. // Experimental. TargetArn *string `json:"targetArn" yaml:"targetArn"` // The name of the log destination. // Experimental. DestinationName *string `json:"destinationName" yaml:"destinationName"` }
Properties for a CrossAccountDestination.
TODO: EXAMPLE
Experimental.
type FilterPattern ¶
type FilterPattern interface { }
A collection of static methods to generate appropriate ILogPatterns.
TODO: EXAMPLE
Experimental.
type IFilterPattern ¶
type IFilterPattern interface { // Experimental. LogPatternString() *string }
Interface for objects that can render themselves to log patterns. Experimental.
func FilterPattern_AllEvents ¶
func FilterPattern_AllEvents() IFilterPattern
A log pattern that matches all events. Experimental.
func FilterPattern_AllTerms ¶
func FilterPattern_AllTerms(terms ...*string) IFilterPattern
A log pattern that matches if all the strings given appear in the event. Experimental.
func FilterPattern_AnyTerm ¶
func FilterPattern_AnyTerm(terms ...*string) IFilterPattern
A log pattern that matches if any of the strings given appear in the event. Experimental.
func FilterPattern_AnyTermGroup ¶
func FilterPattern_AnyTermGroup(termGroups ...*[]*string) IFilterPattern
A log pattern that matches if any of the given term groups matches the event.
A term group matches an event if all the terms in it appear in the event string. Experimental.
func FilterPattern_Literal ¶
func FilterPattern_Literal(logPatternString *string) IFilterPattern
Use the given string as log pattern.
See https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html for information on writing log patterns. Experimental.
type ILogGroup ¶
type ILogGroup interface { awsiam.IResourceWithPolicy // Create a new Metric Filter on this Log Group. // Experimental. AddMetricFilter(id *string, props *MetricFilterOptions) MetricFilter // Create a new Log Stream for this Log Group. // Experimental. AddStream(id *string, props *StreamOptions) LogStream // Create a new Subscription Filter on this Log Group. // Experimental. AddSubscriptionFilter(id *string, props *SubscriptionFilterOptions) SubscriptionFilter // Extract a metric from structured log events in the LogGroup. // // 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. // // Returns: A Metric object representing the extracted metric // Experimental. ExtractMetric(jsonField *string, metricNamespace *string, metricName *string) awscloudwatch.Metric // Give the indicated permissions on this log group and all streams. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Give permissions to write to create and write to streams in this log group. // Experimental. GrantWrite(grantee awsiam.IGrantable) awsiam.Grant // Public method to get the physical name of this log group. // Experimental. LogGroupPhysicalName() *string // The ARN of this log group, with ':*' appended. // Experimental. LogGroupArn() *string // The name of this log group. // Experimental. LogGroupName() *string }
Experimental.
func LogGroup_FromLogGroupArn ¶
func LogGroup_FromLogGroupArn(scope constructs.Construct, id *string, logGroupArn *string) ILogGroup
Import an existing LogGroup given its ARN. Experimental.
func LogGroup_FromLogGroupName ¶
func LogGroup_FromLogGroupName(scope constructs.Construct, id *string, logGroupName *string) ILogGroup
Import an existing LogGroup given its name. Experimental.
type ILogStream ¶
type ILogStream interface { awscdk.IResource // The name of this log stream. // Experimental. LogStreamName() *string }
Experimental.
func LogStream_FromLogStreamName ¶
func LogStream_FromLogStreamName(scope constructs.Construct, id *string, logStreamName *string) ILogStream
Import an existing LogGroup. Experimental.
type ILogSubscriptionDestination ¶
type ILogSubscriptionDestination interface { // Return the properties required to send subscription events to this destination. // // If necessary, the destination can use the properties of the SubscriptionFilter // object itself to configure its permissions to allow the subscription to write // to it. // // The destination may reconfigure its own permissions in response to this // function call. // Experimental. Bind(scope awscdk.Construct, sourceLogGroup ILogGroup) *LogSubscriptionDestinationConfig }
Interface for classes that can be the destination of a log Subscription. Experimental.
type JsonPattern ¶
type JsonPattern interface { IFilterPattern JsonPatternString() *string LogPatternString() *string }
Base class for patterns that only match JSON log events.
TODO: EXAMPLE
Experimental.
func FilterPattern_All ¶
func FilterPattern_All(patterns ...JsonPattern) JsonPattern
A JSON log pattern that matches if all given JSON log patterns match. Experimental.
func FilterPattern_Any ¶
func FilterPattern_Any(patterns ...JsonPattern) JsonPattern
A JSON log pattern that matches if any of the given JSON log patterns match. Experimental.
func FilterPattern_BooleanValue ¶
func FilterPattern_BooleanValue(jsonField *string, value *bool) JsonPattern
A JSON log pattern that matches if the field exists and equals the boolean value. Experimental.
func FilterPattern_Exists ¶
func FilterPattern_Exists(jsonField *string) JsonPattern
A JSON log patter that matches if the field exists.
This is a readable convenience wrapper over 'field = *' Experimental.
func FilterPattern_IsNull ¶
func FilterPattern_IsNull(jsonField *string) JsonPattern
A JSON log pattern that matches if the field exists and has the special value 'null'. Experimental.
func FilterPattern_NotExists ¶
func FilterPattern_NotExists(jsonField *string) JsonPattern
A JSON log pattern that matches if the field does not exist. Experimental.
func FilterPattern_NumberValue ¶
func FilterPattern_NumberValue(jsonField *string, comparison *string, value *float64) JsonPattern
A JSON log pattern that compares numerical values.
This pattern only matches if the event is a JSON event, and the indicated field inside compares with the value in the indicated way.
Use '$' to indicate the root of the JSON structure. The comparison operator can only compare equality or inequality. The '*' wildcard may appear in the value may at the start or at the end.
For more information, see:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html Experimental.
func FilterPattern_StringValue ¶
func FilterPattern_StringValue(jsonField *string, comparison *string, value *string) JsonPattern
A JSON log pattern that compares string values.
This pattern only matches if the event is a JSON event, and the indicated field inside compares with the string value.
Use '$' to indicate the root of the JSON structure. The comparison operator can only compare equality or inequality. The '*' wildcard may appear in the value may at the start or at the end.
For more information, see:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html Experimental.
type LogGroup ¶
type LogGroup interface { awscdk.Resource ILogGroup Env() *awscdk.ResourceEnvironment LogGroupArn() *string LogGroupName() *string Node() awscdk.ConstructNode PhysicalName() *string Stack() awscdk.Stack AddMetricFilter(id *string, props *MetricFilterOptions) MetricFilter AddStream(id *string, props *StreamOptions) LogStream AddSubscriptionFilter(id *string, props *SubscriptionFilterOptions) SubscriptionFilter AddToResourcePolicy(statement awsiam.PolicyStatement) *awsiam.AddToResourcePolicyResult ApplyRemovalPolicy(policy awscdk.RemovalPolicy) ExtractMetric(jsonField *string, metricNamespace *string, metricName *string) awscloudwatch.Metric GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant GrantWrite(grantee awsiam.IGrantable) awsiam.Grant LogGroupPhysicalName() *string OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
Define a CloudWatch Log Group.
TODO: EXAMPLE
Experimental.
func NewLogGroup ¶
func NewLogGroup(scope constructs.Construct, id *string, props *LogGroupProps) LogGroup
Experimental.
type LogGroupProps ¶
type LogGroupProps struct { // The KMS Key to encrypt the log group with. // Experimental. EncryptionKey awskms.IKey `json:"encryptionKey" yaml:"encryptionKey"` // Name of the log group. // Experimental. LogGroupName *string `json:"logGroupName" yaml:"logGroupName"` // Determine the removal policy of this log group. // // Normally you want to retain the log group so you can diagnose issues // from logs even after a deployment that no longer includes the log group. // In that case, use the normal date-based retention policy to age out your // logs. // Experimental. RemovalPolicy awscdk.RemovalPolicy `json:"removalPolicy" yaml:"removalPolicy"` // How long, in days, the log contents will be retained. // // To retain all logs, set this value to RetentionDays.INFINITE. // Experimental. Retention RetentionDays `json:"retention" yaml:"retention"` }
Properties for a LogGroup.
TODO: EXAMPLE
Experimental.
type LogRetention ¶
type LogRetention interface { awscdk.Construct LogGroupArn() *string Node() awscdk.ConstructNode OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
Creates a custom resource to control the retention policy of a CloudWatch Logs log group.
The log group is created if it doesn't already exist. The policy is removed when `retentionDays` is `undefined` or equal to `Infinity`. Log group can be created in the region that is different from stack region by specifying `logGroupRegion`
TODO: EXAMPLE
Experimental.
func NewLogRetention ¶
func NewLogRetention(scope constructs.Construct, id *string, props *LogRetentionProps) LogRetention
Experimental.
type LogRetentionProps ¶
type LogRetentionProps struct { // The log group name. // Experimental. LogGroupName *string `json:"logGroupName" yaml:"logGroupName"` // The number of days log events are kept in CloudWatch Logs. // Experimental. Retention RetentionDays `json:"retention" yaml:"retention"` // The region where the log group should be created. // Experimental. LogGroupRegion *string `json:"logGroupRegion" yaml:"logGroupRegion"` // Retry options for all AWS API calls. // Experimental. LogRetentionRetryOptions *LogRetentionRetryOptions `json:"logRetentionRetryOptions" yaml:"logRetentionRetryOptions"` // The IAM role for the Lambda function associated with the custom resource. // Experimental. Role awsiam.IRole `json:"role" yaml:"role"` }
Construction properties for a LogRetention.
TODO: EXAMPLE
Experimental.
type LogRetentionRetryOptions ¶
type LogRetentionRetryOptions struct { // The base duration to use in the exponential backoff for operation retries. // Experimental. Base awscdk.Duration `json:"base" yaml:"base"` // The maximum amount of retries. // Experimental. MaxRetries *float64 `json:"maxRetries" yaml:"maxRetries"` }
Retry options for all AWS API calls.
TODO: EXAMPLE
Experimental.
type LogStream ¶
type LogStream interface { awscdk.Resource ILogStream Env() *awscdk.ResourceEnvironment LogStreamName() *string Node() awscdk.ConstructNode PhysicalName() *string Stack() awscdk.Stack ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
Define a Log Stream in a Log Group.
TODO: EXAMPLE
Experimental.
func NewLogStream ¶
func NewLogStream(scope constructs.Construct, id *string, props *LogStreamProps) LogStream
Experimental.
type LogStreamProps ¶
type LogStreamProps struct { // The log group to create a log stream for. // Experimental. LogGroup ILogGroup `json:"logGroup" yaml:"logGroup"` // The name of the log stream to create. // // The name must be unique within the log group. // Experimental. LogStreamName *string `json:"logStreamName" yaml:"logStreamName"` // Determine what happens when the log stream resource is removed from the app. // // Normally you want to retain the log stream so you can diagnose issues from // logs even after a deployment that no longer includes the log stream. // // The date-based retention policy of your log group will age out the logs // after a certain time. // Experimental. RemovalPolicy awscdk.RemovalPolicy `json:"removalPolicy" yaml:"removalPolicy"` }
Properties for a LogStream.
TODO: EXAMPLE
Experimental.
type LogSubscriptionDestinationConfig ¶
type LogSubscriptionDestinationConfig struct { // The ARN of the subscription's destination. // Experimental. Arn *string `json:"arn" yaml:"arn"` // The role to assume to write log events to the destination. // Experimental. Role awsiam.IRole `json:"role" yaml:"role"` }
Properties returned by a Subscription destination.
TODO: EXAMPLE
Experimental.
type MetricFilter ¶
type MetricFilter interface { awscdk.Resource Env() *awscdk.ResourceEnvironment Node() awscdk.ConstructNode PhysicalName() *string Stack() awscdk.Stack ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string Metric(props *awscloudwatch.MetricOptions) awscloudwatch.Metric OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
A filter that extracts information from CloudWatch Logs and emits to CloudWatch Metrics.
TODO: EXAMPLE
Experimental.
func NewMetricFilter ¶
func NewMetricFilter(scope constructs.Construct, id *string, props *MetricFilterProps) MetricFilter
Experimental.
type MetricFilterOptions ¶
type MetricFilterOptions struct { // Pattern to search for log events. // Experimental. FilterPattern IFilterPattern `json:"filterPattern" yaml:"filterPattern"` // The name of the metric to emit. // Experimental. MetricName *string `json:"metricName" yaml:"metricName"` // The namespace of the metric to emit. // Experimental. MetricNamespace *string `json:"metricNamespace" yaml:"metricNamespace"` // The value to emit if the pattern does not match a particular event. // Experimental. DefaultValue *float64 `json:"defaultValue" yaml:"defaultValue"` // The value to emit for the metric. // // Can either be a literal number (typically "1"), or the name of a field in the structure // to take the value from the matched event. If you are using a field value, the field // value must have been matched using the pattern. // // If you want to specify a field from a matched JSON structure, use '$.fieldName', // and make sure the field is in the pattern (if only as '$.fieldName = *'). // // If you want to specify a field from a matched space-delimited structure, // use '$fieldName'. // Experimental. MetricValue *string `json:"metricValue" yaml:"metricValue"` }
Properties for a MetricFilter created from a LogGroup.
TODO: EXAMPLE
Experimental.
type MetricFilterProps ¶
type MetricFilterProps struct { // Pattern to search for log events. // Experimental. FilterPattern IFilterPattern `json:"filterPattern" yaml:"filterPattern"` // The name of the metric to emit. // Experimental. MetricName *string `json:"metricName" yaml:"metricName"` // The namespace of the metric to emit. // Experimental. MetricNamespace *string `json:"metricNamespace" yaml:"metricNamespace"` // The value to emit if the pattern does not match a particular event. // Experimental. DefaultValue *float64 `json:"defaultValue" yaml:"defaultValue"` // The value to emit for the metric. // // Can either be a literal number (typically "1"), or the name of a field in the structure // to take the value from the matched event. If you are using a field value, the field // value must have been matched using the pattern. // // If you want to specify a field from a matched JSON structure, use '$.fieldName', // and make sure the field is in the pattern (if only as '$.fieldName = *'). // // If you want to specify a field from a matched space-delimited structure, // use '$fieldName'. // Experimental. MetricValue *string `json:"metricValue" yaml:"metricValue"` // The log group to create the filter on. // Experimental. LogGroup ILogGroup `json:"logGroup" yaml:"logGroup"` }
Properties for a MetricFilter.
TODO: EXAMPLE
Experimental.
type ResourcePolicy ¶
type ResourcePolicy interface { awscdk.Resource Document() awsiam.PolicyDocument Env() *awscdk.ResourceEnvironment Node() awscdk.ConstructNode PhysicalName() *string Stack() awscdk.Stack ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
Resource Policy for CloudWatch Log Groups.
Policies define the operations that are allowed on this resource.
You almost never need to define this construct directly.
All AWS resources that support resource policies have a method called `addToResourcePolicy()`, which will automatically create a new resource policy if one doesn't exist yet, otherwise it will add to the existing policy.
Prefer to use `addToResourcePolicy()` instead.
TODO: EXAMPLE
Experimental.
func NewResourcePolicy ¶
func NewResourcePolicy(scope constructs.Construct, id *string, props *ResourcePolicyProps) ResourcePolicy
Experimental.
type ResourcePolicyProps ¶
type ResourcePolicyProps struct { // Initial statements to add to the resource policy. // Experimental. PolicyStatements *[]awsiam.PolicyStatement `json:"policyStatements" yaml:"policyStatements"` // Name of the log group resource policy. // Experimental. ResourcePolicyName *string `json:"resourcePolicyName" yaml:"resourcePolicyName"` }
Properties to define Cloudwatch log group resource policy.
TODO: EXAMPLE
Experimental.
type RetentionDays ¶
type RetentionDays string
How long, in days, the log contents will be retained.
TODO: EXAMPLE
Experimental.
const ( RetentionDays_ONE_DAY RetentionDays = "ONE_DAY" RetentionDays_THREE_DAYS RetentionDays = "THREE_DAYS" RetentionDays_FIVE_DAYS RetentionDays = "FIVE_DAYS" RetentionDays_ONE_WEEK RetentionDays = "ONE_WEEK" RetentionDays_TWO_WEEKS RetentionDays = "TWO_WEEKS" RetentionDays_ONE_MONTH RetentionDays = "ONE_MONTH" RetentionDays_TWO_MONTHS RetentionDays = "TWO_MONTHS" RetentionDays_THREE_MONTHS RetentionDays = "THREE_MONTHS" RetentionDays_FOUR_MONTHS RetentionDays = "FOUR_MONTHS" RetentionDays_FIVE_MONTHS RetentionDays = "FIVE_MONTHS" RetentionDays_SIX_MONTHS RetentionDays = "SIX_MONTHS" RetentionDays_ONE_YEAR RetentionDays = "ONE_YEAR" RetentionDays_THIRTEEN_MONTHS RetentionDays = "THIRTEEN_MONTHS" RetentionDays_EIGHTEEN_MONTHS RetentionDays = "EIGHTEEN_MONTHS" RetentionDays_TWO_YEARS RetentionDays = "TWO_YEARS" RetentionDays_FIVE_YEARS RetentionDays = "FIVE_YEARS" RetentionDays_TEN_YEARS RetentionDays = "TEN_YEARS" RetentionDays_INFINITE RetentionDays = "INFINITE" )
type SpaceDelimitedTextPattern ¶
type SpaceDelimitedTextPattern interface { IFilterPattern LogPatternString() *string WhereNumber(columnName *string, comparison *string, value *float64) SpaceDelimitedTextPattern WhereString(columnName *string, comparison *string, value *string) SpaceDelimitedTextPattern }
Space delimited text pattern.
TODO: EXAMPLE
Experimental.
func FilterPattern_SpaceDelimited ¶
func FilterPattern_SpaceDelimited(columns ...*string) SpaceDelimitedTextPattern
A space delimited log pattern matcher.
The log event is divided into space-delimited columns (optionally enclosed by "" or [] to capture spaces into column values), and names are given to each column.
'...' may be specified once to match any number of columns.
Afterwards, conditions may be added to individual columns. Experimental.
func NewSpaceDelimitedTextPattern ¶
func NewSpaceDelimitedTextPattern(columns *[]*string, restrictions *map[string]*[]*ColumnRestriction) SpaceDelimitedTextPattern
Experimental.
func SpaceDelimitedTextPattern_Construct ¶
func SpaceDelimitedTextPattern_Construct(columns *[]*string) SpaceDelimitedTextPattern
Construct a new instance of a space delimited text pattern.
Since this class must be public, we can't rely on the user only creating it through the `LogPattern.spaceDelimited()` factory function. We must therefore validate the argument in the constructor. Since we're returning a copy on every mutation, and we don't want to re-validate the same things on every construction, we provide a limited set of mutator functions and only validate the new data every time. Experimental.
type StreamOptions ¶
type StreamOptions struct { // The name of the log stream to create. // // The name must be unique within the log group. // Experimental. LogStreamName *string `json:"logStreamName" yaml:"logStreamName"` }
Properties for a new LogStream created from a LogGroup.
TODO: EXAMPLE
Experimental.
type SubscriptionFilter ¶
type SubscriptionFilter interface { awscdk.Resource Env() *awscdk.ResourceEnvironment Node() awscdk.ConstructNode PhysicalName() *string Stack() awscdk.Stack ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
A new Subscription on a CloudWatch log group.
TODO: EXAMPLE
Experimental.
func NewSubscriptionFilter ¶
func NewSubscriptionFilter(scope constructs.Construct, id *string, props *SubscriptionFilterProps) SubscriptionFilter
Experimental.
type SubscriptionFilterOptions ¶
type SubscriptionFilterOptions struct { // The destination to send the filtered events to. // // For example, a Kinesis stream or a Lambda function. // Experimental. Destination ILogSubscriptionDestination `json:"destination" yaml:"destination"` // Log events matching this pattern will be sent to the destination. // Experimental. FilterPattern IFilterPattern `json:"filterPattern" yaml:"filterPattern"` }
Properties for a new SubscriptionFilter created from a LogGroup.
TODO: EXAMPLE
Experimental.
type SubscriptionFilterProps ¶
type SubscriptionFilterProps struct { // The destination to send the filtered events to. // // For example, a Kinesis stream or a Lambda function. // Experimental. Destination ILogSubscriptionDestination `json:"destination" yaml:"destination"` // Log events matching this pattern will be sent to the destination. // Experimental. FilterPattern IFilterPattern `json:"filterPattern" yaml:"filterPattern"` // The log group to create the subscription on. // Experimental. LogGroup ILogGroup `json:"logGroup" yaml:"logGroup"` }
Properties for a SubscriptionFilter.
TODO: EXAMPLE
Experimental.