Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.CloudGuard.getSecurityRecipes
Explore with Pulumi AI
This data source provides the list of Security Recipes in Oracle Cloud Infrastructure Cloud Guard service.
Returns a list of security zone recipes (SecurityRecipeSummary resources) in a compartment, identified by compartmentId.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityRecipes = oci.CloudGuard.getSecurityRecipes({
    compartmentId: compartmentId,
    displayName: securityRecipeDisplayName,
    id: securityRecipeId,
    state: securityRecipeState,
});
import pulumi
import pulumi_oci as oci
test_security_recipes = oci.CloudGuard.get_security_recipes(compartment_id=compartment_id,
    display_name=security_recipe_display_name,
    id=security_recipe_id,
    state=security_recipe_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/cloudguard"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudguard.GetSecurityRecipes(ctx, &cloudguard.GetSecurityRecipesArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(securityRecipeDisplayName),
			Id:            pulumi.StringRef(securityRecipeId),
			State:         pulumi.StringRef(securityRecipeState),
		}, 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 testSecurityRecipes = Oci.CloudGuard.GetSecurityRecipes.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = securityRecipeDisplayName,
        Id = securityRecipeId,
        State = securityRecipeState,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudGuard.CloudGuardFunctions;
import com.pulumi.oci.CloudGuard.inputs.GetSecurityRecipesArgs;
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 testSecurityRecipes = CloudGuardFunctions.getSecurityRecipes(GetSecurityRecipesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(securityRecipeDisplayName)
            .id(securityRecipeId)
            .state(securityRecipeState)
            .build());
    }
}
variables:
  testSecurityRecipes:
    fn::invoke:
      function: oci:CloudGuard:getSecurityRecipes
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${securityRecipeDisplayName}
        id: ${securityRecipeId}
        state: ${securityRecipeState}
Using getSecurityRecipes
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 getSecurityRecipes(args: GetSecurityRecipesArgs, opts?: InvokeOptions): Promise<GetSecurityRecipesResult>
function getSecurityRecipesOutput(args: GetSecurityRecipesOutputArgs, opts?: InvokeOptions): Output<GetSecurityRecipesResult>def get_security_recipes(compartment_id: Optional[str] = None,
                         display_name: Optional[str] = None,
                         filters: Optional[Sequence[GetSecurityRecipesFilter]] = None,
                         id: Optional[str] = None,
                         state: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSecurityRecipesResult
def get_security_recipes_output(compartment_id: Optional[pulumi.Input[str]] = None,
                         display_name: Optional[pulumi.Input[str]] = None,
                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSecurityRecipesFilterArgs]]]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         state: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSecurityRecipesResult]func GetSecurityRecipes(ctx *Context, args *GetSecurityRecipesArgs, opts ...InvokeOption) (*GetSecurityRecipesResult, error)
