Class: AWSCDK::Glue::CfnPartitionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_partition_props.rb

Overview

Properties for defining a CfnPartition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(catalog_id:, database_name:, partition_input:, table_name:) ⇒ CfnPartitionProps

Returns a new instance of CfnPartitionProps.

Parameters:

  • catalog_id (String)

    The AWS account ID of the catalog in which the partion is to be created.

  • database_name (String)

    The name of the catalog database in which to create the partition.

  • partition_input (AWSCDK::IResolvable, AWSCDK::Glue::CfnPartition::PartitionInputProperty)

    The structure used to create and update a partition.

  • table_name (String)

    The name of the metadata table in which the partition is to be created.



13
14
15
16
17
18
19
20
21
22
# File 'glue/cfn_partition_props.rb', line 13

def initialize(catalog_id:, database_name:, partition_input:, table_name:)
  @catalog_id = catalog_id
  Jsii::Type.check_type(@catalog_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "catalogId")
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName")
  @partition_input = partition_input.is_a?(Hash) ? ::AWSCDK::Glue::CfnPartition::PartitionInputProperty.new(**partition_input.transform_keys(&:to_sym)) : partition_input
  Jsii::Type.check_type(@partition_input, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmblBhcnRpdGlvbi5QYXJ0aXRpb25JbnB1dFByb3BlcnR5In1dfX0=")), "partitionInput")
  @table_name = table_name
  Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName")
end

Instance Attribute Details

#catalog_idString (readonly)

The AWS account ID of the catalog in which the partion is to be created.

To specify the account ID, you can use the Ref intrinsic function with the AWS::AccountId pseudo parameter. For example: !Ref AWS::AccountId



30
31
32
# File 'glue/cfn_partition_props.rb', line 30

def catalog_id
  @catalog_id
end

#database_nameString (readonly)

The name of the catalog database in which to create the partition.



35
36
37
# File 'glue/cfn_partition_props.rb', line 35

def database_name
  @database_name
end

#partition_inputAWSCDK::IResolvable, AWSCDK::Glue::CfnPartition::PartitionInputProperty (readonly)

The structure used to create and update a partition.



40
41
42
# File 'glue/cfn_partition_props.rb', line 40

def partition_input
  @partition_input
end

#table_nameString (readonly)

The name of the metadata table in which the partition is to be created.



45
46
47
# File 'glue/cfn_partition_props.rb', line 45

def table_name
  @table_name
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'glue/cfn_partition_props.rb', line 47

def self.jsii_properties
  {
    :catalog_id => "catalogId",
    :database_name => "databaseName",
    :partition_input => "partitionInput",
    :table_name => "tableName",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'glue/cfn_partition_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "catalogId" => @catalog_id,
    "databaseName" => @database_name,
    "partitionInput" => @partition_input,
    "tableName" => @table_name,
  })
  result.compact
end