1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. VulnerabilityScanning
  5. getHostScanTarget
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.VulnerabilityScanning.getHostScanTarget

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

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,
});
Copy
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"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testHostScanTarget:
    fn::invoke:
      function: oci:VulnerabilityScanning:getHostScanTarget
      arguments:
        hostScanTargetId: ${testHostScanTargetOciVulnerabilityScanningHostScanTarget.id}
Copy

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>
Copy
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]
Copy
func GetHostScanTarget(ctx *Context, args *GetHostScanTargetArgs, opts ...InvokeOption) (*GetHostScanTargetResult, error)
func GetHostScanTargetOutput(ctx *Context, args *GetHostScanTargetOutputArgs, opts ...InvokeOption) GetHostScanTargetResultOutput
Copy

> Note: This function is named GetHostScanTarget 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)
}
Copy
public static CompletableFuture<GetHostScanTargetResult> getHostScanTarget(GetHostScanTargetArgs args, InvokeOptions options)
public static Output<GetHostScanTargetResult> getHostScanTarget(GetHostScanTargetArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:VulnerabilityScanning/getHostScanTarget:getHostScanTarget
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

HostScanTargetId This property is required. string
unique HostScanTarget identifier
HostScanTargetId This property is required. string
unique HostScanTarget identifier
hostScanTargetId This property is required. String
unique HostScanTarget identifier
hostScanTargetId This property is required. string
unique HostScanTarget identifier
host_scan_target_id This property is required. str
unique HostScanTarget identifier
hostScanTargetId This property is required. String
unique HostScanTarget identifier

getHostScanTarget Result

The following output properties are available:

CompartmentId string
Compartment ID of the object (this).
DefinedTags 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.
FreeformTags 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"}
HostScanRecipeId string
ID of the host scan recipe this target applies.
HostScanTargetId string
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.
SystemTags Dictionary<string, string>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TargetCompartmentId string
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).
DefinedTags 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.
FreeformTags 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"}
HostScanRecipeId string
ID of the host scan recipe this target applies.
HostScanTargetId string
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.
SystemTags map[string]string
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TargetCompartmentId string
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).
definedTags 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.
freeformTags 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"}
hostScanRecipeId String
ID of the host scan recipe this target applies.
hostScanTargetId String
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.
systemTags Map<String,String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
targetCompartmentId String
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).
definedTags {[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.
freeformTags {[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"}
hostScanRecipeId string
ID of the host scan recipe this target applies.
hostScanTargetId string
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.
systemTags {[key: string]: string}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
targetCompartmentId string
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).
defined_tags 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.
freeform_tags 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_recipe_id str
ID of the host scan recipe this target applies.
host_scan_target_id str
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.
system_tags Mapping[str, str]
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
target_compartment_id str
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).
definedTags 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.
freeformTags 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"}
hostScanRecipeId String
ID of the host scan recipe this target applies.
hostScanTargetId String
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.
systemTags Map<String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
targetCompartmentId String
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 oci Terraform Provider.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi