1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. VulnerabilityScanning
  5. getHostScanTargetErrors
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.VulnerabilityScanning.getHostScanTargetErrors

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides the list of Host Scan Target Errors in Oracle Cloud Infrastructure Vulnerability Scanning service.

    Retrieves list of errors during scanning on instances associated with HostScanTarget identified by the target ID. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testHostScanTargetErrors = oci.VulnerabilityScanning.getHostScanTargetErrors({
        compartmentId: _var.compartment_id,
        hostScanTargetId: oci_vulnerability_scanning_host_scan_target.test_host_scan_target.id,
        state: _var.host_scan_target_error_state,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_host_scan_target_errors = oci.VulnerabilityScanning.get_host_scan_target_errors(compartment_id=var["compartment_id"],
        host_scan_target_id=oci_vulnerability_scanning_host_scan_target["test_host_scan_target"]["id"],
        state=var["host_scan_target_error_state"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/VulnerabilityScanning"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := VulnerabilityScanning.GetHostScanTargetErrors(ctx, &vulnerabilityscanning.GetHostScanTargetErrorsArgs{
    			CompartmentId:    _var.Compartment_id,
    			HostScanTargetId: oci_vulnerability_scanning_host_scan_target.Test_host_scan_target.Id,
    			State:            pulumi.StringRef(_var.Host_scan_target_error_state),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testHostScanTargetErrors = Oci.VulnerabilityScanning.GetHostScanTargetErrors.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            HostScanTargetId = oci_vulnerability_scanning_host_scan_target.Test_host_scan_target.Id,
            State = @var.Host_scan_target_error_state,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.VulnerabilityScanning.VulnerabilityScanningFunctions;
    import com.pulumi.oci.VulnerabilityScanning.inputs.GetHostScanTargetErrorsArgs;
    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 testHostScanTargetErrors = VulnerabilityScanningFunctions.getHostScanTargetErrors(GetHostScanTargetErrorsArgs.builder()
                .compartmentId(var_.compartment_id())
                .hostScanTargetId(oci_vulnerability_scanning_host_scan_target.test_host_scan_target().id())
                .state(var_.host_scan_target_error_state())
                .build());
    
        }
    }
    
    variables:
      testHostScanTargetErrors:
        fn::invoke:
          Function: oci:VulnerabilityScanning:getHostScanTargetErrors
          Arguments:
            compartmentId: ${var.compartment_id}
            hostScanTargetId: ${oci_vulnerability_scanning_host_scan_target.test_host_scan_target.id}
            state: ${var.host_scan_target_error_state}
    

    Using getHostScanTargetErrors

    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 getHostScanTargetErrors(args: GetHostScanTargetErrorsArgs, opts?: InvokeOptions): Promise<GetHostScanTargetErrorsResult>
    function getHostScanTargetErrorsOutput(args: GetHostScanTargetErrorsOutputArgs, opts?: InvokeOptions): Output<GetHostScanTargetErrorsResult>
    def get_host_scan_target_errors(compartment_id: Optional[str] = None,
                                    filters: Optional[Sequence[_vulnerabilityscanning.GetHostScanTargetErrorsFilter]] = None,
                                    host_scan_target_id: Optional[str] = None,
                                    state: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetHostScanTargetErrorsResult
    def get_host_scan_target_errors_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[_vulnerabilityscanning.GetHostScanTargetErrorsFilterArgs]]]] = None,
                                    host_scan_target_id: Optional[pulumi.Input[str]] = None,
                                    state: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetHostScanTargetErrorsResult]
    func GetHostScanTargetErrors(ctx *Context, args *GetHostScanTargetErrorsArgs, opts ...InvokeOption) (*GetHostScanTargetErrorsResult, error)
    func GetHostScanTargetErrorsOutput(ctx *Context, args *GetHostScanTargetErrorsOutputArgs, opts ...InvokeOption) GetHostScanTargetErrorsResultOutput

    > Note: This function is named GetHostScanTargetErrors in the Go SDK.

    public static class GetHostScanTargetErrors 
    {
        public static Task<GetHostScanTargetErrorsResult> InvokeAsync(GetHostScanTargetErrorsArgs args, InvokeOptions? opts = null)
        public static Output<GetHostScanTargetErrorsResult> Invoke(GetHostScanTargetErrorsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHostScanTargetErrorsResult> getHostScanTargetErrors(GetHostScanTargetErrorsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:VulnerabilityScanning/getHostScanTargetErrors:getHostScanTargetErrors
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    HostScanTargetId string
    unique HostScanTarget identifier
    Filters List<GetHostScanTargetErrorsFilter>
    State string
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    CompartmentId string
    The ID of the compartment in which to list resources.
    HostScanTargetId string
    unique HostScanTarget identifier
    Filters []GetHostScanTargetErrorsFilter
    State string
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    hostScanTargetId String
    unique HostScanTarget identifier
    filters List<GetHostScanTargetErrorsFilter>
    state String
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    compartmentId string
    The ID of the compartment in which to list resources.
    hostScanTargetId string
    unique HostScanTarget identifier
    filters GetHostScanTargetErrorsFilter[]
    state string
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    compartment_id str
    The ID of the compartment in which to list resources.
    host_scan_target_id str
    unique HostScanTarget identifier
    filters Sequence[vulnerabilityscanning.GetHostScanTargetErrorsFilter]
    state str
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    hostScanTargetId String
    unique HostScanTarget identifier
    filters List<Property Map>
    state String
    A filter to return only resources whose lifecycleState matches the given lifecycleState.

    getHostScanTargetErrors Result

    The following output properties are available:

    CompartmentId string
    HostScanTargetErrorSummaryCollections List<GetHostScanTargetErrorsHostScanTargetErrorSummaryCollection>
    The list of host_scan_target_error_summary_collection.
    HostScanTargetId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters List<GetHostScanTargetErrorsFilter>
    State string
    The current state of the config.
    CompartmentId string
    HostScanTargetErrorSummaryCollections []GetHostScanTargetErrorsHostScanTargetErrorSummaryCollection
    The list of host_scan_target_error_summary_collection.
    HostScanTargetId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters []GetHostScanTargetErrorsFilter
    State string
    The current state of the config.
    compartmentId String
    hostScanTargetErrorSummaryCollections List<GetHostScanTargetErrorsHostScanTargetErrorSummaryCollection>
    The list of host_scan_target_error_summary_collection.
    hostScanTargetId String
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<GetHostScanTargetErrorsFilter>
    state String
    The current state of the config.
    compartmentId string
    hostScanTargetErrorSummaryCollections GetHostScanTargetErrorsHostScanTargetErrorSummaryCollection[]
    The list of host_scan_target_error_summary_collection.
    hostScanTargetId string
    id string
    The provider-assigned unique ID for this managed resource.
    filters GetHostScanTargetErrorsFilter[]
    state string
    The current state of the config.
    compartment_id str
    host_scan_target_error_summary_collections Sequence[vulnerabilityscanning.GetHostScanTargetErrorsHostScanTargetErrorSummaryCollection]
    The list of host_scan_target_error_summary_collection.
    host_scan_target_id str
    id str
    The provider-assigned unique ID for this managed resource.
    filters Sequence[vulnerabilityscanning.GetHostScanTargetErrorsFilter]
    state str
    The current state of the config.
    compartmentId String
    hostScanTargetErrorSummaryCollections List<Property Map>
    The list of host_scan_target_error_summary_collection.
    hostScanTargetId String
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<Property Map>
    state String
    The current state of the config.

    Supporting Types

    GetHostScanTargetErrorsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetHostScanTargetErrorsHostScanTargetErrorSummaryCollection

    Items List<GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItem>
    The HostScanTargetError objects in the collection.
    Items []GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItem
    The HostScanTargetError objects in the collection.
    items List<GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItem>
    The HostScanTargetError objects in the collection.
    items GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItem[]
    The HostScanTargetError objects in the collection.
    items List<Property Map>
    The HostScanTargetError objects in the collection.

    GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItem

    Items []GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItemItem
    The HostScanTargetError objects in the collection.
    items GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItemItem[]
    The HostScanTargetError objects in the collection.
    items List<Property Map>
    The HostScanTargetError objects in the collection.

    GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItemItem

    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    ErrorCode string
    Error code of task failure.
    FreeformTags Dictionary<string, object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    InstanceId string
    OCID of the host instance where scan was done.
    Message string
    Error message detailing task failure.
    State string
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    Task string
    Task during scan which failed.
    TimeUpdated string
    Date and time the error was updated, format as described in RFC 3339.
    Vendor string
    Vendor which was used for the host scan agent.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    ErrorCode string
    Error code of task failure.
    FreeformTags map[string]interface{}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    InstanceId string
    OCID of the host instance where scan was done.
    Message string
    Error message detailing task failure.
    State string
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    Task string
    Task during scan which failed.
    TimeUpdated string
    Date and time the error was updated, format as described in RFC 3339.
    Vendor string
    Vendor which was used for the host scan agent.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    errorCode String
    Error code of task failure.
    freeformTags Map<String,Object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    instanceId String
    OCID of the host instance where scan was done.
    message String
    Error message detailing task failure.
    state String
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    task String
    Task during scan which failed.
    timeUpdated String
    Date and time the error was updated, format as described in RFC 3339.
    vendor String
    Vendor which was used for the host scan agent.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    errorCode string
    Error code of task failure.
    freeformTags {[key: string]: any}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    instanceId string
    OCID of the host instance where scan was done.
    message string
    Error message detailing task failure.
    state string
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    task string
    Task during scan which failed.
    timeUpdated string
    Date and time the error was updated, format as described in RFC 3339.
    vendor string
    Vendor which was used for the host scan agent.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    error_code str
    Error code of task failure.
    freeform_tags Mapping[str, Any]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    instance_id str
    OCID of the host instance where scan was done.
    message str
    Error message detailing task failure.
    state str
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    task str
    Task during scan which failed.
    time_updated str
    Date and time the error was updated, format as described in RFC 3339.
    vendor str
    Vendor which was used for the host scan agent.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    errorCode String
    Error code of task failure.
    freeformTags Map<Any>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    instanceId String
    OCID of the host instance where scan was done.
    message String
    Error message detailing task failure.
    state String
    A filter to return only resources whose lifecycleState matches the given lifecycleState.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    task String
    Task during scan which failed.
    timeUpdated String
    Date and time the error was updated, format as described in RFC 3339.
    vendor String
    Vendor which was used for the host scan agent.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi