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",
});
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
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",
});
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")
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
	})
}
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",
    });
});
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());
    }
}
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
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",
});
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")
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
	})
}
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",
    });
});
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());
    }
}
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
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",
        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,
            },
        },
    },
});
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),
			},
		},
	},
})
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());
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,
            },
        },
    })
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,
            },
        },
    },
});
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
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 string
- The Catalog ID of the table.
- 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, andorphan_file_deletion.
- Configuration
CatalogTable Optimizer Configuration 
- A configuration block that defines the table optimizer settings. See Configuration for additional details.
- CatalogId string
- The Catalog ID of the table.
- 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, andorphan_file_deletion.
- Configuration
CatalogTable Optimizer Configuration Args 
- A configuration block that defines the table optimizer settings. See Configuration for additional details.
- catalogId String
- The Catalog ID of the table.
- 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, andorphan_file_deletion.
- configuration
CatalogTable Optimizer Configuration 
- A configuration block that defines the table optimizer settings. See Configuration for additional details.
- catalogId string
- The Catalog ID of the table.
- 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, andorphan_file_deletion.
- configuration
CatalogTable Optimizer Configuration 
- A configuration block that defines the table optimizer settings. See Configuration for additional details.
- 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. Valid values are compaction,retention, andorphan_file_deletion.
- configuration
CatalogTable Optimizer Configuration Args 
- A configuration block that defines the table optimizer settings. See Configuration for additional details.
- catalogId String
- The Catalog ID of the table.
- 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, andorphan_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) -> CatalogTableOptimizerfunc 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
- 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.
- CatalogId string
- The Catalog ID of the table.
- Configuration
CatalogTable Optimizer Configuration 
- 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, andorphan_file_deletion.
- CatalogId string
- The Catalog ID of the table.
- Configuration
CatalogTable Optimizer Configuration Args 
- 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, andorphan_file_deletion.
- catalogId String
- The Catalog ID of the table.
- configuration
CatalogTable Optimizer Configuration 
- 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, andorphan_file_deletion.
- catalogId string
- The Catalog ID of the table.
- configuration
CatalogTable Optimizer Configuration 
- 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, andorphan_file_deletion.
- catalog_id str
- The Catalog ID of the table.
- configuration
CatalogTable Optimizer Configuration Args 
- 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, andorphan_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, andorphan_file_deletion.
Supporting Types
CatalogTableOptimizerConfiguration, CatalogTableOptimizerConfigurationArgs        
- Enabled bool
- Indicates whether the table optimizer is enabled.
- RoleArn string
- The ARN of the IAM role to use for the table optimizer.
- OrphanFile CatalogDeletion Configuration Table Optimizer Configuration Orphan File Deletion Configuration 
- The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
- RetentionConfiguration CatalogTable Optimizer Configuration Retention Configuration 
- The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
- Enabled bool
- Indicates whether the table optimizer is enabled.
- RoleArn string
- The ARN of the IAM role to use for the table optimizer.
- OrphanFile CatalogDeletion Configuration Table Optimizer Configuration Orphan File Deletion Configuration 
- The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
- RetentionConfiguration CatalogTable Optimizer Configuration Retention Configuration 
- The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
- enabled Boolean
- Indicates whether the table optimizer is enabled.
- roleArn String
- The ARN of the IAM role to use for the table optimizer.
- orphanFile CatalogDeletion Configuration Table Optimizer Configuration Orphan File Deletion Configuration 
- The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
- retentionConfiguration CatalogTable Optimizer Configuration Retention Configuration 
- The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
- enabled boolean
- Indicates whether the table optimizer is enabled.
- roleArn string
- The ARN of the IAM role to use for the table optimizer.
- orphanFile CatalogDeletion Configuration Table Optimizer Configuration Orphan File Deletion Configuration 
- The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
- retentionConfiguration CatalogTable Optimizer Configuration Retention Configuration 
- The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
- enabled bool
- Indicates whether the table optimizer is enabled.
- role_arn str
- The ARN of the IAM role to use for the table optimizer.
- orphan_file_ Catalogdeletion_ configuration Table Optimizer Configuration Orphan File Deletion Configuration 
- The configuration block for an orphan file deletion optimizer. See Orphan File Deletion Configuration for additional details.
- retention_configuration CatalogTable Optimizer Configuration Retention Configuration 
- The configuration block for a snapshot retention optimizer. See Retention Configuration for additional details.
- enabled Boolean
- Indicates whether the table optimizer is enabled.
- roleArn String
- The ARN of the IAM role to use for the table optimizer.
- orphanFile Property MapDeletion Configuration 
- 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 CatalogTable Optimizer Configuration Orphan File Deletion Configuration Iceberg Configuration 
- The configuration for an Iceberg orphan file deletion optimizer.
- IcebergConfiguration CatalogTable Optimizer Configuration Orphan File Deletion Configuration Iceberg Configuration 
- The configuration for an Iceberg orphan file deletion optimizer.
- icebergConfiguration CatalogTable Optimizer Configuration Orphan File Deletion Configuration Iceberg Configuration 
- The configuration for an Iceberg orphan file deletion optimizer.
- icebergConfiguration CatalogTable Optimizer Configuration Orphan File Deletion Configuration Iceberg Configuration 
- The configuration for an Iceberg orphan file deletion optimizer.
- iceberg_configuration CatalogTable Optimizer Configuration Orphan File Deletion Configuration Iceberg Configuration 
- The configuration for an Iceberg orphan file deletion optimizer.
- 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.
- OrphanFile intRetention Period In Days 
- 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.
- OrphanFile intRetention Period In Days 
- 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.
- orphanFile IntegerRetention Period In Days 
- 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.
- orphanFile numberRetention Period In Days 
- 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_ intretention_ period_ in_ days 
- 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.
- orphanFile NumberRetention Period In Days 
- The number of days that orphan files should be retained before file deletion. Defaults to 3.
CatalogTableOptimizerConfigurationRetentionConfiguration, CatalogTableOptimizerConfigurationRetentionConfigurationArgs            
- IcebergConfiguration CatalogTable Optimizer Configuration Retention Configuration Iceberg Configuration 
- The configuration for an Iceberg snapshot retention optimizer.
- IcebergConfiguration CatalogTable Optimizer Configuration Retention Configuration Iceberg Configuration 
- The configuration for an Iceberg snapshot retention optimizer.
- icebergConfiguration CatalogTable Optimizer Configuration Retention Configuration Iceberg Configuration 
- The configuration for an Iceberg snapshot retention optimizer.
- icebergConfiguration CatalogTable Optimizer Configuration Retention Configuration Iceberg Configuration 
- The configuration for an Iceberg snapshot retention optimizer.
- iceberg_configuration CatalogTable Optimizer Configuration Retention Configuration Iceberg Configuration 
- The configuration for an Iceberg snapshot retention optimizer.
- icebergConfiguration Property Map
- The configuration for an Iceberg snapshot retention optimizer.
CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfiguration, CatalogTableOptimizerConfigurationRetentionConfigurationIcebergConfigurationArgs                
- CleanExpired boolFiles 
- If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults tofalse.
- NumberOf intSnapshots To Retain 
- The number of Iceberg snapshots to retain within the retention period. Defaults to 1or the corresponding Iceberg table configuration field if it exists.
- SnapshotRetention intPeriod In Days 
- The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
- CleanExpired boolFiles 
- If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults tofalse.
- NumberOf intSnapshots To Retain 
- The number of Iceberg snapshots to retain within the retention period. Defaults to 1or the corresponding Iceberg table configuration field if it exists.
- SnapshotRetention intPeriod In Days 
- The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
- cleanExpired BooleanFiles 
- If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults tofalse.
- numberOf IntegerSnapshots To Retain 
- The number of Iceberg snapshots to retain within the retention period. Defaults to 1or the corresponding Iceberg table configuration field if it exists.
- snapshotRetention IntegerPeriod In Days 
- The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
- cleanExpired booleanFiles 
- If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults tofalse.
- numberOf numberSnapshots To Retain 
- The number of Iceberg snapshots to retain within the retention period. Defaults to 1or the corresponding Iceberg table configuration field if it exists.
- snapshotRetention numberPeriod In Days 
- The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
- clean_expired_ boolfiles 
- If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults tofalse.
- number_of_ intsnapshots_ to_ retain 
- The number of Iceberg snapshots to retain within the retention period. Defaults to 1or the corresponding Iceberg table configuration field if it exists.
- snapshot_retention_ intperiod_ in_ days 
- The number of days to retain the Iceberg snapshots. Defaults to 5, or the corresponding Iceberg table configuration field if it exists.
- cleanExpired BooleanFiles 
- If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted. Defaults tofalse.
- numberOf NumberSnapshots To Retain 
- The number of Iceberg snapshots to retain within the retention period. Defaults to 1or the corresponding Iceberg table configuration field if it exists.
- snapshotRetention NumberPeriod In Days 
- 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
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 awsTerraform Provider.