1. Packages
  2. AWS Native
  3. API Docs
  4. athena
  5. NamedQuery

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi

aws-native.athena.NamedQuery

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi

    Resource schema for AWS::Athena::NamedQuery

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var athenaNamedQuery = new AwsNative.Athena.NamedQuery("athenaNamedQuery", new()
        {
            Database = "swfmetadata",
            Description = "A query that selects all aggregated data",
            Name = "MostExpensiveWorkflow",
            QueryString = "SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/athena"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := athena.NewNamedQuery(ctx, "athenaNamedQuery", &athena.NamedQueryArgs{
    			Database:    pulumi.String("swfmetadata"),
    			Description: pulumi.String("A query that selects all aggregated data"),
    			Name:        pulumi.String("MostExpensiveWorkflow"),
    			QueryString: pulumi.String("SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    athena_named_query = aws_native.athena.NamedQuery("athenaNamedQuery",
        database="swfmetadata",
        description="A query that selects all aggregated data",
        name="MostExpensiveWorkflow",
        query_string="SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const athenaNamedQuery = new aws_native.athena.NamedQuery("athenaNamedQuery", {
        database: "swfmetadata",
        description: "A query that selects all aggregated data",
        name: "MostExpensiveWorkflow",
        queryString: "SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10",
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var athenaNamedQuery = new AwsNative.Athena.NamedQuery("athenaNamedQuery", new()
        {
            Database = "swfmetadata",
            Description = "A query that selects all aggregated data",
            Name = "MostExpensiveWorkflow",
            QueryString = "SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/athena"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := athena.NewNamedQuery(ctx, "athenaNamedQuery", &athena.NamedQueryArgs{
    			Database:    pulumi.String("swfmetadata"),
    			Description: pulumi.String("A query that selects all aggregated data"),
    			Name:        pulumi.String("MostExpensiveWorkflow"),
    			QueryString: pulumi.String("SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    athena_named_query = aws_native.athena.NamedQuery("athenaNamedQuery",
        database="swfmetadata",
        description="A query that selects all aggregated data",
        name="MostExpensiveWorkflow",
        query_string="SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const athenaNamedQuery = new aws_native.athena.NamedQuery("athenaNamedQuery", {
        database: "swfmetadata",
        description: "A query that selects all aggregated data",
        name: "MostExpensiveWorkflow",
        queryString: "SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10",
    });
    

    Coming soon!

    Create NamedQuery Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NamedQuery(name: string, args: NamedQueryArgs, opts?: CustomResourceOptions);
    @overload
    def NamedQuery(resource_name: str,
                   args: NamedQueryArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def NamedQuery(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   database: Optional[str] = None,
                   query_string: Optional[str] = None,
                   description: Optional[str] = None,
                   name: Optional[str] = None,
                   work_group: Optional[str] = None)
    func NewNamedQuery(ctx *Context, name string, args NamedQueryArgs, opts ...ResourceOption) (*NamedQuery, error)
    public NamedQuery(string name, NamedQueryArgs args, CustomResourceOptions? opts = null)
    public NamedQuery(String name, NamedQueryArgs args)
    public NamedQuery(String name, NamedQueryArgs args, CustomResourceOptions options)
    
    type: aws-native:athena:NamedQuery
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NamedQueryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NamedQueryArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NamedQueryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NamedQueryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NamedQueryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const namedQueryResource = new aws_native.athena.NamedQuery("namedQueryResource", {
        database: "string",
        queryString: "string",
        description: "string",
        name: "string",
        workGroup: "string",
    });
    
    Coming soon!
    

    NamedQuery Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NamedQuery resource accepts the following input properties:

    Database string
    The database to which the query belongs.
    QueryString string
    The contents of the query with all query statements.
    Description string
    The query description.
    Name string
    The query name.
    WorkGroup string
    The name of the workgroup that contains the named query.
    Database string
    The database to which the query belongs.
    QueryString string
    The contents of the query with all query statements.
    Description string
    The query description.
    Name string
    The query name.
    WorkGroup string
    The name of the workgroup that contains the named query.
    database String
    The database to which the query belongs.
    queryString String
    The contents of the query with all query statements.
    description String
    The query description.
    name String
    The query name.
    workGroup String
    The name of the workgroup that contains the named query.
    database string
    The database to which the query belongs.
    queryString string
    The contents of the query with all query statements.
    description string
    The query description.
    name string
    The query name.
    workGroup string
    The name of the workgroup that contains the named query.
    database str
    The database to which the query belongs.
    query_string str
    The contents of the query with all query statements.
    description str
    The query description.
    name str
    The query name.
    work_group str
    The name of the workgroup that contains the named query.
    database String
    The database to which the query belongs.
    queryString String
    The contents of the query with all query statements.
    description String
    The query description.
    name String
    The query name.
    workGroup String
    The name of the workgroup that contains the named query.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NamedQuery resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    NamedQueryId string
    The unique ID of the query.
    Id string
    The provider-assigned unique ID for this managed resource.
    NamedQueryId string
    The unique ID of the query.
    id String
    The provider-assigned unique ID for this managed resource.
    namedQueryId String
    The unique ID of the query.
    id string
    The provider-assigned unique ID for this managed resource.
    namedQueryId string
    The unique ID of the query.
    id str
    The provider-assigned unique ID for this managed resource.
    named_query_id str
    The unique ID of the query.
    id String
    The provider-assigned unique ID for this managed resource.
    namedQueryId String
    The unique ID of the query.

    Package Details

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

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi