Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.VulnerabilityScanning.getHostScanTarget
Explore with Pulumi AI
This data source provides details about a specific Host Scan Target resource in Oracle Cloud Infrastructure Vulnerability Scanning service.
Retrieves a 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 testHostScanTarget = oci.VulnerabilityScanning.getHostScanTarget({
    hostScanTargetId: testHostScanTargetOciVulnerabilityScanningHostScanTarget.id,
});
import pulumi
import pulumi_oci as oci
test_host_scan_target = oci.VulnerabilityScanning.get_host_scan_target(host_scan_target_id=test_host_scan_target_oci_vulnerability_scanning_host_scan_target["id"])
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.GetHostScanTarget(ctx, &vulnerabilityscanning.GetHostScanTargetArgs{
			HostScanTargetId: testHostScanTargetOciVulnerabilityScanningHostScanTarget.Id,
		}, 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 testHostScanTarget = Oci.VulnerabilityScanning.GetHostScanTarget.Invoke(new()
    {
        HostScanTargetId = testHostScanTargetOciVulnerabilityScanningHostScanTarget.Id,
    });
});
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.GetHostScanTargetArgs;
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 testHostScanTarget = VulnerabilityScanningFunctions.getHostScanTarget(GetHostScanTargetArgs.builder()
            .hostScanTargetId(testHostScanTargetOciVulnerabilityScanningHostScanTarget.id())
            .build());
    }
}
variables:
  testHostScanTarget:
    fn::invoke:
      function: oci:VulnerabilityScanning:getHostScanTarget
      arguments:
        hostScanTargetId: ${testHostScanTargetOciVulnerabilityScanningHostScanTarget.id}
Using getHostScanTarget
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 getHostScanTarget(args: GetHostScanTargetArgs, opts?: InvokeOptions): Promise<GetHostScanTargetResult>
function getHostScanTargetOutput(args: GetHostScanTargetOutputArgs, opts?: InvokeOptions): Output<GetHostScanTargetResult>def get_host_scan_target(host_scan_target_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetHostScanTargetResult
def get_host_scan_target_output(host_scan_target_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetHostScanTargetResult]func LookupHostScanTarget(ctx *Context, args *LookupHostScanTargetArgs, opts ...InvokeOption) (*LookupHostScanTargetResult, error)
func LookupHostScanTargetOutput(ctx *Context, args *LookupHostScanTargetOutputArgs, opts ...InvokeOption) LookupHostScanTargetResultOutput> Note: This function is named LookupHostScanTarget in the Go SDK.
public static class GetHostScanTarget 
{
    public static Task<GetHostScanTargetResult> InvokeAsync(GetHostScanTargetArgs args, InvokeOptions? opts = null)
    public static Output<GetHostScanTargetResult> Invoke(GetHostScanTargetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetHostScanTargetResult> getHostScanTarget(GetHostScanTargetArgs args, InvokeOptions options)
public static Output<GetHostScanTargetResult> getHostScanTarget(GetHostScanTargetArgs args, InvokeOptions options)
fn::invoke:
  function: oci:VulnerabilityScanning/getHostScanTarget:getHostScanTarget
  arguments:
    # arguments dictionaryThe following arguments are supported:
- HostScan stringTarget Id 
- unique HostScanTarget identifier
- HostScan stringTarget Id 
- unique HostScanTarget identifier
- hostScan StringTarget Id 
- unique HostScanTarget identifier
- hostScan stringTarget Id 
- unique HostScanTarget identifier
- host_scan_ strtarget_ id 
- unique HostScanTarget identifier
- hostScan StringTarget Id 
- unique HostScanTarget identifier
getHostScanTarget Result
The following output properties are available:
- CompartmentId string
- Compartment ID of the object (this).
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Target description.
- DisplayName string
- Target identifier, which can be renamed.
- 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"}
- HostScan stringRecipe Id 
- ID of the host scan recipe this target applies.
- HostScan stringTarget Id 
- Id string
- Unique identifier of the config that is immutable on creation
- InstanceIds List<string>
- List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- State string
- The current state of the config.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- TargetCompartment stringId 
- Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- TimeCreated string
- Date and time the target was created, format as described in RFC 3339
- TimeUpdated string
- Date and time the target was last updated, format as described in RFC 3339
- CompartmentId string
- Compartment ID of the object (this).
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Target description.
- DisplayName string
- Target identifier, which can be renamed.
- 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"}
- HostScan stringRecipe Id 
- ID of the host scan recipe this target applies.
- HostScan stringTarget Id 
- Id string
- Unique identifier of the config that is immutable on creation
- InstanceIds []string
- List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- State string
- The current state of the config.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- TargetCompartment stringId 
- Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- TimeCreated string
- Date and time the target was created, format as described in RFC 3339
- TimeUpdated string
- Date and time the target was last updated, format as described in RFC 3339
- compartmentId String
- Compartment ID of the object (this).
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description String
- Target description.
- displayName String
- Target identifier, which can be renamed.
- 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"}
- hostScan StringRecipe Id 
- ID of the host scan recipe this target applies.
- hostScan StringTarget Id 
- id String
- Unique identifier of the config that is immutable on creation
- instanceIds List<String>
- List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- state String
- The current state of the config.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- targetCompartment StringId 
- Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- timeCreated String
- Date and time the target was created, format as described in RFC 3339
- timeUpdated String
- Date and time the target was last updated, format as described in RFC 3339
- compartmentId string
- Compartment ID of the object (this).
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description string
- Target description.
- displayName string
- Target identifier, which can be renamed.
- {[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"}
- hostScan stringRecipe Id 
- ID of the host scan recipe this target applies.
- hostScan stringTarget Id 
- id string
- Unique identifier of the config that is immutable on creation
- instanceIds string[]
- List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- state string
- The current state of the config.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- targetCompartment stringId 
- Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- timeCreated string
- Date and time the target was created, format as described in RFC 3339
- timeUpdated string
- Date and time the target was last updated, format as described in RFC 3339
- compartment_id str
- Compartment ID of the object (this).
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description str
- Target description.
- display_name str
- Target identifier, which can be renamed.
- 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"}
- host_scan_ strrecipe_ id 
- ID of the host scan recipe this target applies.
- host_scan_ strtarget_ id 
- id str
- Unique identifier of the config that is immutable on creation
- instance_ids Sequence[str]
- List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- state str
- The current state of the config.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- target_compartment_ strid 
- Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- time_created str
- Date and time the target was created, format as described in RFC 3339
- time_updated str
- Date and time the target was last updated, format as described in RFC 3339
- compartmentId String
- Compartment ID of the object (this).
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description String
- Target description.
- displayName String
- Target identifier, which can be renamed.
- 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"}
- hostScan StringRecipe Id 
- ID of the host scan recipe this target applies.
- hostScan StringTarget Id 
- id String
- Unique identifier of the config that is immutable on creation
- instanceIds List<String>
- List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- state String
- The current state of the config.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- targetCompartment StringId 
- Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- timeCreated String
- Date and time the target was created, format as described in RFC 3339
- timeUpdated String
- Date and time the target was last updated, format as described in RFC 3339
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.