CreateLogPattern
Adds an log pattern to a LogPatternSet
.
Request Syntax
{
"Pattern": "string
",
"PatternName": "string
",
"PatternSetName": "string
",
"Rank": number
,
"ResourceGroupName": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Pattern
-
The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 50.
Pattern:
[\S\s]+
Required: Yes
- PatternName
-
The name of the log pattern.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 50.
Pattern:
[a-zA-Z0-9\.\-_]*
Required: Yes
- PatternSetName
-
The name of the log pattern set.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 30.
Pattern:
[a-zA-Z0-9\.\-_]*
Required: Yes
- Rank
-
Rank of the log pattern. Must be a value between
1
and1,000,000
. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank1
will be the first to get matched to a log line. A pattern of rank1,000,000
will be last to get matched. When you configure custom log patterns from the console, aLow
severity pattern translates to a750,000
rank. AMedium
severity pattern translates to a500,000
rank. And aHigh
severity pattern translates to a250,000
rank. Rank values less than1
or greater than1,000,000
are reserved for AWS provided patterns.Type: Integer
Required: Yes
- ResourceGroupName
-
The name of the resource group.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
[a-zA-Z0-9\.\-_]*
Required: Yes
Response Syntax
{
"LogPattern": {
"Pattern": "string",
"PatternName": "string",
"PatternSetName": "string",
"Rank": number
},
"ResourceGroupName": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- LogPattern
-
The successfully created log pattern.
Type: LogPattern object
- ResourceGroupName
-
The name of the resource group.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
[a-zA-Z0-9\.\-_]*
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerException
-
The server encountered an internal error and is unable to complete the request.
HTTP Status Code: 400
- ResourceInUseException
-
The resource is already created or in use.
HTTP Status Code: 400
- ResourceNotFoundException
-
The resource does not exist in the customer account.
HTTP Status Code: 400
- ValidationException
-
The parameter is not valid.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: