oci.VulnerabilityScanning.getContainerScanTargets
Explore with Pulumi AI
This data source provides the list of Container Scan Targets in Oracle Cloud Infrastructure Vulnerability Scanning service.
Retrieves a list of ContainerScanTargetSummary objects in a compartment. 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 testContainerScanTargets = oci.VulnerabilityScanning.getContainerScanTargets({
compartmentId: compartmentId,
displayName: containerScanTargetDisplayName,
state: containerScanTargetState,
});
import pulumi
import pulumi_oci as oci
test_container_scan_targets = oci.VulnerabilityScanning.get_container_scan_targets(compartment_id=compartment_id,
display_name=container_scan_target_display_name,
state=container_scan_target_state)
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.GetContainerScanTargets(ctx, &vulnerabilityscanning.GetContainerScanTargetsArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(containerScanTargetDisplayName),
State: pulumi.StringRef(containerScanTargetState),
}, 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 testContainerScanTargets = Oci.VulnerabilityScanning.GetContainerScanTargets.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = containerScanTargetDisplayName,
State = containerScanTargetState,
});
});
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.GetContainerScanTargetsArgs;
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 testContainerScanTargets = VulnerabilityScanningFunctions.getContainerScanTargets(GetContainerScanTargetsArgs.builder()
.compartmentId(compartmentId)
.displayName(containerScanTargetDisplayName)
.state(containerScanTargetState)
.build());
}
}
variables:
testContainerScanTargets:
fn::invoke:
Function: oci:VulnerabilityScanning:getContainerScanTargets
Arguments:
compartmentId: ${compartmentId}
displayName: ${containerScanTargetDisplayName}
state: ${containerScanTargetState}
Using getContainerScanTargets
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 getContainerScanTargets(args: GetContainerScanTargetsArgs, opts?: InvokeOptions): Promise<GetContainerScanTargetsResult>
function getContainerScanTargetsOutput(args: GetContainerScanTargetsOutputArgs, opts?: InvokeOptions): Output<GetContainerScanTargetsResult>
def get_container_scan_targets(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_vulnerabilityscanning.GetContainerScanTargetsFilter]] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetContainerScanTargetsResult
def get_container_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.GetContainerScanTargetsFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetContainerScanTargetsResult]
func GetContainerScanTargets(ctx *Context, args *GetContainerScanTargetsArgs, opts ...InvokeOption) (*GetContainerScanTargetsResult, error)
func GetContainerScanTargetsOutput(ctx *Context, args *GetContainerScanTargetsOutputArgs, opts ...InvokeOption) GetContainerScanTargetsResultOutput
> Note: This function is named GetContainerScanTargets
in the Go SDK.
public static class GetContainerScanTargets
{
public static Task<GetContainerScanTargetsResult> InvokeAsync(GetContainerScanTargetsArgs args, InvokeOptions? opts = null)
public static Output<GetContainerScanTargetsResult> Invoke(GetContainerScanTargetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetContainerScanTargetsResult> getContainerScanTargets(GetContainerScanTargetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:VulnerabilityScanning/getContainerScanTargets:getContainerScanTargets
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
Container 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
Container 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
Container 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
Container 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
Sequence[vulnerabilityscanning.
Get Container 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.
getContainerScanTargets Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
- Container
Scan List<GetTarget Summary Collections Container Scan Targets Container Scan Target Summary Collection> - The list of container_scan_target_summary_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Display
Name string - User friendly name of container scan target
- Filters
List<Get
Container Scan Targets Filter> - State string
- The current state of the config.
- Compartment
Id string - The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
- Container
Scan []GetTarget Summary Collections Container Scan Targets Container Scan Target Summary Collection - The list of container_scan_target_summary_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Display
Name string - User friendly name of container scan target
- Filters
[]Get
Container Scan Targets Filter - State string
- The current state of the config.
- compartment
Id String - The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
- container
Scan List<GetTarget Summary Collections Container Scan Targets Container Scan Target Summary Collection> - The list of container_scan_target_summary_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- display
Name String - User friendly name of container scan target
- filters
List<Get
Container Scan Targets Filter> - state String
- The current state of the config.
- compartment
Id string - The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
- container
Scan GetTarget Summary Collections Container Scan Targets Container Scan Target Summary Collection[] - The list of container_scan_target_summary_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- display
Name string - User friendly name of container scan target
- filters
Get
Container Scan Targets Filter[] - state string
- The current state of the config.
- compartment_
id str - The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
- container_
scan_ Sequence[vulnerabilityscanning.target_ summary_ collections Get Container Scan Targets Container Scan Target Summary Collection] - The list of container_scan_target_summary_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- display_
name str - User friendly name of container scan target
- filters
Sequence[vulnerabilityscanning.
Get Container Scan Targets Filter] - state str
- The current state of the config.
- compartment
Id String - The OCID of the compartment to perform the scans in. All listed repositories must be in the compartment.
- container
Scan List<Property Map>Target Summary Collections - The list of container_scan_target_summary_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- display
Name String - User friendly name of container scan target
- filters List<Property Map>
- state String
- The current state of the config.
Supporting Types
GetContainerScanTargetsContainerScanTargetSummaryCollection
GetContainerScanTargetsContainerScanTargetSummaryCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources.
- Container
Scan stringRecipe Id - ID of the container scan recipe this target applies.
- 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 - A filter to return only resources that match the entire display name given.
- 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
- A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Registries List<GetContainer Scan Targets Container Scan Target Summary Collection Item Target Registry> - Registry information for a container scan target
- 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.
- Container
Scan stringRecipe Id - ID of the container scan recipe this target applies.
- 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 - A filter to return only resources that match the entire display name given.
- 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
- A filter to return only resources whose lifecycleState matches the given lifecycleState.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Registries []GetContainer Scan Targets Container Scan Target Summary Collection Item Target Registry - Registry information for a container scan target
- 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.
- container
Scan StringRecipe Id - ID of the container scan recipe this target applies.
- 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 - A filter to return only resources that match the entire display name given.
- 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
- A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Registries List<GetContainer Scan Targets Container Scan Target Summary Collection Item Target Registry> - Registry information for a container scan target
- 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.
- container
Scan stringRecipe Id - ID of the container scan recipe this target applies.
- {[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 - A filter to return only resources that match the entire display name given.
- {[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
- A filter to return only resources whose lifecycleState matches the given lifecycleState.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Registries GetContainer Scan Targets Container Scan Target Summary Collection Item Target Registry[] - Registry information for a container scan target
- 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.
- container_
scan_ strrecipe_ id - ID of the container scan recipe this target applies.
- 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 - A filter to return only resources that match the entire display name given.
- 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
- A filter to return only resources whose lifecycleState matches the given lifecycleState.
- 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.Get Container Scan Targets Container Scan Target Summary Collection Item Target Registry] - 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
- compartment
Id String - The ID of the compartment in which to list resources.
- container
Scan StringRecipe Id - ID of the container scan recipe this target applies.
- 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 - A filter to return only resources that match the entire display name given.
- 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
- A filter to return only resources whose lifecycleState matches the given lifecycleState.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Registries List<Property Map> - Registry information for a container scan target
- 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
GetContainerScanTargetsContainerScanTargetSummaryCollectionItemTargetRegistry
- Compartment
Id string - The ID of the compartment in which to list resources.
- 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.
- Compartment
Id string - The ID of the compartment in which to list resources.
- 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 String - The ID of the compartment in which to list resources.
- 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.
- compartment
Id string - The ID of the compartment in which to list resources.
- 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 ID of the compartment in which to list resources.
- 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.
- compartment
Id String - The ID of the compartment in which to list resources.
- 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.
GetContainerScanTargetsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.