oci.VulnerabilityScanning.getHostScanTargets
Explore with Pulumi AI
This data source provides the list of Host Scan Targets in Oracle Cloud Infrastructure Vulnerability Scanning service.
Retrieves a list of HostScanTargetSummary objects in a compartment. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testHostScanTargets = Oci.VulnerabilityScanning.GetHostScanTargets.Invoke(new()
{
CompartmentId = @var.Compartment_id,
DisplayName = @var.Host_scan_target_display_name,
State = @var.Host_scan_target_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.GetHostScanTargets(ctx, &vulnerabilityscanning.GetHostScanTargetsArgs{
CompartmentId: _var.Compartment_id,
DisplayName: pulumi.StringRef(_var.Host_scan_target_display_name),
State: pulumi.StringRef(_var.Host_scan_target_state),
}, nil)
if err != nil {
return err
}
return nil
})
}
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.GetHostScanTargetsArgs;
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 testHostScanTargets = VulnerabilityScanningFunctions.getHostScanTargets(GetHostScanTargetsArgs.builder()
.compartmentId(var_.compartment_id())
.displayName(var_.host_scan_target_display_name())
.state(var_.host_scan_target_state())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_host_scan_targets = oci.VulnerabilityScanning.get_host_scan_targets(compartment_id=var["compartment_id"],
display_name=var["host_scan_target_display_name"],
state=var["host_scan_target_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testHostScanTargets = oci.VulnerabilityScanning.getHostScanTargets({
compartmentId: _var.compartment_id,
displayName: _var.host_scan_target_display_name,
state: _var.host_scan_target_state,
});
variables:
testHostScanTargets:
fn::invoke:
Function: oci:VulnerabilityScanning:getHostScanTargets
Arguments:
compartmentId: ${var.compartment_id}
displayName: ${var.host_scan_target_display_name}
state: ${var.host_scan_target_state}
Using getHostScanTargets
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 getHostScanTargets(args: GetHostScanTargetsArgs, opts?: InvokeOptions): Promise<GetHostScanTargetsResult>
function getHostScanTargetsOutput(args: GetHostScanTargetsOutputArgs, opts?: InvokeOptions): Output<GetHostScanTargetsResult>
def get_host_scan_targets(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_vulnerabilityscanning.GetHostScanTargetsFilter]] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHostScanTargetsResult
def get_host_scan_targets_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_vulnerabilityscanning.GetHostScanTargetsFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHostScanTargetsResult]
func GetHostScanTargets(ctx *Context, args *GetHostScanTargetsArgs, opts ...InvokeOption) (*GetHostScanTargetsResult, error)
func GetHostScanTargetsOutput(ctx *Context, args *GetHostScanTargetsOutputArgs, opts ...InvokeOption) GetHostScanTargetsResultOutput
> Note: This function is named GetHostScanTargets
in the Go SDK.
public static class GetHostScanTargets
{
public static Task<GetHostScanTargetsResult> InvokeAsync(GetHostScanTargetsArgs args, InvokeOptions? opts = null)
public static Output<GetHostScanTargetsResult> Invoke(GetHostScanTargetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHostScanTargetsResult> getHostScanTargets(GetHostScanTargetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:VulnerabilityScanning/getHostScanTargets:getHostScanTargets
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string The ID of the compartment in which to list resources.
- Display
Name string A filter to return only resources that match the entire display name given.
- Filters
List<Get
Host Scan Targets Filter> - State string
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Compartment
Id string The ID of the compartment in which to list resources.
- Display
Name string A filter to return only resources that match the entire display name given.
- Filters
[]Get
Host Scan Targets Filter - State string
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- compartment
Id String The ID of the compartment in which to list resources.
- display
Name String A filter to return only resources that match the entire display name given.
- filters
List<Get
Host Scan Targets Filter> - state String
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- compartment
Id string The ID of the compartment in which to list resources.
- display
Name string A filter to return only resources that match the entire display name given.
- filters
Get
Host Scan Targets 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.
- display_
name str A filter to return only resources that match the entire display name given.
- filters
Get
Host Scan Targets Filter] - state str
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- compartment
Id String The ID of the compartment in which to list resources.
- display
Name String A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- state String
A filter to return only resources whose lifecycleState matches the given lifecycleState.
getHostScanTargets Result
The following output properties are available:
- Compartment
Id string Compartment ID of the object (this).
- Host
Scan List<GetTarget Summary Collections Host Scan Targets Host Scan Target Summary Collection> The list of host_scan_target_summary_collection.
- Id string
The provider-assigned unique ID for this managed resource.
- Display
Name string Target identifier, which can be renamed.
- Filters
List<Get
Host Scan Targets Filter> - State string
The current state of the config.
- Compartment
Id string Compartment ID of the object (this).
- Host
Scan []GetTarget Summary Collections Host Scan Targets Host Scan Target Summary Collection The list of host_scan_target_summary_collection.
- Id string
The provider-assigned unique ID for this managed resource.
- Display
Name string Target identifier, which can be renamed.
- Filters
[]Get
Host Scan Targets Filter - State string
The current state of the config.
- compartment
Id String Compartment ID of the object (this).
- host
Scan List<GetTarget Summary Collections Host Scan Targets Host Scan Target Summary Collection> The list of host_scan_target_summary_collection.
- id String
The provider-assigned unique ID for this managed resource.
- display
Name String Target identifier, which can be renamed.
- filters
List<Get
Host Scan Targets Filter> - state String
The current state of the config.
- compartment
Id string Compartment ID of the object (this).
- host
Scan GetTarget Summary Collections Host Scan Targets Host Scan Target Summary Collection[] The list of host_scan_target_summary_collection.
- id string
The provider-assigned unique ID for this managed resource.
- display
Name string Target identifier, which can be renamed.
- filters
Get
Host Scan Targets Filter[] - state string
The current state of the config.
- compartment_
id str Compartment ID of the object (this).
- host_
scan_ Gettarget_ summary_ collections Host Scan Targets Host Scan Target Summary Collection] The list of host_scan_target_summary_collection.
- id str
The provider-assigned unique ID for this managed resource.
- display_
name str Target identifier, which can be renamed.
- filters
Get
Host Scan Targets Filter] - state str
The current state of the config.
- compartment
Id String Compartment ID of the object (this).
- host
Scan List<Property Map>Target Summary Collections The list of host_scan_target_summary_collection.
- id String
The provider-assigned unique ID for this managed resource.
- display
Name String Target identifier, which can be renamed.
- filters List<Property Map>
- state String
The current state of the config.
Supporting Types
GetHostScanTargetsFilter
GetHostScanTargetsHostScanTargetSummaryCollection
GetHostScanTargetsHostScanTargetSummaryCollectionItem
- Compartment
Id string The ID of the compartment in which to list resources.
- Dictionary<string, object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
Target description.
- Display
Name string A filter to return only resources that match the entire display name given.
- 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"}
- Host
Scan stringRecipe Id ID of the host scan recipe this target applies.
- Id string
Unique identifier of the config that is immutable on creation
- Instance
Ids List<string> List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- State string
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Dictionary<string, object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Compartment stringId Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- Time
Created string Date and time the target was created, format as described in RFC 3339
- Time
Updated string Date and time the target was last updated, format as described in RFC 3339
- Compartment
Id string The ID of the compartment in which to list resources.
- map[string]interface{}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
Target description.
- Display
Name string A filter to return only resources that match the entire display name given.
- 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"}
- Host
Scan stringRecipe Id ID of the host scan recipe this target applies.
- Id string
Unique identifier of the config that is immutable on creation
- Instance
Ids []string List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- State string
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- map[string]interface{}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Compartment stringId Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- Time
Created string Date and time the target was created, format as described in RFC 3339
- Time
Updated string Date and time the target was last updated, format as described in RFC 3339
- compartment
Id String The ID of the compartment in which to list resources.
- Map<String,Object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
Target description.
- display
Name String A filter to return only resources that match the entire display name given.
- 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"}
- host
Scan StringRecipe Id ID of the host scan recipe this target applies.
- id String
Unique identifier of the config that is immutable on creation
- instance
Ids List<String> List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- state String
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Map<String,Object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Compartment StringId Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- time
Created String Date and time the target was created, format as described in RFC 3339
- time
Updated String Date and time the target was last updated, format as described in RFC 3339
- compartment
Id string The ID of the compartment in which to list resources.
- {[key: string]: any}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
Target description.
- display
Name string A filter to return only resources that match the entire display name given.
- {[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"}
- host
Scan stringRecipe Id ID of the host scan recipe this target applies.
- id string
Unique identifier of the config that is immutable on creation
- instance
Ids string[] List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- state string
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- {[key: string]: any}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Compartment stringId Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- time
Created string Date and time the target was created, format as described in RFC 3339
- time
Updated string Date and time the target was last updated, format as described in RFC 3339
- compartment_
id str The ID of the compartment in which to list resources.
- Mapping[str, Any]
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 A filter to return only resources that match the entire display name given.
- 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"}
- host_
scan_ strrecipe_ id ID of the host scan recipe this target applies.
- 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
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Mapping[str, Any]
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
- compartment
Id String The ID of the compartment in which to list resources.
- Map<Any>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
Target description.
- display
Name String A filter to return only resources that match the entire display name given.
- 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"}
- host
Scan StringRecipe Id ID of the host scan recipe this target applies.
- id String
Unique identifier of the config that is immutable on creation
- instance
Ids List<String> List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.
- state String
A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Map<Any>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Compartment StringId Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
- time
Created String Date and time the target was created, format as described in RFC 3339
- time
Updated 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.