func GetSecurityRecipesOutput(ctx *Context, args *GetSecurityRecipesOutputArgs, opts ...InvokeOption) GetSecurityRecipesResultOutput> Note: This function is named GetSecurityRecipes in the Go SDK.
public static class GetSecurityRecipes 
{
    public static Task<GetSecurityRecipesResult> InvokeAsync(GetSecurityRecipesArgs args, InvokeOptions? opts = null)
    public static Output<GetSecurityRecipesResult> Invoke(GetSecurityRecipesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecurityRecipesResult> getSecurityRecipes(GetSecurityRecipesArgs args, InvokeOptions options)
public static Output<GetSecurityRecipesResult> getSecurityRecipes(GetSecurityRecipesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:CloudGuard/getSecurityRecipes:getSecurityRecipes
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
List<GetSecurity Recipes Filter> 
- Id string
- The unique identifier of the security zone recipe. (SecurityRecipe)
- State string
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- CompartmentId string
- The OCID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
[]GetSecurity Recipes Filter 
- Id string
- The unique identifier of the security zone recipe. (SecurityRecipe)
- State string
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- compartmentId String
- The OCID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters
List<GetSecurity Recipes Filter> 
- id String
- The unique identifier of the security zone recipe. (SecurityRecipe)
- state String
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- compartmentId string
- The OCID of the compartment in which to list resources.
- displayName string
- A filter to return only resources that match the entire display name given.
- filters
GetSecurity Recipes Filter[] 
- id string
- The unique identifier of the security zone recipe. (SecurityRecipe)
- state string
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- compartment_id str
- The OCID 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[GetSecurity Recipes Filter] 
- id str
- The unique identifier of the security zone recipe. (SecurityRecipe)
- state str
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- compartmentId String
- The OCID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- id String
- The unique identifier of the security zone recipe. (SecurityRecipe)
- state String
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
getSecurityRecipes Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment that contains the recipe
- SecurityRecipe List<GetCollections Security Recipes Security Recipe Collection> 
- The list of security_recipe_collection.
- DisplayName string
- The recipe's display name
- Filters
List<GetSecurity Recipes Filter> 
- Id string
- Unique identifier that can’t be changed after creation
- State string
- The current lifecycle state of the recipe
- CompartmentId string
- The OCID of the compartment that contains the recipe
- SecurityRecipe []GetCollections Security Recipes Security Recipe Collection 
- The list of security_recipe_collection.
- DisplayName string
- The recipe's display name
- Filters
[]GetSecurity Recipes Filter 
- Id string
- Unique identifier that can’t be changed after creation
- State string
- The current lifecycle state of the recipe
- compartmentId String
- The OCID of the compartment that contains the recipe
- securityRecipe List<GetCollections Security Recipes Security Recipe Collection> 
- The list of security_recipe_collection.
- displayName String
- The recipe's display name
- filters
List<GetSecurity Recipes Filter> 
- id String
- Unique identifier that can’t be changed after creation
- state String
- The current lifecycle state of the recipe
- compartmentId string
- The OCID of the compartment that contains the recipe
- securityRecipe GetCollections Security Recipes Security Recipe Collection[] 
- The list of security_recipe_collection.
- displayName string
- The recipe's display name
- filters
GetSecurity Recipes Filter[] 
- id string
- Unique identifier that can’t be changed after creation
- state string
- The current lifecycle state of the recipe
- compartment_id str
- The OCID of the compartment that contains the recipe
- security_recipe_ Sequence[Getcollections Security Recipes Security Recipe Collection] 
- The list of security_recipe_collection.
- display_name str
- The recipe's display name
- filters
Sequence[GetSecurity Recipes Filter] 
- id str
- Unique identifier that can’t be changed after creation
- state str
- The current lifecycle state of the recipe
- compartmentId String
- The OCID of the compartment that contains the recipe
- securityRecipe List<Property Map>Collections 
- The list of security_recipe_collection.
- displayName String
- The recipe's display name
- filters List<Property Map>
- id String
- Unique identifier that can’t be changed after creation
- state String
- The current lifecycle state of the recipe
Supporting Types
GetSecurityRecipesFilter   
GetSecurityRecipesSecurityRecipeCollection     
GetSecurityRecipesSecurityRecipeCollectionItem      
- CompartmentId string
- The OCID of the compartment in which to list resources.
- 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
- The recipe's description
- DisplayName 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 unique identifier of the security zone recipe. (SecurityRecipe)
- LifecycleDetails string
- A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the Failedstate.
- Owner string
- The owner of the recipe
- SecurityPolicies List<string>
- The list of security policy IDs that are included in the recipe
- State string
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- TimeCreated string
- The time the recipe was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time the recipe was last updated. An RFC3339 formatted datetime string.
- CompartmentId string
- The OCID of the compartment in which to list resources.
- 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
- The recipe's description
- DisplayName 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 unique identifier of the security zone recipe. (SecurityRecipe)
- LifecycleDetails string
- A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the Failedstate.
- Owner string
- The owner of the recipe
- SecurityPolicies []string
- The list of security policy IDs that are included in the recipe
- State string
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- TimeCreated string
- The time the recipe was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartmentId String
- The OCID of the compartment in which to list resources.
- 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
- The recipe's description
- displayName 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 unique identifier of the security zone recipe. (SecurityRecipe)
- lifecycleDetails String
- A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the Failedstate.
- owner String
- The owner of the recipe
- securityPolicies List<String>
- The list of security policy IDs that are included in the recipe
- state String
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- timeCreated String
- The time the recipe was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartmentId string
- The OCID of the compartment in which to list resources.
- {[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
- The recipe's description
- displayName 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 unique identifier of the security zone recipe. (SecurityRecipe)
- lifecycleDetails string
- A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the Failedstate.
- owner string
- The owner of the recipe
- securityPolicies string[]
- The list of security policy IDs that are included in the recipe
- state string
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- timeCreated string
- The time the recipe was created. An RFC3339 formatted datetime string.
- timeUpdated string
- The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartment_id str
- The OCID of the compartment in which to list resources.
- 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
- The recipe's 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 unique identifier of the security zone recipe. (SecurityRecipe)
- lifecycle_details str
- A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the Failedstate.
- owner str
- The owner of the recipe
- security_policies Sequence[str]
- The list of security policy IDs that are included in the recipe
- state str
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- time_created str
- The time the recipe was created. An RFC3339 formatted datetime string.
- time_updated str
- The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartmentId String
- The OCID of the compartment in which to list resources.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description String
- The recipe's description
- displayName 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 unique identifier of the security zone recipe. (SecurityRecipe)
- lifecycleDetails String
- A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the Failedstate.
- owner String
- The owner of the recipe
- securityPolicies List<String>
- The list of security policy IDs that are included in the recipe
- state String
- The field lifecycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- timeCreated String
- The time the recipe was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time the recipe was last updated. An RFC3339 formatted datetime string.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.