1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. sddp
  5. DataLimit
Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi

alicloud.sddp.DataLimit

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi

    Provides a Data Security Center Data Limit resource.

    For information about Data Security Center Data Limit and how to use it, see What is Data Limit.

    NOTE: Available since v1.159.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as std from "@pulumi/std";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf_example";
    const _default = alicloud.getRegions({
        current: true,
    });
    const defaultGetZones = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "8.0",
        instanceChargeType: "PostPaid",
        category: "Basic",
        dbInstanceStorageType: "cloud_essd",
    });
    const defaultGetInstanceClasses = defaultGetZones.then(defaultGetZones => alicloud.rds.getInstanceClasses({
        zoneId: defaultGetZones.zones?.[0]?.id,
        engine: "MySQL",
        engineVersion: "8.0",
        category: "Basic",
        dbInstanceStorageType: "cloud_essd",
        instanceChargeType: "PostPaid",
    }));
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultNetwork.id,
    });
    const defaultInstance = new alicloud.rds.Instance("default", {
        engine: "MySQL",
        engineVersion: "8.0",
        instanceType: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.instanceClass),
        instanceStorage: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.storageRange?.min),
        instanceChargeType: "Postpaid",
        instanceName: name,
        vswitchId: defaultSwitch.id,
        monitoringPeriod: 60,
        dbInstanceStorageType: "cloud_essd",
        securityGroupIds: [defaultSecurityGroup.id],
    });
    const defaultRdsAccount = new alicloud.rds.RdsAccount("default", {
        dbInstanceId: defaultInstance.id,
        accountName: name,
        accountPassword: "Example1234",
    });
    const defaultDatabase = new alicloud.rds.Database("default", {
        instanceId: defaultInstance.id,
        name: name,
    });
    const defaultAccountPrivilege = new alicloud.rds.AccountPrivilege("default", {
        instanceId: defaultInstance.id,
        accountName: defaultRdsAccount.accountName,
        privilege: "ReadWrite",
        dbNames: [defaultDatabase.name],
    });
    const defaultDataLimit = new alicloud.sddp.DataLimit("default", {
        auditStatus: 0,
        engineType: "MySQL",
        parentId: std.joinOutput({
            separator: ".",
            input: [
                defaultAccountPrivilege.instanceId,
                defaultDatabase.name,
            ],
        }).apply(invoke => invoke.result),
        resourceType: "RDS",
        userName: defaultDatabase.name,
        password: defaultRdsAccount.accountPassword,
        port: 3306,
        serviceRegionId: _default.then(_default => _default.regions?.[0]?.id),
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_std as std
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf_example"
    default = alicloud.get_regions(current=True)
    default_get_zones = alicloud.rds.get_zones(engine="MySQL",
        engine_version="8.0",
        instance_charge_type="PostPaid",
        category="Basic",
        db_instance_storage_type="cloud_essd")
    default_get_instance_classes = alicloud.rds.get_instance_classes(zone_id=default_get_zones.zones[0].id,
        engine="MySQL",
        engine_version="8.0",
        category="Basic",
        db_instance_storage_type="cloud_essd",
        instance_charge_type="PostPaid")
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_get_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_network.id)
    default_instance = alicloud.rds.Instance("default",
        engine="MySQL",
        engine_version="8.0",
        instance_type=default_get_instance_classes.instance_classes[0].instance_class,
        instance_storage=default_get_instance_classes.instance_classes[0].storage_range.min,
        instance_charge_type="Postpaid",
        instance_name=name,
        vswitch_id=default_switch.id,
        monitoring_period=60,
        db_instance_storage_type="cloud_essd",
        security_group_ids=[default_security_group.id])
    default_rds_account = alicloud.rds.RdsAccount("default",
        db_instance_id=default_instance.id,
        account_name=name,
        account_password="Example1234")
    default_database = alicloud.rds.Database("default",
        instance_id=default_instance.id,
        name=name)
    default_account_privilege = alicloud.rds.AccountPrivilege("default",
        instance_id=default_instance.id,
        account_name=default_rds_account.account_name,
        privilege="ReadWrite",
        db_names=[default_database.name])
    default_data_limit = alicloud.sddp.DataLimit("default",
        audit_status=0,
        engine_type="MySQL",
        parent_id=std.join_output(separator=".",
            input=[
                default_account_privilege.instance_id,
                default_database.name,
            ]).apply(lambda invoke: invoke.result),
        resource_type="RDS",
        user_name=default_database.name,
        password=default_rds_account.account_password,
        port=3306,
        service_region_id=default.regions[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sddp"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"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 := "tf_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			InstanceChargeType:    pulumi.StringRef("PostPaid"),
    			Category:              pulumi.StringRef("Basic"),
    			DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
    			ZoneId:                pulumi.StringRef(defaultGetZones.Zones[0].Id),
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			Category:              pulumi.StringRef("Basic"),
    			DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
    			InstanceChargeType:    pulumi.StringRef("PostPaid"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultGetZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "default", &rds.InstanceArgs{
    			Engine:                pulumi.String("MySQL"),
    			EngineVersion:         pulumi.String("8.0"),
    			InstanceType:          pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].InstanceClass),
    			InstanceStorage:       pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].StorageRange.Min),
    			InstanceChargeType:    pulumi.String("Postpaid"),
    			InstanceName:          pulumi.String(name),
    			VswitchId:             defaultSwitch.ID(),
    			MonitoringPeriod:      pulumi.Int(60),
    			DbInstanceStorageType: pulumi.String("cloud_essd"),
    			SecurityGroupIds: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultRdsAccount, err := rds.NewRdsAccount(ctx, "default", &rds.RdsAccountArgs{
    			DbInstanceId:    defaultInstance.ID(),
    			AccountName:     pulumi.String(name),
    			AccountPassword: pulumi.String("Example1234"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultDatabase, err := rds.NewDatabase(ctx, "default", &rds.DatabaseArgs{
    			InstanceId: defaultInstance.ID(),
    			Name:       pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultAccountPrivilege, err := rds.NewAccountPrivilege(ctx, "default", &rds.AccountPrivilegeArgs{
    			InstanceId:  defaultInstance.ID(),
    			AccountName: defaultRdsAccount.AccountName,
    			Privilege:   pulumi.String("ReadWrite"),
    			DbNames: pulumi.StringArray{
    				defaultDatabase.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sddp.NewDataLimit(ctx, "default", &sddp.DataLimitArgs{
    			AuditStatus: pulumi.Int(0),
    			EngineType:  pulumi.String("MySQL"),
    			ParentId: pulumi.String(std.JoinOutput(ctx, std.JoinOutputArgs{
    				Separator: pulumi.String("."),
    				Input: pulumi.StringArray{
    					defaultAccountPrivilege.InstanceId,
    					defaultDatabase.Name,
    				},
    			}, nil).ApplyT(func(invoke std.JoinResult) (*string, error) {
    				return invoke.Result, nil
    			}).(pulumi.StringPtrOutput)),
    			ResourceType:    pulumi.String("RDS"),
    			UserName:        defaultDatabase.Name,
    			Password:        defaultRdsAccount.AccountPassword,
    			Port:            pulumi.Int(3306),
    			ServiceRegionId: pulumi.String(_default.Regions[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf_example";
        var @default = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultGetZones = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            InstanceChargeType = "PostPaid",
            Category = "Basic",
            DbInstanceStorageType = "cloud_essd",
        });
    
        var defaultGetInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
        {
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            Engine = "MySQL",
            EngineVersion = "8.0",
            Category = "Basic",
            DbInstanceStorageType = "cloud_essd",
            InstanceChargeType = "PostPaid",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("default", new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            InstanceType = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.InstanceClass),
            InstanceStorage = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.StorageRange?.Min),
            InstanceChargeType = "Postpaid",
            InstanceName = name,
            VswitchId = defaultSwitch.Id,
            MonitoringPeriod = 60,
            DbInstanceStorageType = "cloud_essd",
            SecurityGroupIds = new[]
            {
                defaultSecurityGroup.Id,
            },
        });
    
        var defaultRdsAccount = new AliCloud.Rds.RdsAccount("default", new()
        {
            DbInstanceId = defaultInstance.Id,
            AccountName = name,
            AccountPassword = "Example1234",
        });
    
        var defaultDatabase = new AliCloud.Rds.Database("default", new()
        {
            InstanceId = defaultInstance.Id,
            Name = name,
        });
    
        var defaultAccountPrivilege = new AliCloud.Rds.AccountPrivilege("default", new()
        {
            InstanceId = defaultInstance.Id,
            AccountName = defaultRdsAccount.AccountName,
            Privilege = "ReadWrite",
            DbNames = new[]
            {
                defaultDatabase.Name,
            },
        });
    
        var defaultDataLimit = new AliCloud.Sddp.DataLimit("default", new()
        {
            AuditStatus = 0,
            EngineType = "MySQL",
            ParentId = Std.Join.Invoke(new()
            {
                Separator = ".",
                Input = new[]
                {
                    defaultAccountPrivilege.InstanceId,
                    defaultDatabase.Name,
                },
            }).Apply(invoke => invoke.Result),
            ResourceType = "RDS",
            UserName = defaultDatabase.Name,
            Password = defaultRdsAccount.AccountPassword,
            Port = 3306,
            ServiceRegionId = @default.Apply(@default => @default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetRegionsArgs;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
    import com.pulumi.alicloud.rds.inputs.GetInstanceClassesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.rds.Instance;
    import com.pulumi.alicloud.rds.InstanceArgs;
    import com.pulumi.alicloud.rds.RdsAccount;
    import com.pulumi.alicloud.rds.RdsAccountArgs;
    import com.pulumi.alicloud.rds.Database;
    import com.pulumi.alicloud.rds.DatabaseArgs;
    import com.pulumi.alicloud.rds.AccountPrivilege;
    import com.pulumi.alicloud.rds.AccountPrivilegeArgs;
    import com.pulumi.alicloud.sddp.DataLimit;
    import com.pulumi.alicloud.sddp.DataLimitArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.std.inputs.JoinArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf_example");
            final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            final var defaultGetZones = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .instanceChargeType("PostPaid")
                .category("Basic")
                .dbInstanceStorageType("cloud_essd")
                .build());
    
            final var defaultGetInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(defaultGetZones.zones()[0].id())
                .engine("MySQL")
                .engineVersion("8.0")
                .category("Basic")
                .dbInstanceStorageType("cloud_essd")
                .instanceChargeType("PostPaid")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultGetZones.zones()[0].id())
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .instanceType(defaultGetInstanceClasses.instanceClasses()[0].instanceClass())
                .instanceStorage(defaultGetInstanceClasses.instanceClasses()[0].storageRange().min())
                .instanceChargeType("Postpaid")
                .instanceName(name)
                .vswitchId(defaultSwitch.id())
                .monitoringPeriod(60)
                .dbInstanceStorageType("cloud_essd")
                .securityGroupIds(defaultSecurityGroup.id())
                .build());
    
            var defaultRdsAccount = new RdsAccount("defaultRdsAccount", RdsAccountArgs.builder()
                .dbInstanceId(defaultInstance.id())
                .accountName(name)
                .accountPassword("Example1234")
                .build());
    
            var defaultDatabase = new Database("defaultDatabase", DatabaseArgs.builder()
                .instanceId(defaultInstance.id())
                .name(name)
                .build());
    
            var defaultAccountPrivilege = new AccountPrivilege("defaultAccountPrivilege", AccountPrivilegeArgs.builder()
                .instanceId(defaultInstance.id())
                .accountName(defaultRdsAccount.accountName())
                .privilege("ReadWrite")
                .dbNames(defaultDatabase.name())
                .build());
    
            var defaultDataLimit = new DataLimit("defaultDataLimit", DataLimitArgs.builder()
                .auditStatus(0)
                .engineType("MySQL")
                .parentId(StdFunctions.join(JoinArgs.builder()
                    .separator(".")
                    .input(                
                        defaultAccountPrivilege.instanceId(),
                        defaultDatabase.name())
                    .build()).applyValue(_invoke -> _invoke.result()))
                .resourceType("RDS")
                .userName(defaultDatabase.name())
                .password(defaultRdsAccount.accountPassword())
                .port(3306)
                .serviceRegionId(default_.regions()[0].id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf_example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultGetZones.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:rds:Instance
        name: default
        properties:
          engine: MySQL
          engineVersion: '8.0'
          instanceType: ${defaultGetInstanceClasses.instanceClasses[0].instanceClass}
          instanceStorage: ${defaultGetInstanceClasses.instanceClasses[0].storageRange.min}
          instanceChargeType: Postpaid
          instanceName: ${name}
          vswitchId: ${defaultSwitch.id}
          monitoringPeriod: '60'
          dbInstanceStorageType: cloud_essd
          securityGroupIds:
            - ${defaultSecurityGroup.id}
      defaultRdsAccount:
        type: alicloud:rds:RdsAccount
        name: default
        properties:
          dbInstanceId: ${defaultInstance.id}
          accountName: ${name}
          accountPassword: Example1234
      defaultDatabase:
        type: alicloud:rds:Database
        name: default
        properties:
          instanceId: ${defaultInstance.id}
          name: ${name}
      defaultAccountPrivilege:
        type: alicloud:rds:AccountPrivilege
        name: default
        properties:
          instanceId: ${defaultInstance.id}
          accountName: ${defaultRdsAccount.accountName}
          privilege: ReadWrite
          dbNames:
            - ${defaultDatabase.name}
      defaultDataLimit:
        type: alicloud:sddp:DataLimit
        name: default
        properties:
          auditStatus: 0
          engineType: MySQL
          parentId:
            fn::invoke:
              function: std:join
              arguments:
                separator: .
                input:
                  - ${defaultAccountPrivilege.instanceId}
                  - ${defaultDatabase.name}
              return: result
          resourceType: RDS
          userName: ${defaultDatabase.name}
          password: ${defaultRdsAccount.accountPassword}
          port: 3306
          serviceRegionId: ${default.regions[0].id}
    variables:
      default:
        fn::invoke:
          function: alicloud:getRegions
          arguments:
            current: true
      defaultGetZones:
        fn::invoke:
          function: alicloud:rds:getZones
          arguments:
            engine: MySQL
            engineVersion: '8.0'
            instanceChargeType: PostPaid
            category: Basic
            dbInstanceStorageType: cloud_essd
      defaultGetInstanceClasses:
        fn::invoke:
          function: alicloud:rds:getInstanceClasses
          arguments:
            zoneId: ${defaultGetZones.zones[0].id}
            engine: MySQL
            engineVersion: '8.0'
            category: Basic
            dbInstanceStorageType: cloud_essd
            instanceChargeType: PostPaid
    

    Create DataLimit Resource

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

    Constructor syntax

    new DataLimit(name: string, args: DataLimitArgs, opts?: CustomResourceOptions);
    @overload
    def DataLimit(resource_name: str,
                  args: DataLimitArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataLimit(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  resource_type: Optional[str] = None,
                  audit_status: Optional[int] = None,
                  engine_type: Optional[str] = None,
                  lang: Optional[str] = None,
                  log_store_day: Optional[int] = None,
                  parent_id: Optional[str] = None,
                  password: Optional[str] = None,
                  port: Optional[int] = None,
                  service_region_id: Optional[str] = None,
                  user_name: Optional[str] = None)
    func NewDataLimit(ctx *Context, name string, args DataLimitArgs, opts ...ResourceOption) (*DataLimit, error)
    public DataLimit(string name, DataLimitArgs args, CustomResourceOptions? opts = null)
    public DataLimit(String name, DataLimitArgs args)
    public DataLimit(String name, DataLimitArgs args, CustomResourceOptions options)
    
    type: alicloud:sddp:DataLimit
    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 DataLimitArgs
    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 DataLimitArgs
    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 DataLimitArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataLimitArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataLimitArgs
    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 dataLimitResource = new AliCloud.Sddp.DataLimit("dataLimitResource", new()
    {
        ResourceType = "string",
        AuditStatus = 0,
        EngineType = "string",
        Lang = "string",
        LogStoreDay = 0,
        ParentId = "string",
        Password = "string",
        Port = 0,
        ServiceRegionId = "string",
        UserName = "string",
    });
    
    example, err := sddp.NewDataLimit(ctx, "dataLimitResource", &sddp.DataLimitArgs{
    	ResourceType:    pulumi.String("string"),
    	AuditStatus:     pulumi.Int(0),
    	EngineType:      pulumi.String("string"),
    	Lang:            pulumi.String("string"),
    	LogStoreDay:     pulumi.Int(0),
    	ParentId:        pulumi.String("string"),
    	Password:        pulumi.String("string"),
    	Port:            pulumi.Int(0),
    	ServiceRegionId: pulumi.String("string"),
    	UserName:        pulumi.String("string"),
    })
    
    var dataLimitResource = new DataLimit("dataLimitResource", DataLimitArgs.builder()
        .resourceType("string")
        .auditStatus(0)
        .engineType("string")
        .lang("string")
        .logStoreDay(0)
        .parentId("string")
        .password("string")
        .port(0)
        .serviceRegionId("string")
        .userName("string")
        .build());
    
    data_limit_resource = alicloud.sddp.DataLimit("dataLimitResource",
        resource_type="string",
        audit_status=0,
        engine_type="string",
        lang="string",
        log_store_day=0,
        parent_id="string",
        password="string",
        port=0,
        service_region_id="string",
        user_name="string")
    
    const dataLimitResource = new alicloud.sddp.DataLimit("dataLimitResource", {
        resourceType: "string",
        auditStatus: 0,
        engineType: "string",
        lang: "string",
        logStoreDay: 0,
        parentId: "string",
        password: "string",
        port: 0,
        serviceRegionId: "string",
        userName: "string",
    });
    
    type: alicloud:sddp:DataLimit
    properties:
        auditStatus: 0
        engineType: string
        lang: string
        logStoreDay: 0
        parentId: string
        password: string
        port: 0
        resourceType: string
        serviceRegionId: string
        userName: string
    

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

    ResourceType string
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    AuditStatus int
    Whether to enable the log auditing feature. Valid values: 0, 1.
    EngineType string
    The type of the database. Valid values: MySQL, SQLServer.
    Lang string
    The lang.
    LogStoreDay int
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    ParentId string
    The ID of the data asset.
    Password string
    The password that is used to connect to the database.
    Port int
    The port that is used to connect to the database.
    ServiceRegionId string
    The region ID of the data asset.
    UserName string
    The name of the service to which the data asset belongs.
    ResourceType string
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    AuditStatus int
    Whether to enable the log auditing feature. Valid values: 0, 1.
    EngineType string
    The type of the database. Valid values: MySQL, SQLServer.
    Lang string
    The lang.
    LogStoreDay int
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    ParentId string
    The ID of the data asset.
    Password string
    The password that is used to connect to the database.
    Port int
    The port that is used to connect to the database.
    ServiceRegionId string
    The region ID of the data asset.
    UserName string
    The name of the service to which the data asset belongs.
    resourceType String
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    auditStatus Integer
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engineType String
    The type of the database. Valid values: MySQL, SQLServer.
    lang String
    The lang.
    logStoreDay Integer
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parentId String
    The ID of the data asset.
    password String
    The password that is used to connect to the database.
    port Integer
    The port that is used to connect to the database.
    serviceRegionId String
    The region ID of the data asset.
    userName String
    The name of the service to which the data asset belongs.
    resourceType string
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    auditStatus number
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engineType string
    The type of the database. Valid values: MySQL, SQLServer.
    lang string
    The lang.
    logStoreDay number
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parentId string
    The ID of the data asset.
    password string
    The password that is used to connect to the database.
    port number
    The port that is used to connect to the database.
    serviceRegionId string
    The region ID of the data asset.
    userName string
    The name of the service to which the data asset belongs.
    resource_type str
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    audit_status int
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engine_type str
    The type of the database. Valid values: MySQL, SQLServer.
    lang str
    The lang.
    log_store_day int
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parent_id str
    The ID of the data asset.
    password str
    The password that is used to connect to the database.
    port int
    The port that is used to connect to the database.
    service_region_id str
    The region ID of the data asset.
    user_name str
    The name of the service to which the data asset belongs.
    resourceType String
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    auditStatus Number
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engineType String
    The type of the database. Valid values: MySQL, SQLServer.
    lang String
    The lang.
    logStoreDay Number
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parentId String
    The ID of the data asset.
    password String
    The password that is used to connect to the database.
    port Number
    The port that is used to connect to the database.
    serviceRegionId String
    The region ID of the data asset.
    userName String
    The name of the service to which the data asset belongs.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DataLimit 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 DataLimit Resource

    Get an existing DataLimit 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?: DataLimitState, opts?: CustomResourceOptions): DataLimit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            audit_status: Optional[int] = None,
            engine_type: Optional[str] = None,
            lang: Optional[str] = None,
            log_store_day: Optional[int] = None,
            parent_id: Optional[str] = None,
            password: Optional[str] = None,
            port: Optional[int] = None,
            resource_type: Optional[str] = None,
            service_region_id: Optional[str] = None,
            user_name: Optional[str] = None) -> DataLimit
    func GetDataLimit(ctx *Context, name string, id IDInput, state *DataLimitState, opts ...ResourceOption) (*DataLimit, error)
    public static DataLimit Get(string name, Input<string> id, DataLimitState? state, CustomResourceOptions? opts = null)
    public static DataLimit get(String name, Output<String> id, DataLimitState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:sddp:DataLimit    get:      id: ${id}
    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:
    AuditStatus int
    Whether to enable the log auditing feature. Valid values: 0, 1.
    EngineType string
    The type of the database. Valid values: MySQL, SQLServer.
    Lang string
    The lang.
    LogStoreDay int
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    ParentId string
    The ID of the data asset.
    Password string
    The password that is used to connect to the database.
    Port int
    The port that is used to connect to the database.
    ResourceType string
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    ServiceRegionId string
    The region ID of the data asset.
    UserName string
    The name of the service to which the data asset belongs.
    AuditStatus int
    Whether to enable the log auditing feature. Valid values: 0, 1.
    EngineType string
    The type of the database. Valid values: MySQL, SQLServer.
    Lang string
    The lang.
    LogStoreDay int
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    ParentId string
    The ID of the data asset.
    Password string
    The password that is used to connect to the database.
    Port int
    The port that is used to connect to the database.
    ResourceType string
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    ServiceRegionId string
    The region ID of the data asset.
    UserName string
    The name of the service to which the data asset belongs.
    auditStatus Integer
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engineType String
    The type of the database. Valid values: MySQL, SQLServer.
    lang String
    The lang.
    logStoreDay Integer
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parentId String
    The ID of the data asset.
    password String
    The password that is used to connect to the database.
    port Integer
    The port that is used to connect to the database.
    resourceType String
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    serviceRegionId String
    The region ID of the data asset.
    userName String
    The name of the service to which the data asset belongs.
    auditStatus number
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engineType string
    The type of the database. Valid values: MySQL, SQLServer.
    lang string
    The lang.
    logStoreDay number
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parentId string
    The ID of the data asset.
    password string
    The password that is used to connect to the database.
    port number
    The port that is used to connect to the database.
    resourceType string
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    serviceRegionId string
    The region ID of the data asset.
    userName string
    The name of the service to which the data asset belongs.
    audit_status int
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engine_type str
    The type of the database. Valid values: MySQL, SQLServer.
    lang str
    The lang.
    log_store_day int
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parent_id str
    The ID of the data asset.
    password str
    The password that is used to connect to the database.
    port int
    The port that is used to connect to the database.
    resource_type str
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    service_region_id str
    The region ID of the data asset.
    user_name str
    The name of the service to which the data asset belongs.
    auditStatus Number
    Whether to enable the log auditing feature. Valid values: 0, 1.
    engineType String
    The type of the database. Valid values: MySQL, SQLServer.
    lang String
    The lang.
    logStoreDay Number
    The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values: 180, 30, 365, 90. NOTE: Thelog_store_day is valid when the audit_status is 1.
    parentId String
    The ID of the data asset.
    password String
    The password that is used to connect to the database.
    port Number
    The port that is used to connect to the database.
    resourceType String
    The type of the service to which the data asset belongs. Valid values: MaxCompute, OSS, RDS.
    serviceRegionId String
    The region ID of the data asset.
    userName String
    The name of the service to which the data asset belongs.

    Import

    Data Security Center Data Limit can be imported using the id, e.g.

    $ pulumi import alicloud:sddp/dataLimit:DataLimit example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi
      AI Agentic Workflows: Register now