github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/glue/catalogTable.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package glue 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a Glue Catalog Table Resource. You can refer to the [Glue Developer Guide](http://docs.aws.amazon.com/glue/latest/dg/populate-data-catalog.html) for a full explanation of the Glue Data Catalog functionality. 16 // 17 // ## Example Usage 18 // 19 // ### Basic Table 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := glue.NewCatalogTable(ctx, "aws_glue_catalog_table", &glue.CatalogTableArgs{ 35 // Name: pulumi.String("MyCatalogTable"), 36 // DatabaseName: pulumi.String("MyCatalogDatabase"), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 // 48 // ### Parquet Table for Athena 49 // 50 // <!--Start PulumiCodeChooser --> 51 // ```go 52 // package main 53 // 54 // import ( 55 // 56 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 57 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 58 // 59 // ) 60 // 61 // func main() { 62 // pulumi.Run(func(ctx *pulumi.Context) error { 63 // _, err := glue.NewCatalogTable(ctx, "aws_glue_catalog_table", &glue.CatalogTableArgs{ 64 // Name: pulumi.String("MyCatalogTable"), 65 // DatabaseName: pulumi.String("MyCatalogDatabase"), 66 // TableType: pulumi.String("EXTERNAL_TABLE"), 67 // Parameters: pulumi.StringMap{ 68 // "EXTERNAL": pulumi.String("TRUE"), 69 // "parquet.compression": pulumi.String("SNAPPY"), 70 // }, 71 // StorageDescriptor: &glue.CatalogTableStorageDescriptorArgs{ 72 // Location: pulumi.String("s3://my-bucket/event-streams/my-stream"), 73 // InputFormat: pulumi.String("org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat"), 74 // OutputFormat: pulumi.String("org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"), 75 // SerDeInfo: &glue.CatalogTableStorageDescriptorSerDeInfoArgs{ 76 // Name: pulumi.String("my-stream"), 77 // SerializationLibrary: pulumi.String("org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"), 78 // Parameters: pulumi.StringMap{ 79 // "serialization.format": pulumi.String("1"), 80 // }, 81 // }, 82 // Columns: glue.CatalogTableStorageDescriptorColumnArray{ 83 // &glue.CatalogTableStorageDescriptorColumnArgs{ 84 // Name: pulumi.String("my_string"), 85 // Type: pulumi.String("string"), 86 // }, 87 // &glue.CatalogTableStorageDescriptorColumnArgs{ 88 // Name: pulumi.String("my_double"), 89 // Type: pulumi.String("double"), 90 // }, 91 // &glue.CatalogTableStorageDescriptorColumnArgs{ 92 // Name: pulumi.String("my_date"), 93 // Type: pulumi.String("date"), 94 // Comment: pulumi.String(""), 95 // }, 96 // &glue.CatalogTableStorageDescriptorColumnArgs{ 97 // Name: pulumi.String("my_bigint"), 98 // Type: pulumi.String("bigint"), 99 // Comment: pulumi.String(""), 100 // }, 101 // &glue.CatalogTableStorageDescriptorColumnArgs{ 102 // Name: pulumi.String("my_struct"), 103 // Type: pulumi.String("struct<my_nested_string:string>"), 104 // Comment: pulumi.String(""), 105 // }, 106 // }, 107 // }, 108 // }) 109 // if err != nil { 110 // return err 111 // } 112 // return nil 113 // }) 114 // } 115 // 116 // ``` 117 // <!--End PulumiCodeChooser --> 118 // 119 // ## Import 120 // 121 // Using `pulumi import`, import Glue Tables using the catalog ID (usually AWS account ID), database name, and table name. For example: 122 // 123 // ```sh 124 // $ pulumi import aws:glue/catalogTable:CatalogTable MyTable 123456789012:MyDatabase:MyTable 125 // ``` 126 type CatalogTable struct { 127 pulumi.CustomResourceState 128 129 // The ARN of the Glue Table. 130 Arn pulumi.StringOutput `pulumi:"arn"` 131 // ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name. 132 CatalogId pulumi.StringOutput `pulumi:"catalogId"` 133 // Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase. 134 // 135 // The follow arguments are optional: 136 DatabaseName pulumi.StringOutput `pulumi:"databaseName"` 137 // Description of the table. 138 Description pulumi.StringPtrOutput `pulumi:"description"` 139 // Name of the table. For Hive compatibility, this must be entirely lowercase. 140 Name pulumi.StringOutput `pulumi:"name"` 141 // Configuration block for open table formats. See `openTableFormatInput` below. 142 OpenTableFormatInput CatalogTableOpenTableFormatInputPtrOutput `pulumi:"openTableFormatInput"` 143 // Owner of the table. 144 Owner pulumi.StringPtrOutput `pulumi:"owner"` 145 // Properties associated with this table, as a list of key-value pairs. 146 Parameters pulumi.StringMapOutput `pulumi:"parameters"` 147 // Configuration block for a maximum of 3 partition indexes. See `partitionIndex` below. 148 PartitionIndices CatalogTablePartitionIndexArrayOutput `pulumi:"partitionIndices"` 149 // Configuration block of columns by which the table is partitioned. Only primitive types are supported as partition keys. See `partitionKeys` below. 150 PartitionKeys CatalogTablePartitionKeyArrayOutput `pulumi:"partitionKeys"` 151 // Retention time for this table. 152 Retention pulumi.IntPtrOutput `pulumi:"retention"` 153 // Configuration block for information about the physical storage of this table. For more information, refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor). See `storageDescriptor` below. 154 StorageDescriptor CatalogTableStorageDescriptorPtrOutput `pulumi:"storageDescriptor"` 155 // Type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). While optional, some Athena DDL queries such as `ALTER TABLE` and `SHOW CREATE TABLE` will fail if this argument is empty. 156 TableType pulumi.StringPtrOutput `pulumi:"tableType"` 157 // Configuration block of a target table for resource linking. See `targetTable` below. 158 TargetTable CatalogTableTargetTablePtrOutput `pulumi:"targetTable"` 159 // If the table is a view, the expanded text of the view; otherwise null. 160 ViewExpandedText pulumi.StringPtrOutput `pulumi:"viewExpandedText"` 161 // If the table is a view, the original text of the view; otherwise null. 162 ViewOriginalText pulumi.StringPtrOutput `pulumi:"viewOriginalText"` 163 } 164 165 // NewCatalogTable registers a new resource with the given unique name, arguments, and options. 166 func NewCatalogTable(ctx *pulumi.Context, 167 name string, args *CatalogTableArgs, opts ...pulumi.ResourceOption) (*CatalogTable, error) { 168 if args == nil { 169 return nil, errors.New("missing one or more required arguments") 170 } 171 172 if args.DatabaseName == nil { 173 return nil, errors.New("invalid value for required argument 'DatabaseName'") 174 } 175 opts = internal.PkgResourceDefaultOpts(opts) 176 var resource CatalogTable 177 err := ctx.RegisterResource("aws:glue/catalogTable:CatalogTable", name, args, &resource, opts...) 178 if err != nil { 179 return nil, err 180 } 181 return &resource, nil 182 } 183 184 // GetCatalogTable gets an existing CatalogTable resource's state with the given name, ID, and optional 185 // state properties that are used to uniquely qualify the lookup (nil if not required). 186 func GetCatalogTable(ctx *pulumi.Context, 187 name string, id pulumi.IDInput, state *CatalogTableState, opts ...pulumi.ResourceOption) (*CatalogTable, error) { 188 var resource CatalogTable 189 err := ctx.ReadResource("aws:glue/catalogTable:CatalogTable", name, id, state, &resource, opts...) 190 if err != nil { 191 return nil, err 192 } 193 return &resource, nil 194 } 195 196 // Input properties used for looking up and filtering CatalogTable resources. 197 type catalogTableState struct { 198 // The ARN of the Glue Table. 199 Arn *string `pulumi:"arn"` 200 // ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name. 201 CatalogId *string `pulumi:"catalogId"` 202 // Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase. 203 // 204 // The follow arguments are optional: 205 DatabaseName *string `pulumi:"databaseName"` 206 // Description of the table. 207 Description *string `pulumi:"description"` 208 // Name of the table. For Hive compatibility, this must be entirely lowercase. 209 Name *string `pulumi:"name"` 210 // Configuration block for open table formats. See `openTableFormatInput` below. 211 OpenTableFormatInput *CatalogTableOpenTableFormatInput `pulumi:"openTableFormatInput"` 212 // Owner of the table. 213 Owner *string `pulumi:"owner"` 214 // Properties associated with this table, as a list of key-value pairs. 215 Parameters map[string]string `pulumi:"parameters"` 216 // Configuration block for a maximum of 3 partition indexes. See `partitionIndex` below. 217 PartitionIndices []CatalogTablePartitionIndex `pulumi:"partitionIndices"` 218 // Configuration block of columns by which the table is partitioned. Only primitive types are supported as partition keys. See `partitionKeys` below. 219 PartitionKeys []CatalogTablePartitionKey `pulumi:"partitionKeys"` 220 // Retention time for this table. 221 Retention *int `pulumi:"retention"` 222 // Configuration block for information about the physical storage of this table. For more information, refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor). See `storageDescriptor` below. 223 StorageDescriptor *CatalogTableStorageDescriptor `pulumi:"storageDescriptor"` 224 // Type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). While optional, some Athena DDL queries such as `ALTER TABLE` and `SHOW CREATE TABLE` will fail if this argument is empty. 225 TableType *string `pulumi:"tableType"` 226 // Configuration block of a target table for resource linking. See `targetTable` below. 227 TargetTable *CatalogTableTargetTable `pulumi:"targetTable"` 228 // If the table is a view, the expanded text of the view; otherwise null. 229 ViewExpandedText *string `pulumi:"viewExpandedText"` 230 // If the table is a view, the original text of the view; otherwise null. 231 ViewOriginalText *string `pulumi:"viewOriginalText"` 232 } 233 234 type CatalogTableState struct { 235 // The ARN of the Glue Table. 236 Arn pulumi.StringPtrInput 237 // ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name. 238 CatalogId pulumi.StringPtrInput 239 // Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase. 240 // 241 // The follow arguments are optional: 242 DatabaseName pulumi.StringPtrInput 243 // Description of the table. 244 Description pulumi.StringPtrInput 245 // Name of the table. For Hive compatibility, this must be entirely lowercase. 246 Name pulumi.StringPtrInput 247 // Configuration block for open table formats. See `openTableFormatInput` below. 248 OpenTableFormatInput CatalogTableOpenTableFormatInputPtrInput 249 // Owner of the table. 250 Owner pulumi.StringPtrInput 251 // Properties associated with this table, as a list of key-value pairs. 252 Parameters pulumi.StringMapInput 253 // Configuration block for a maximum of 3 partition indexes. See `partitionIndex` below. 254 PartitionIndices CatalogTablePartitionIndexArrayInput 255 // Configuration block of columns by which the table is partitioned. Only primitive types are supported as partition keys. See `partitionKeys` below. 256 PartitionKeys CatalogTablePartitionKeyArrayInput 257 // Retention time for this table. 258 Retention pulumi.IntPtrInput 259 // Configuration block for information about the physical storage of this table. For more information, refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor). See `storageDescriptor` below. 260 StorageDescriptor CatalogTableStorageDescriptorPtrInput 261 // Type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). While optional, some Athena DDL queries such as `ALTER TABLE` and `SHOW CREATE TABLE` will fail if this argument is empty. 262 TableType pulumi.StringPtrInput 263 // Configuration block of a target table for resource linking. See `targetTable` below. 264 TargetTable CatalogTableTargetTablePtrInput 265 // If the table is a view, the expanded text of the view; otherwise null. 266 ViewExpandedText pulumi.StringPtrInput 267 // If the table is a view, the original text of the view; otherwise null. 268 ViewOriginalText pulumi.StringPtrInput 269 } 270 271 func (CatalogTableState) ElementType() reflect.Type { 272 return reflect.TypeOf((*catalogTableState)(nil)).Elem() 273 } 274 275 type catalogTableArgs struct { 276 // ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name. 277 CatalogId *string `pulumi:"catalogId"` 278 // Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase. 279 // 280 // The follow arguments are optional: 281 DatabaseName string `pulumi:"databaseName"` 282 // Description of the table. 283 Description *string `pulumi:"description"` 284 // Name of the table. For Hive compatibility, this must be entirely lowercase. 285 Name *string `pulumi:"name"` 286 // Configuration block for open table formats. See `openTableFormatInput` below. 287 OpenTableFormatInput *CatalogTableOpenTableFormatInput `pulumi:"openTableFormatInput"` 288 // Owner of the table. 289 Owner *string `pulumi:"owner"` 290 // Properties associated with this table, as a list of key-value pairs. 291 Parameters map[string]string `pulumi:"parameters"` 292 // Configuration block for a maximum of 3 partition indexes. See `partitionIndex` below. 293 PartitionIndices []CatalogTablePartitionIndex `pulumi:"partitionIndices"` 294 // Configuration block of columns by which the table is partitioned. Only primitive types are supported as partition keys. See `partitionKeys` below. 295 PartitionKeys []CatalogTablePartitionKey `pulumi:"partitionKeys"` 296 // Retention time for this table. 297 Retention *int `pulumi:"retention"` 298 // Configuration block for information about the physical storage of this table. For more information, refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor). See `storageDescriptor` below. 299 StorageDescriptor *CatalogTableStorageDescriptor `pulumi:"storageDescriptor"` 300 // Type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). While optional, some Athena DDL queries such as `ALTER TABLE` and `SHOW CREATE TABLE` will fail if this argument is empty. 301 TableType *string `pulumi:"tableType"` 302 // Configuration block of a target table for resource linking. See `targetTable` below. 303 TargetTable *CatalogTableTargetTable `pulumi:"targetTable"` 304 // If the table is a view, the expanded text of the view; otherwise null. 305 ViewExpandedText *string `pulumi:"viewExpandedText"` 306 // If the table is a view, the original text of the view; otherwise null. 307 ViewOriginalText *string `pulumi:"viewOriginalText"` 308 } 309 310 // The set of arguments for constructing a CatalogTable resource. 311 type CatalogTableArgs struct { 312 // ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name. 313 CatalogId pulumi.StringPtrInput 314 // Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase. 315 // 316 // The follow arguments are optional: 317 DatabaseName pulumi.StringInput 318 // Description of the table. 319 Description pulumi.StringPtrInput 320 // Name of the table. For Hive compatibility, this must be entirely lowercase. 321 Name pulumi.StringPtrInput 322 // Configuration block for open table formats. See `openTableFormatInput` below. 323 OpenTableFormatInput CatalogTableOpenTableFormatInputPtrInput 324 // Owner of the table. 325 Owner pulumi.StringPtrInput 326 // Properties associated with this table, as a list of key-value pairs. 327 Parameters pulumi.StringMapInput 328 // Configuration block for a maximum of 3 partition indexes. See `partitionIndex` below. 329 PartitionIndices CatalogTablePartitionIndexArrayInput 330 // Configuration block of columns by which the table is partitioned. Only primitive types are supported as partition keys. See `partitionKeys` below. 331 PartitionKeys CatalogTablePartitionKeyArrayInput 332 // Retention time for this table. 333 Retention pulumi.IntPtrInput 334 // Configuration block for information about the physical storage of this table. For more information, refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor). See `storageDescriptor` below. 335 StorageDescriptor CatalogTableStorageDescriptorPtrInput 336 // Type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). While optional, some Athena DDL queries such as `ALTER TABLE` and `SHOW CREATE TABLE` will fail if this argument is empty. 337 TableType pulumi.StringPtrInput 338 // Configuration block of a target table for resource linking. See `targetTable` below. 339 TargetTable CatalogTableTargetTablePtrInput 340 // If the table is a view, the expanded text of the view; otherwise null. 341 ViewExpandedText pulumi.StringPtrInput 342 // If the table is a view, the original text of the view; otherwise null. 343 ViewOriginalText pulumi.StringPtrInput 344 } 345 346 func (CatalogTableArgs) ElementType() reflect.Type { 347 return reflect.TypeOf((*catalogTableArgs)(nil)).Elem() 348 } 349 350 type CatalogTableInput interface { 351 pulumi.Input 352 353 ToCatalogTableOutput() CatalogTableOutput 354 ToCatalogTableOutputWithContext(ctx context.Context) CatalogTableOutput 355 } 356 357 func (*CatalogTable) ElementType() reflect.Type { 358 return reflect.TypeOf((**CatalogTable)(nil)).Elem() 359 } 360 361 func (i *CatalogTable) ToCatalogTableOutput() CatalogTableOutput { 362 return i.ToCatalogTableOutputWithContext(context.Background()) 363 } 364 365 func (i *CatalogTable) ToCatalogTableOutputWithContext(ctx context.Context) CatalogTableOutput { 366 return pulumi.ToOutputWithContext(ctx, i).(CatalogTableOutput) 367 } 368 369 // CatalogTableArrayInput is an input type that accepts CatalogTableArray and CatalogTableArrayOutput values. 370 // You can construct a concrete instance of `CatalogTableArrayInput` via: 371 // 372 // CatalogTableArray{ CatalogTableArgs{...} } 373 type CatalogTableArrayInput interface { 374 pulumi.Input 375 376 ToCatalogTableArrayOutput() CatalogTableArrayOutput 377 ToCatalogTableArrayOutputWithContext(context.Context) CatalogTableArrayOutput 378 } 379 380 type CatalogTableArray []CatalogTableInput 381 382 func (CatalogTableArray) ElementType() reflect.Type { 383 return reflect.TypeOf((*[]*CatalogTable)(nil)).Elem() 384 } 385 386 func (i CatalogTableArray) ToCatalogTableArrayOutput() CatalogTableArrayOutput { 387 return i.ToCatalogTableArrayOutputWithContext(context.Background()) 388 } 389 390 func (i CatalogTableArray) ToCatalogTableArrayOutputWithContext(ctx context.Context) CatalogTableArrayOutput { 391 return pulumi.ToOutputWithContext(ctx, i).(CatalogTableArrayOutput) 392 } 393 394 // CatalogTableMapInput is an input type that accepts CatalogTableMap and CatalogTableMapOutput values. 395 // You can construct a concrete instance of `CatalogTableMapInput` via: 396 // 397 // CatalogTableMap{ "key": CatalogTableArgs{...} } 398 type CatalogTableMapInput interface { 399 pulumi.Input 400 401 ToCatalogTableMapOutput() CatalogTableMapOutput 402 ToCatalogTableMapOutputWithContext(context.Context) CatalogTableMapOutput 403 } 404 405 type CatalogTableMap map[string]CatalogTableInput 406 407 func (CatalogTableMap) ElementType() reflect.Type { 408 return reflect.TypeOf((*map[string]*CatalogTable)(nil)).Elem() 409 } 410 411 func (i CatalogTableMap) ToCatalogTableMapOutput() CatalogTableMapOutput { 412 return i.ToCatalogTableMapOutputWithContext(context.Background()) 413 } 414 415 func (i CatalogTableMap) ToCatalogTableMapOutputWithContext(ctx context.Context) CatalogTableMapOutput { 416 return pulumi.ToOutputWithContext(ctx, i).(CatalogTableMapOutput) 417 } 418 419 type CatalogTableOutput struct{ *pulumi.OutputState } 420 421 func (CatalogTableOutput) ElementType() reflect.Type { 422 return reflect.TypeOf((**CatalogTable)(nil)).Elem() 423 } 424 425 func (o CatalogTableOutput) ToCatalogTableOutput() CatalogTableOutput { 426 return o 427 } 428 429 func (o CatalogTableOutput) ToCatalogTableOutputWithContext(ctx context.Context) CatalogTableOutput { 430 return o 431 } 432 433 // The ARN of the Glue Table. 434 func (o CatalogTableOutput) Arn() pulumi.StringOutput { 435 return o.ApplyT(func(v *CatalogTable) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 436 } 437 438 // ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name. 439 func (o CatalogTableOutput) CatalogId() pulumi.StringOutput { 440 return o.ApplyT(func(v *CatalogTable) pulumi.StringOutput { return v.CatalogId }).(pulumi.StringOutput) 441 } 442 443 // Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase. 444 // 445 // The follow arguments are optional: 446 func (o CatalogTableOutput) DatabaseName() pulumi.StringOutput { 447 return o.ApplyT(func(v *CatalogTable) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput) 448 } 449 450 // Description of the table. 451 func (o CatalogTableOutput) Description() pulumi.StringPtrOutput { 452 return o.ApplyT(func(v *CatalogTable) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 453 } 454 455 // Name of the table. For Hive compatibility, this must be entirely lowercase. 456 func (o CatalogTableOutput) Name() pulumi.StringOutput { 457 return o.ApplyT(func(v *CatalogTable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 458 } 459 460 // Configuration block for open table formats. See `openTableFormatInput` below. 461 func (o CatalogTableOutput) OpenTableFormatInput() CatalogTableOpenTableFormatInputPtrOutput { 462 return o.ApplyT(func(v *CatalogTable) CatalogTableOpenTableFormatInputPtrOutput { return v.OpenTableFormatInput }).(CatalogTableOpenTableFormatInputPtrOutput) 463 } 464 465 // Owner of the table. 466 func (o CatalogTableOutput) Owner() pulumi.StringPtrOutput { 467 return o.ApplyT(func(v *CatalogTable) pulumi.StringPtrOutput { return v.Owner }).(pulumi.StringPtrOutput) 468 } 469 470 // Properties associated with this table, as a list of key-value pairs. 471 func (o CatalogTableOutput) Parameters() pulumi.StringMapOutput { 472 return o.ApplyT(func(v *CatalogTable) pulumi.StringMapOutput { return v.Parameters }).(pulumi.StringMapOutput) 473 } 474 475 // Configuration block for a maximum of 3 partition indexes. See `partitionIndex` below. 476 func (o CatalogTableOutput) PartitionIndices() CatalogTablePartitionIndexArrayOutput { 477 return o.ApplyT(func(v *CatalogTable) CatalogTablePartitionIndexArrayOutput { return v.PartitionIndices }).(CatalogTablePartitionIndexArrayOutput) 478 } 479 480 // Configuration block of columns by which the table is partitioned. Only primitive types are supported as partition keys. See `partitionKeys` below. 481 func (o CatalogTableOutput) PartitionKeys() CatalogTablePartitionKeyArrayOutput { 482 return o.ApplyT(func(v *CatalogTable) CatalogTablePartitionKeyArrayOutput { return v.PartitionKeys }).(CatalogTablePartitionKeyArrayOutput) 483 } 484 485 // Retention time for this table. 486 func (o CatalogTableOutput) Retention() pulumi.IntPtrOutput { 487 return o.ApplyT(func(v *CatalogTable) pulumi.IntPtrOutput { return v.Retention }).(pulumi.IntPtrOutput) 488 } 489 490 // Configuration block for information about the physical storage of this table. For more information, refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor). See `storageDescriptor` below. 491 func (o CatalogTableOutput) StorageDescriptor() CatalogTableStorageDescriptorPtrOutput { 492 return o.ApplyT(func(v *CatalogTable) CatalogTableStorageDescriptorPtrOutput { return v.StorageDescriptor }).(CatalogTableStorageDescriptorPtrOutput) 493 } 494 495 // Type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). While optional, some Athena DDL queries such as `ALTER TABLE` and `SHOW CREATE TABLE` will fail if this argument is empty. 496 func (o CatalogTableOutput) TableType() pulumi.StringPtrOutput { 497 return o.ApplyT(func(v *CatalogTable) pulumi.StringPtrOutput { return v.TableType }).(pulumi.StringPtrOutput) 498 } 499 500 // Configuration block of a target table for resource linking. See `targetTable` below. 501 func (o CatalogTableOutput) TargetTable() CatalogTableTargetTablePtrOutput { 502 return o.ApplyT(func(v *CatalogTable) CatalogTableTargetTablePtrOutput { return v.TargetTable }).(CatalogTableTargetTablePtrOutput) 503 } 504 505 // If the table is a view, the expanded text of the view; otherwise null. 506 func (o CatalogTableOutput) ViewExpandedText() pulumi.StringPtrOutput { 507 return o.ApplyT(func(v *CatalogTable) pulumi.StringPtrOutput { return v.ViewExpandedText }).(pulumi.StringPtrOutput) 508 } 509 510 // If the table is a view, the original text of the view; otherwise null. 511 func (o CatalogTableOutput) ViewOriginalText() pulumi.StringPtrOutput { 512 return o.ApplyT(func(v *CatalogTable) pulumi.StringPtrOutput { return v.ViewOriginalText }).(pulumi.StringPtrOutput) 513 } 514 515 type CatalogTableArrayOutput struct{ *pulumi.OutputState } 516 517 func (CatalogTableArrayOutput) ElementType() reflect.Type { 518 return reflect.TypeOf((*[]*CatalogTable)(nil)).Elem() 519 } 520 521 func (o CatalogTableArrayOutput) ToCatalogTableArrayOutput() CatalogTableArrayOutput { 522 return o 523 } 524 525 func (o CatalogTableArrayOutput) ToCatalogTableArrayOutputWithContext(ctx context.Context) CatalogTableArrayOutput { 526 return o 527 } 528 529 func (o CatalogTableArrayOutput) Index(i pulumi.IntInput) CatalogTableOutput { 530 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CatalogTable { 531 return vs[0].([]*CatalogTable)[vs[1].(int)] 532 }).(CatalogTableOutput) 533 } 534 535 type CatalogTableMapOutput struct{ *pulumi.OutputState } 536 537 func (CatalogTableMapOutput) ElementType() reflect.Type { 538 return reflect.TypeOf((*map[string]*CatalogTable)(nil)).Elem() 539 } 540 541 func (o CatalogTableMapOutput) ToCatalogTableMapOutput() CatalogTableMapOutput { 542 return o 543 } 544 545 func (o CatalogTableMapOutput) ToCatalogTableMapOutputWithContext(ctx context.Context) CatalogTableMapOutput { 546 return o 547 } 548 549 func (o CatalogTableMapOutput) MapIndex(k pulumi.StringInput) CatalogTableOutput { 550 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CatalogTable { 551 return vs[0].(map[string]*CatalogTable)[vs[1].(string)] 552 }).(CatalogTableOutput) 553 } 554 555 func init() { 556 pulumi.RegisterInputType(reflect.TypeOf((*CatalogTableInput)(nil)).Elem(), &CatalogTable{}) 557 pulumi.RegisterInputType(reflect.TypeOf((*CatalogTableArrayInput)(nil)).Elem(), CatalogTableArray{}) 558 pulumi.RegisterInputType(reflect.TypeOf((*CatalogTableMapInput)(nil)).Elem(), CatalogTableMap{}) 559 pulumi.RegisterOutputType(CatalogTableOutput{}) 560 pulumi.RegisterOutputType(CatalogTableArrayOutput{}) 561 pulumi.RegisterOutputType(CatalogTableMapOutput{}) 562 }