oci.VulnerabilityScanning.getHostScanTargetErrors
Explore with Pulumi AI
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: compartmentId,
    hostScanTargetId: testHostScanTarget.id,
    state: hostScanTargetErrorState,
});
import pulumi
import pulumi_oci as oci
test_host_scan_target_errors = oci.VulnerabilityScanning.get_host_scan_target_errors(compartment_id=compartment_id,
    host_scan_target_id=test_host_scan_target["id"],
    state=host_scan_target_error_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/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:    compartmentId,
			HostScanTargetId: testHostScanTarget.Id,
			State:            pulumi.StringRef(hostScanTargetErrorState),
		}, 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 = compartmentId,
        HostScanTargetId = testHostScanTarget.Id,
        State = hostScanTargetErrorState,
    });
});
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(compartmentId)
            .hostScanTargetId(testHostScanTarget.id())
            .state(hostScanTargetErrorState)
            .build());
    }
}
variables:
  testHostScanTargetErrors:
    fn::invoke:
      function: oci:VulnerabilityScanning:getHostScanTargetErrors
      arguments:
        compartmentId: ${compartmentId}
        hostScanTargetId: ${testHostScanTarget.id}
        state: ${hostScanTargetErrorState}
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[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[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)
public static Output<GetHostScanTargetErrorsResult> getHostScanTargetErrors(GetHostScanTargetErrorsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:VulnerabilityScanning/getHostScanTargetErrors:getHostScanTargetErrors
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The ID of the compartment in which to list resources.
- HostScan stringTarget Id 
- unique HostScanTarget identifier
- Filters
List<GetHost Scan Target Errors Filter> 
- 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.
- HostScan stringTarget Id 
- unique HostScanTarget identifier
- Filters
[]GetHost Scan Target Errors Filter 
- 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.
- hostScan StringTarget Id 
- unique HostScanTarget identifier
- filters
List<GetHost Scan Target Errors Filter> 
- 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.
- hostScan stringTarget Id 
- unique HostScanTarget identifier
- filters
GetHost Scan Target Errors Filter[] 
- 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_ strtarget_ id 
- unique HostScanTarget identifier
- filters
Sequence[GetHost Scan Target Errors Filter] 
- 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.
- hostScan StringTarget Id 
- 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
- HostScan List<GetTarget Error Summary Collections Host Scan Target Errors Host Scan Target Error Summary Collection> 
- The list of host_scan_target_error_summary_collection.
- HostScan stringTarget Id 
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<GetHost Scan Target Errors Filter> 
- State string
- The current state of the config.
- CompartmentId string
- HostScan []GetTarget Error Summary Collections Host Scan Target Errors Host Scan Target Error Summary Collection 
- The list of host_scan_target_error_summary_collection.
- HostScan stringTarget Id 
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]GetHost Scan Target Errors Filter 
- State string
- The current state of the config.
- compartmentId String
- hostScan List<GetTarget Error Summary Collections Host Scan Target Errors Host Scan Target Error Summary Collection> 
- The list of host_scan_target_error_summary_collection.
- hostScan StringTarget Id 
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<GetHost Scan Target Errors Filter> 
- state String
- The current state of the config.
- compartmentId string
- hostScan GetTarget Error Summary Collections Host Scan Target Errors Host Scan Target Error Summary Collection[] 
- The list of host_scan_target_error_summary_collection.
- hostScan stringTarget Id 
- id string
- The provider-assigned unique ID for this managed resource.
- filters
GetHost Scan Target Errors Filter[] 
- state string
- The current state of the config.
- compartment_id str
- host_scan_ Sequence[Gettarget_ error_ summary_ collections Host Scan Target Errors Host Scan Target Error Summary Collection] 
- The list of host_scan_target_error_summary_collection.
- host_scan_ strtarget_ id 
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[GetHost Scan Target Errors Filter] 
- state str
- The current state of the config.
- compartmentId String
- hostScan List<Property Map>Target Error Summary Collections 
- The list of host_scan_target_error_summary_collection.
- hostScan StringTarget Id 
- 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     
GetHostScanTargetErrorsHostScanTargetErrorSummaryCollection          
- Items
List<GetHost Scan Target Errors Host Scan Target Error Summary Collection Item> 
- The HostScanTargetError objects in the collection.
- Items
[]GetHost Scan Target Errors Host Scan Target Error Summary Collection Item 
- The HostScanTargetError objects in the collection.
- items
List<GetHost Scan Target Errors Host Scan Target Error Summary Collection Item> 
- The HostScanTargetError objects in the collection.
- items
GetHost Scan Target Errors Host Scan Target Error Summary Collection Item[] 
- The HostScanTargetError objects in the collection.
- items
Sequence[GetHost Scan Target Errors Host Scan Target Error Summary Collection Item] 
- The HostScanTargetError objects in the collection.
- items List<Property Map>
- The HostScanTargetError objects in the collection.
GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItem           
- Items
List<GetHost Scan Target Errors Host Scan Target Error Summary Collection Item Item> 
- The HostScanTargetError objects in the collection.
- Items
[]GetHost Scan Target Errors Host Scan Target Error Summary Collection Item Item 
- The HostScanTargetError objects in the collection.
- items
List<GetHost Scan Target Errors Host Scan Target Error Summary Collection Item Item> 
- The HostScanTargetError objects in the collection.
- items
GetHost Scan Target Errors Host Scan Target Error Summary Collection Item Item[] 
- The HostScanTargetError objects in the collection.
- items
Sequence[GetHost Scan Target Errors Host Scan Target Error Summary Collection Item Item] 
- The HostScanTargetError objects in the collection.
- items List<Property Map>
- The HostScanTargetError objects in the collection.
GetHostScanTargetErrorsHostScanTargetErrorSummaryCollectionItemItem            
- Dictionary<string, string>
- 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.
- Dictionary<string, string>
- 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.
- Dictionary<string, string>
- 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.
- map[string]string
- 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.
- map[string]string
- 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.
- map[string]string
- 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.
- Map<String,String>
- 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.
- Map<String,String>
- 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.
- Map<String,String>
- 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.
- {[key: string]: string}
- 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.
- {[key: string]: string}
- 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.
- {[key: string]: string}
- 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.
- Mapping[str, str]
- 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.
- Mapping[str, str]
- 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.
- Mapping[str, str]
- 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.
- Map<String>
- 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.
- Map<String>
- 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.
- Map<String>
- 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 ociTerraform Provider.