package awscdkgluealpha import ( _init_ "github.com/aws/aws-cdk-go/awscdkgluealpha/v2/jsii" _jsii_ "github.com/aws/jsii-runtime-go/runtime" "github.com/aws/aws-cdk-go/awscdk/v2" "github.com/aws/aws-cdk-go/awscdk/v2/awsiam" "github.com/aws/aws-cdk-go/awscdk/v2/awskms" "github.com/aws/aws-cdk-go/awscdk/v2/awss3" "github.com/aws/aws-cdk-go/awscdkgluealpha/v2/internal" "github.com/aws/constructs-go/constructs/v10" ) // A Glue table. // // Example: // var myDatabase database // // glue.NewTable(this, jsii.String("MyTable"), &TableProps{ // Database: myDatabase, // Columns: []column{ // &column{ // Name: jsii.String("col1"), // Type: glue.Schema_STRING(), // }, // }, // PartitionKeys: []*column{ // &column{ // Name: jsii.String("year"), // Type: glue.Schema_SMALL_INT(), // }, // &column{ // Name: jsii.String("month"), // Type: glue.Schema_SMALL_INT(), // }, // }, // DataFormat: glue.DataFormat_JSON(), // }) // // Experimental. type Table interface { awscdk.Resource ITable // S3 bucket in which the table's data resides. // Experimental. Bucket() awss3.IBucket // This table's columns. // Experimental. Columns() *[]*Column // Indicates whether the table's data is compressed or not. // Experimental. Compressed() *bool // Database this table belongs to. // Experimental. Database() IDatabase // Format of this table's data files. // Experimental. DataFormat() DataFormat // The type of encryption enabled for the table. // Experimental. Encryption() TableEncryption // The KMS key used to secure the data if `encryption` is set to `CSE-KMS` or `SSE-KMS`. // // Otherwise, `undefined`. // Experimental. EncryptionKey() awskms.IKey // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // This table's partition indexes. // Experimental. PartitionIndexes() *[]*PartitionIndex // This table's partition keys if the table is partitioned. // Experimental. PartitionKeys() *[]*Column // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // S3 Key Prefix under which this table's files are stored in S3. // Experimental. S3Prefix() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // ARN of this table. // Experimental. TableArn() *string // Name of this table. // Experimental. TableName() *string // Add a partition index to the table. // // You can have a maximum of 3 partition // indexes to a table. Partition index keys must be a subset of the table's // partition keys. // See: https://docs.aws.amazon.com/glue/latest/dg/partition-indexes.html // // Experimental. AddPartitionIndex(index *PartitionIndex) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given identity custom permissions. // Experimental. Grant(grantee awsiam.IGrantable, actions *[]*string) awsiam.Grant // Grant read permissions to the table and the underlying data stored in S3 to an IAM principal. // Experimental. GrantRead(grantee awsiam.IGrantable) awsiam.Grant // Grant read and write permissions to the table and the underlying data stored in S3 to an IAM principal. // Experimental. GrantReadWrite(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity custom permissions to ALL underlying resources of the table. // // Permissions will be granted to the catalog, the database, and the table. // Experimental. GrantToUnderlyingResources(grantee awsiam.IGrantable, actions *[]*string) awsiam.Grant // Grant write permissions to the table and the underlying data stored in S3 to an IAM principal. // Experimental. GrantWrite(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string } // The jsii proxy struct for Table type jsiiProxy_Table struct { internal.Type__awscdkResource jsiiProxy_ITable } func (j *jsiiProxy_Table) Bucket() awss3.IBucket { var returns awss3.IBucket _jsii_.Get( j, "bucket", &returns, ) return returns } func (j *jsiiProxy_Table) Columns() *[]*Column { var returns *[]*Column _jsii_.Get( j, "columns", &returns, ) return returns } func (j *jsiiProxy_Table) Compressed() *bool { var returns *bool _jsii_.Get( j, "compressed", &returns, ) return returns } func (j *jsiiProxy_Table) Database() IDatabase { var returns IDatabase _jsii_.Get( j, "database", &returns, ) return returns } func (j *jsiiProxy_Table) DataFormat() DataFormat { var returns DataFormat _jsii_.Get( j, "dataFormat", &returns, ) return returns } func (j *jsiiProxy_Table) Encryption() TableEncryption { var returns TableEncryption _jsii_.Get( j, "encryption", &returns, ) return returns } func (j *jsiiProxy_Table) EncryptionKey() awskms.IKey { var returns awskms.IKey _jsii_.Get( j, "encryptionKey", &returns, ) return returns } func (j *jsiiProxy_Table) Env() *awscdk.ResourceEnvironment { var returns *awscdk.ResourceEnvironment _jsii_.Get( j, "env", &returns, ) return returns } func (j *jsiiProxy_Table) Node() constructs.Node { var returns constructs.Node _jsii_.Get( j, "node", &returns, ) return returns } func (j *jsiiProxy_Table) PartitionIndexes() *[]*PartitionIndex { var returns *[]*PartitionIndex _jsii_.Get( j, "partitionIndexes", &returns, ) return returns } func (j *jsiiProxy_Table) PartitionKeys() *[]*Column { var returns *[]*Column _jsii_.Get( j, "partitionKeys", &returns, ) return returns } func (j *jsiiProxy_Table) PhysicalName() *string { var returns *string _jsii_.Get( j, "physicalName", &returns, ) return returns } func (j *jsiiProxy_Table) S3Prefix() *string { var returns *string _jsii_.Get( j, "s3Prefix", &returns, ) return returns } func (j *jsiiProxy_Table) Stack() awscdk.Stack { var returns awscdk.Stack _jsii_.Get( j, "stack", &returns, ) return returns } func (j *jsiiProxy_Table) TableArn() *string { var returns *string _jsii_.Get( j, "tableArn", &returns, ) return returns } func (j *jsiiProxy_Table) TableName() *string { var returns *string _jsii_.Get( j, "tableName", &returns, ) return returns } // Experimental. func NewTable(scope constructs.Construct, id *string, props *TableProps) Table { _init_.Initialize() if err := validateNewTableParameters(scope, id, props); err != nil { panic(err) } j := jsiiProxy_Table{} _jsii_.Create( "@aws-cdk/aws-glue-alpha.Table", []interface{}{scope, id, props}, &j, ) return &j } // Experimental. func NewTable_Override(t Table, scope constructs.Construct, id *string, props *TableProps) { _init_.Initialize() _jsii_.Create( "@aws-cdk/aws-glue-alpha.Table", []interface{}{scope, id, props}, t, ) } // Experimental. func Table_FromTableArn(scope constructs.Construct, id *string, tableArn *string) ITable { _init_.Initialize() if err := validateTable_FromTableArnParameters(scope, id, tableArn); err != nil { panic(err) } var returns ITable _jsii_.StaticInvoke( "@aws-cdk/aws-glue-alpha.Table", "fromTableArn", []interface{}{scope, id, tableArn}, &returns, ) return returns } // Creates a Table construct that represents an external table. // Experimental. func Table_FromTableAttributes(scope constructs.Construct, id *string, attrs *TableAttributes) ITable { _init_.Initialize() if err := validateTable_FromTableAttributesParameters(scope, id, attrs); err != nil { panic(err) } var returns ITable _jsii_.StaticInvoke( "@aws-cdk/aws-glue-alpha.Table", "fromTableAttributes", []interface{}{scope, id, attrs}, &returns, ) return returns } // Checks if `x` is a construct. // // Use this method instead of `instanceof` to properly detect `Construct` // instances, even when the construct library is symlinked. // // Explanation: in JavaScript, multiple copies of the `constructs` library on // disk are seen as independent, completely different libraries. As a // consequence, the class `Construct` in each copy of the `constructs` library // is seen as a different class, and an instance of one class will not test as // `instanceof` the other class. `npm install` will not create installations // like this, but users may manually symlink construct libraries together or // use a monorepo tool: in those cases, multiple copies of the `constructs` // library can be accidentally installed, and `instanceof` will behave // unpredictably. It is safest to avoid using `instanceof`, and using // this type-testing method instead. // // Returns: true if `x` is an object created from a class which extends `Construct`. // Experimental. func Table_IsConstruct(x interface{}) *bool { _init_.Initialize() if err := validateTable_IsConstructParameters(x); err != nil { panic(err) } var returns *bool _jsii_.StaticInvoke( "@aws-cdk/aws-glue-alpha.Table", "isConstruct", []interface{}{x}, &returns, ) return returns } // Returns true if the construct was created by CDK, and false otherwise. // Experimental. func Table_IsOwnedResource(construct constructs.IConstruct) *bool { _init_.Initialize() if err := validateTable_IsOwnedResourceParameters(construct); err != nil { panic(err) } var returns *bool _jsii_.StaticInvoke( "@aws-cdk/aws-glue-alpha.Table", "isOwnedResource", []interface{}{construct}, &returns, ) return returns } // Check whether the given construct is a Resource. // Experimental. func Table_IsResource(construct constructs.IConstruct) *bool { _init_.Initialize() if err := validateTable_IsResourceParameters(construct); err != nil { panic(err) } var returns *bool _jsii_.StaticInvoke( "@aws-cdk/aws-glue-alpha.Table", "isResource", []interface{}{construct}, &returns, ) return returns } func (t *jsiiProxy_Table) AddPartitionIndex(index *PartitionIndex) { if err := t.validateAddPartitionIndexParameters(index); err != nil { panic(err) } _jsii_.InvokeVoid( t, "addPartitionIndex", []interface{}{index}, ) } func (t *jsiiProxy_Table) ApplyRemovalPolicy(policy awscdk.RemovalPolicy) { if err := t.validateApplyRemovalPolicyParameters(policy); err != nil { panic(err) } _jsii_.InvokeVoid( t, "applyRemovalPolicy", []interface{}{policy}, ) } func (t *jsiiProxy_Table) GeneratePhysicalName() *string { var returns *string _jsii_.Invoke( t, "generatePhysicalName", nil, // no parameters &returns, ) return returns } func (t *jsiiProxy_Table) GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string { if err := t.validateGetResourceArnAttributeParameters(arnAttr, arnComponents); err != nil { panic(err) } var returns *string _jsii_.Invoke( t, "getResourceArnAttribute", []interface{}{arnAttr, arnComponents}, &returns, ) return returns } func (t *jsiiProxy_Table) GetResourceNameAttribute(nameAttr *string) *string { if err := t.validateGetResourceNameAttributeParameters(nameAttr); err != nil { panic(err) } var returns *string _jsii_.Invoke( t, "getResourceNameAttribute", []interface{}{nameAttr}, &returns, ) return returns } func (t *jsiiProxy_Table) Grant(grantee awsiam.IGrantable, actions *[]*string) awsiam.Grant { if err := t.validateGrantParameters(grantee, actions); err != nil { panic(err) } var returns awsiam.Grant _jsii_.Invoke( t, "grant", []interface{}{grantee, actions}, &returns, ) return returns } func (t *jsiiProxy_Table) GrantRead(grantee awsiam.IGrantable) awsiam.Grant { if err := t.validateGrantReadParameters(grantee); err != nil { panic(err) } var returns awsiam.Grant _jsii_.Invoke( t, "grantRead", []interface{}{grantee}, &returns, ) return returns } func (t *jsiiProxy_Table) GrantReadWrite(grantee awsiam.IGrantable) awsiam.Grant { if err := t.validateGrantReadWriteParameters(grantee); err != nil { panic(err) } var returns awsiam.Grant _jsii_.Invoke( t, "grantReadWrite", []interface{}{grantee}, &returns, ) return returns } func (t *jsiiProxy_Table) GrantToUnderlyingResources(grantee awsiam.IGrantable, actions *[]*string) awsiam.Grant { if err := t.validateGrantToUnderlyingResourcesParameters(grantee, actions); err != nil { panic(err) } var returns awsiam.Grant _jsii_.Invoke( t, "grantToUnderlyingResources", []interface{}{grantee, actions}, &returns, ) return returns } func (t *jsiiProxy_Table) GrantWrite(grantee awsiam.IGrantable) awsiam.Grant { if err := t.validateGrantWriteParameters(grantee); err != nil { panic(err) } var returns awsiam.Grant _jsii_.Invoke( t, "grantWrite", []interface{}{grantee}, &returns, ) return returns } func (t *jsiiProxy_Table) ToString() *string { var returns *string _jsii_.Invoke( t, "toString", nil, // no parameters &returns, ) return returns }