Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi
oci.CloudGuard.getSecurityZones
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi
This data source provides the list of Security Zones in Oracle Cloud Infrastructure Cloud Guard service.
Gets a list of all security zones in a compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityZones = oci.CloudGuard.getSecurityZones({
compartmentId: _var.compartment_id,
displayName: _var.security_zone_display_name,
id: _var.security_zone_id,
isRequiredSecurityZonesInSubtree: _var.security_zone_is_required_security_zones_in_subtree,
securityRecipeId: oci_cloud_guard_security_recipe.test_security_recipe.id,
state: _var.security_zone_state,
});
import pulumi
import pulumi_oci as oci
test_security_zones = oci.CloudGuard.get_security_zones(compartment_id=var["compartment_id"],
display_name=var["security_zone_display_name"],
id=var["security_zone_id"],
is_required_security_zones_in_subtree=var["security_zone_is_required_security_zones_in_subtree"],
security_recipe_id=oci_cloud_guard_security_recipe["test_security_recipe"]["id"],
state=var["security_zone_state"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/CloudGuard"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := CloudGuard.GetSecurityZones(ctx, &cloudguard.GetSecurityZonesArgs{
CompartmentId: _var.Compartment_id,
DisplayName: pulumi.StringRef(_var.Security_zone_display_name),
Id: pulumi.StringRef(_var.Security_zone_id),
IsRequiredSecurityZonesInSubtree: pulumi.BoolRef(_var.Security_zone_is_required_security_zones_in_subtree),
SecurityRecipeId: pulumi.StringRef(oci_cloud_guard_security_recipe.Test_security_recipe.Id),
State: pulumi.StringRef(_var.Security_zone_state),
}, 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 testSecurityZones = Oci.CloudGuard.GetSecurityZones.Invoke(new()
{
CompartmentId = @var.Compartment_id,
DisplayName = @var.Security_zone_display_name,
Id = @var.Security_zone_id,
IsRequiredSecurityZonesInSubtree = @var.Security_zone_is_required_security_zones_in_subtree,
SecurityRecipeId = oci_cloud_guard_security_recipe.Test_security_recipe.Id,
State = @var.Security_zone_state,
});
});
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.GetSecurityZonesArgs;
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 testSecurityZones = CloudGuardFunctions.getSecurityZones(GetSecurityZonesArgs.builder()
.compartmentId(var_.compartment_id())
.displayName(var_.security_zone_display_name())
.id(var_.security_zone_id())
.isRequiredSecurityZonesInSubtree(var_.security_zone_is_required_security_zones_in_subtree())
.securityRecipeId(oci_cloud_guard_security_recipe.test_security_recipe().id())
.state(var_.security_zone_state())
.build());
}
}
variables:
testSecurityZones:
fn::invoke:
Function: oci:CloudGuard:getSecurityZones
Arguments:
compartmentId: ${var.compartment_id}
displayName: ${var.security_zone_display_name}
id: ${var.security_zone_id}
isRequiredSecurityZonesInSubtree: ${var.security_zone_is_required_security_zones_in_subtree}
securityRecipeId: ${oci_cloud_guard_security_recipe.test_security_recipe.id}
state: ${var.security_zone_state}
Using getSecurityZones
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 getSecurityZones(args: GetSecurityZonesArgs, opts?: InvokeOptions): Promise<GetSecurityZonesResult>
function getSecurityZonesOutput(args: GetSecurityZonesOutputArgs, opts?: InvokeOptions): Output<GetSecurityZonesResult>
def get_security_zones(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_cloudguard.GetSecurityZonesFilter]] = None,
id: Optional[str] = None,
is_required_security_zones_in_subtree: Optional[bool] = None,
security_recipe_id: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecurityZonesResult
def get_security_zones_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_cloudguard.GetSecurityZonesFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
is_required_security_zones_in_subtree: Optional[pulumi.Input[bool]] = None,
security_recipe_id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecurityZonesResult]
func GetSecurityZones(ctx *Context, args *GetSecurityZonesArgs, opts ...InvokeOption) (*GetSecurityZonesResult, error)
func GetSecurityZonesOutput(ctx *Context, args *GetSecurityZonesOutputArgs, opts ...InvokeOption) GetSecurityZonesResultOutput
> Note: This function is named GetSecurityZones
in the Go SDK.
public static class GetSecurityZones
{
public static Task<GetSecurityZonesResult> InvokeAsync(GetSecurityZonesArgs args, InvokeOptions? opts = null)
public static Output<GetSecurityZonesResult> Invoke(GetSecurityZonesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecurityZonesResult> getSecurityZones(GetSecurityZonesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:CloudGuard/getSecurityZones:getSecurityZones
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
Security Zones Filter> - Id string
- The unique identifier of the security zone (
SecurityZone
) - Is
Required boolSecurity Zones In Subtree - security zones in the subtree
- Security
Recipe stringId - The unique identifier of the security zone recipe (
SecurityRecipe
) - State string
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- 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
Security Zones Filter - Id string
- The unique identifier of the security zone (
SecurityZone
) - Is
Required boolSecurity Zones In Subtree - security zones in the subtree
- Security
Recipe stringId - The unique identifier of the security zone recipe (
SecurityRecipe
) - State string
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- 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
Security Zones Filter> - id String
- The unique identifier of the security zone (
SecurityZone
) - is
Required BooleanSecurity Zones In Subtree - security zones in the subtree
- security
Recipe StringId - The unique identifier of the security zone recipe (
SecurityRecipe
) - state String
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- 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
Security Zones Filter[] - id string
- The unique identifier of the security zone (
SecurityZone
) - is
Required booleanSecurity Zones In Subtree - security zones in the subtree
- security
Recipe stringId - The unique identifier of the security zone recipe (
SecurityRecipe
) - state string
- The field life cycle 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 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[cloudguard.
Get Security Zones Filter] - id str
- The unique identifier of the security zone (
SecurityZone
) - is_
required_ boolsecurity_ zones_ in_ subtree - security zones in the subtree
- security_
recipe_ strid - The unique identifier of the security zone recipe (
SecurityRecipe
) - state str
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- 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>
- id String
- The unique identifier of the security zone (
SecurityZone
) - is
Required BooleanSecurity Zones In Subtree - security zones in the subtree
- security
Recipe StringId - The unique identifier of the security zone recipe (
SecurityRecipe
) - state String
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
getSecurityZones Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment for the security zone
- Security
Zone List<GetCollections Security Zones Security Zone Collection> - The list of security_zone_collection.
- Display
Name string - The security zone's name
- Filters
List<Get
Security Zones Filter> - Id string
- Unique identifier that is immutable on creation
- Is
Required boolSecurity Zones In Subtree - Security
Recipe stringId - State string
- The current state of the security zone
- Compartment
Id string - The OCID of the compartment for the security zone
- Security
Zone []GetCollections Security Zones Security Zone Collection - The list of security_zone_collection.
- Display
Name string - The security zone's name
- Filters
[]Get
Security Zones Filter - Id string
- Unique identifier that is immutable on creation
- Is
Required boolSecurity Zones In Subtree - Security
Recipe stringId - State string
- The current state of the security zone
- compartment
Id String - The OCID of the compartment for the security zone
- security
Zone List<GetCollections Security Zones Security Zone Collection> - The list of security_zone_collection.
- display
Name String - The security zone's name
- filters
List<Get
Security Zones Filter> - id String
- Unique identifier that is immutable on creation
- is
Required BooleanSecurity Zones In Subtree - security
Recipe StringId - state String
- The current state of the security zone
- compartment
Id string - The OCID of the compartment for the security zone
- security
Zone GetCollections Security Zones Security Zone Collection[] - The list of security_zone_collection.
- display
Name string - The security zone's name
- filters
Get
Security Zones Filter[] - id string
- Unique identifier that is immutable on creation
- is
Required booleanSecurity Zones In Subtree - security
Recipe stringId - state string
- The current state of the security zone
- compartment_
id str - The OCID of the compartment for the security zone
- security_
zone_ Sequence[cloudguard.collections Get Security Zones Security Zone Collection] - The list of security_zone_collection.
- display_
name str - The security zone's name
- filters
Sequence[cloudguard.
Get Security Zones Filter] - id str
- Unique identifier that is immutable on creation
- is_
required_ boolsecurity_ zones_ in_ subtree - security_
recipe_ strid - state str
- The current state of the security zone
- compartment
Id String - The OCID of the compartment for the security zone
- security
Zone List<Property Map>Collections - The list of security_zone_collection.
- display
Name String - The security zone's name
- filters List<Property Map>
- id String
- Unique identifier that is immutable on creation
- is
Required BooleanSecurity Zones In Subtree - security
Recipe StringId - state String
- The current state of the security zone
Supporting Types
GetSecurityZonesFilter
GetSecurityZonesSecurityZoneCollection
GetSecurityZonesSecurityZoneCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources.
- Dictionary<string, object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- The security zone's description
- Display
Name string - A filter to return only resources that match the entire display name given.
- Dictionary<string, object>
- 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 (
SecurityZone
) - Inherited
By List<string>Compartments - List of inherited compartments
- Lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state. - Security
Zone stringRecipe Id - The OCID of the recipe (
SecurityRecipe
) for the security zone - Security
Zone stringTarget Id - The OCID of the target associated with the security zone
- State string
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- Time
Created string - The time the security zone was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time the security zone was last updated. An RFC3339 formatted datetime string.
- Compartment
Id string - The ID of the compartment in which to list resources.
- map[string]interface{}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- The security zone's description
- Display
Name string - A filter to return only resources that match the entire display name given.
- map[string]interface{}
- 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 (
SecurityZone
) - Inherited
By []stringCompartments - List of inherited compartments
- Lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state. - Security
Zone stringRecipe Id - The OCID of the recipe (
SecurityRecipe
) for the security zone - Security
Zone stringTarget Id - The OCID of the target associated with the security zone
- State string
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- Time
Created string - The time the security zone was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment
Id String - The ID of the compartment in which to list resources.
- Map<String,Object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- The security zone's description
- display
Name String - A filter to return only resources that match the entire display name given.
- Map<String,Object>
- 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 (
SecurityZone
) - inherited
By List<String>Compartments - List of inherited compartments
- lifecycle
Details String - A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state. - security
Zone StringRecipe Id - The OCID of the recipe (
SecurityRecipe
) for the security zone - security
Zone StringTarget Id - The OCID of the target associated with the security zone
- state String
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- time
Created String - The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated String - The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment
Id string - The ID of the compartment in which to list resources.
- {[key: string]: any}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- The security zone's description
- display
Name string - A filter to return only resources that match the entire display name given.
- {[key: string]: any}
- 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 (
SecurityZone
) - inherited
By string[]Compartments - List of inherited compartments
- lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state. - security
Zone stringRecipe Id - The OCID of the recipe (
SecurityRecipe
) for the security zone - security
Zone stringTarget Id - The OCID of the target associated with the security zone
- state string
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- time
Created string - The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated string - The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment_
id str - The ID of the compartment in which to list resources.
- Mapping[str, Any]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- The security zone's description
- display_
name str - A filter to return only resources that match the entire display name given.
- Mapping[str, Any]
- 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 (
SecurityZone
) - inherited_
by_ Sequence[str]compartments - List of inherited compartments
- lifecycle_
details str - A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state. - security_
zone_ strrecipe_ id - The OCID of the recipe (
SecurityRecipe
) for the security zone - security_
zone_ strtarget_ id - The OCID of the target associated with the security zone
- state str
- The field life cycle 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 security zone was created. An RFC3339 formatted datetime string.
- time_
updated str - The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment
Id String - The ID of the compartment in which to list resources.
- Map<Any>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- The security zone's description
- display
Name String - A filter to return only resources that match the entire display name given.
- Map<Any>
- 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 (
SecurityZone
) - inherited
By List<String>Compartments - List of inherited compartments
- lifecycle
Details String - A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state. - security
Zone StringRecipe Id - The OCID of the recipe (
SecurityRecipe
) for the security zone - security
Zone StringTarget Id - The OCID of the target associated with the security zone
- state String
- The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.
- time
Created String - The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated String - The time the security zone 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
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi