Package com.pulumi.aws.athena
Class DataCatalog
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.athena.DataCatalog
-
public class DataCatalog extends com.pulumi.resources.CustomResource
Provides an Athena data catalog. More information about Athena and Athena data catalogs can be found in the [Athena User Guide](https://docs.aws.amazon.com/athena/latest/ug/what-is.html). > **Tip:** for a more detailed explanation on the usage of `parameters`, see the [DataCatalog API documentation](https://docs.aws.amazon.com/athena/latest/APIReference/API_DataCatalog.html) ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.athena.DataCatalog; import com.pulumi.aws.athena.DataCatalogArgs; 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 DataCatalog("example", DataCatalogArgs.builder() .description("Example Athena data catalog") .parameters(Map.of("function", "arn:aws:lambda:eu-central-1:123456789012:function:not-important-lambda-function")) .tags(Map.of("Name", "example-athena-data-catalog")) .type("LAMBDA") .build()); } } ``` ### Hive based Data Catalog ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.athena.DataCatalog; import com.pulumi.aws.athena.DataCatalogArgs; 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 DataCatalog("example", DataCatalogArgs.builder() .description("Hive based Data Catalog") .parameters(Map.of("metadata-function", "arn:aws:lambda:eu-central-1:123456789012:function:not-important-lambda-function")) .type("HIVE") .build()); } } ``` ### Glue based Data Catalog ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.athena.DataCatalog; import com.pulumi.aws.athena.DataCatalogArgs; 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 DataCatalog("example", DataCatalogArgs.builder() .description("Glue based Data Catalog") .parameters(Map.of("catalog-id", "123456789012")) .type("GLUE") .build()); } } ``` ### Lambda based Data Catalog ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.athena.DataCatalog; import com.pulumi.aws.athena.DataCatalogArgs; 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 DataCatalog("example", DataCatalogArgs.builder() .description("Lambda based Data Catalog") .parameters(Map.ofEntries( Map.entry("metadata-function", "arn:aws:lambda:eu-central-1:123456789012:function:not-important-lambda-function-1"), Map.entry("record-function", "arn:aws:lambda:eu-central-1:123456789012:function:not-important-lambda-function-2") )) .type("LAMBDA") .build()); } } ``` ## Import Data catalogs can be imported using their `name`, e.g., ```sh $ pulumi import aws:athena/dataCatalog:DataCatalog example example-data-catalog ```
-
-
Constructor Summary
Constructors Constructor Description DataCatalog(java.lang.String name)
DataCatalog(java.lang.String name, DataCatalogArgs args)
DataCatalog(java.lang.String name, DataCatalogArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
arn()
com.pulumi.core.Output<java.lang.String>
description()
static DataCatalog
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DataCatalogState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
parameters()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
tagsAll()
com.pulumi.core.Output<java.lang.String>
type()
-
-
-
Constructor Detail
-
DataCatalog
public DataCatalog(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
DataCatalog
public DataCatalog(java.lang.String name, DataCatalogArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
DataCatalog
public DataCatalog(java.lang.String name, DataCatalogArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the data catalog.
-
description
public com.pulumi.core.Output<java.lang.String> description()
- Returns:
- Description of the data catalog.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the data catalog. The catalog name must be unique for the AWS account and can use a maximum of 128 alphanumeric, underscore, at sign, or hyphen characters.
-
parameters
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> parameters()
- Returns:
- Key value pairs that specifies the Lambda function or functions to use for the data catalog. The mapping used depends on the catalog type.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- Type of data catalog: `LAMBDA` for a federated catalog, `GLUE` for AWS Glue Catalog, or `HIVE` for an external hive metastore.
-
get
public static DataCatalog get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable DataCatalogState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-