Try AWS Native preview for resources not in the classic version.
aws.glue.UserDefinedFunction
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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=[{
"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
})
}
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 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
Create UserDefinedFunction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserDefinedFunction(name: string, args: UserDefinedFunctionArgs, opts?: CustomResourceOptions);
@overload
def UserDefinedFunction(resource_name: str,
args: UserDefinedFunctionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UserDefinedFunction(resource_name: str,
opts: Optional[ResourceOptions] = None,
class_name: Optional[str] = None,
database_name: Optional[str] = None,
owner_name: Optional[str] = None,
owner_type: Optional[str] = None,
catalog_id: Optional[str] = None,
name: Optional[str] = None,
resource_uris: Optional[Sequence[UserDefinedFunctionResourceUriArgs]] = None)
func NewUserDefinedFunction(ctx *Context, name string, args UserDefinedFunctionArgs, opts ...ResourceOption) (*UserDefinedFunction, error)
public UserDefinedFunction(string name, UserDefinedFunctionArgs args, CustomResourceOptions? opts = null)
public UserDefinedFunction(String name, UserDefinedFunctionArgs args)
public UserDefinedFunction(String name, UserDefinedFunctionArgs args, CustomResourceOptions options)
type: aws:glue:UserDefinedFunction
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 UserDefinedFunctionArgs
- 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 UserDefinedFunctionArgs
- 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 UserDefinedFunctionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserDefinedFunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserDefinedFunctionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var userDefinedFunctionResource = new Aws.Glue.UserDefinedFunction("userDefinedFunctionResource", new()
{
ClassName = "string",
DatabaseName = "string",
OwnerName = "string",
OwnerType = "string",
CatalogId = "string",
Name = "string",
ResourceUris = new[]
{
new Aws.Glue.Inputs.UserDefinedFunctionResourceUriArgs
{
ResourceType = "string",
Uri = "string",
},
},
});
example, err := glue.NewUserDefinedFunction(ctx, "userDefinedFunctionResource", &glue.UserDefinedFunctionArgs{
ClassName: pulumi.String("string"),
DatabaseName: pulumi.String("string"),
OwnerName: pulumi.String("string"),
OwnerType: pulumi.String("string"),
CatalogId: pulumi.String("string"),
Name: pulumi.String("string"),
ResourceUris: glue.UserDefinedFunctionResourceUriArray{
&glue.UserDefinedFunctionResourceUriArgs{
ResourceType: pulumi.String("string"),
Uri: pulumi.String("string"),
},
},
})
var userDefinedFunctionResource = new UserDefinedFunction("userDefinedFunctionResource", UserDefinedFunctionArgs.builder()
.className("string")
.databaseName("string")
.ownerName("string")
.ownerType("string")
.catalogId("string")
.name("string")
.resourceUris(UserDefinedFunctionResourceUriArgs.builder()
.resourceType("string")
.uri("string")
.build())
.build());
user_defined_function_resource = aws.glue.UserDefinedFunction("userDefinedFunctionResource",
class_name="string",
database_name="string",
owner_name="string",
owner_type="string",
catalog_id="string",
name="string",
resource_uris=[{
"resourceType": "string",
"uri": "string",
}])
const userDefinedFunctionResource = new aws.glue.UserDefinedFunction("userDefinedFunctionResource", {
className: "string",
databaseName: "string",
ownerName: "string",
ownerType: "string",
catalogId: "string",
name: "string",
resourceUris: [{
resourceType: "string",
uri: "string",
}],
});
type: aws:glue:UserDefinedFunction
properties:
catalogId: string
className: string
databaseName: string
name: string
ownerName: string
ownerType: string
resourceUris:
- resourceType: string
uri: string
UserDefinedFunction 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 UserDefinedFunction resource accepts the following input properties:
- Class
Name string - The Java class that contains the function code.
- Database
Name string - The name of the Database to create the Function.
- Owner
Name string - The owner of the function.
- Owner
Type string - The owner type. can be one of
USER
,ROLE
, andGROUP
. - Catalog
Id string - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- Name string
- The name of the function.
- Resource
Uris List<UserDefined Function Resource Uri> - The configuration block for Resource URIs. See resource uris below for more details.
- Class
Name string - The Java class that contains the function code.
- Database
Name string - The name of the Database to create the Function.
- Owner
Name string - The owner of the function.
- Owner
Type string - The owner type. can be one of
USER
,ROLE
, andGROUP
. - Catalog
Id string - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- Name string
- The name of the function.
- Resource
Uris []UserDefined Function Resource Uri Args - The configuration block for Resource URIs. See resource uris below for more details.
- class
Name String - The Java class that contains the function code.
- database
Name String - The name of the Database to create the Function.
- owner
Name String - The owner of the function.
- owner
Type String - The owner type. can be one of
USER
,ROLE
, andGROUP
. - catalog
Id String - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- name String
- The name of the function.
- resource
Uris List<UserDefined Function Resource Uri> - The configuration block for Resource URIs. See resource uris below for more details.
- class
Name string - The Java class that contains the function code.
- database
Name string - The name of the Database to create the Function.
- owner
Name string - The owner of the function.
- owner
Type string - The owner type. can be one of
USER
,ROLE
, andGROUP
. - catalog
Id string - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- name string
- The name of the function.
- resource
Uris UserDefined Function Resource Uri[] - The configuration block for Resource URIs. See resource uris below for more details.
- class_
name str - The Java class that contains the function code.
- database_
name str - The name of the Database to create the Function.
- owner_
name str - The owner of the function.
- owner_
type str - The owner type. can be one of
USER
,ROLE
, andGROUP
. - catalog_
id str - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- name str
- The name of the function.
- resource_
uris Sequence[UserDefined Function Resource Uri Args] - The configuration block for Resource URIs. See resource uris below for more details.
- class
Name String - The Java class that contains the function code.
- database
Name String - The name of the Database to create the Function.
- owner
Name String - The owner of the function.
- owner
Type String - The owner type. can be one of
USER
,ROLE
, andGROUP
. - catalog
Id String - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- name String
- The name of the function.
- resource
Uris List<Property Map> - The configuration block for Resource URIs. See resource uris below for more details.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserDefinedFunction resource produces the following output properties:
- Arn string
- The ARN of the Glue User Defined Function.
- Create
Time string - The time at which the function was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Arn string
- The ARN of the Glue User Defined Function.
- Create
Time string - The time at which the function was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- arn String
- The ARN of the Glue User Defined Function.
- create
Time String - The time at which the function was created.
- id String
- The provider-assigned unique ID for this managed resource.
- arn string
- The ARN of the Glue User Defined Function.
- create
Time string - The time at which the function was created.
- id string
- The provider-assigned unique ID for this managed resource.
- arn str
- The ARN of the Glue User Defined Function.
- create_
time str - The time at which the function was created.
- id str
- The provider-assigned unique ID for this managed resource.
- arn String
- The ARN of the Glue User Defined Function.
- create
Time String - The time at which the function was created.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing UserDefinedFunction Resource
Get an existing UserDefinedFunction resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: UserDefinedFunctionState, opts?: CustomResourceOptions): UserDefinedFunction
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
catalog_id: Optional[str] = None,
class_name: Optional[str] = None,
create_time: Optional[str] = None,
database_name: Optional[str] = None,
name: Optional[str] = None,
owner_name: Optional[str] = None,
owner_type: Optional[str] = None,
resource_uris: Optional[Sequence[UserDefinedFunctionResourceUriArgs]] = None) -> UserDefinedFunction
func GetUserDefinedFunction(ctx *Context, name string, id IDInput, state *UserDefinedFunctionState, opts ...ResourceOption) (*UserDefinedFunction, error)
public static UserDefinedFunction Get(string name, Input<string> id, UserDefinedFunctionState? state, CustomResourceOptions? opts = null)
public static UserDefinedFunction get(String name, Output<String> id, UserDefinedFunctionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The ARN of the Glue User Defined Function.
- Catalog
Id string - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- Class
Name string - The Java class that contains the function code.
- Create
Time string - The time at which the function was created.
- Database
Name string - The name of the Database to create the Function.
- Name string
- The name of the function.
- Owner
Name string - The owner of the function.
- Owner
Type string - The owner type. can be one of
USER
,ROLE
, andGROUP
. - Resource
Uris List<UserDefined Function Resource Uri> - The configuration block for Resource URIs. See resource uris below for more details.
- Arn string
- The ARN of the Glue User Defined Function.
- Catalog
Id string - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- Class
Name string - The Java class that contains the function code.
- Create
Time string - The time at which the function was created.
- Database
Name string - The name of the Database to create the Function.
- Name string
- The name of the function.
- Owner
Name string - The owner of the function.
- Owner
Type string - The owner type. can be one of
USER
,ROLE
, andGROUP
. - Resource
Uris []UserDefined Function Resource Uri Args - The configuration block for Resource URIs. See resource uris below for more details.
- arn String
- The ARN of the Glue User Defined Function.
- catalog
Id String - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- class
Name String - The Java class that contains the function code.
- create
Time String - The time at which the function was created.
- database
Name String - The name of the Database to create the Function.
- name String
- The name of the function.
- owner
Name String - The owner of the function.
- owner
Type String - The owner type. can be one of
USER
,ROLE
, andGROUP
. - resource
Uris List<UserDefined Function Resource Uri> - The configuration block for Resource URIs. See resource uris below for more details.
- arn string
- The ARN of the Glue User Defined Function.
- catalog
Id string - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- class
Name string - The Java class that contains the function code.
- create
Time string - The time at which the function was created.
- database
Name string - The name of the Database to create the Function.
- name string
- The name of the function.
- owner
Name string - The owner of the function.
- owner
Type string - The owner type. can be one of
USER
,ROLE
, andGROUP
. - resource
Uris UserDefined Function Resource Uri[] - The configuration block for Resource URIs. See resource uris below for more details.
- arn str
- The ARN of the Glue User Defined Function.
- catalog_
id str - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- class_
name str - The Java class that contains the function code.
- create_
time str - The time at which the function was created.
- database_
name str - The name of the Database to create the Function.
- name str
- The name of the function.
- owner_
name str - The owner of the function.
- owner_
type str - The owner type. can be one of
USER
,ROLE
, andGROUP
. - resource_
uris Sequence[UserDefined Function Resource Uri Args] - The configuration block for Resource URIs. See resource uris below for more details.
- arn String
- The ARN of the Glue User Defined Function.
- catalog
Id String - ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.
- class
Name String - The Java class that contains the function code.
- create
Time String - The time at which the function was created.
- database
Name String - The name of the Database to create the Function.
- name String
- The name of the function.
- owner
Name String - The owner of the function.
- owner
Type String - The owner type. can be one of
USER
,ROLE
, andGROUP
. - resource
Uris List<Property Map> - The configuration block for Resource URIs. See resource uris below for more details.
Supporting Types
UserDefinedFunctionResourceUri, UserDefinedFunctionResourceUriArgs
- Resource
Type string - The type of the resource. can be one of
JAR
,FILE
, andARCHIVE
. - Uri string
- The URI for accessing the resource.
- Resource
Type string - The type of the resource. can be one of
JAR
,FILE
, andARCHIVE
. - Uri string
- The URI for accessing the resource.
- resource
Type String - The type of the resource. can be one of
JAR
,FILE
, andARCHIVE
. - uri String
- The URI for accessing the resource.
- resource
Type string - The type of the resource. can be one of
JAR
,FILE
, andARCHIVE
. - uri string
- The URI for accessing the resource.
- resource_
type str - The type of the resource. can be one of
JAR
,FILE
, andARCHIVE
. - uri str
- The URI for accessing the resource.
- resource
Type String - The type of the resource. can be one of
JAR
,FILE
, andARCHIVE
. - uri String
- The URI for accessing the resource.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.