All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.glue.UserDefinedFunction Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.66.3
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.glue;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.glue.UserDefinedFunctionArgs;
import com.pulumi.aws.glue.inputs.UserDefinedFunctionState;
import com.pulumi.aws.glue.outputs.UserDefinedFunctionResourceUri;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a Glue User Defined Function Resource.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## 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: * * ```sh * $ pulumi import aws:glue/userDefinedFunction:UserDefinedFunction func 123456789012:my_database:my_func * ``` * */ @ResourceType(type="aws:glue/userDefinedFunction:UserDefinedFunction") public class UserDefinedFunction extends com.pulumi.resources.CustomResource { /** * The ARN of the Glue User Defined Function. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return The ARN of the Glue User Defined Function. * */ public Output arn() { return this.arn; } /** * ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID. * */ @Export(name="catalogId", refs={String.class}, tree="[0]") private Output catalogId; /** * @return ID of the Glue Catalog to create the function in. If omitted, this defaults to the AWS Account ID. * */ public Output> catalogId() { return Codegen.optional(this.catalogId); } /** * The Java class that contains the function code. * */ @Export(name="className", refs={String.class}, tree="[0]") private Output className; /** * @return The Java class that contains the function code. * */ public Output className() { return this.className; } /** * The time at which the function was created. * */ @Export(name="createTime", refs={String.class}, tree="[0]") private Output createTime; /** * @return The time at which the function was created. * */ public Output createTime() { return this.createTime; } /** * The name of the Database to create the Function. * */ @Export(name="databaseName", refs={String.class}, tree="[0]") private Output databaseName; /** * @return The name of the Database to create the Function. * */ public Output databaseName() { return this.databaseName; } /** * The name of the function. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the function. * */ public Output name() { return this.name; } /** * The owner of the function. * */ @Export(name="ownerName", refs={String.class}, tree="[0]") private Output ownerName; /** * @return The owner of the function. * */ public Output ownerName() { return this.ownerName; } /** * The owner type. can be one of `USER`, `ROLE`, and `GROUP`. * */ @Export(name="ownerType", refs={String.class}, tree="[0]") private Output ownerType; /** * @return The owner type. can be one of `USER`, `ROLE`, and `GROUP`. * */ public Output ownerType() { return this.ownerType; } /** * The configuration block for Resource URIs. See resource uris below for more details. * */ @Export(name="resourceUris", refs={List.class,UserDefinedFunctionResourceUri.class}, tree="[0,1]") private Output> resourceUris; /** * @return The configuration block for Resource URIs. See resource uris below for more details. * */ public Output>> resourceUris() { return Codegen.optional(this.resourceUris); } /** * * @param name The _unique_ name of the resulting resource. */ public UserDefinedFunction(java.lang.String name) { this(name, UserDefinedFunctionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public UserDefinedFunction(java.lang.String name, UserDefinedFunctionArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public UserDefinedFunction(java.lang.String name, UserDefinedFunctionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:glue/userDefinedFunction:UserDefinedFunction", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private UserDefinedFunction(java.lang.String name, Output id, @Nullable UserDefinedFunctionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:glue/userDefinedFunction:UserDefinedFunction", name, state, makeResourceOptions(options, id), false); } private static UserDefinedFunctionArgs makeArgs(UserDefinedFunctionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? UserDefinedFunctionArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static UserDefinedFunction get(java.lang.String name, Output id, @Nullable UserDefinedFunctionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new UserDefinedFunction(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy