Resource: awsGlueUserDefinedFunction
Provides a Glue User Defined Function Resource.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsGlueCatalogDatabaseExample =
new aws.glueCatalogDatabase.GlueCatalogDatabase(this, "example", {
name: "my_database",
});
const awsGlueUserDefinedFunctionExample =
new aws.glueUserDefinedFunction.GlueUserDefinedFunction(this, "example_1", {
catalogId: awsGlueCatalogDatabaseExample.catalogId,
className: "class",
databaseName: awsGlueCatalogDatabaseExample.name,
name: "my_func",
ownerName: "owner",
ownerType: "GROUP",
resourceUris: [
{
resourceType: "ARCHIVE",
uri: "uri",
},
],
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsGlueUserDefinedFunctionExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
name
- (Required) The name of the function.catalogId
- (Optional) ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID.databaseName
- (Required) The name of the Database to create the Function.className
- (Required) The Java class that contains the function code.ownerName
- (Required) The owner of the function.ownerType
- (Required) The owner type. can be one ofuser
,role
, andgroup
.resourceUris
- (Optional) The configuration block for Resource URIs. See resource uris below for more details.
Resource URIs
resourceType
- (Required) The type of the resource. can be one ofjar
,file
, andarchive
.uri
- (Required) The URI for accessing the resource.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The id of the Glue User Defined Function.arn
- The ARN of the Glue User Defined Function.createTime
- The time at which the function was created.
Import
Glue User Defined Functions can be imported using the catalogId:databaseName:functionName
. If you have not set a Catalog ID specify the AWS Account ID that the database is in, e.g.,