UserDefinedFunction

class UserDefinedFunction : KotlinCustomResource

Provides a Glue User Defined Function Resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.CatalogDatabase("example", {name: "my_database"});
const exampleUserDefinedFunction = new aws.glue.UserDefinedFunction("example", {
name: "my_func",
catalogId: example.catalogId,
databaseName: example.name,
className: "class",
ownerName: "owner",
ownerType: "GROUP",
resourceUris: [{
resourceType: "ARCHIVE",
uri: "uri",
}],
});
import pulumi
import pulumi_aws as aws
example = aws.glue.CatalogDatabase("example", name="my_database")
example_user_defined_function = aws.glue.UserDefinedFunction("example",
name="my_func",
catalog_id=example.catalog_id,
database_name=example.name,
class_name="class",
owner_name="owner",
owner_type="GROUP",
resource_uris=[{
"resource_type": "ARCHIVE",
"uri": "uri",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.CatalogDatabase("example", new()
{
Name = "my_database",
});
var exampleUserDefinedFunction = new Aws.Glue.UserDefinedFunction("example", new()
{
Name = "my_func",
CatalogId = example.CatalogId,
DatabaseName = example.Name,
ClassName = "class",
OwnerName = "owner",
OwnerType = "GROUP",
ResourceUris = new[]
{
new Aws.Glue.Inputs.UserDefinedFunctionResourceUriArgs
{
ResourceType = "ARCHIVE",
Uri = "uri",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := glue.NewCatalogDatabase(ctx, "example", &glue.CatalogDatabaseArgs{
Name: pulumi.String("my_database"),
})
if err != nil {
return err
}
_, err = glue.NewUserDefinedFunction(ctx, "example", &glue.UserDefinedFunctionArgs{
Name: pulumi.String("my_func"),
CatalogId: example.CatalogId,
DatabaseName: example.Name,
ClassName: pulumi.String("class"),
OwnerName: pulumi.String("owner"),
OwnerType: pulumi.String("GROUP"),
ResourceUris: glue.UserDefinedFunctionResourceUriArray{
&glue.UserDefinedFunctionResourceUriArgs{
ResourceType: pulumi.String("ARCHIVE"),
Uri: pulumi.String("uri"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.CatalogDatabase;
import com.pulumi.aws.glue.CatalogDatabaseArgs;
import com.pulumi.aws.glue.UserDefinedFunction;
import com.pulumi.aws.glue.UserDefinedFunctionArgs;
import com.pulumi.aws.glue.inputs.UserDefinedFunctionResourceUriArgs;
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) {
var example = new CatalogDatabase("example", CatalogDatabaseArgs.builder()
.name("my_database")
.build());
var exampleUserDefinedFunction = new UserDefinedFunction("exampleUserDefinedFunction", UserDefinedFunctionArgs.builder()
.name("my_func")
.catalogId(example.catalogId())
.databaseName(example.name())
.className("class")
.ownerName("owner")
.ownerType("GROUP")
.resourceUris(UserDefinedFunctionResourceUriArgs.builder()
.resourceType("ARCHIVE")
.uri("uri")
.build())
.build());
}
}
resources:
example:
type: aws:glue:CatalogDatabase
properties:
name: my_database
exampleUserDefinedFunction:
type: aws:glue:UserDefinedFunction
name: example
properties:
name: my_func
catalogId: ${example.catalogId}
databaseName: ${example.name}
className: class
ownerName: owner
ownerType: GROUP
resourceUris:
- resourceType: ARCHIVE
uri: uri

Import

Using pulumi import, import Glue User Defined Functions using the catalog_id:database_name:function_name. If you have not set a Catalog ID specify the AWS Account ID that the database is in. For example:

$ pulumi import aws:glue/userDefinedFunction:UserDefinedFunction func 123456789012:my_database:my_func

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the Glue User Defined Function.

Link copied to clipboard
val catalogId: Output<String>?

ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.

Link copied to clipboard
val className: Output<String>

The Java class that contains the function code.

Link copied to clipboard
val createTime: Output<String>

The time at which the function was created.

Link copied to clipboard
val databaseName: Output<String>

The name of the Database to create the Function.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the function.

Link copied to clipboard
val ownerName: Output<String>

The owner of the function.

Link copied to clipboard
val ownerType: Output<String>

The owner type. can be one of USER, ROLE, and GROUP.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The configuration block for Resource URIs. See resource uris below for more details.

Link copied to clipboard
val urn: Output<String>