snowflake.UnsafeExecute
Explore with Pulumi AI
!> Warning This is a dangerous resource that allows executing ANY SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Will be deleted in the upcoming versions. Use at your own risk.
Note It can be theoretically used to manage resource that are not supported by the provider. This is risky and may brake other resources if used incorrectly.
Note Use
query
parameter with caution. It will fetch ALL the results returned by the query provided. Try to limit the number of results by writing query with filters. Query failure does not stop resource creation; it simply results inquery_results
being empty.
Deprecation Experimental resource. Will be deleted in the upcoming versions. Use at your own risk.
Experimental resource used for testing purposes only. Allows to execute ANY SQL statement.
Create UnsafeExecute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UnsafeExecute(name: string, args: UnsafeExecuteArgs, opts?: CustomResourceOptions);
@overload
def UnsafeExecute(resource_name: str,
args: UnsafeExecuteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UnsafeExecute(resource_name: str,
opts: Optional[ResourceOptions] = None,
execute: Optional[str] = None,
revert: Optional[str] = None,
query: Optional[str] = None)
func NewUnsafeExecute(ctx *Context, name string, args UnsafeExecuteArgs, opts ...ResourceOption) (*UnsafeExecute, error)
public UnsafeExecute(string name, UnsafeExecuteArgs args, CustomResourceOptions? opts = null)
public UnsafeExecute(String name, UnsafeExecuteArgs args)
public UnsafeExecute(String name, UnsafeExecuteArgs args, CustomResourceOptions options)
type: snowflake:UnsafeExecute
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 UnsafeExecuteArgs
- 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 UnsafeExecuteArgs
- 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 UnsafeExecuteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UnsafeExecuteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UnsafeExecuteArgs
- 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 unsafeExecuteResource = new Snowflake.UnsafeExecute("unsafeExecuteResource", new()
{
Execute = "string",
Revert = "string",
Query = "string",
});
example, err := snowflake.NewUnsafeExecute(ctx, "unsafeExecuteResource", &snowflake.UnsafeExecuteArgs{
Execute: pulumi.String("string"),
Revert: pulumi.String("string"),
Query: pulumi.String("string"),
})
var unsafeExecuteResource = new UnsafeExecute("unsafeExecuteResource", UnsafeExecuteArgs.builder()
.execute("string")
.revert("string")
.query("string")
.build());
unsafe_execute_resource = snowflake.UnsafeExecute("unsafeExecuteResource",
execute="string",
revert="string",
query="string")
const unsafeExecuteResource = new snowflake.UnsafeExecute("unsafeExecuteResource", {
execute: "string",
revert: "string",
query: "string",
});
type: snowflake:UnsafeExecute
properties:
execute: string
query: string
revert: string
UnsafeExecute Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The UnsafeExecute resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the UnsafeExecute resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Results List<ImmutableDictionary<string, string>> - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Results []map[string]string - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- id String
- The provider-assigned unique ID for this managed resource.
- query
Results List<Map<String,String>> - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- id string
- The provider-assigned unique ID for this managed resource.
- query
Results {[key: string]: string}[] - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- id str
- The provider-assigned unique ID for this managed resource.
- query_
results Sequence[Mapping[str, str]] - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- id String
- The provider-assigned unique ID for this managed resource.
- query
Results List<Map<String>> - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
Look up Existing UnsafeExecute Resource
Get an existing UnsafeExecute 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?: UnsafeExecuteState, opts?: CustomResourceOptions): UnsafeExecute
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
execute: Optional[str] = None,
query: Optional[str] = None,
query_results: Optional[Sequence[Mapping[str, str]]] = None,
revert: Optional[str] = None) -> UnsafeExecute
func GetUnsafeExecute(ctx *Context, name string, id IDInput, state *UnsafeExecuteState, opts ...ResourceOption) (*UnsafeExecute, error)
public static UnsafeExecute Get(string name, Input<string> id, UnsafeExecuteState? state, CustomResourceOptions? opts = null)
public static UnsafeExecute get(String name, Output<String> id, UnsafeExecuteState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Execute string
- SQL statement to execute. Forces recreation of resource on change.
- Query string
- Optional SQL statement to do a read. Invoked after creation and every time it is changed.
- Query
Results List<ImmutableDictionary<string, string>> - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- Revert string
- SQL statement to revert the execute statement. Invoked when resource is being destroyed.
- Execute string
- SQL statement to execute. Forces recreation of resource on change.
- Query string
- Optional SQL statement to do a read. Invoked after creation and every time it is changed.
- Query
Results []map[string]string - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- Revert string
- SQL statement to revert the execute statement. Invoked when resource is being destroyed.
- execute String
- SQL statement to execute. Forces recreation of resource on change.
- query String
- Optional SQL statement to do a read. Invoked after creation and every time it is changed.
- query
Results List<Map<String,String>> - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- revert String
- SQL statement to revert the execute statement. Invoked when resource is being destroyed.
- execute string
- SQL statement to execute. Forces recreation of resource on change.
- query string
- Optional SQL statement to do a read. Invoked after creation and every time it is changed.
- query
Results {[key: string]: string}[] - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- revert string
- SQL statement to revert the execute statement. Invoked when resource is being destroyed.
- execute str
- SQL statement to execute. Forces recreation of resource on change.
- query str
- Optional SQL statement to do a read. Invoked after creation and every time it is changed.
- query_
results Sequence[Mapping[str, str]] - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- revert str
- SQL statement to revert the execute statement. Invoked when resource is being destroyed.
- execute String
- SQL statement to execute. Forces recreation of resource on change.
- query String
- Optional SQL statement to do a read. Invoked after creation and every time it is changed.
- query
Results List<Map<String>> - List of key-value maps (text to text) retrieved after executing read query. Will be empty if the query results in an error.
- revert String
- SQL statement to revert the execute statement. Invoked when resource is being destroyed.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.