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:
- Compartment
Id string (Updatable) The OCID of the container scan recipe's compartment
- Scan
Settings ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- Dictionary<string, object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- 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
- Compartment
Id string (Updatable) The OCID of the container scan recipe's compartment
- Scan
Settings ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- map[string]interface{}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- 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
- compartment
Id String (Updatable) The OCID of the container scan recipe's compartment
- scan
Settings ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- Map<String,Object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- image
Count 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
- compartment
Id string (Updatable) The OCID of the container scan recipe's compartment
- scan
Settings ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- {[key: string]: any}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name string (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- {[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"}
- image
Count 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 ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- 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.
- 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
- compartment
Id String (Updatable) The OCID of the container scan recipe's compartment
- scan
Settings Property Map (Updatable) A collection of container scan settings
- Map<Any>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- image
Count 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.
- Dictionary<string, object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string Date and time the recipe was created, format as described in RFC 3339
- Time
Updated 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.
- map[string]interface{}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string Date and time the recipe was created, format as described in RFC 3339
- Time
Updated 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.
- Map<String,Object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String Date and time the recipe was created, format as described in RFC 3339
- time
Updated 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.
- {[key: string]: any}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string Date and time the recipe was created, format as described in RFC 3339
- time
Updated 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.
- 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.
- Map<Any>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String Date and time the recipe was created, format as described in RFC 3339
- time
Updated 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.
- Compartment
Id string (Updatable) The OCID of the container scan recipe's compartment
- Dictionary<string, object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- 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 ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- State string
The current state of the config.
- Dictionary<string, object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string Date and time the recipe was created, format as described in RFC 3339
- Time
Updated string Date and time the recipe was last updated, format as described in RFC 3339
- Compartment
Id string (Updatable) The OCID of the container scan recipe's compartment
- map[string]interface{}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- 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 ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- State string
The current state of the config.
- map[string]interface{}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string Date and time the recipe was created, format as described in RFC 3339
- Time
Updated string Date and time the recipe was last updated, format as described in RFC 3339
- compartment
Id String (Updatable) The OCID of the container scan recipe's compartment
- Map<String,Object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- image
Count 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
- scan
Settings ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- state String
The current state of the config.
- Map<String,Object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String Date and time the recipe was created, format as described in RFC 3339
- time
Updated String Date and time the recipe was last updated, format as described in RFC 3339
- compartment
Id string (Updatable) The OCID of the container scan recipe's compartment
- {[key: string]: any}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name string (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- {[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"}
- image
Count 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
- scan
Settings ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- state string
The current state of the config.
- {[key: string]: any}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string Date and time the recipe was created, format as described in RFC 3339
- time
Updated 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
- 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.
- 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 ContainerScan Recipe Scan Settings Args (Updatable) A collection of container scan settings
- state str
The current state of the config.
- 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
- compartment
Id String (Updatable) The OCID of the container scan recipe's compartment
- Map<Any>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String (Updatable) User friendly name of container scan recipe. If not present, will be auto-generated.
- 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"}
- image
Count 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
- scan
Settings Property Map (Updatable) A collection of container scan settings
- state String
The current state of the config.
- Map<Any>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String Date and time the recipe was created, format as described in RFC 3339
- time
Updated String Date and time the recipe was last updated, format as described in RFC 3339
Supporting Types
ContainerScanRecipeScanSettings
- Scan
Level string (Updatable) The scan level
- Scan
Level string (Updatable) The scan level
- scan
Level String (Updatable) The scan level
- scan
Level string (Updatable) The scan level
- scan_
level str (Updatable) The scan level
- scan
Level 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.