Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi
published on Thursday, Jul 16, 2026 by Pulumi
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi
published on Thursday, Jul 16, 2026 by Pulumi
This data source provides the DAS Sql Log Config of the current Alibaba Cloud user.
NOTE: Available since v1.285.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.rds.getInstances({
status: "Running",
});
const defaultGetSqlLogConfigs = _default.then(_default => alicloud.das.getSqlLogConfigs({
instanceId: _default.instances?.[0]?.id,
}));
export const dasSqlLogConfigEnable = defaultGetSqlLogConfigs.then(defaultGetSqlLogConfigs => defaultGetSqlLogConfigs.configs?.[0]?.enable);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.rds.get_instances(status="Running")
default_get_sql_log_configs = alicloud.das.get_sql_log_configs(instance_id=default.instances[0].id)
pulumi.export("dasSqlLogConfigEnable", default_get_sql_log_configs.configs[0].enable)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/das"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := rds.GetInstances(ctx, &rds.GetInstancesArgs{
Status: pulumi.StringRef("Running"),
}, nil)
if err != nil {
return err
}
defaultGetSqlLogConfigs, err := das.GetSqlLogConfigs(ctx, &das.GetSqlLogConfigsArgs{
InstanceId: _default.Instances[0].Id,
}, nil)
if err != nil {
return err
}
ctx.Export("dasSqlLogConfigEnable", defaultGetSqlLogConfigs.Configs[0].Enable)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Rds.GetInstances.Invoke(new()
{
Status = "Running",
});
var defaultGetSqlLogConfigs = AliCloud.Das.GetSqlLogConfigs.Invoke(new()
{
InstanceId = @default.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id),
});
return new Dictionary<string, object?>
{
["dasSqlLogConfigEnable"] = defaultGetSqlLogConfigs.Apply(getSqlLogConfigsResult => getSqlLogConfigsResult.Configs[0]?.Enable),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rds.RdsFunctions;
import com.pulumi.alicloud.rds.inputs.GetInstancesArgs;
import com.pulumi.alicloud.das.DasFunctions;
import com.pulumi.alicloud.das.inputs.GetSqlLogConfigsArgs;
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 default = RdsFunctions.getInstances(GetInstancesArgs.builder()
.status("Running")
.build());
final var defaultGetSqlLogConfigs = DasFunctions.getSqlLogConfigs(GetSqlLogConfigsArgs.builder()
.instanceId(default_.instances()[0].id())
.build());
ctx.export("dasSqlLogConfigEnable", defaultGetSqlLogConfigs.configs()[0].enable());
}
}
variables:
default:
fn::invoke:
function: alicloud:rds:getInstances
arguments:
status: Running
defaultGetSqlLogConfigs:
fn::invoke:
function: alicloud:das:getSqlLogConfigs
arguments:
instanceId: ${default.instances[0].id}
outputs:
dasSqlLogConfigEnable: ${defaultGetSqlLogConfigs.configs[0].enable}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_rds_getinstances" "default" {
status = "Running"
}
data "alicloud_das_getsqllogconfigs" "defaultGetSqlLogConfigs" {
instance_id = data.alicloud_rds_getinstances.default.instances[0].id
}
output "dasSqlLogConfigEnable" {
value = data.alicloud_das_getsqllogconfigs.defaultGetSqlLogConfigs.configs[0].enable
}
Using getSqlLogConfigs
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 getSqlLogConfigs(args: GetSqlLogConfigsArgs, opts?: InvokeOptions): Promise<GetSqlLogConfigsResult>
function getSqlLogConfigsOutput(args: GetSqlLogConfigsOutputArgs, opts?: InvokeOptions): Output<GetSqlLogConfigsResult>def get_sql_log_configs(ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSqlLogConfigsResult
def get_sql_log_configs_output(ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
instance_id: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSqlLogConfigsResult]func GetSqlLogConfigs(ctx *Context, args *GetSqlLogConfigsArgs, opts ...InvokeOption) (*GetSqlLogConfigsResult, error)
func GetSqlLogConfigsOutput(ctx *Context, args *GetSqlLogConfigsOutputArgs, opts ...InvokeOption) GetSqlLogConfigsResultOutput> Note: This function is named GetSqlLogConfigs in the Go SDK.
public static class GetSqlLogConfigs
{
public static Task<GetSqlLogConfigsResult> InvokeAsync(GetSqlLogConfigsArgs args, InvokeOptions? opts = null)
public static Output<GetSqlLogConfigsResult> Invoke(GetSqlLogConfigsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSqlLogConfigsResult> getSqlLogConfigs(GetSqlLogConfigsArgs args, InvokeOptions options)
public static Output<GetSqlLogConfigsResult> getSqlLogConfigs(GetSqlLogConfigsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:das/getSqlLogConfigs:getSqlLogConfigs
arguments:
# arguments dictionarydata "alicloud_das_get_sql_log_configs" "name" {
# arguments
}The following arguments are supported:
- Instance
Id string - The ID of the database instance to query the SQL log configuration for.
- Ids List<string>
- A list of Sql Log Config IDs. Its element value is same as the instance ID.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Instance
Id string - The ID of the database instance to query the SQL log configuration for.
- Ids []string
- A list of Sql Log Config IDs. Its element value is same as the instance ID.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- instance_
id string - The ID of the database instance to query the SQL log configuration for.
- ids list(string)
- A list of Sql Log Config IDs. Its element value is same as the instance ID.
- output_
file string - File name where to save data source results (after running
pulumi preview).
- instance
Id String - The ID of the database instance to query the SQL log configuration for.
- ids List<String>
- A list of Sql Log Config IDs. Its element value is same as the instance ID.
- output
File String - File name where to save data source results (after running
pulumi preview).
- instance
Id string - The ID of the database instance to query the SQL log configuration for.
- ids string[]
- A list of Sql Log Config IDs. Its element value is same as the instance ID.
- output
File string - File name where to save data source results (after running
pulumi preview).
- instance_
id str - The ID of the database instance to query the SQL log configuration for.
- ids Sequence[str]
- A list of Sql Log Config IDs. Its element value is same as the instance ID.
- output_
file str - File name where to save data source results (after running
pulumi preview).
- instance
Id String - The ID of the database instance to query the SQL log configuration for.
- ids List<String>
- A list of Sql Log Config IDs. Its element value is same as the instance ID.
- output
File String - File name where to save data source results (after running
pulumi preview).
getSqlLogConfigs Result
The following output properties are available:
- Configs
List<Pulumi.
Ali Cloud. Das. Outputs. Get Sql Log Configs Config> - A list of Sql Log Config Entries. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instance
Id string - The ID of the database instance.
- Output
File string
- Configs
[]Get
Sql Log Configs Config - A list of Sql Log Config Entries. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - The ID of the database instance.
- Output
File string
- configs list(object)
- A list of Sql Log Config Entries. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- instance_
id string - The ID of the database instance.
- output_
file string
- configs
List<Get
Sql Log Configs Config> - A list of Sql Log Config Entries. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - The ID of the database instance.
- output
File String
- configs
Get
Sql Log Configs Config[] - A list of Sql Log Config Entries. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - The ID of the database instance.
- output
File string
- configs
Sequence[Get
Sql Log Configs Config] - A list of Sql Log Config Entries. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instance_
id str - The ID of the database instance.
- output_
file str
- configs List<Property Map>
- A list of Sql Log Config Entries. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - The ID of the database instance.
- output
File String
Supporting Types
GetSqlLogConfigsConfig
- Cold
Retention int - The retention period of cold SQL audit logs. Calculated as
retention - hotRetention. - Enable bool
- Specifies whether SQL Explorer is enabled.
- Hot
Retention int - The retention period of hot SQL audit logs. Unit: days.
- Instance
Id string - The ID of the database instance to query the SQL log configuration for.
- Log
Filter string - The configuration of log filters.
- Request
Enable bool - The requested state of SQL Explorer.
- Retention int
- The retention period of SQL audit logs. Unit: days.
- Sql
Log intVisible Time - The visible start time of SQL audit logs.
- Version string
- The current version of SQL audit logs.
- Cold
Retention int - The retention period of cold SQL audit logs. Calculated as
retention - hotRetention. - Enable bool
- Specifies whether SQL Explorer is enabled.
- Hot
Retention int - The retention period of hot SQL audit logs. Unit: days.
- Instance
Id string - The ID of the database instance to query the SQL log configuration for.
- Log
Filter string - The configuration of log filters.
- Request
Enable bool - The requested state of SQL Explorer.
- Retention int
- The retention period of SQL audit logs. Unit: days.
- Sql
Log intVisible Time - The visible start time of SQL audit logs.
- Version string
- The current version of SQL audit logs.
- cold_
retention number - The retention period of cold SQL audit logs. Calculated as
retention - hotRetention. - enable bool
- Specifies whether SQL Explorer is enabled.
- hot_
retention number - The retention period of hot SQL audit logs. Unit: days.
- instance_
id string - The ID of the database instance to query the SQL log configuration for.
- log_
filter string - The configuration of log filters.
- request_
enable bool - The requested state of SQL Explorer.
- retention number
- The retention period of SQL audit logs. Unit: days.
- sql_
log_ numbervisible_ time - The visible start time of SQL audit logs.
- version string
- The current version of SQL audit logs.
- cold
Retention Integer - The retention period of cold SQL audit logs. Calculated as
retention - hotRetention. - enable Boolean
- Specifies whether SQL Explorer is enabled.
- hot
Retention Integer - The retention period of hot SQL audit logs. Unit: days.
- instance
Id String - The ID of the database instance to query the SQL log configuration for.
- log
Filter String - The configuration of log filters.
- request
Enable Boolean - The requested state of SQL Explorer.
- retention Integer
- The retention period of SQL audit logs. Unit: days.
- sql
Log IntegerVisible Time - The visible start time of SQL audit logs.
- version String
- The current version of SQL audit logs.
- cold
Retention number - The retention period of cold SQL audit logs. Calculated as
retention - hotRetention. - enable boolean
- Specifies whether SQL Explorer is enabled.
- hot
Retention number - The retention period of hot SQL audit logs. Unit: days.
- instance
Id string - The ID of the database instance to query the SQL log configuration for.
- log
Filter string - The configuration of log filters.
- request
Enable boolean - The requested state of SQL Explorer.
- retention number
- The retention period of SQL audit logs. Unit: days.
- sql
Log numberVisible Time - The visible start time of SQL audit logs.
- version string
- The current version of SQL audit logs.
- cold_
retention int - The retention period of cold SQL audit logs. Calculated as
retention - hotRetention. - enable bool
- Specifies whether SQL Explorer is enabled.
- hot_
retention int - The retention period of hot SQL audit logs. Unit: days.
- instance_
id str - The ID of the database instance to query the SQL log configuration for.
- log_
filter str - The configuration of log filters.
- request_
enable bool - The requested state of SQL Explorer.
- retention int
- The retention period of SQL audit logs. Unit: days.
- sql_
log_ intvisible_ time - The visible start time of SQL audit logs.
- version str
- The current version of SQL audit logs.
- cold
Retention Number - The retention period of cold SQL audit logs. Calculated as
retention - hotRetention. - enable Boolean
- Specifies whether SQL Explorer is enabled.
- hot
Retention Number - The retention period of hot SQL audit logs. Unit: days.
- instance
Id String - The ID of the database instance to query the SQL log configuration for.
- log
Filter String - The configuration of log filters.
- request
Enable Boolean - The requested state of SQL Explorer.
- retention Number
- The retention period of SQL audit logs. Unit: days.
- sql
Log NumberVisible Time - The visible start time of SQL audit logs.
- version String
- The current version of SQL audit logs.
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.105.0
published on Thursday, Jul 16, 2026 by Pulumi
published on Thursday, Jul 16, 2026 by Pulumi