Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
This data source provides Realtime Compute Sql File available to the user.What is Sql File
NOTE: Available since v1.292.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tfexample-sql-file";
const _default = alicloud.realtimecompute.getSqlFiles({
workspace: "a14bda1c4a****",
namespace: "default-namespace",
ids: ["a14bda1c4a****:default-namespace:123456"],
});
export const firstSqlFileId = _default.then(_default => _default.files?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tfexample-sql-file"
default = alicloud.realtimecompute.get_sql_files(workspace="a14bda1c4a****",
namespace="default-namespace",
ids=["a14bda1c4a****:default-namespace:123456"])
pulumi.export("firstSqlFileId", default.files[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/realtimecompute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tfexample-sql-file"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := realtimecompute.GetSqlFiles(ctx, &realtimecompute.GetSqlFilesArgs{
Workspace: "a14bda1c4a****",
Namespace: "default-namespace",
Ids: []string{
"a14bda1c4a****:default-namespace:123456",
},
}, nil)
if err != nil {
return err
}
ctx.Export("firstSqlFileId", _default.Files[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tfexample-sql-file";
var @default = AliCloud.RealtimeCompute.GetSqlFiles.Invoke(new()
{
Workspace = "a14bda1c4a****",
Namespace = "default-namespace",
Ids = new[]
{
"a14bda1c4a****:default-namespace:123456",
},
});
return new Dictionary<string, object?>
{
["firstSqlFileId"] = @default.Apply(@default => @default.Apply(getSqlFilesResult => getSqlFilesResult.Files[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.realtimecompute.RealtimecomputeFunctions;
import com.pulumi.alicloud.realtimecompute.inputs.GetSqlFilesArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tfexample-sql-file");
final var default = RealtimecomputeFunctions.getSqlFiles(GetSqlFilesArgs.builder()
.workspace("a14bda1c4a****")
.namespace("default-namespace")
.ids("a14bda1c4a****:default-namespace:123456")
.build());
ctx.export("firstSqlFileId", default_.files()[0].id());
}
}
configuration:
name:
type: string
default: tfexample-sql-file
variables:
default:
fn::invoke:
function: alicloud:realtimecompute:getSqlFiles
arguments:
workspace: a14bda1c4a****
namespace: default-namespace
ids:
- a14bda1c4a****:default-namespace:123456
outputs:
firstSqlFileId: ${default.files[0].id}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_realtimecompute_getsqlfiles" "default" {
workspace = "a14bda1c4a****"
namespace = "default-namespace"
ids = ["a14bda1c4a****:default-namespace:123456"]
}
variable "name" {
type = string
default = "tfexample-sql-file"
}
output "firstSqlFileId" {
value = data.alicloud_realtimecompute_getsqlfiles.default.files[0].id
}
Using getSqlFiles
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSqlFiles(args: GetSqlFilesArgs, opts?: InvokeOptions): Promise<GetSqlFilesResult>
function getSqlFilesOutput(args: GetSqlFilesOutputArgs, opts?: InvokeOutputOptions): Output<GetSqlFilesResult>def get_sql_files(ids: Optional[Sequence[str]] = None,
namespace: Optional[str] = None,
output_file: Optional[str] = None,
workspace: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSqlFilesResult
def get_sql_files_output(ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
namespace: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
workspace: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetSqlFilesResult]func GetSqlFiles(ctx *Context, args *GetSqlFilesArgs, opts ...InvokeOption) (*GetSqlFilesResult, error)
func GetSqlFilesOutput(ctx *Context, args *GetSqlFilesOutputArgs, opts ...InvokeOption) GetSqlFilesResultOutput> Note: This function is named GetSqlFiles in the Go SDK.
public static class GetSqlFiles
{
public static Task<GetSqlFilesResult> InvokeAsync(GetSqlFilesArgs args, InvokeOptions? opts = null)
public static Output<GetSqlFilesResult> Invoke(GetSqlFilesInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetSqlFilesResult> Invoke(GetSqlFilesInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetSqlFilesResult> getSqlFiles(GetSqlFilesArgs args, InvokeOptions options)
public static Output<GetSqlFilesResult> getSqlFiles(GetSqlFilesArgs args, InvokeOptions options)
public static Output<GetSqlFilesResult> getSqlFiles(GetSqlFilesArgs args, InvokeOutputOptions options)
fn::invoke:
function: alicloud:realtimecompute/getSqlFiles:getSqlFiles
arguments:
# arguments dictionarydata "alicloud_realtimecompute_get_sql_files" "name" {
# arguments
}The following arguments are supported:
- Namespace string
- The name of the namespace.
- Workspace string
- The ID of the workspace.
- Ids List<string>
- A list of Sql File IDs. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - Output
File string - File name where to save data source results (after running
pulumi preview).
- Namespace string
- The name of the namespace.
- Workspace string
- The ID of the workspace.
- Ids []string
- A list of Sql File IDs. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - Output
File string - File name where to save data source results (after running
pulumi preview).
- namespace string
- The name of the namespace.
- workspace string
- The ID of the workspace.
- ids list(string)
- A list of Sql File IDs. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - output_
file string - File name where to save data source results (after running
pulumi preview).
- namespace String
- The name of the namespace.
- workspace String
- The ID of the workspace.
- ids List<String>
- A list of Sql File IDs. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - output
File String - File name where to save data source results (after running
pulumi preview).
- namespace string
- The name of the namespace.
- workspace string
- The ID of the workspace.
- ids string[]
- A list of Sql File IDs. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - output
File string - File name where to save data source results (after running
pulumi preview).
- namespace str
- The name of the namespace.
- workspace str
- The ID of the workspace.
- ids Sequence[str]
- A list of Sql File IDs. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - output_
file str - File name where to save data source results (after running
pulumi preview).
- namespace String
- The name of the namespace.
- workspace String
- The ID of the workspace.
- ids List<String>
- A list of Sql File IDs. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - output
File String - File name where to save data source results (after running
pulumi preview).
getSqlFiles Result
The following output properties are available:
- Files
List<Pulumi.
Ali Cloud. Realtime Compute. Outputs. Get Sql Files File> - A list of Sql File Entries. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Sql File IDs.
- Namespace string
- The name of the namespace.
- Workspace string
- The ID of the workspace.
- Output
File string
- Files
[]Get
Sql Files File - A list of Sql File Entries. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Sql File IDs.
- Namespace string
- The name of the namespace.
- Workspace string
- The ID of the workspace.
- Output
File string
- files list(object)
- A list of Sql File Entries. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- A list of Sql File IDs.
- namespace string
- The name of the namespace.
- workspace string
- The ID of the workspace.
- output_
file string
- files
List<Get
Sql Files File> - A list of Sql File Entries. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Sql File IDs.
- namespace String
- The name of the namespace.
- workspace String
- The ID of the workspace.
- output
File String
- files
Get
Sql Files File[] - A list of Sql File Entries. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Sql File IDs.
- namespace string
- The name of the namespace.
- workspace string
- The ID of the workspace.
- output
File string
- files
Sequence[Get
Sql Files File] - A list of Sql File Entries. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Sql File IDs.
- namespace str
- The name of the namespace.
- workspace str
- The ID of the workspace.
- output_
file str
- files List<Property Map>
- A list of Sql File Entries. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Sql File IDs.
- namespace String
- The name of the namespace.
- workspace String
- The ID of the workspace.
- output
File String
Supporting Types
GetSqlFilesFile
- Batch
Mode string - Whether the SQL query script runs in batch mode.
- Description string
- The description of the SQL file.
- Id string
- The ID of the SQL file. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - Name string
- The name of the SQL file.
- Namespace string
- The name of the namespace.
- Parent
Id string - The ID of the parent folder of the SQL file.
- Session
Cluster stringName - The name of the session cluster that runs the SQL query script.
- Sql
File stringId - The ID of the SQL file.
- Sql
Script string - The SQL script content.
- Workspace string
- The ID of the workspace.
- Batch
Mode string - Whether the SQL query script runs in batch mode.
- Description string
- The description of the SQL file.
- Id string
- The ID of the SQL file. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - Name string
- The name of the SQL file.
- Namespace string
- The name of the namespace.
- Parent
Id string - The ID of the parent folder of the SQL file.
- Session
Cluster stringName - The name of the session cluster that runs the SQL query script.
- Sql
File stringId - The ID of the SQL file.
- Sql
Script string - The SQL script content.
- Workspace string
- The ID of the workspace.
- batch_
mode string - Whether the SQL query script runs in batch mode.
- description string
- The description of the SQL file.
- id string
- The ID of the SQL file. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - name string
- The name of the SQL file.
- namespace string
- The name of the namespace.
- parent_
id string - The ID of the parent folder of the SQL file.
- session_
cluster_ stringname - The name of the session cluster that runs the SQL query script.
- sql_
file_ stringid - The ID of the SQL file.
- sql_
script string - The SQL script content.
- workspace string
- The ID of the workspace.
- batch
Mode String - Whether the SQL query script runs in batch mode.
- description String
- The description of the SQL file.
- id String
- The ID of the SQL file. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - name String
- The name of the SQL file.
- namespace String
- The name of the namespace.
- parent
Id String - The ID of the parent folder of the SQL file.
- session
Cluster StringName - The name of the session cluster that runs the SQL query script.
- sql
File StringId - The ID of the SQL file.
- sql
Script String - The SQL script content.
- workspace String
- The ID of the workspace.
- batch
Mode string - Whether the SQL query script runs in batch mode.
- description string
- The description of the SQL file.
- id string
- The ID of the SQL file. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - name string
- The name of the SQL file.
- namespace string
- The name of the namespace.
- parent
Id string - The ID of the parent folder of the SQL file.
- session
Cluster stringName - The name of the session cluster that runs the SQL query script.
- sql
File stringId - The ID of the SQL file.
- sql
Script string - The SQL script content.
- workspace string
- The ID of the workspace.
- batch_
mode str - Whether the SQL query script runs in batch mode.
- description str
- The description of the SQL file.
- id str
- The ID of the SQL file. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - name str
- The name of the SQL file.
- namespace str
- The name of the namespace.
- parent_
id str - The ID of the parent folder of the SQL file.
- session_
cluster_ strname - The name of the session cluster that runs the SQL query script.
- sql_
file_ strid - The ID of the SQL file.
- sql_
script str - The SQL script content.
- workspace str
- The ID of the workspace.
- batch
Mode String - Whether the SQL query script runs in batch mode.
- description String
- The description of the SQL file.
- id String
- The ID of the SQL file. The value is formulated as
<workspace>:<namespace>:<sql_file_id>. - name String
- The name of the SQL file.
- namespace String
- The name of the namespace.
- parent
Id String - The ID of the parent folder of the SQL file.
- session
Cluster StringName - The name of the session cluster that runs the SQL query script.
- sql
File StringId - The ID of the SQL file.
- sql
Script String - The SQL script content.
- workspace String
- The ID of the workspace.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi