Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.threatdetection.getAssets
Explore with Pulumi AI
This data source provides Threat Detection Asset available to the user.What is Asset
NOTE: Available since v1.195.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.threatdetection.getAssets({});
export const alicloudThreatDetectionAssetExampleId = _default.then(_default => _default.assets?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.threatdetection.get_assets()
pulumi.export("alicloudThreatDetectionAssetExampleId", default.assets[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/threatdetection"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := threatdetection.GetAssets(ctx, &threatdetection.GetAssetsArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("alicloudThreatDetectionAssetExampleId", _default.Assets[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.ThreatDetection.GetAssets.Invoke();
    return new Dictionary<string, object?>
    {
        ["alicloudThreatDetectionAssetExampleId"] = @default.Apply(@default => @default.Apply(getAssetsResult => getAssetsResult.Assets[0]?.Id)),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.threatdetection.ThreatdetectionFunctions;
import com.pulumi.alicloud.threatdetection.inputs.GetAssetsArgs;
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 = ThreatdetectionFunctions.getAssets();
        ctx.export("alicloudThreatDetectionAssetExampleId", default_.assets()[0].id());
    }
}
variables:
  default:
    fn::invoke:
      function: alicloud:threatdetection:getAssets
      arguments: {}
outputs:
  alicloudThreatDetectionAssetExampleId: ${default.assets[0].id}
Using getAssets
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 getAssets(args: GetAssetsArgs, opts?: InvokeOptions): Promise<GetAssetsResult>
function getAssetsOutput(args: GetAssetsOutputArgs, opts?: InvokeOptions): Output<GetAssetsResult>def get_assets(criteria: Optional[str] = None,
               ids: Optional[Sequence[str]] = None,
               importance: Optional[int] = None,
               logical_exp: Optional[str] = None,
               machine_types: Optional[str] = None,
               no_group_trace: Optional[bool] = None,
               output_file: Optional[str] = None,
               page_number: Optional[int] = None,
               page_size: Optional[int] = None,
               opts: Optional[InvokeOptions] = None) -> GetAssetsResult
def get_assets_output(criteria: Optional[pulumi.Input[str]] = None,
               ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               importance: Optional[pulumi.Input[int]] = None,
               logical_exp: Optional[pulumi.Input[str]] = None,
               machine_types: Optional[pulumi.Input[str]] = None,
               no_group_trace: Optional[pulumi.Input[bool]] = None,
               output_file: Optional[pulumi.Input[str]] = None,
               page_number: Optional[pulumi.Input[int]] = None,
               page_size: Optional[pulumi.Input[int]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetAssetsResult]func GetAssets(ctx *Context, args *GetAssetsArgs, opts ...InvokeOption) (*GetAssetsResult, error)
func GetAssetsOutput(ctx *Context, args *GetAssetsOutputArgs, opts ...InvokeOption) GetAssetsResultOutput> Note: This function is named GetAssets in the Go SDK.
public static class GetAssets 
{
    public static Task<GetAssetsResult> InvokeAsync(GetAssetsArgs args, InvokeOptions? opts = null)
    public static Output<GetAssetsResult> Invoke(GetAssetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAssetsResult> getAssets(GetAssetsArgs args, InvokeOptions options)
public static Output<GetAssetsResult> getAssets(GetAssetsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:threatdetection/getAssets:getAssets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Criteria string
 - Set the conditions for searching assets. This parameter is in JSON format. Note the case when you enter the parameter. NOTE: You can search for assets by using conditions such as the instance ID, instance name, VPC ID, region, and public IP address of the asset.
 - Ids List<string>
 - A list of Asset IDs.
 - Importance int
 - Set asset importance. Value:
- 2: Significant assets
 - 1: General assets
 - 0: Test asset
 
 - Logical
Exp string - Set the logical relationship between multiple search conditions. The default value is OR. Valid values:
- OR: indicates that the relationship between multiple search conditions is OR.
 - AND: indicates that the relationship between multiple search conditions is AND.
 
 - Machine
Types string - The type of asset to query. Value:
- ecs: server.
 - cloud_product: Cloud product.
 
 - No
Group boolTrace  - Specifies whether to internationalize the name of the default group. Default value: false
 - Output
File string - File name where to save data source results (after running 
pulumi preview). - Page
Number int - Page
Size int 
- Criteria string
 - Set the conditions for searching assets. This parameter is in JSON format. Note the case when you enter the parameter. NOTE: You can search for assets by using conditions such as the instance ID, instance name, VPC ID, region, and public IP address of the asset.
 - Ids []string
 - A list of Asset IDs.
 - Importance int
 - Set asset importance. Value:
- 2: Significant assets
 - 1: General assets
 - 0: Test asset
 
 - Logical
Exp string - Set the logical relationship between multiple search conditions. The default value is OR. Valid values:
- OR: indicates that the relationship between multiple search conditions is OR.
 - AND: indicates that the relationship between multiple search conditions is AND.
 
 - Machine
Types string - The type of asset to query. Value:
- ecs: server.
 - cloud_product: Cloud product.
 
 - No
Group boolTrace  - Specifies whether to internationalize the name of the default group. Default value: false
 - Output
File string - File name where to save data source results (after running 
pulumi preview). - Page
Number int - Page
Size int 
- criteria String
 - Set the conditions for searching assets. This parameter is in JSON format. Note the case when you enter the parameter. NOTE: You can search for assets by using conditions such as the instance ID, instance name, VPC ID, region, and public IP address of the asset.
 - ids List<String>
 - A list of Asset IDs.
 - importance Integer
 - Set asset importance. Value:
- 2: Significant assets
 - 1: General assets
 - 0: Test asset
 
 - logical
Exp String - Set the logical relationship between multiple search conditions. The default value is OR. Valid values:
- OR: indicates that the relationship between multiple search conditions is OR.
 - AND: indicates that the relationship between multiple search conditions is AND.
 
 - machine
Types String - The type of asset to query. Value:
- ecs: server.
 - cloud_product: Cloud product.
 
 - no
Group BooleanTrace  - Specifies whether to internationalize the name of the default group. Default value: false
 - output
File String - File name where to save data source results (after running 
pulumi preview). - page
Number Integer - page
Size Integer 
- criteria string
 - Set the conditions for searching assets. This parameter is in JSON format. Note the case when you enter the parameter. NOTE: You can search for assets by using conditions such as the instance ID, instance name, VPC ID, region, and public IP address of the asset.
 - ids string[]
 - A list of Asset IDs.
 - importance number
 - Set asset importance. Value:
- 2: Significant assets
 - 1: General assets
 - 0: Test asset
 
 - logical
Exp string - Set the logical relationship between multiple search conditions. The default value is OR. Valid values:
- OR: indicates that the relationship between multiple search conditions is OR.
 - AND: indicates that the relationship between multiple search conditions is AND.
 
 - machine
Types string - The type of asset to query. Value:
- ecs: server.
 - cloud_product: Cloud product.
 
 - no
Group booleanTrace  - Specifies whether to internationalize the name of the default group. Default value: false
 - output
File string - File name where to save data source results (after running 
pulumi preview). - page
Number number - page
Size number 
- criteria str
 - Set the conditions for searching assets. This parameter is in JSON format. Note the case when you enter the parameter. NOTE: You can search for assets by using conditions such as the instance ID, instance name, VPC ID, region, and public IP address of the asset.
 - ids Sequence[str]
 - A list of Asset IDs.
 - importance int
 - Set asset importance. Value:
- 2: Significant assets
 - 1: General assets
 - 0: Test asset
 
 - logical_
exp str - Set the logical relationship between multiple search conditions. The default value is OR. Valid values:
- OR: indicates that the relationship between multiple search conditions is OR.
 - AND: indicates that the relationship between multiple search conditions is AND.
 
 - machine_
types str - The type of asset to query. Value:
- ecs: server.
 - cloud_product: Cloud product.
 
 - no_
group_ booltrace  - Specifies whether to internationalize the name of the default group. Default value: false
 - output_
file str - File name where to save data source results (after running 
pulumi preview). - page_
number int - page_
size int 
- criteria String
 - Set the conditions for searching assets. This parameter is in JSON format. Note the case when you enter the parameter. NOTE: You can search for assets by using conditions such as the instance ID, instance name, VPC ID, region, and public IP address of the asset.
 - ids List<String>
 - A list of Asset IDs.
 - importance Number
 - Set asset importance. Value:
- 2: Significant assets
 - 1: General assets
 - 0: Test asset
 
 - logical
Exp String - Set the logical relationship between multiple search conditions. The default value is OR. Valid values:
- OR: indicates that the relationship between multiple search conditions is OR.
 - AND: indicates that the relationship between multiple search conditions is AND.
 
 - machine
Types String - The type of asset to query. Value:
- ecs: server.
 - cloud_product: Cloud product.
 
 - no
Group BooleanTrace  - Specifies whether to internationalize the name of the default group. Default value: false
 - output
File String - File name where to save data source results (after running 
pulumi preview). - page
Number Number - page
Size Number 
getAssets Result
The following output properties are available:
- Assets
List<Pulumi.
Ali Cloud. Threat Detection. Outputs. Get Assets Asset>  - A list of Asset Entries. Each element contains the following attributes:
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids List<string>
 - A list of Asset IDs.
 - Criteria string
 - Importance int
 - Logical
Exp string - Machine
Types string - No
Group boolTrace  - Output
File string - Page
Number int - Page
Size int 
- Assets
[]Get
Assets Asset  - A list of Asset Entries. Each element contains the following attributes:
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids []string
 - A list of Asset IDs.
 - Criteria string
 - Importance int
 - Logical
Exp string - Machine
Types string - No
Group boolTrace  - Output
File string - Page
Number int - Page
Size int 
- assets
List<Get
Assets Asset>  - A list of Asset Entries. Each element contains the following attributes:
 - id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - A list of Asset IDs.
 - criteria String
 - importance Integer
 - logical
Exp String - machine
Types String - no
Group BooleanTrace  - output
File String - page
Number Integer - page
Size Integer 
- assets
Get
Assets Asset[]  - A list of Asset Entries. Each element contains the following attributes:
 - id string
 - The provider-assigned unique ID for this managed resource.
 - ids string[]
 - A list of Asset IDs.
 - criteria string
 - importance number
 - logical
Exp string - machine
Types string - no
Group booleanTrace  - output
File string - page
Number number - page
Size number 
- assets
Sequence[Get
Assets Asset]  - A list of Asset Entries. Each element contains the following attributes:
 - id str
 - The provider-assigned unique ID for this managed resource.
 - ids Sequence[str]
 - A list of Asset IDs.
 - criteria str
 - importance int
 - logical_
exp str - machine_
types str - no_
group_ booltrace  - output_
file str - page_
number int - page_
size int 
- assets List<Property Map>
 - A list of Asset Entries. Each element contains the following attributes:
 - id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - A list of Asset IDs.
 - criteria String
 - importance Number
 - logical
Exp String - machine
Types String - no
Group BooleanTrace  - output
File String - page
Number Number - page
Size Number 
Supporting Types
GetAssetsAsset  
- Create
Time string - The creation time of the resource
 - Id string
 - The ID of the instance.
 - Uuid string
 - The UUID of the instance.
 
- Create
Time string - The creation time of the resource
 - Id string
 - The ID of the instance.
 - Uuid string
 - The UUID of the instance.
 
- create
Time String - The creation time of the resource
 - id String
 - The ID of the instance.
 - uuid String
 - The UUID of the instance.
 
- create
Time string - The creation time of the resource
 - id string
 - The ID of the instance.
 - uuid string
 - The UUID of the instance.
 
- create_
time str - The creation time of the resource
 - id str
 - The ID of the instance.
 - uuid str
 - The UUID of the instance.
 
- create
Time String - The creation time of the resource
 - id String
 - The ID of the instance.
 - uuid String
 - The UUID of the instance.
 
Package Details
- Repository
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.