aws.glue.CatalogTableOptimizer
Explore with Pulumi AI
Resource for managing an AWS Glue Catalog Table Optimizer.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.CatalogTableOptimizer("example", {
catalogId: "123456789012",
databaseName: "example_database",
tableName: "example_table",
configuration: {
roleArn: "arn:aws:iam::123456789012:role/example-role",
enabled: true,
},
type: "compaction",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.CatalogTableOptimizer("example",
catalog_id="123456789012",
database_name="example_database",
table_name="example_table",
configuration={
"role_arn": "arn:aws:iam::123456789012:role/example-role",
"enabled": True,
},
type="compaction")
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 {
_, err := glue.NewCatalogTableOptimizer(ctx, "example", &glue.CatalogTableOptimizerArgs{
CatalogId: pulumi.String("123456789012"),
DatabaseName: pulumi.String("example_database"),
TableName: pulumi.String("example_table"),
Configuration: &glue.CatalogTableOptimizerConfigurationArgs{
RoleArn: pulumi.String("arn:aws:iam::123456789012:role/example-role"),
Enabled: pulumi.Bool(true),
},
Type: pulumi.String("compaction"),
})
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.CatalogTableOptimizer("example", new()
{
CatalogId = "123456789012",
DatabaseName = "example_database",
TableName = "example_table",
Configuration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationArgs
{
RoleArn = "arn:aws:iam::123456789012:role/example-role",
Enabled = true,
},
Type = "compaction",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.CatalogTableOptimizer;
import com.pulumi.aws.glue.CatalogTableOptimizerArgs;
import com.pulumi.aws.glue.inputs.CatalogTableOptimizerConfigurationArgs;
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 CatalogTableOptimizer("example", CatalogTableOptimizerArgs.builder()
.catalogId("123456789012")
.databaseName("example_database")
.tableName("example_table")
.configuration(CatalogTableOptimizerConfigurationArgs.builder()
.roleArn("arn:aws:iam::123456789012:role/example-role")
.enabled(true)
.build())
.type("compaction")
.build());
}
}
resources:
example:
type: aws:glue:CatalogTableOptimizer
properties:
catalogId: '123456789012'
databaseName: example_database
tableName: example_table
configuration:
roleArn: arn:aws:iam::123456789012:role/example-role
enabled: true
type: compaction
Create CatalogTableOptimizer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CatalogTableOptimizer(name: string, args: CatalogTableOptimizerArgs, opts?: CustomResourceOptions);
@overload
def CatalogTableOptimizer(resource_name: str,
args: CatalogTableOptimizerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CatalogTableOptimizer(resource_name: str,
opts: Optional[ResourceOptions] = None,
catalog_id: Optional[str] = None,
database_name: Optional[str] = None,
table_name: Optional[str] = None,
type: Optional[str] = None,
configuration: Optional[CatalogTableOptimizerConfigurationArgs] = None)
func NewCatalogTableOptimizer(ctx *Context, name string, args CatalogTableOptimizerArgs, opts ...ResourceOption) (*CatalogTableOptimizer, error)
public CatalogTableOptimizer(string name, CatalogTableOptimizerArgs args, CustomResourceOptions? opts = null)
public CatalogTableOptimizer(String name, CatalogTableOptimizerArgs args)
public CatalogTableOptimizer(String name, CatalogTableOptimizerArgs args, CustomResourceOptions options)
type: aws:glue:CatalogTableOptimizer
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 CatalogTableOptimizerArgs
- 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 CatalogTableOptimizerArgs
- 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 CatalogTableOptimizerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CatalogTableOptimizerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CatalogTableOptimizerArgs
- 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 catalogTableOptimizerResource = new Aws.Glue.CatalogTableOptimizer("catalogTableOptimizerResource", new()
{
CatalogId = "string",
DatabaseName = "string",
TableName = "string",
Type = "string",
Configuration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationArgs
{
Enabled = false,
RoleArn = "string",
},
});
example, err := glue.NewCatalogTableOptimizer(ctx, "catalogTableOptimizerResource", &glue.CatalogTableOptimizerArgs{
CatalogId: pulumi.String("string"),
DatabaseName: pulumi.String("string"),
TableName: pulumi.String("string"),
Type: pulumi.String("string"),
Configuration: &glue.CatalogTableOptimizerConfigurationArgs{
Enabled: pulumi.Bool(false),
RoleArn: pulumi.String("string"),
},
})
var catalogTableOptimizerResource = new CatalogTableOptimizer("catalogTableOptimizerResource", CatalogTableOptimizerArgs.builder()
.catalogId("string")
.databaseName("string")
.tableName("string")
.type("string")
.configuration(CatalogTableOptimizerConfigurationArgs.builder()
.enabled(false)
.roleArn("string")
.build())
.build());
catalog_table_optimizer_resource = aws.glue.CatalogTableOptimizer("catalogTableOptimizerResource",
catalog_id="string",
database_name="string",
table_name="string",
type="string",
configuration={
"enabled": False,
"role_arn": "string",
})
const catalogTableOptimizerResource = new aws.glue.CatalogTableOptimizer("catalogTableOptimizerResource", {
catalogId: "string",
databaseName: "string",
tableName: "string",
type: "string",
configuration: {
enabled: false,
roleArn: "string",
},
});
type: aws:glue:CatalogTableOptimizer
properties:
catalogId: string
configuration:
enabled: false
roleArn: string
databaseName: string
tableName: string
type: string
CatalogTableOptimizer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CatalogTableOptimizer resource accepts the following input properties:
- Catalog
Id string - The Catalog ID of the table.
- Database
Name string - The name of the database in the catalog in which the table resides.
- Table
Name string - The name of the table.
- Type string
- The type of table optimizer. Currently, the only valid value is compaction.
- Configuration
Catalog
Table Optimizer Configuration - A configuration block that defines the table optimizer settings. The block contains:
- Catalog
Id string - The Catalog ID of the table.
- Database
Name string - The name of the database in the catalog in which the table resides.
- Table
Name string - The name of the table.
- Type string
- The type of table optimizer. Currently, the only valid value is compaction.
- Configuration
Catalog
Table Optimizer Configuration Args - A configuration block that defines the table optimizer settings. The block contains:
- catalog
Id String - The Catalog ID of the table.
- database
Name String - The name of the database in the catalog in which the table resides.
- table
Name String - The name of the table.
- type String
- The type of table optimizer. Currently, the only valid value is compaction.
- configuration
Catalog
Table Optimizer Configuration - A configuration block that defines the table optimizer settings. The block contains:
- catalog
Id string - The Catalog ID of the table.
- database
Name string - The name of the database in the catalog in which the table resides.
- table
Name string - The name of the table.
- type string
- The type of table optimizer. Currently, the only valid value is compaction.
- configuration
Catalog
Table Optimizer Configuration - A configuration block that defines the table optimizer settings. The block contains:
- catalog_
id str - The Catalog ID of the table.
- database_
name str - The name of the database in the catalog in which the table resides.
- table_
name str - The name of the table.
- type str
- The type of table optimizer. Currently, the only valid value is compaction.
- configuration
Catalog
Table Optimizer Configuration Args - A configuration block that defines the table optimizer settings. The block contains:
- catalog
Id String - The Catalog ID of the table.
- database
Name String - The name of the database in the catalog in which the table resides.
- table
Name String - The name of the table.
- type String
- The type of table optimizer. Currently, the only valid value is compaction.
- configuration Property Map
- A configuration block that defines the table optimizer settings. The block contains:
Outputs
All input properties are implicitly available as output properties. Additionally, the CatalogTableOptimizer resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CatalogTableOptimizer Resource
Get an existing CatalogTableOptimizer 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?: CatalogTableOptimizerState, opts?: CustomResourceOptions): CatalogTableOptimizer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
catalog_id: Optional[str] = None,
configuration: Optional[CatalogTableOptimizerConfigurationArgs] = None,
database_name: Optional[str] = None,
table_name: Optional[str] = None,
type: Optional[str] = None) -> CatalogTableOptimizer
func GetCatalogTableOptimizer(ctx *Context, name string, id IDInput, state *CatalogTableOptimizerState, opts ...ResourceOption) (*CatalogTableOptimizer, error)
public static CatalogTableOptimizer Get(string name, Input<string> id, CatalogTableOptimizerState? state, CustomResourceOptions? opts = null)
public static CatalogTableOptimizer get(String name, Output<String> id, CatalogTableOptimizerState 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.
- Catalog
Id string - The Catalog ID of the table.
- Configuration
Catalog
Table Optimizer Configuration - A configuration block that defines the table optimizer settings. The block contains:
- Database
Name string - The name of the database in the catalog in which the table resides.
- Table
Name string - The name of the table.
- Type string
- The type of table optimizer. Currently, the only valid value is compaction.
- Catalog
Id string - The Catalog ID of the table.
- Configuration
Catalog
Table Optimizer Configuration Args - A configuration block that defines the table optimizer settings. The block contains:
- Database
Name string - The name of the database in the catalog in which the table resides.
- Table
Name string - The name of the table.
- Type string
- The type of table optimizer. Currently, the only valid value is compaction.
- catalog
Id String - The Catalog ID of the table.
- configuration
Catalog
Table Optimizer Configuration - A configuration block that defines the table optimizer settings. The block contains:
- database
Name String - The name of the database in the catalog in which the table resides.
- table
Name String - The name of the table.
- type String
- The type of table optimizer. Currently, the only valid value is compaction.
- catalog
Id string - The Catalog ID of the table.
- configuration
Catalog
Table Optimizer Configuration - A configuration block that defines the table optimizer settings. The block contains:
- database
Name string - The name of the database in the catalog in which the table resides.
- table
Name string - The name of the table.
- type string
- The type of table optimizer. Currently, the only valid value is compaction.
- catalog_
id str - The Catalog ID of the table.
- configuration
Catalog
Table Optimizer Configuration Args - A configuration block that defines the table optimizer settings. The block contains:
- database_
name str - The name of the database in the catalog in which the table resides.
- table_
name str - The name of the table.
- type str
- The type of table optimizer. Currently, the only valid value is compaction.
- catalog
Id String - The Catalog ID of the table.
- configuration Property Map
- A configuration block that defines the table optimizer settings. The block contains:
- database
Name String - The name of the database in the catalog in which the table resides.
- table
Name String - The name of the table.
- type String
- The type of table optimizer. Currently, the only valid value is compaction.
Supporting Types
CatalogTableOptimizerConfiguration, CatalogTableOptimizerConfigurationArgs
Import
Using pulumi import
, import Glue Catalog Table Optimizer using the catalog_id,database_name,table_name,type
. For example:
$ pulumi import aws:glue/catalogTableOptimizer:CatalogTableOptimizer example 123456789012,example_database,example_table,compaction
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.