published on Saturday, Mar 14, 2026 by Pulumi
published on Saturday, Mar 14, 2026 by Pulumi
Cloud DBaudit instance resource (“Yundun_dbaudit” is the short term of this product).
NOTE: The endpoint of bssopenapi used only support “business.aliyuncs.com” at present.
NOTE: Available since v1.62.0+.
NOTE: In order to destroy Cloud DBaudit instance , users are required to apply for white list first
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const defaultGetNetworks = alicloud.vpc.getNetworks({
nameRegex: "^default-NODELETING$",
});
const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
vpcId: defaultGetNetworks.ids?.[0],
zoneId: _default.zones?.[0]?.id,
}));
const defaultDBAuditInstance = new alicloud.yundun.DBAuditInstance("default", {
description: "tf-example",
planCode: "alpha.professional",
period: 1,
vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.get_zones(available_resource_creation="VSwitch")
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
zone_id=default.zones[0].id)
default_db_audit_instance = alicloud.yundun.DBAuditInstance("default",
description="tf-example",
plan_code="alpha.professional",
period=1,
vswitch_id=default_get_switches.ids[0])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/yundun"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
NameRegex: pulumi.StringRef("^default-NODELETING$"),
}, nil)
if err != nil {
return err
}
defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
VpcId: pulumi.StringRef(defaultGetNetworks.Ids[0]),
ZoneId: pulumi.StringRef(_default.Zones[0].Id),
}, nil)
if err != nil {
return err
}
_, err = yundun.NewDBAuditInstance(ctx, "default", &yundun.DBAuditInstanceArgs{
Description: pulumi.String("tf-example"),
PlanCode: pulumi.String("alpha.professional"),
Period: pulumi.Int(1),
VswitchId: pulumi.String(defaultGetSwitches.Ids[0]),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
{
NameRegex = "^default-NODELETING$",
});
var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
{
VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
ZoneId = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
});
var defaultDBAuditInstance = new AliCloud.Yundun.DBAuditInstance("default", new()
{
Description = "tf-example",
PlanCode = "alpha.professional",
Period = 1,
VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
});
});
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.GetZonesArgs;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
import com.pulumi.alicloud.yundun.DBAuditInstance;
import com.pulumi.alicloud.yundun.DBAuditInstanceArgs;
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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
.nameRegex("^default-NODELETING$")
.build());
final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
.vpcId(defaultGetNetworks.ids()[0])
.zoneId(default_.zones()[0].id())
.build());
var defaultDBAuditInstance = new DBAuditInstance("defaultDBAuditInstance", DBAuditInstanceArgs.builder()
.description("tf-example")
.planCode("alpha.professional")
.period(1)
.vswitchId(defaultGetSwitches.ids()[0])
.build());
}
}
resources:
defaultDBAuditInstance:
type: alicloud:yundun:DBAuditInstance
name: default
properties:
description: tf-example
planCode: alpha.professional
period: '1'
vswitchId: ${defaultGetSwitches.ids[0]}
variables:
default:
fn::invoke:
function: alicloud:getZones
arguments:
availableResourceCreation: VSwitch
defaultGetNetworks:
fn::invoke:
function: alicloud:vpc:getNetworks
arguments:
nameRegex: ^default-NODELETING$
defaultGetSwitches:
fn::invoke:
function: alicloud:vpc:getSwitches
arguments:
vpcId: ${defaultGetNetworks.ids[0]}
zoneId: ${default.zones[0].id}
Deleting alicloud.yundun.DBAuditInstance or removing it from your configuration
The alicloud.yundun.DBAuditInstance resource allows you to manage yundun dbaudit instance, but Terraform cannot destroy it.
Deleting the subscription resource or removing it from your configuration
will remove it from your state file and management, but will not destroy the yundun_dbaudit_instance.
You can resume managing the subscription yundun_dbaudit_instance via the AlibabaCloud Console.
📚 Need more examples? VIEW MORE EXAMPLES
Create DBAuditInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DBAuditInstance(name: string, args: DBAuditInstanceArgs, opts?: CustomResourceOptions);@overload
def DBAuditInstance(resource_name: str,
args: DBAuditInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DBAuditInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
period: Optional[int] = None,
plan_code: Optional[str] = None,
vswitch_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewDBAuditInstance(ctx *Context, name string, args DBAuditInstanceArgs, opts ...ResourceOption) (*DBAuditInstance, error)public DBAuditInstance(string name, DBAuditInstanceArgs args, CustomResourceOptions? opts = null)
public DBAuditInstance(String name, DBAuditInstanceArgs args)
public DBAuditInstance(String name, DBAuditInstanceArgs args, CustomResourceOptions options)
type: alicloud:yundun:DBAuditInstance
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 DBAuditInstanceArgs
- 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 DBAuditInstanceArgs
- 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 DBAuditInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DBAuditInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DBAuditInstanceArgs
- 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 dbauditInstanceResource = new AliCloud.Yundun.DBAuditInstance("dbauditInstanceResource", new()
{
Description = "string",
Period = 0,
PlanCode = "string",
VswitchId = "string",
ResourceGroupId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := yundun.NewDBAuditInstance(ctx, "dbauditInstanceResource", &yundun.DBAuditInstanceArgs{
Description: pulumi.String("string"),
Period: pulumi.Int(0),
PlanCode: pulumi.String("string"),
VswitchId: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var dbauditInstanceResource = new DBAuditInstance("dbauditInstanceResource", DBAuditInstanceArgs.builder()
.description("string")
.period(0)
.planCode("string")
.vswitchId("string")
.resourceGroupId("string")
.tags(Map.of("string", "string"))
.build());
dbaudit_instance_resource = alicloud.yundun.DBAuditInstance("dbauditInstanceResource",
description="string",
period=0,
plan_code="string",
vswitch_id="string",
resource_group_id="string",
tags={
"string": "string",
})
const dbauditInstanceResource = new alicloud.yundun.DBAuditInstance("dbauditInstanceResource", {
description: "string",
period: 0,
planCode: "string",
vswitchId: "string",
resourceGroupId: "string",
tags: {
string: "string",
},
});
type: alicloud:yundun:DBAuditInstance
properties:
description: string
period: 0
planCode: string
resourceGroupId: string
tags:
string: string
vswitchId: string
DBAuditInstance 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 DBAuditInstance resource accepts the following input properties:
- Description string
- Description of the instance. This name can have a string of 1 to 63 characters.
- Period int
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- Plan
Code string - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- Vswitch
Id string - vSwtich ID configured to audit
- Resource
Group stringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Description string
- Description of the instance. This name can have a string of 1 to 63 characters.
- Period int
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- Plan
Code string - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- Vswitch
Id string - vSwtich ID configured to audit
- Resource
Group stringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- map[string]string
- A mapping of tags to assign to the resource.
- description String
- Description of the instance. This name can have a string of 1 to 63 characters.
- period Integer
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan
Code String - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- vswitch
Id String - vSwtich ID configured to audit
- resource
Group StringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Map<String,String>
- A mapping of tags to assign to the resource.
- description string
- Description of the instance. This name can have a string of 1 to 63 characters.
- period number
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan
Code string - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- vswitch
Id string - vSwtich ID configured to audit
- resource
Group stringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- description str
- Description of the instance. This name can have a string of 1 to 63 characters.
- period int
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan_
code str - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- vswitch_
id str - vSwtich ID configured to audit
- resource_
group_ strid - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- description String
- Description of the instance. This name can have a string of 1 to 63 characters.
- period Number
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan
Code String - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- vswitch
Id String - vSwtich ID configured to audit
- resource
Group StringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DBAuditInstance 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 DBAuditInstance Resource
Get an existing DBAuditInstance 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?: DBAuditInstanceState, opts?: CustomResourceOptions): DBAuditInstance@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
period: Optional[int] = None,
plan_code: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vswitch_id: Optional[str] = None) -> DBAuditInstancefunc GetDBAuditInstance(ctx *Context, name string, id IDInput, state *DBAuditInstanceState, opts ...ResourceOption) (*DBAuditInstance, error)public static DBAuditInstance Get(string name, Input<string> id, DBAuditInstanceState? state, CustomResourceOptions? opts = null)public static DBAuditInstance get(String name, Output<String> id, DBAuditInstanceState state, CustomResourceOptions options)resources: _: type: alicloud:yundun:DBAuditInstance 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.
- Description string
- Description of the instance. This name can have a string of 1 to 63 characters.
- Period int
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- Plan
Code string - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- Resource
Group stringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Vswitch
Id string - vSwtich ID configured to audit
- Description string
- Description of the instance. This name can have a string of 1 to 63 characters.
- Period int
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- Plan
Code string - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- Resource
Group stringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- map[string]string
- A mapping of tags to assign to the resource.
- Vswitch
Id string - vSwtich ID configured to audit
- description String
- Description of the instance. This name can have a string of 1 to 63 characters.
- period Integer
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan
Code String - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- resource
Group StringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Map<String,String>
- A mapping of tags to assign to the resource.
- vswitch
Id String - vSwtich ID configured to audit
- description string
- Description of the instance. This name can have a string of 1 to 63 characters.
- period number
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan
Code string - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- resource
Group stringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- vswitch
Id string - vSwtich ID configured to audit
- description str
- Description of the instance. This name can have a string of 1 to 63 characters.
- period int
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan_
code str - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- resource_
group_ strid - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- vswitch_
id str - vSwtich ID configured to audit
- description String
- Description of the instance. This name can have a string of 1 to 63 characters.
- period Number
Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".
NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi upwill not effect the resource.- plan
Code String - Plan code of the Cloud DBAudit to produce. (alpha.professional, alpha.basic, alpha.premium)
- resource
Group StringId - The Id of resource group which the DBaudit Instance belongs. If not set, the resource is created in the default resource group.
- Map<String>
- A mapping of tags to assign to the resource.
- vswitch
Id String - vSwtich ID configured to audit
Import
Yundun_dbaudit instance can be imported using the id, e.g.
$ pulumi import alicloud:yundun/dBAuditInstance:DBAuditInstance example dbaudit-exampe123456
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
alicloudTerraform Provider.
published on Saturday, Mar 14, 2026 by Pulumi
