Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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 GetHostScanTarget(ctx *Context, args *GetHostScanTargetArgs, opts ...InvokeOption) (*GetHostScanTargetResult, error)
func GetHostScanTargetOutput(ctx *Context, args *GetHostScanTargetOutputArgs, opts ...InvokeOption) GetHostScanTargetResultOutput
> 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)
}
public static CompletableFuture<GetHostScanTargetResult> getHostScanTarget(GetHostScanTargetArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:VulnerabilityScanning/getHostScanTarget:getHostScanTarget
arguments:
# arguments dictionary
The following arguments are supported:
- Host
Scan stringTarget Id - unique HostScanTarget identifier
- Host
Scan stringTarget Id - unique HostScanTarget identifier
- host
Scan StringTarget Id - unique HostScanTarget identifier
- host
Scan stringTarget Id - unique HostScanTarget identifier
- host_
scan_ strtarget_ id - unique HostScanTarget identifier
- host
Scan StringTarget Id - unique HostScanTarget identifier
getHostScanTarget Result
The following output properties are available:
- Compartment
Id 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.
- Display
Name 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"}
- Host
Scan stringRecipe Id - ID of the host scan recipe this target applies.
- Host
Scan stringTarget Id - 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
- 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"}
- 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 - 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.
- Display
Name 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"}
- Host
Scan stringRecipe Id - ID of the host scan recipe this target applies.
- Host
Scan stringTarget Id - 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
- 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"}
- 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 - 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.
- display
Name 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"}
- host
Scan StringRecipe Id - ID of the host scan recipe this target applies.
- host
Scan StringTarget Id - 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
- 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"}
- 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 - 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.
- display
Name 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"}
- host
Scan stringRecipe Id - ID of the host scan recipe this target applies.
- host
Scan stringTarget Id - 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
- 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"}
- 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 - 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
- compartment
Id 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.
- display
Name 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"}
- host
Scan StringRecipe Id - ID of the host scan recipe this target applies.
- host
Scan StringTarget Id - 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
- 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"}
- 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.