1. Packages
  2. AWS Classic
  3. API Docs
  4. athena
  5. getNamedQuery

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.athena.getNamedQuery

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides an Athena Named Query data source.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.athena.getNamedQuery({
        name: "athenaQueryName",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.athena.get_named_query(name="athenaQueryName")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/athena"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := athena.LookupNamedQuery(ctx, &athena.LookupNamedQueryArgs{
    			Name: "athenaQueryName",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Athena.GetNamedQuery.Invoke(new()
        {
            Name = "athenaQueryName",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.athena.AthenaFunctions;
    import com.pulumi.aws.athena.inputs.GetNamedQueryArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = AthenaFunctions.getNamedQuery(GetNamedQueryArgs.builder()
                .name("athenaQueryName")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:athena:getNamedQuery
          Arguments:
            name: athenaQueryName
    

    Using getNamedQuery

    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 getNamedQuery(args: GetNamedQueryArgs, opts?: InvokeOptions): Promise<GetNamedQueryResult>
    function getNamedQueryOutput(args: GetNamedQueryOutputArgs, opts?: InvokeOptions): Output<GetNamedQueryResult>
    def get_named_query(name: Optional[str] = None,
                        workgroup: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNamedQueryResult
    def get_named_query_output(name: Optional[pulumi.Input[str]] = None,
                        workgroup: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNamedQueryResult]
    func LookupNamedQuery(ctx *Context, args *LookupNamedQueryArgs, opts ...InvokeOption) (*LookupNamedQueryResult, error)
    func LookupNamedQueryOutput(ctx *Context, args *LookupNamedQueryOutputArgs, opts ...InvokeOption) LookupNamedQueryResultOutput

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

    public static class GetNamedQuery 
    {
        public static Task<GetNamedQueryResult> InvokeAsync(GetNamedQueryArgs args, InvokeOptions? opts = null)
        public static Output<GetNamedQueryResult> Invoke(GetNamedQueryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNamedQueryResult> getNamedQuery(GetNamedQueryArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:athena/getNamedQuery:getNamedQuery
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The plain language name for the query. Maximum length of 128.
    Workgroup string
    The workgroup to which the query belongs. Defaults to primary.
    Name string
    The plain language name for the query. Maximum length of 128.
    Workgroup string
    The workgroup to which the query belongs. Defaults to primary.
    name String
    The plain language name for the query. Maximum length of 128.
    workgroup String
    The workgroup to which the query belongs. Defaults to primary.
    name string
    The plain language name for the query. Maximum length of 128.
    workgroup string
    The workgroup to which the query belongs. Defaults to primary.
    name str
    The plain language name for the query. Maximum length of 128.
    workgroup str
    The workgroup to which the query belongs. Defaults to primary.
    name String
    The plain language name for the query. Maximum length of 128.
    workgroup String
    The workgroup to which the query belongs. Defaults to primary.

    getNamedQuery Result

    The following output properties are available:

    Database string
    Database to which the query belongs.
    Description string
    Brief explanation of the query.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Querystring string
    Workgroup string
    Database string
    Database to which the query belongs.
    Description string
    Brief explanation of the query.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Querystring string
    Workgroup string
    database String
    Database to which the query belongs.
    description String
    Brief explanation of the query.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    querystring String
    workgroup String
    database string
    Database to which the query belongs.
    description string
    Brief explanation of the query.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    querystring string
    workgroup string
    database str
    Database to which the query belongs.
    description str
    Brief explanation of the query.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    querystring str
    workgroup str
    database String
    Database to which the query belongs.
    description String
    Brief explanation of the query.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    querystring String
    workgroup String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi