AWS Native

Pulumi Official
Package maintained by Pulumi
v0.19.0 published on Wednesday, Jun 8, 2022 by Pulumi

NamedQuery

Resource schema for AWS::Athena::NamedQuery

Example Usage

Example

using Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var athenaNamedQuery = new AwsNative.Athena.NamedQuery("athenaNamedQuery", new AwsNative.Athena.NamedQueryArgs
        {
            Database = "swfnetadata",
            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("swfnetadata"),
			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="swfnetadata",
    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: "swfnetadata",
    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 Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var athenaNamedQuery = new AwsNative.Athena.NamedQuery("athenaNamedQuery", new AwsNative.Athena.NamedQueryArgs
        {
            Database = "swfnetadata",
            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("swfnetadata"),
			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="swfnetadata",
    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: "swfnetadata",
    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 a NamedQuery Resource

new NamedQuery(name: string, args: NamedQueryArgs, opts?: CustomResourceOptions);
@overload
def NamedQuery(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               database: Optional[str] = None,
               description: Optional[str] = None,
               name: Optional[str] = None,
               query_string: Optional[str] = None,
               work_group: Optional[str] = None)
@overload
def NamedQuery(resource_name: str,
               args: NamedQueryArgs,
               opts: Optional[ResourceOptions] = 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.

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.

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
https://github.com/pulumi/pulumi-aws-native
License
Apache-2.0