1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataFlow
  5. RunStatement
Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi

oci.DataFlow.RunStatement

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi

    This resource provides the Run Statement resource in Oracle Cloud Infrastructure Data Flow service.

    Executes a statement for a Session run.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRunStatement = new oci.dataflow.RunStatement("test_run_statement", {
        code: runStatementCode,
        runId: testRun.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_run_statement = oci.data_flow.RunStatement("test_run_statement",
        code=run_statement_code,
        run_id=test_run["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DataFlow"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DataFlow.NewRunStatement(ctx, "test_run_statement", &DataFlow.RunStatementArgs{
    			Code:  pulumi.Any(runStatementCode),
    			RunId: pulumi.Any(testRun.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testRunStatement = new Oci.DataFlow.RunStatement("test_run_statement", new()
        {
            Code = runStatementCode,
            RunId = testRun.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DataFlow.RunStatement;
    import com.pulumi.oci.DataFlow.RunStatementArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testRunStatement = new RunStatement("testRunStatement", RunStatementArgs.builder()        
                .code(runStatementCode)
                .runId(testRun.id())
                .build());
    
        }
    }
    
    resources:
      testRunStatement:
        type: oci:DataFlow:RunStatement
        name: test_run_statement
        properties:
          code: ${runStatementCode}
          runId: ${testRun.id}
    

    Create RunStatement Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RunStatement(name: string, args: RunStatementArgs, opts?: CustomResourceOptions);
    @overload
    def RunStatement(resource_name: str,
                     args: RunStatementArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def RunStatement(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     code: Optional[str] = None,
                     run_id: Optional[str] = None)
    func NewRunStatement(ctx *Context, name string, args RunStatementArgs, opts ...ResourceOption) (*RunStatement, error)
    public RunStatement(string name, RunStatementArgs args, CustomResourceOptions? opts = null)
    public RunStatement(String name, RunStatementArgs args)
    public RunStatement(String name, RunStatementArgs args, CustomResourceOptions options)
    
    type: oci:DataFlow:RunStatement
    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 RunStatementArgs
    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 RunStatementArgs
    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 RunStatementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RunStatementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RunStatementArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var runStatementResource = new Oci.DataFlow.RunStatement("runStatementResource", new()
    {
        Code = "string",
        RunId = "string",
    });
    
    example, err := DataFlow.NewRunStatement(ctx, "runStatementResource", &DataFlow.RunStatementArgs{
    	Code:  pulumi.String("string"),
    	RunId: pulumi.String("string"),
    })
    
    var runStatementResource = new RunStatement("runStatementResource", RunStatementArgs.builder()        
        .code("string")
        .runId("string")
        .build());
    
    run_statement_resource = oci.data_flow.RunStatement("runStatementResource",
        code="string",
        run_id="string")
    
    const runStatementResource = new oci.dataflow.RunStatement("runStatementResource", {
        code: "string",
        runId: "string",
    });
    
    type: oci:DataFlow:RunStatement
    properties:
        code: string
        runId: string
    

    RunStatement 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 RunStatement resource accepts the following input properties:

    Code string
    The statement code to execute. Example: println(sc.version)
    RunId string

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Code string
    The statement code to execute. Example: println(sc.version)
    RunId string

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    code String
    The statement code to execute. Example: println(sc.version)
    runId String

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    code string
    The statement code to execute. Example: println(sc.version)
    runId string

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    code str
    The statement code to execute. Example: println(sc.version)
    run_id str

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    code String
    The statement code to execute. Example: println(sc.version)
    runId String

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RunStatement resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Outputs List<RunStatementOutput>
    The execution output of a statement.
    Progress double
    The execution progress.
    State string
    The current state of this statement.
    TimeCompleted string
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    TimeCreated string
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    Id string
    The provider-assigned unique ID for this managed resource.
    Outputs []RunStatementOutputType
    The execution output of a statement.
    Progress float64
    The execution progress.
    State string
    The current state of this statement.
    TimeCompleted string
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    TimeCreated string
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    outputs List<RunStatementOutput>
    The execution output of a statement.
    progress Double
    The execution progress.
    state String
    The current state of this statement.
    timeCompleted String
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    timeCreated String
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    id string
    The provider-assigned unique ID for this managed resource.
    outputs RunStatementOutput[]
    The execution output of a statement.
    progress number
    The execution progress.
    state string
    The current state of this statement.
    timeCompleted string
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    timeCreated string
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    id str
    The provider-assigned unique ID for this managed resource.
    outputs Sequence[dataflow.RunStatementOutput]
    The execution output of a statement.
    progress float
    The execution progress.
    state str
    The current state of this statement.
    time_completed str
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    time_created str
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    outputs List<Property Map>
    The execution output of a statement.
    progress Number
    The execution progress.
    state String
    The current state of this statement.
    timeCompleted String
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    timeCreated String
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z

    Look up Existing RunStatement Resource

    Get an existing RunStatement 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?: RunStatementState, opts?: CustomResourceOptions): RunStatement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            code: Optional[str] = None,
            outputs: Optional[Sequence[_dataflow.RunStatementOutputArgs]] = None,
            progress: Optional[float] = None,
            run_id: Optional[str] = None,
            state: Optional[str] = None,
            time_completed: Optional[str] = None,
            time_created: Optional[str] = None) -> RunStatement
    func GetRunStatement(ctx *Context, name string, id IDInput, state *RunStatementState, opts ...ResourceOption) (*RunStatement, error)
    public static RunStatement Get(string name, Input<string> id, RunStatementState? state, CustomResourceOptions? opts = null)
    public static RunStatement get(String name, Output<String> id, RunStatementState 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.
    The following state arguments are supported:
    Code string
    The statement code to execute. Example: println(sc.version)
    Outputs List<RunStatementOutput>
    The execution output of a statement.
    Progress double
    The execution progress.
    RunId string

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current state of this statement.
    TimeCompleted string
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    TimeCreated string
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    Code string
    The statement code to execute. Example: println(sc.version)
    Outputs []RunStatementOutputTypeArgs
    The execution output of a statement.
    Progress float64
    The execution progress.
    RunId string

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current state of this statement.
    TimeCompleted string
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    TimeCreated string
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    code String
    The statement code to execute. Example: println(sc.version)
    outputs List<RunStatementOutput>
    The execution output of a statement.
    progress Double
    The execution progress.
    runId String

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current state of this statement.
    timeCompleted String
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    timeCreated String
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    code string
    The statement code to execute. Example: println(sc.version)
    outputs RunStatementOutput[]
    The execution output of a statement.
    progress number
    The execution progress.
    runId string

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state string
    The current state of this statement.
    timeCompleted string
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    timeCreated string
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    code str
    The statement code to execute. Example: println(sc.version)
    outputs Sequence[dataflow.RunStatementOutputArgs]
    The execution output of a statement.
    progress float
    The execution progress.
    run_id str

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state str
    The current state of this statement.
    time_completed str
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    time_created str
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
    code String
    The statement code to execute. Example: println(sc.version)
    outputs List<Property Map>
    The execution output of a statement.
    progress Number
    The execution progress.
    runId String

    The unique ID for the run

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current state of this statement.
    timeCompleted String
    The date and time a statement execution was completed, expressed in RFC 3339 timestamp format. Example: 2022-05-31T21:10:29.600Z
    timeCreated String
    The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z

    Supporting Types

    RunStatementOutput, RunStatementOutputArgs

    Datas List<RunStatementOutputData>
    An object representing execution output of a statement.
    ErrorName string
    The name of the error in the statement output.
    ErrorValue string
    The value of the error in the statement output.
    Status string
    Status of the statement output.
    Tracebacks List<string>
    The traceback of the statement output.
    Datas []RunStatementOutputData
    An object representing execution output of a statement.
    ErrorName string
    The name of the error in the statement output.
    ErrorValue string
    The value of the error in the statement output.
    Status string
    Status of the statement output.
    Tracebacks []string
    The traceback of the statement output.
    datas List<RunStatementOutputData>
    An object representing execution output of a statement.
    errorName String
    The name of the error in the statement output.
    errorValue String
    The value of the error in the statement output.
    status String
    Status of the statement output.
    tracebacks List<String>
    The traceback of the statement output.
    datas RunStatementOutputData[]
    An object representing execution output of a statement.
    errorName string
    The name of the error in the statement output.
    errorValue string
    The value of the error in the statement output.
    status string
    Status of the statement output.
    tracebacks string[]
    The traceback of the statement output.
    datas Sequence[dataflow.RunStatementOutputData]
    An object representing execution output of a statement.
    error_name str
    The name of the error in the statement output.
    error_value str
    The value of the error in the statement output.
    status str
    Status of the statement output.
    tracebacks Sequence[str]
    The traceback of the statement output.
    datas List<Property Map>
    An object representing execution output of a statement.
    errorName String
    The name of the error in the statement output.
    errorValue String
    The value of the error in the statement output.
    status String
    Status of the statement output.
    tracebacks List<String>
    The traceback of the statement output.

    RunStatementOutputData, RunStatementOutputDataArgs

    Type string
    The type of the StatementOutputData like TEXT_PLAIN, TEXT_HTML or IMAGE_PNG.
    Value string
    The statement code execution output in html format.
    Type string
    The type of the StatementOutputData like TEXT_PLAIN, TEXT_HTML or IMAGE_PNG.
    Value string
    The statement code execution output in html format.
    type String
    The type of the StatementOutputData like TEXT_PLAIN, TEXT_HTML or IMAGE_PNG.
    value String
    The statement code execution output in html format.
    type string
    The type of the StatementOutputData like TEXT_PLAIN, TEXT_HTML or IMAGE_PNG.
    value string
    The statement code execution output in html format.
    type str
    The type of the StatementOutputData like TEXT_PLAIN, TEXT_HTML or IMAGE_PNG.
    value str
    The statement code execution output in html format.
    type String
    The type of the StatementOutputData like TEXT_PLAIN, TEXT_HTML or IMAGE_PNG.
    value String
    The statement code execution output in html format.

    Import

    RunStatements can be imported using the id, e.g.

    $ pulumi import oci:DataFlow/runStatement:RunStatement test_run_statement "runs/{runId}/statements/{statementId}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi