Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates or updates a query definition for CloudWatch Logs Insights. For more information, see Analyzing Log Data with CloudWatch Logs Insights.
To update a query definition, specify its queryDefinitionId
in your
request. The values of name
, queryString
, and logGroupNames
are
changed to the values that you specify in your update operation. No
current values are retained from the current query definition. For
example, if you update a current query definition that includes log
groups, and you don't specify the logGroupNames
parameter in your
update operation, the query definition changes to contain no log groups.
You must have the logs:PutQueryDefinition
permission to be able to
perform this operation.
Synopsis
- data PutQueryDefinition = PutQueryDefinition' {
- logGroupNames :: Maybe [Text]
- queryDefinitionId :: Maybe Text
- name :: Text
- queryString :: Text
- newPutQueryDefinition :: Text -> Text -> PutQueryDefinition
- putQueryDefinition_logGroupNames :: Lens' PutQueryDefinition (Maybe [Text])
- putQueryDefinition_queryDefinitionId :: Lens' PutQueryDefinition (Maybe Text)
- putQueryDefinition_name :: Lens' PutQueryDefinition Text
- putQueryDefinition_queryString :: Lens' PutQueryDefinition Text
- data PutQueryDefinitionResponse = PutQueryDefinitionResponse' {}
- newPutQueryDefinitionResponse :: Int -> PutQueryDefinitionResponse
- putQueryDefinitionResponse_queryDefinitionId :: Lens' PutQueryDefinitionResponse (Maybe Text)
- putQueryDefinitionResponse_httpStatus :: Lens' PutQueryDefinitionResponse Int
Creating a Request
data PutQueryDefinition Source #
See: newPutQueryDefinition
smart constructor.
PutQueryDefinition' | |
|
Instances
newPutQueryDefinition Source #
:: Text | |
-> Text | |
-> PutQueryDefinition |
Create a value of PutQueryDefinition
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:logGroupNames:PutQueryDefinition'
, putQueryDefinition_logGroupNames
- Use this parameter to include specific log groups as part of your query
definition.
If you are updating a query definition and you omit this parameter, then the updated definition will contain no log groups.
$sel:queryDefinitionId:PutQueryDefinition'
, putQueryDefinition_queryDefinitionId
- If you are updating a query definition, use this parameter to specify
the ID of the query definition that you want to update. You can use
DescribeQueryDefinitions
to retrieve the IDs of your saved query definitions.
If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation.
$sel:name:PutQueryDefinition'
, putQueryDefinition_name
- A name for the query definition. If you are saving a lot of query
definitions, we recommend that you name them so that you can easily find
the ones you want by using the first part of the name as a filter in the
queryDefinitionNamePrefix
parameter of
DescribeQueryDefinitions.
$sel:queryString:PutQueryDefinition'
, putQueryDefinition_queryString
- The query string to use for this definition. For more information, see
CloudWatch Logs Insights Query Syntax.
Request Lenses
putQueryDefinition_logGroupNames :: Lens' PutQueryDefinition (Maybe [Text]) Source #
Use this parameter to include specific log groups as part of your query definition.
If you are updating a query definition and you omit this parameter, then the updated definition will contain no log groups.
putQueryDefinition_queryDefinitionId :: Lens' PutQueryDefinition (Maybe Text) Source #
If you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.
If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation.
putQueryDefinition_name :: Lens' PutQueryDefinition Text Source #
A name for the query definition. If you are saving a lot of query
definitions, we recommend that you name them so that you can easily find
the ones you want by using the first part of the name as a filter in the
queryDefinitionNamePrefix
parameter of
DescribeQueryDefinitions.
putQueryDefinition_queryString :: Lens' PutQueryDefinition Text Source #
The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.
Destructuring the Response
data PutQueryDefinitionResponse Source #
See: newPutQueryDefinitionResponse
smart constructor.
PutQueryDefinitionResponse' | |
|
Instances
newPutQueryDefinitionResponse Source #
Create a value of PutQueryDefinitionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:queryDefinitionId:PutQueryDefinition'
, putQueryDefinitionResponse_queryDefinitionId
- The ID of the query definition.
$sel:httpStatus:PutQueryDefinitionResponse'
, putQueryDefinitionResponse_httpStatus
- The response's http status code.
Response Lenses
putQueryDefinitionResponse_queryDefinitionId :: Lens' PutQueryDefinitionResponse (Maybe Text) Source #
The ID of the query definition.
putQueryDefinitionResponse_httpStatus :: Lens' PutQueryDefinitionResponse Int Source #
The response's http status code.