1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. VulnerabilityScanning
  5. getContainerScanTarget
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.VulnerabilityScanning.getContainerScanTarget

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about a specific Container Scan Target resource in Oracle Cloud Infrastructure Vulnerability Scanning service.

    Gets a ContainerScanTarget identified by the target ID. A container scan target specifies a group of one or more Docker image repositories in Oracle Cloud Infrastructure Registry (OCIR) that you want routinely scanned for security vulnerabilities.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testContainerScanTarget = oci.VulnerabilityScanning.getContainerScanTarget({
        containerScanTargetId: testContainerScanTargetOciVulnerabilityScanningContainerScanTarget.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_container_scan_target = oci.VulnerabilityScanning.get_container_scan_target(container_scan_target_id=test_container_scan_target_oci_vulnerability_scanning_container_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.GetContainerScanTarget(ctx, &vulnerabilityscanning.GetContainerScanTargetArgs{
    			ContainerScanTargetId: testContainerScanTargetOciVulnerabilityScanningContainerScanTarget.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 testContainerScanTarget = Oci.VulnerabilityScanning.GetContainerScanTarget.Invoke(new()
        {
            ContainerScanTargetId = testContainerScanTargetOciVulnerabilityScanningContainerScanTarget.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.GetContainerScanTargetArgs;
    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 testContainerScanTarget = VulnerabilityScanningFunctions.getContainerScanTarget(GetContainerScanTargetArgs.builder()
                .containerScanTargetId(testContainerScanTargetOciVulnerabilityScanningContainerScanTarget.id())
                .build());
    
        }
    }
    
    variables:
      testContainerScanTarget:
        fn::invoke:
          Function: oci:VulnerabilityScanning:getContainerScanTarget
          Arguments:
            containerScanTargetId: ${testContainerScanTargetOciVulnerabilityScanningContainerScanTarget.id}
    

    Using getContainerScanTarget

    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 getContainerScanTarget(args: GetContainerScanTargetArgs, opts?: InvokeOptions): Promise<GetContainerScanTargetResult>
    function getContainerScanTargetOutput(args: GetContainerScanTargetOutputArgs, opts?: InvokeOptions): Output<GetContainerScanTargetResult>
    def get_container_scan_target(container_scan_target_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetContainerScanTargetResult
    def get_container_scan_target_output(container_scan_target_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetContainerScanTargetResult]
    func GetContainerScanTarget(ctx *Context, args *GetContainerScanTargetArgs, opts ...InvokeOption) (*GetContainerScanTargetResult, error)
    func GetContainerScanTargetOutput(ctx *Context, args *GetContainerScanTargetOutputArgs, opts ...InvokeOption) GetContainerScanTargetResultOutput

    > Note: This function is named GetContainerScanTarget in the Go SDK.

    public static class GetContainerScanTarget 
    {
        public static Task<GetContainerScanTargetResult> InvokeAsync(GetContainerScanTargetArgs args, InvokeOptions? opts = null)
        public static Output<GetContainerScanTargetResult> Invoke(GetContainerScanTargetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContainerScanTargetResult> getContainerScanTarget(GetContainerScanTargetArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:VulnerabilityScanning/getContainerScanTarget:getContainerScanTarget
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ContainerScanTargetId string
    unique ContainerScanTarget identifier
    ContainerScanTargetId string
    unique ContainerScanTarget identifier
    containerScanTargetId String
    unique ContainerScanTarget identifier
    containerScanTargetId string
    unique ContainerScanTarget identifier
    container_scan_target_id str
    unique ContainerScanTarget identifier
    containerScanTargetId String
    unique ContainerScanTarget identifier

    getContainerScanTarget Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    ContainerScanRecipeId string
    ID of the container scan recipe this target applies.
    ContainerScanTargetId string
    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
    User friendly name of container scan target
    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"}
    Id string
    The OCID of container scan target. Immutable and generated on creation.
    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"}
    TargetRegistries List<GetContainerScanTargetTargetRegistry>
    Registry information for a container scan target
    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
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    ContainerScanRecipeId string
    ID of the container scan recipe this target applies.
    ContainerScanTargetId string
    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
    User friendly name of container scan target
    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"}
    Id string
    The OCID of container scan target. Immutable and generated on creation.
    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"}
    TargetRegistries []GetContainerScanTargetTargetRegistry
    Registry information for a container scan target
    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
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    containerScanRecipeId String
    ID of the container scan recipe this target applies.
    containerScanTargetId String
    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
    User friendly name of container scan target
    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"}
    id String
    The OCID of container scan target. Immutable and generated on creation.
    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"}
    targetRegistries List<GetContainerScanTargetTargetRegistry>
    Registry information for a container scan target
    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
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    containerScanRecipeId string
    ID of the container scan recipe this target applies.
    containerScanTargetId string
    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
    User friendly name of container scan target
    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"}
    id string
    The OCID of container scan target. Immutable and generated on creation.
    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"}
    targetRegistries GetContainerScanTargetTargetRegistry[]
    Registry information for a container scan target
    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
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    container_scan_recipe_id str
    ID of the container scan recipe this target applies.
    container_scan_target_id str
    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
    User friendly name of container scan target
    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"}
    id str
    The OCID of container scan target. Immutable and generated on creation.
    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_registries Sequence[vulnerabilityscanning.GetContainerScanTargetTargetRegistry]
    Registry information for a container scan target
    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
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    containerScanRecipeId String
    ID of the container scan recipe this target applies.
    containerScanTargetId String
    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
    User friendly name of container scan target
    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"}
    id String
    The OCID of container scan target. Immutable and generated on creation.
    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"}
    targetRegistries List<Property Map>
    Registry information for a container scan target
    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

    Supporting Types

    GetContainerScanTargetTargetRegistry

    CompartmentId string
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    Repositories List<string>
    List of repositories to scan images in. If left empty, the target defaults to scanning all repos in the compartmentId
    Type string
    The scan level
    Url string
    URL of the registry.
    CompartmentId string
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    Repositories []string
    List of repositories to scan images in. If left empty, the target defaults to scanning all repos in the compartmentId
    Type string
    The scan level
    Url string
    URL of the registry.
    compartmentId String
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    repositories List<String>
    List of repositories to scan images in. If left empty, the target defaults to scanning all repos in the compartmentId
    type String
    The scan level
    url String
    URL of the registry.
    compartmentId string
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    repositories string[]
    List of repositories to scan images in. If left empty, the target defaults to scanning all repos in the compartmentId
    type string
    The scan level
    url string
    URL of the registry.
    compartment_id str
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    repositories Sequence[str]
    List of repositories to scan images in. If left empty, the target defaults to scanning all repos in the compartmentId
    type str
    The scan level
    url str
    URL of the registry.
    compartmentId String
    The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
    repositories List<String>
    List of repositories to scan images in. If left empty, the target defaults to scanning all repos in the compartmentId
    type String
    The scan level
    url String
    URL of the registry.

    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 v2.17.0 published on Friday, Nov 15, 2024 by Pulumi