1. Packages
  2. AWS
  3. API Docs
  4. glue
  5. CatalogTableOptimizer
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.glue.CatalogTableOptimizer

Explore with Pulumi AI

Resource for managing an AWS Glue Catalog Table Optimizer.

Example Usage

Compaction Optimizer

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

Snapshot Retention Optimizer

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,
        retentionConfiguration: {
            icebergConfiguration: {
                snapshotRetentionPeriodInDays: 7,
                numberOfSnapshotsToRetain: 3,
                cleanExpiredFiles: true,
            },
        },
    },
    type: "retention",
});
Copy
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,
        "retention_configuration": {
            "iceberg_configuration": {
                "snapshot_retention_period_in_days": 7,
                "number_of_snapshots_to_retain": 3,
                "clean_expired_files": True,
            },
        },
    },
    type="retention")
Copy
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),
				RetentionConfiguration: &glue.CatalogTableOptimizerConfigurationRetentionConfigurationArgs{
					IcebergConfiguration: &glue.CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs{
						SnapshotRetentionPeriodInDays: pulumi.Int(7),
						NumberOfSnapshotsToRetain:     pulumi.Int(3),
						CleanExpiredFiles:             pulumi.Bool(true),
					},
				},
			},
			Type: pulumi.String("retention"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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,
            RetentionConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationRetentionConfigurationArgs
            {
                IcebergConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs
                {
                    SnapshotRetentionPeriodInDays = 7,
                    NumberOfSnapshotsToRetain = 3,
                    CleanExpiredFiles = true,
                },
            },
        },
        Type = "retention",
    });

});
Copy
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 com.pulumi.aws.glue.inputs.CatalogTableOptimizerConfigurationRetentionConfigurationArgs;
import com.pulumi.aws.glue.inputs.CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs;
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)
                .retentionConfiguration(CatalogTableOptimizerConfigurationRetentionConfigurationArgs.builder()
                    .icebergConfiguration(CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs.builder()
                        .snapshotRetentionPeriodInDays(7)
                        .numberOfSnapshotsToRetain(3)
                        .cleanExpiredFiles(true)
                        .build())
                    .build())
                .build())
            .type("retention")
            .build());

    }
}
Copy
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
        retentionConfiguration:
          icebergConfiguration:
            snapshotRetentionPeriodInDays: 7
            numberOfSnapshotsToRetain: 3
            cleanExpiredFiles: true
      type: retention
Copy

Orphan File Deletion Optimizer

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,
        orphanFileDeletionConfiguration: {
            icebergConfiguration: {
                orphanFileRetentionPeriodInDays: 7,
                location: "s3://example-bucket/example_table/",
            },
        },
    },
    type: "orphan_file_deletion",
});
Copy
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,
        "orphan_file_deletion_configuration": {
            "iceberg_configuration": {
                "orphan_file_retention_period_in_days": 7,
                "location": "s3://example-bucket/example_table/",
            },
        },
    },
    type="orphan_file_deletion")
Copy
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),
				OrphanFileDeletionConfiguration: &glue.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs{
					IcebergConfiguration: &glue.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs{
						OrphanFileRetentionPeriodInDays: pulumi.Int(7),
						Location:                        pulumi.String("s3://example-bucket/example_table/"),
					},
				},
			},
			Type: pulumi.String("orphan_file_deletion"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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,
            OrphanFileDeletionConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs
            {
                IcebergConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs
                {
                    OrphanFileRetentionPeriodInDays = 7,
                    Location = "s3://example-bucket/example_table/",
                },
            },
        },
        Type = "orphan_file_deletion",
    });

});
Copy
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 com.pulumi.aws.glue.inputs.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs;
import com.pulumi.aws.glue.inputs.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs;
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)
                .orphanFileDeletionConfiguration(CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs.builder()
                    .icebergConfiguration(CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs.builder()
                        .orphanFileRetentionPeriodInDays(7)
                        .location("s3://example-bucket/example_table/")
                        .build())
                    .build())
                .build())
            .type("orphan_file_deletion")
            .build());

    }
}
Copy
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
        orphanFileDeletionConfiguration:
          icebergConfiguration:
            orphanFileRetentionPeriodInDays: 7
            location: s3://example-bucket/example_table/
      type: orphan_file_deletion
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. CatalogTableOptimizerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. CatalogTableOptimizerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CatalogTableOptimizerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
        OrphanFileDeletionConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs
        {
            IcebergConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs
            {
                Location = "string",
                OrphanFileRetentionPeriodInDays = 0,
            },
        },
        RetentionConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationRetentionConfigurationArgs
        {
            IcebergConfiguration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs
            {
                CleanExpiredFiles = false,
                NumberOfSnapshotsToRetain = 0,
                SnapshotRetentionPeriodInDays = 0,
            },
        },
    },
});
Copy
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"),
		OrphanFileDeletionConfiguration: &glue.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs{
			IcebergConfiguration: &glue.CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs{
				Location:                        pulumi.String("string"),
				OrphanFileRetentionPeriodInDays: pulumi.Int(0),
			},
		},
		RetentionConfiguration: &glue.CatalogTableOptimizerConfigurationRetentionConfigurationArgs{
			IcebergConfiguration: &glue.CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs{
				CleanExpiredFiles:             pulumi.Bool(false),
				NumberOfSnapshotsToRetain:     pulumi.Int(0),
				SnapshotRetentionPeriodInDays: pulumi.Int(0),
			},
		},
	},
})
Copy
var catalogTableOptimizerResource = new CatalogTableOptimizer("catalogTableOptimizerResource", CatalogTableOptimizerArgs.builder()
    .catalogId("string")
    .databaseName("string")
    .tableName("string")
    .type("string")
    .configuration(CatalogTableOptimizerConfigurationArgs.builder()
        .enabled(false)
        .roleArn("string")
        .orphanFileDeletionConfiguration(CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs.builder()
            .icebergConfiguration(CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs.builder()
                .location("string")
                .orphanFileRetentionPeriodInDays(0)
                .build())
            .build())
        .retentionConfiguration(CatalogTableOptimizerConfigurationRetentionConfigurationArgs.builder()
            .icebergConfiguration(CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs.builder()
                .cleanExpiredFiles(false)
                .numberOfSnapshotsToRetain(0)
                .snapshotRetentionPeriodInDays(0)
                .build())
            .build())
        .build())
    .build());
Copy
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",
        "orphan_file_deletion_configuration": {
            "iceberg_configuration": {
                "location": "string",
                "orphan_file_retention_period_in_days": 0,
            },
        },
        "retention_configuration": {
            "iceberg_configuration": {
                "clean_expired_files": False,
                "number_of_snapshots_to_retain": 0,
                "snapshot_retention_period_in_days": 0,
            },
        },
    })
Copy
const catalogTableOptimizerResource = new aws.glue.CatalogTableOptimizer("catalogTableOptimizerResource", {
    catalogId: "string",
    databaseName: "string",
    tableName: "string",
    type: "string",
    configuration: {
        enabled: false,
        roleArn: "string",
        orphanFileDeletionConfiguration: {
            icebergConfiguration: {
                location: "string",
                orphanFileRetentionPeriodInDays: 0,
            },
        },
        retentionConfiguration: {
            icebergConfiguration: {
                cleanExpiredFiles: false,
                numberOfSnapshotsToRetain: 0,
                snapshotRetentionPeriodInDays: 0,
            },
        },
    },
});
Copy
type: aws:glue:CatalogTableOptimizer
properties:
    catalogId: string
    configuration:
        enabled: false
        orphanFileDeletionConfiguration:
            icebergConfiguration:
                location: string
                orphanFileRetentionPeriodInDays: 0
        retentionConfiguration:
            icebergConfiguration:
                cleanExpiredFiles: false
                numberOfSnapshotsToRetain: 0
                snapshotRetentionPeriodInDays: 0
        roleArn: string
    databaseName: string
    tableName: string
    type: string
Copy

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:

CatalogId This property is required. string
The Catalog ID of the table.
DatabaseName This property is required. string
The name of the database in the catalog in which the table resides.
TableName This property is required. string
The name of the table.
Type This property is required. string
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
Configuration CatalogTableOptimizerConfiguration
A configuration block that defines the table optimizer settings. See Configuration for additional details.
CatalogId This property is required. string
The Catalog ID of the table.
DatabaseName This property is required. string
The name of the database in the catalog in which the table resides.
TableName This property is required. string
The name of the table.
Type This property is required. string
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
Configuration CatalogTableOptimizerConfigurationArgs
A configuration block that defines the table optimizer settings. See Configuration for additional details.
catalogId This property is required. String
The Catalog ID of the table.
databaseName This property is required. String
The name of the database in the catalog in which the table resides.
tableName This property is required. String
The name of the table.
type This property is required. String
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
configuration CatalogTableOptimizerConfiguration
A configuration block that defines the table optimizer settings. See Configuration for additional details.
catalogId This property is required. string
The Catalog ID of the table.
databaseName This property is required. string
The name of the database in the catalog in which the table resides.
tableName This property is required. string
The name of the table.
type This property is required. string
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
configuration CatalogTableOptimizerConfiguration
A configuration block that defines the table optimizer settings. See Configuration for additional details.
catalog_id This property is required. str
The Catalog ID of the table.
database_name This property is required. str
The name of the database in the catalog in which the table resides.
table_name This property is required. str
The name of the table.
type This property is required. str
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
configuration CatalogTableOptimizerConfigurationArgs
A configuration block that defines the table optimizer settings. See Configuration for additional details.
catalogId This property is required. String
The Catalog ID of the table.
databaseName This property is required. String
The name of the database in the catalog in which the table resides.
tableName This property is required. String
The name of the table.
type This property is required. String
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
configuration Property Map
A configuration block that defines the table optimizer settings. See Configuration for additional details.

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)
resources:  _:    type: aws:glue:CatalogTableOptimizer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
CatalogId string
The Catalog ID of the table.
Configuration CatalogTableOptimizerConfiguration
A configuration block that defines the table optimizer settings. See Configuration for additional details.
DatabaseName string
The name of the database in the catalog in which the table resides.
TableName string
The name of the table.
Type string
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
CatalogId string
The Catalog ID of the table.
Configuration CatalogTableOptimizerConfigurationArgs
A configuration block that defines the table optimizer settings. See Configuration for additional details.
DatabaseName string
The name of the database in the catalog in which the table resides.
TableName string
The name of the table.
Type string
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
catalogId String
The Catalog ID of the table.
configuration CatalogTableOptimizerConfiguration
A configuration block that defines the table optimizer settings. See Configuration for additional details.
databaseName String
The name of the database in the catalog in which the table resides.
tableName String
The name of the table.
type String
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
catalogId string
The Catalog ID of the table.
configuration CatalogTableOptimizerConfiguration
A configuration block that defines the table optimizer settings. See Configuration for additional details.
databaseName string
The name of the database in the catalog in which the table resides.
tableName string
The name of the table.
type string
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.
catalog_id str
The Catalog ID of the table.
configuration CatalogTableOptimizerConfigurationArgs
A configuration block that defines the table optimizer settings. See Configuration for additional details.
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. Valid values are compaction, retention, and orphan_file_deletion.
catalogId String
The Catalog ID of the table.
configuration Property Map
A configuration block that defines the table optimizer settings. See Configuration for additional details.
databaseName String
The name of the database in the catalog in which the table resides.
tableName String
The name of the table.
type String
The type of table optimizer. Valid values are compaction, retention, and orphan_file_deletion.

Supporting Types

CatalogTableOptimizerConfiguration
, CatalogTableOptimizerConfigurationArgs

Enabled This property is required. bool
Indicates whether the table optimizer is enabled.
RoleArn This property is required. string
The ARN of the IAM role to use for the table optimizer.
OrphanFileDeletionConfiguration CatalogTableOptimizerConfigurationOrphanFileDeletionConfiguration
The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
RetentionConfiguration CatalogTableOptimizerConfigurationRetentionConfiguration
The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
Enabled This property is required. bool
Indicates whether the table optimizer is enabled.
RoleArn This property is required. string
The ARN of the IAM role to use for the table optimizer.
OrphanFileDeletionConfiguration CatalogTableOptimizerConfigurationOrphanFileDeletionConfiguration
The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
RetentionConfiguration CatalogTableOptimizerConfigurationRetentionConfiguration
The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
enabled This property is required. Boolean
Indicates whether the table optimizer is enabled.
roleArn This property is required. String
The ARN of the IAM role to use for the table optimizer.
orphanFileDeletionConfiguration CatalogTableOptimizerConfigurationOrphanFileDeletionConfiguration
The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
retentionConfiguration CatalogTableOptimizerConfigurationRetentionConfiguration
The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
enabled This property is required. boolean
Indicates whether the table optimizer is enabled.
roleArn This property is required. string
The ARN of the IAM role to use for the table optimizer.
orphanFileDeletionConfiguration CatalogTableOptimizerConfigurationOrphanFileDeletionConfiguration
The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
retentionConfiguration CatalogTableOptimizerConfigurationRetentionConfiguration
The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
enabled This property is required. bool
Indicates whether the table optimizer is enabled.
role_arn This property is required. str
The ARN of the IAM role to use for the table optimizer.
orphan_file_deletion_configuration CatalogTableOptimizerConfigurationOrphanFileDeletionConfiguration
The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
retention_configuration CatalogTableOptimizerConfigurationRetentionConfiguration
The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
enabled This property is required. Boolean
Indicates whether the table optimizer is enabled.
roleArn This property is required. String
The ARN of the IAM role to use for the table optimizer.
orphanFileDeletionConfiguration Property Map
The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
retentionConfiguration Property Map
The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.

CatalogTableOptimizerConfigurationOrphanFileDeletionConfiguration
, CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationArgs

icebergConfiguration Property Map
The configuration for an Iceberg orphan file deletion optimizer.

CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfiguration
, CatalogTableOptimizerConfigurationOrphanFileDeletionConfigurationIcebergConfigurationArgs

Location string
Specifies a directory in which to look for files. You may choose a sub-directory rather than the top-level table location. Defaults to the table's location.
OrphanFileRetentionPeriodInDays int
The number of days that orphan files should be retained before file deletion. Defaults to 3.
Location string
Specifies a directory in which to look for files. You may choose a sub-directory rather than the top-level table location. Defaults to the table's location.
OrphanFileRetentionPeriodInDays int
The number of days that orphan files should be retained before file deletion. Defaults to 3.
location String
Specifies a directory in which to look for files. You may choose a sub-directory rather than the top-level table location. Defaults to the table's location.
orphanFileRetentionPeriodInDays Integer
The number of days that orphan files should be retained before file deletion. Defaults to 3.
location string
Specifies a directory in which to look for files. You may choose a sub-directory rather than the top-level table location. Defaults to the table's location.
orphanFileRetentionPeriodInDays number
The number of days that orphan files should be retained before file deletion. Defaults to 3.
location str
Specifies a directory in which to look for files. You may choose a sub-directory rather than the top-level table location. Defaults to the table's location.
orphan_file_retention_period_in_days int
The number of days that orphan files should be retained before file deletion. Defaults to 3.
location String
Specifies a directory in which to look for files. You may choose a sub-directory rather than the top-level table location. Defaults to the table's location.
orphanFileRetentionPeriodInDays Number
The number of days that orphan files should be retained before file deletion. Defaults to 3.

CatalogTableOptimizerConfigurationRetentionConfiguration
, CatalogTableOptimizerConfigurationRetentionConfigurationArgs

icebergConfiguration Property Map
The configuration for an Iceberg snapshot retention optimizer.

CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfiguration
, CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs

CleanExpiredFiles bool
If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults to false.
NumberOfSnapshotsToRetain int
The number of Iceberg snapshots to retain within the retention period. Defaults to 1 or the corresponding Iceberg table configuration field if it exists.
SnapshotRetentionPeriodInDays int
The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
CleanExpiredFiles bool
If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults to false.
NumberOfSnapshotsToRetain int
The number of Iceberg snapshots to retain within the retention period. Defaults to 1 or the corresponding Iceberg table configuration field if it exists.
SnapshotRetentionPeriodInDays int
The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
cleanExpiredFiles Boolean
If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults to false.
numberOfSnapshotsToRetain Integer
The number of Iceberg snapshots to retain within the retention period. Defaults to 1 or the corresponding Iceberg table configuration field if it exists.
snapshotRetentionPeriodInDays Integer
The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
cleanExpiredFiles boolean
If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults to false.
numberOfSnapshotsToRetain number
The number of Iceberg snapshots to retain within the retention period. Defaults to 1 or the corresponding Iceberg table configuration field if it exists.
snapshotRetentionPeriodInDays number
The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
clean_expired_files bool
If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults to false.
number_of_snapshots_to_retain int
The number of Iceberg snapshots to retain within the retention period. Defaults to 1 or the corresponding Iceberg table configuration field if it exists.
snapshot_retention_period_in_days int
The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
cleanExpiredFiles Boolean
If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults to false.
numberOfSnapshotsToRetain Number
The number of Iceberg snapshots to retain within the retention period. Defaults to 1 or the corresponding Iceberg table configuration field if it exists.
snapshotRetentionPeriodInDays Number
The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.

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
Copy

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.