1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. threatdetection
  5. getAssets
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.threatdetection.getAssets

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    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, nil, 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:threatdetection/getAssets:getAssets
      arguments:
        # arguments dictionary

    The 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
    LogicalExp 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.
    MachineTypes string
    The type of asset to query. Value:

    • ecs: server.
    • cloud_product: Cloud product.
    NoGroupTrace bool
    Specifies whether to internationalize the name of the default group. Default value: false
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize 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
    LogicalExp 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.
    MachineTypes string
    The type of asset to query. Value:

    • ecs: server.
    • cloud_product: Cloud product.
    NoGroupTrace bool
    Specifies whether to internationalize the name of the default group. Default value: false
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize 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
    logicalExp 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.
    machineTypes String
    The type of asset to query. Value:

    • ecs: server.
    • cloud_product: Cloud product.
    noGroupTrace Boolean
    Specifies whether to internationalize the name of the default group. Default value: false
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize 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
    logicalExp 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.
    machineTypes string
    The type of asset to query. Value:

    • ecs: server.
    • cloud_product: Cloud product.
    noGroupTrace boolean
    Specifies whether to internationalize the name of the default group. Default value: false
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize 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_trace bool
    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
    logicalExp 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.
    machineTypes String
    The type of asset to query. Value:

    • ecs: server.
    • cloud_product: Cloud product.
    noGroupTrace Boolean
    Specifies whether to internationalize the name of the default group. Default value: false
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number

    getAssets Result

    The following output properties are available:

    Assets List<Pulumi.AliCloud.ThreatDetection.Outputs.GetAssetsAsset>
    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
    LogicalExp string
    MachineTypes string
    NoGroupTrace bool
    OutputFile string
    PageNumber int
    PageSize int
    Assets []GetAssetsAsset
    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
    LogicalExp string
    MachineTypes string
    NoGroupTrace bool
    OutputFile string
    PageNumber int
    PageSize int
    assets List<GetAssetsAsset>
    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
    logicalExp String
    machineTypes String
    noGroupTrace Boolean
    outputFile String
    pageNumber Integer
    pageSize Integer
    assets GetAssetsAsset[]
    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
    logicalExp string
    machineTypes string
    noGroupTrace boolean
    outputFile string
    pageNumber number
    pageSize number
    assets Sequence[GetAssetsAsset]
    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_trace bool
    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
    logicalExp String
    machineTypes String
    noGroupTrace Boolean
    outputFile String
    pageNumber Number
    pageSize Number

    Supporting Types

    GetAssetsAsset

    CreateTime string
    The creation time of the resource
    Id string
    The ID of the instance.
    Uuid string
    The UUID of the instance.
    CreateTime string
    The creation time of the resource
    Id string
    The ID of the instance.
    Uuid string
    The UUID of the instance.
    createTime String
    The creation time of the resource
    id String
    The ID of the instance.
    uuid String
    The UUID of the instance.
    createTime 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.
    createTime 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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi