oci logo
Oracle Cloud Infrastructure v0.12.0, Mar 17 23

oci.VulnerabilityScanning.ContainerScanRecipe

This resource provides the Container Scan Recipe resource in Oracle Cloud Infrastructure Vulnerability Scanning service.

Creates a new ContainerScanRecipe. A recipe determines the types of security issues that you want scanned.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testContainerScanRecipe = new Oci.VulnerabilityScanning.ContainerScanRecipe("testContainerScanRecipe", new()
    {
        CompartmentId = @var.Compartment_id,
        ScanSettings = new Oci.VulnerabilityScanning.Inputs.ContainerScanRecipeScanSettingsArgs
        {
            ScanLevel = @var.Container_scan_recipe_scan_settings_scan_level,
        },
        DefinedTags = 
        {
            { "foo-namespace.bar-key", "value" },
        },
        DisplayName = @var.Container_scan_recipe_display_name,
        FreeformTags = 
        {
            { "bar-key", "value" },
        },
        ImageCount = @var.Container_scan_recipe_image_count,
    });

});
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.NewContainerScanRecipe(ctx, "testContainerScanRecipe", &VulnerabilityScanning.ContainerScanRecipeArgs{
			CompartmentId: pulumi.Any(_var.Compartment_id),
			ScanSettings: &vulnerabilityscanning.ContainerScanRecipeScanSettingsArgs{
				ScanLevel: pulumi.Any(_var.Container_scan_recipe_scan_settings_scan_level),
			},
			DefinedTags: pulumi.AnyMap{
				"foo-namespace.bar-key": pulumi.Any("value"),
			},
			DisplayName: pulumi.Any(_var.Container_scan_recipe_display_name),
			FreeformTags: pulumi.AnyMap{
				"bar-key": pulumi.Any("value"),
			},
			ImageCount: pulumi.Any(_var.Container_scan_recipe_image_count),
		})
		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.ContainerScanRecipe;
import com.pulumi.oci.VulnerabilityScanning.ContainerScanRecipeArgs;
import com.pulumi.oci.VulnerabilityScanning.inputs.ContainerScanRecipeScanSettingsArgs;
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) {
        var testContainerScanRecipe = new ContainerScanRecipe("testContainerScanRecipe", ContainerScanRecipeArgs.builder()        
            .compartmentId(var_.compartment_id())
            .scanSettings(ContainerScanRecipeScanSettingsArgs.builder()
                .scanLevel(var_.container_scan_recipe_scan_settings_scan_level())
                .build())
            .definedTags(Map.of("foo-namespace.bar-key", "value"))
            .displayName(var_.container_scan_recipe_display_name())
            .freeformTags(Map.of("bar-key", "value"))
            .imageCount(var_.container_scan_recipe_image_count())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_container_scan_recipe = oci.vulnerability_scanning.ContainerScanRecipe("testContainerScanRecipe",
    compartment_id=var["compartment_id"],
    scan_settings=oci.vulnerability_scanning.ContainerScanRecipeScanSettingsArgs(
        scan_level=var["container_scan_recipe_scan_settings_scan_level"],
    ),
    defined_tags={
        "foo-namespace.bar-key": "value",
    },
    display_name=var["container_scan_recipe_display_name"],
    freeform_tags={
        "bar-key": "value",
    },
    image_count=var["container_scan_recipe_image_count"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testContainerScanRecipe = new oci.vulnerabilityscanning.ContainerScanRecipe("testContainerScanRecipe", {
    compartmentId: _var.compartment_id,
    scanSettings: {
        scanLevel: _var.container_scan_recipe_scan_settings_scan_level,
    },
    definedTags: {
        "foo-namespace.bar-key": "value",
    },
    displayName: _var.container_scan_recipe_display_name,
    freeformTags: {
        "bar-key": "value",
    },
    imageCount: _var.container_scan_recipe_image_count,
});
resources:
  testContainerScanRecipe:
    type: oci:VulnerabilityScanning:ContainerScanRecipe
    properties:
      #Required
      compartmentId: ${var.compartment_id}
      scanSettings:
        scanLevel: ${var.container_scan_recipe_scan_settings_scan_level}
      #Optional
      definedTags:
        foo-namespace.bar-key: value
      displayName: ${var.container_scan_recipe_display_name}
      freeformTags:
        bar-key: value
      imageCount: ${var.container_scan_recipe_image_count}

Create ContainerScanRecipe Resource

new ContainerScanRecipe(name: string, args: ContainerScanRecipeArgs, opts?: CustomResourceOptions);
@overload
def ContainerScanRecipe(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        compartment_id: Optional[str] = None,
                        defined_tags: Optional[Mapping[str, Any]] = None,
                        display_name: Optional[str] = None,
                        freeform_tags: Optional[Mapping[str, Any]] = None,
                        image_count: Optional[int] = None,
                        scan_settings: Optional[_vulnerabilityscanning.ContainerScanRecipeScanSettingsArgs] = None)
@overload
def ContainerScanRecipe(resource_name: str,
                        args: ContainerScanRecipeArgs,
                        opts: Optional[ResourceOptions] = None)
func NewContainerScanRecipe(ctx *Context, name string, args ContainerScanRecipeArgs, opts ...ResourceOption) (*ContainerScanRecipe, error)
public ContainerScanRecipe(string name, ContainerScanRecipeArgs args, CustomResourceOptions? opts = null)
public ContainerScanRecipe(String name, ContainerScanRecipeArgs args)
public ContainerScanRecipe(String name, ContainerScanRecipeArgs args, CustomResourceOptions options)
type: oci:VulnerabilityScanning:ContainerScanRecipe
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ContainerScanRecipeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ContainerScanRecipeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ContainerScanRecipeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ContainerScanRecipeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ContainerScanRecipeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ContainerScanRecipe Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ContainerScanRecipe resource accepts the following input properties:

CompartmentId string

(Updatable) The OCID of the container scan recipe's compartment

ScanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

FreeformTags Dictionary<string, object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

ImageCount int

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

CompartmentId string

(Updatable) The OCID of the container scan recipe's compartment

ScanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

FreeformTags map[string]interface{}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

ImageCount int

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

compartmentId String

(Updatable) The OCID of the container scan recipe's compartment

scanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeformTags Map<String,Object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

imageCount Integer

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

compartmentId string

(Updatable) The OCID of the container scan recipe's compartment

scanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName string

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeformTags {[key: string]: any}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

imageCount number

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

compartment_id str

(Updatable) The OCID of the container scan recipe's compartment

scan_settings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

display_name str

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeform_tags Mapping[str, Any]

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

image_count int

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

compartmentId String

(Updatable) The OCID of the container scan recipe's compartment

scanSettings Property Map

(Updatable) A collection of container scan settings

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeformTags Map<Any>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

imageCount Number

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

Outputs

All input properties are implicitly available as output properties. Additionally, the ContainerScanRecipe resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

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"}

TimeCreated string

Date and time the recipe was created, format as described in RFC 3339

TimeUpdated string

Date and time the recipe was last updated, format as described in RFC 3339

Id string

The provider-assigned unique ID for this managed resource.

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"}

TimeCreated string

Date and time the recipe was created, format as described in RFC 3339

TimeUpdated string

Date and time the recipe was last updated, format as described in RFC 3339

id String

The provider-assigned unique ID for this managed resource.

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"}

timeCreated String

Date and time the recipe was created, format as described in RFC 3339

timeUpdated String

Date and time the recipe was last updated, format as described in RFC 3339

id string

The provider-assigned unique ID for this managed resource.

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"}

timeCreated string

Date and time the recipe was created, format as described in RFC 3339

timeUpdated string

Date and time the recipe was last updated, format as described in RFC 3339

id str

The provider-assigned unique ID for this managed resource.

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"}

time_created str

Date and time the recipe was created, format as described in RFC 3339

time_updated str

Date and time the recipe was last updated, format as described in RFC 3339

id String

The provider-assigned unique ID for this managed resource.

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"}

timeCreated String

Date and time the recipe was created, format as described in RFC 3339

timeUpdated String

Date and time the recipe was last updated, format as described in RFC 3339

Look up Existing ContainerScanRecipe Resource

Get an existing ContainerScanRecipe resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ContainerScanRecipeState, opts?: CustomResourceOptions): ContainerScanRecipe
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None,
        image_count: Optional[int] = None,
        scan_settings: Optional[_vulnerabilityscanning.ContainerScanRecipeScanSettingsArgs] = None,
        state: Optional[str] = None,
        system_tags: Optional[Mapping[str, Any]] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None) -> ContainerScanRecipe
func GetContainerScanRecipe(ctx *Context, name string, id IDInput, state *ContainerScanRecipeState, opts ...ResourceOption) (*ContainerScanRecipe, error)
public static ContainerScanRecipe Get(string name, Input<string> id, ContainerScanRecipeState? state, CustomResourceOptions? opts = null)
public static ContainerScanRecipe get(String name, Output<String> id, ContainerScanRecipeState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CompartmentId string

(Updatable) The OCID of the container scan recipe's compartment

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

FreeformTags Dictionary<string, object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

ImageCount int

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

ScanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

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"}

TimeCreated string

Date and time the recipe was created, format as described in RFC 3339

TimeUpdated string

Date and time the recipe was last updated, format as described in RFC 3339

CompartmentId string

(Updatable) The OCID of the container scan recipe's compartment

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

FreeformTags map[string]interface{}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

ImageCount int

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

ScanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

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"}

TimeCreated string

Date and time the recipe was created, format as described in RFC 3339

TimeUpdated string

Date and time the recipe was last updated, format as described in RFC 3339

compartmentId String

(Updatable) The OCID of the container scan recipe's compartment

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeformTags Map<String,Object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

imageCount Integer

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

scanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

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"}

timeCreated String

Date and time the recipe was created, format as described in RFC 3339

timeUpdated String

Date and time the recipe was last updated, format as described in RFC 3339

compartmentId string

(Updatable) The OCID of the container scan recipe's compartment

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName string

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeformTags {[key: string]: any}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

imageCount number

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

scanSettings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

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"}

timeCreated string

Date and time the recipe was created, format as described in RFC 3339

timeUpdated string

Date and time the recipe was last updated, format as described in RFC 3339

compartment_id str

(Updatable) The OCID of the container scan recipe's compartment

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

display_name str

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeform_tags Mapping[str, Any]

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

image_count int

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

scan_settings ContainerScanRecipeScanSettingsArgs

(Updatable) A collection of container scan settings

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"}

time_created str

Date and time the recipe was created, format as described in RFC 3339

time_updated str

Date and time the recipe was last updated, format as described in RFC 3339

compartmentId String

(Updatable) The OCID of the container scan recipe's compartment

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.

freeformTags Map<Any>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

imageCount Number

(Updatable) This field is set equal to the number of images we want to scan in the first go when the recipe is created

scanSettings Property Map

(Updatable) A collection of container scan settings

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"}

timeCreated String

Date and time the recipe was created, format as described in RFC 3339

timeUpdated String

Date and time the recipe was last updated, format as described in RFC 3339

Supporting Types

ContainerScanRecipeScanSettings

ScanLevel string

(Updatable) The scan level

ScanLevel string

(Updatable) The scan level

scanLevel String

(Updatable) The scan level

scanLevel string

(Updatable) The scan level

scan_level str

(Updatable) The scan level

scanLevel String

(Updatable) The scan level

Import

ContainerScanRecipes can be imported using the id, e.g.

 $ pulumi import oci:VulnerabilityScanning/containerScanRecipe:ContainerScanRecipe test_container_scan_recipe "id"

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.