1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. logs
  5. getQueryDefinition

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.logs.getQueryDefinition

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

The resource schema for AWSLogs QueryDefinition

Using getQueryDefinition

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getQueryDefinition(args: GetQueryDefinitionArgs, opts?: InvokeOptions): Promise<GetQueryDefinitionResult>
function getQueryDefinitionOutput(args: GetQueryDefinitionOutputArgs, opts?: InvokeOptions): Output<GetQueryDefinitionResult>
Copy
def get_query_definition(query_definition_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetQueryDefinitionResult
def get_query_definition_output(query_definition_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetQueryDefinitionResult]
Copy
func LookupQueryDefinition(ctx *Context, args *LookupQueryDefinitionArgs, opts ...InvokeOption) (*LookupQueryDefinitionResult, error)
func LookupQueryDefinitionOutput(ctx *Context, args *LookupQueryDefinitionOutputArgs, opts ...InvokeOption) LookupQueryDefinitionResultOutput
Copy

> Note: This function is named LookupQueryDefinition in the Go SDK.

public static class GetQueryDefinition 
{
    public static Task<GetQueryDefinitionResult> InvokeAsync(GetQueryDefinitionArgs args, InvokeOptions? opts = null)
    public static Output<GetQueryDefinitionResult> Invoke(GetQueryDefinitionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetQueryDefinitionResult> getQueryDefinition(GetQueryDefinitionArgs args, InvokeOptions options)
public static Output<GetQueryDefinitionResult> getQueryDefinition(GetQueryDefinitionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:logs:getQueryDefinition
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

QueryDefinitionId This property is required. string
Unique identifier of a query definition
QueryDefinitionId This property is required. string
Unique identifier of a query definition
queryDefinitionId This property is required. String
Unique identifier of a query definition
queryDefinitionId This property is required. string
Unique identifier of a query definition
query_definition_id This property is required. str
Unique identifier of a query definition
queryDefinitionId This property is required. String
Unique identifier of a query definition

getQueryDefinition Result

The following output properties are available:

LogGroupNames List<string>
Optionally define specific log groups as part of your query definition
Name string
A name for the saved query definition
QueryDefinitionId string
Unique identifier of a query definition
QueryLanguage Pulumi.AwsNative.Logs.QueryDefinitionQueryLanguage
Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
QueryString string
The query string to use for this definition
LogGroupNames []string
Optionally define specific log groups as part of your query definition
Name string
A name for the saved query definition
QueryDefinitionId string
Unique identifier of a query definition
QueryLanguage QueryDefinitionQueryLanguage
Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
QueryString string
The query string to use for this definition
logGroupNames List<String>
Optionally define specific log groups as part of your query definition
name String
A name for the saved query definition
queryDefinitionId String
Unique identifier of a query definition
queryLanguage QueryDefinitionQueryLanguage
Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
queryString String
The query string to use for this definition
logGroupNames string[]
Optionally define specific log groups as part of your query definition
name string
A name for the saved query definition
queryDefinitionId string
Unique identifier of a query definition
queryLanguage QueryDefinitionQueryLanguage
Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
queryString string
The query string to use for this definition
log_group_names Sequence[str]
Optionally define specific log groups as part of your query definition
name str
A name for the saved query definition
query_definition_id str
Unique identifier of a query definition
query_language QueryDefinitionQueryLanguage
Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
query_string str
The query string to use for this definition
logGroupNames List<String>
Optionally define specific log groups as part of your query definition
name String
A name for the saved query definition
queryDefinitionId String
Unique identifier of a query definition
queryLanguage "CWLI" | "SQL" | "PPL"
Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
queryString String
The query string to use for this definition

Supporting Types

QueryDefinitionQueryLanguage

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi