snowflake.TableConstraint
Explore with Pulumi AI
Import
$ pulumi import snowflake:index/tableConstraint:TableConstraint example 'myconstraintfk❄️FOREIGN KEY❄️databaseName|schemaName|tableName'
Create TableConstraint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TableConstraint(name: string, args: TableConstraintArgs, opts?: CustomResourceOptions);
@overload
def TableConstraint(resource_name: str,
args: TableConstraintArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TableConstraint(resource_name: str,
opts: Optional[ResourceOptions] = None,
columns: Optional[Sequence[str]] = None,
table_id: Optional[str] = None,
type: Optional[str] = None,
comment: Optional[str] = None,
deferrable: Optional[bool] = None,
enable: Optional[bool] = None,
enforced: Optional[bool] = None,
foreign_key_properties: Optional[TableConstraintForeignKeyPropertiesArgs] = None,
initially: Optional[str] = None,
name: Optional[str] = None,
rely: Optional[bool] = None,
validate: Optional[bool] = None)
func NewTableConstraint(ctx *Context, name string, args TableConstraintArgs, opts ...ResourceOption) (*TableConstraint, error)
public TableConstraint(string name, TableConstraintArgs args, CustomResourceOptions? opts = null)
public TableConstraint(String name, TableConstraintArgs args)
public TableConstraint(String name, TableConstraintArgs args, CustomResourceOptions options)
type: snowflake:TableConstraint
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. TableConstraintArgs - 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. TableConstraintArgs - 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. TableConstraintArgs - 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. TableConstraintArgs - 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. TableConstraintArgs - 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 tableConstraintResource = new Snowflake.TableConstraint("tableConstraintResource", new()
{
Columns = new[]
{
"string",
},
TableId = "string",
Type = "string",
Deferrable = false,
Enable = false,
Enforced = false,
ForeignKeyProperties = new Snowflake.Inputs.TableConstraintForeignKeyPropertiesArgs
{
References = new Snowflake.Inputs.TableConstraintForeignKeyPropertiesReferencesArgs
{
Columns = new[]
{
"string",
},
TableId = "string",
},
Match = "string",
OnDelete = "string",
OnUpdate = "string",
},
Initially = "string",
Name = "string",
Rely = false,
Validate = false,
});
example, err := snowflake.NewTableConstraint(ctx, "tableConstraintResource", &snowflake.TableConstraintArgs{
Columns: pulumi.StringArray{
pulumi.String("string"),
},
TableId: pulumi.String("string"),
Type: pulumi.String("string"),
Deferrable: pulumi.Bool(false),
Enable: pulumi.Bool(false),
Enforced: pulumi.Bool(false),
ForeignKeyProperties: &snowflake.TableConstraintForeignKeyPropertiesArgs{
References: &snowflake.TableConstraintForeignKeyPropertiesReferencesArgs{
Columns: pulumi.StringArray{
pulumi.String("string"),
},
TableId: pulumi.String("string"),
},
Match: pulumi.String("string"),
OnDelete: pulumi.String("string"),
OnUpdate: pulumi.String("string"),
},
Initially: pulumi.String("string"),
Name: pulumi.String("string"),
Rely: pulumi.Bool(false),
Validate: pulumi.Bool(false),
})
var tableConstraintResource = new TableConstraint("tableConstraintResource", TableConstraintArgs.builder()
.columns("string")
.tableId("string")
.type("string")
.deferrable(false)
.enable(false)
.enforced(false)
.foreignKeyProperties(TableConstraintForeignKeyPropertiesArgs.builder()
.references(TableConstraintForeignKeyPropertiesReferencesArgs.builder()
.columns("string")
.tableId("string")
.build())
.match("string")
.onDelete("string")
.onUpdate("string")
.build())
.initially("string")
.name("string")
.rely(false)
.validate(false)
.build());
table_constraint_resource = snowflake.TableConstraint("tableConstraintResource",
columns=["string"],
table_id="string",
type="string",
deferrable=False,
enable=False,
enforced=False,
foreign_key_properties={
"references": {
"columns": ["string"],
"table_id": "string",
},
"match": "string",
"on_delete": "string",
"on_update": "string",
},
initially="string",
name="string",
rely=False,
validate=False)
const tableConstraintResource = new snowflake.TableConstraint("tableConstraintResource", {
columns: ["string"],
tableId: "string",
type: "string",
deferrable: false,
enable: false,
enforced: false,
foreignKeyProperties: {
references: {
columns: ["string"],
tableId: "string",
},
match: "string",
onDelete: "string",
onUpdate: "string",
},
initially: "string",
name: "string",
rely: false,
validate: false,
});
type: snowflake:TableConstraint
properties:
columns:
- string
deferrable: false
enable: false
enforced: false
foreignKeyProperties:
match: string
onDelete: string
onUpdate: string
references:
columns:
- string
tableId: string
initially: string
name: string
rely: false
tableId: string
type: string
validate: false
TableConstraint 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 TableConstraint resource accepts the following input properties:
- Columns
This property is required. Changes to this property will trigger replacement.
- Columns to use in constraint key
- Table
Id This property is required. Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- Type
This property is required. Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- Comment string
- Comment for the table constraint
- Deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - Enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - Enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - Foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- Initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - Name string
- Name of constraint
- Rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - Validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- Columns
This property is required. Changes to this property will trigger replacement.
- Columns to use in constraint key
- Table
Id This property is required. Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- Type
This property is required. Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- Comment string
- Comment for the table constraint
- Deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - Enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - Enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - Foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties Args - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- Initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - Name string
- Name of constraint
- Rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - Validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
This property is required. Changes to this property will trigger replacement.
- Columns to use in constraint key
- table
Id This property is required. Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
This property is required. Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- comment String
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name String
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
This property is required. Changes to this property will trigger replacement.
- Columns to use in constraint key
- table
Id This property is required. Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
This property is required. Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- comment string
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name string
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
This property is required. Changes to this property will trigger replacement.
- Columns to use in constraint key
- table_
id This property is required. Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
This property is required. Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- comment str
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign_
key_ properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties Args - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name str
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
This property is required. Changes to this property will trigger replacement.
- Columns to use in constraint key
- table
Id This property is required. Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
This property is required. Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- comment String
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign
Key Properties Changes to this property will trigger replacement.
- Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name String
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
Outputs
All input properties are implicitly available as output properties. Additionally, the TableConstraint 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 TableConstraint Resource
Get an existing TableConstraint 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?: TableConstraintState, opts?: CustomResourceOptions): TableConstraint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
columns: Optional[Sequence[str]] = None,
comment: Optional[str] = None,
deferrable: Optional[bool] = None,
enable: Optional[bool] = None,
enforced: Optional[bool] = None,
foreign_key_properties: Optional[TableConstraintForeignKeyPropertiesArgs] = None,
initially: Optional[str] = None,
name: Optional[str] = None,
rely: Optional[bool] = None,
table_id: Optional[str] = None,
type: Optional[str] = None,
validate: Optional[bool] = None) -> TableConstraint
func GetTableConstraint(ctx *Context, name string, id IDInput, state *TableConstraintState, opts ...ResourceOption) (*TableConstraint, error)
public static TableConstraint Get(string name, Input<string> id, TableConstraintState? state, CustomResourceOptions? opts = null)
public static TableConstraint get(String name, Output<String> id, TableConstraintState state, CustomResourceOptions options)
resources: _: type: snowflake:TableConstraint 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.
- Columns
Changes to this property will trigger replacement.
- Columns to use in constraint key
- Comment string
- Comment for the table constraint
- Deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - Enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - Enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - Foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- Initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - Name string
- Name of constraint
- Rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - Table
Id Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- Type
Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- Validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- Columns
Changes to this property will trigger replacement.
- Columns to use in constraint key
- Comment string
- Comment for the table constraint
- Deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - Enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - Enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - Foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties Args - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- Initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - Name string
- Name of constraint
- Rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - Table
Id Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- Type
Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- Validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
Changes to this property will trigger replacement.
- Columns to use in constraint key
- comment String
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name String
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - table
Id Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
Changes to this property will trigger replacement.
- Columns to use in constraint key
- comment string
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign
Key Properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name string
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - table
Id Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
Changes to this property will trigger replacement.
- Columns to use in constraint key
- comment str
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign_
key_ properties Changes to this property will trigger replacement.
Constraint Foreign Key Properties Args - Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name str
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - table_
id Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
- columns
Changes to this property will trigger replacement.
- Columns to use in constraint key
- comment String
- Comment for the table constraint
- deferrable
Changes to this property will trigger replacement.
- (Default:
true
) Whether the constraint is deferrable - enable
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle. - enforced
Changes to this property will trigger replacement.
- (Default:
false
) Whether the constraint is enforced - foreign
Key Properties Changes to this property will trigger replacement.
- Additional properties when type is set to foreign key. Not applicable for primary/unique keys
- initially
Changes to this property will trigger replacement.
- (Default:
DEFERRED
) Whether the constraint is initially deferred or immediate - name String
- Name of constraint
- rely
Changes to this property will trigger replacement.
- (Default:
true
) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite. - table
Id Changes to this property will trigger replacement.
- Identifier for table to create constraint on. Format must follow: ""<dbname>"."<schemaname>"."<tablename>"" or "<dbname>.<schemaname>.<tablename>" (snowflaketable.mytable.id)
- type
Changes to this property will trigger replacement.
- Type of constraint, one of 'UNIQUE', 'PRIMARY KEY', or 'FOREIGN KEY'
- validate
Changes to this property will trigger replacement.
- (Default:
false
) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
Supporting Types
TableConstraintForeignKeyProperties, TableConstraintForeignKeyPropertiesArgs
- References
This property is required. Changes to this property will trigger replacement.
Constraint Foreign Key Properties References - The table and columns that the foreign key references.
- Match
Changes to this property will trigger replacement.
- (Default:
FULL
) The match type for the foreign key. Not applicable for primary/unique keys - On
Delete Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is deleted. Not applicable for primary/unique keys - On
Update Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is updated. Not applicable for primary/unique keys
- References
This property is required. Changes to this property will trigger replacement.
Constraint Foreign Key Properties References - The table and columns that the foreign key references.
- Match
Changes to this property will trigger replacement.
- (Default:
FULL
) The match type for the foreign key. Not applicable for primary/unique keys - On
Delete Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is deleted. Not applicable for primary/unique keys - On
Update Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is updated. Not applicable for primary/unique keys
- references
This property is required. Changes to this property will trigger replacement.
Constraint Foreign Key Properties References - The table and columns that the foreign key references.
- match
Changes to this property will trigger replacement.
- (Default:
FULL
) The match type for the foreign key. Not applicable for primary/unique keys - on
Delete Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is deleted. Not applicable for primary/unique keys - on
Update Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is updated. Not applicable for primary/unique keys
- references
This property is required. Changes to this property will trigger replacement.
Constraint Foreign Key Properties References - The table and columns that the foreign key references.
- match
Changes to this property will trigger replacement.
- (Default:
FULL
) The match type for the foreign key. Not applicable for primary/unique keys - on
Delete Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is deleted. Not applicable for primary/unique keys - on
Update Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is updated. Not applicable for primary/unique keys
- references
This property is required. Changes to this property will trigger replacement.
Constraint Foreign Key Properties References - The table and columns that the foreign key references.
- match
Changes to this property will trigger replacement.
- (Default:
FULL
) The match type for the foreign key. Not applicable for primary/unique keys - on_
delete Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is deleted. Not applicable for primary/unique keys - on_
update Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is updated. Not applicable for primary/unique keys
- references
This property is required. Changes to this property will trigger replacement.
- The table and columns that the foreign key references.
- match
Changes to this property will trigger replacement.
- (Default:
FULL
) The match type for the foreign key. Not applicable for primary/unique keys - on
Delete Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is deleted. Not applicable for primary/unique keys - on
Update Changes to this property will trigger replacement.
- (Default:
NO ACTION
) Specifies the action performed when the primary/unique key for the foreign key is updated. Not applicable for primary/unique keys
TableConstraintForeignKeyPropertiesReferences, TableConstraintForeignKeyPropertiesReferencesArgs
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.