1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. VulnerabilityScanning
  5. getHostScanTarget
Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi

oci.VulnerabilityScanning.getHostScanTarget

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 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,
    });
    
    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/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:

    HostScanTargetId string
    unique HostScanTarget identifier
    HostScanTargetId string
    unique HostScanTarget identifier
    hostScanTargetId String
    unique HostScanTarget identifier
    hostScanTargetId string
    unique HostScanTarget identifier
    host_scan_target_id str
    unique HostScanTarget identifier
    hostScanTargetId String
    unique HostScanTarget identifier

    getHostScanTarget Result

    The following output properties are available:

    CompartmentId string
    Compartment ID of the object (this).
    DefinedTags 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.
    DisplayName string
    Target identifier, which can be renamed.
    FreeformTags 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"}
    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, object>
    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]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.
    DisplayName string
    Target identifier, which can be renamed.
    FreeformTags 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"}
    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]interface{}
    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,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.
    displayName String
    Target identifier, which can be renamed.
    freeformTags 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"}
    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,Object>
    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]: 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.
    displayName string
    Target identifier, which can be renamed.
    freeformTags {[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"}
    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]: any}
    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, 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
    Target identifier, which can be renamed.
    freeform_tags 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_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, Any]
    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<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.
    displayName String
    Target identifier, which can be renamed.
    freeformTags 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"}
    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<Any>
    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.
    oci logo
    Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi