Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.CloudGuard.getSecurityZones
Explore with Pulumi AI
This data source provides the list of Security Zones in Oracle Cloud Infrastructure Cloud Guard service.
Returns a list of security zones (SecurityZone resources) in a compartment identified by compartmentId. List is contained in a page of SecurityZoneSummary resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityZones = oci.CloudGuard.getSecurityZones({
compartmentId: compartmentId,
displayName: securityZoneDisplayName,
id: securityZoneId,
isRequiredSecurityZonesInSubtree: securityZoneIsRequiredSecurityZonesInSubtree,
securityRecipeId: testSecurityRecipe.id,
state: securityZoneState,
});
import pulumi
import pulumi_oci as oci
test_security_zones = oci.CloudGuard.get_security_zones(compartment_id=compartment_id,
display_name=security_zone_display_name,
id=security_zone_id,
is_required_security_zones_in_subtree=security_zone_is_required_security_zones_in_subtree,
security_recipe_id=test_security_recipe["id"],
state=security_zone_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.GetSecurityZones(ctx, &cloudguard.GetSecurityZonesArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(securityZoneDisplayName),
Id: pulumi.StringRef(securityZoneId),
IsRequiredSecurityZonesInSubtree: pulumi.BoolRef(securityZoneIsRequiredSecurityZonesInSubtree),
SecurityRecipeId: pulumi.StringRef(testSecurityRecipe.Id),
State: pulumi.StringRef(securityZoneState),
}, 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 = compartmentId,
DisplayName = securityZoneDisplayName,
Id = securityZoneId,
IsRequiredSecurityZonesInSubtree = securityZoneIsRequiredSecurityZonesInSubtree,
SecurityRecipeId = testSecurityRecipe.Id,
State = securityZoneState,
});
});
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(compartmentId)
.displayName(securityZoneDisplayName)
.id(securityZoneId)
.isRequiredSecurityZonesInSubtree(securityZoneIsRequiredSecurityZonesInSubtree)
.securityRecipeId(testSecurityRecipe.id())
.state(securityZoneState)
.build());
}
}
variables:
testSecurityZones:
fn::invoke:
Function: oci:CloudGuard:getSecurityZones
Arguments:
compartmentId: ${compartmentId}
displayName: ${securityZoneDisplayName}
id: ${securityZoneId}
isRequiredSecurityZonesInSubtree: ${securityZoneIsRequiredSecurityZonesInSubtree}
securityRecipeId: ${testSecurityRecipe.id}
state: ${securityZoneState}
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 OCID 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
resource). - Is
Required boolSecurity Zones In Subtree - Is security zones in the subtree?
- Security
Recipe stringId - The unique identifier of the security zone recipe. (
SecurityRecipe
resource). - 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 string - The OCID 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
resource). - Is
Required boolSecurity Zones In Subtree - Is security zones in the subtree?
- Security
Recipe stringId - The unique identifier of the security zone recipe. (
SecurityRecipe
resource). - 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 String - The OCID 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
resource). - is
Required BooleanSecurity Zones In Subtree - Is security zones in the subtree?
- security
Recipe StringId - The unique identifier of the security zone recipe. (
SecurityRecipe
resource). - 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 string - The OCID 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
resource). - is
Required booleanSecurity Zones In Subtree - Is security zones in the subtree?
- security
Recipe stringId - The unique identifier of the security zone recipe. (
SecurityRecipe
resource). - 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[cloudguard.
Get Security Zones Filter] - id str
- The unique identifier of the security zone (
SecurityZone
resource). - is_
required_ boolsecurity_ zones_ in_ subtree - Is security zones in the subtree?
- security_
recipe_ strid - The unique identifier of the security zone recipe. (
SecurityRecipe
resource). - 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.
- compartment
Id String - The OCID 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
resource). - is
Required BooleanSecurity Zones In Subtree - Is security zones in the subtree?
- security
Recipe StringId - The unique identifier of the security zone recipe. (
SecurityRecipe
resource). - 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.
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 display name
- Filters
List<Get
Security Zones Filter> - Id string
- Unique identifier that can’t be changed after creation
- Is
Required boolSecurity Zones In Subtree - Security
Recipe stringId - State string
- The current lifecycle 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 display name
- Filters
[]Get
Security Zones Filter - Id string
- Unique identifier that can’t be changed after creation
- Is
Required boolSecurity Zones In Subtree - Security
Recipe stringId - State string
- The current lifecycle 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 display name
- filters
List<Get
Security Zones Filter> - id String
- Unique identifier that can’t be changed after creation
- is
Required BooleanSecurity Zones In Subtree - security
Recipe StringId - state String
- The current lifecycle 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 display name
- filters
Get
Security Zones Filter[] - id string
- Unique identifier that can’t be changed after creation
- is
Required booleanSecurity Zones In Subtree - security
Recipe stringId - state string
- The current lifecycle 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 display name
- filters
Sequence[cloudguard.
Get Security Zones Filter] - id str
- Unique identifier that can’t be changed after creation
- is_
required_ boolsecurity_ zones_ in_ subtree - security_
recipe_ strid - state str
- The current lifecycle 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 display name
- filters List<Property Map>
- id String
- Unique identifier that can’t be changed after creation
- is
Required BooleanSecurity Zones In Subtree - security
Recipe StringId - state String
- The current lifecycle state of the security zone
Supporting Types
GetSecurityZonesFilter
GetSecurityZonesSecurityZoneCollection
GetSecurityZonesSecurityZoneCollectionItem
- Compartment
Id 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 security zone's 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 unique identifier of the security zone (
SecurityZone
resource). - 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
resource) for the security zone - Security
Zone stringTarget Id - The OCID of the target associated with the security zone
- 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.
- 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 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 security zone's 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 unique identifier of the security zone (
SecurityZone
resource). - 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
resource) for the security zone - Security
Zone stringTarget Id - The OCID of the target associated with the security zone
- 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.
- 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 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 security zone's 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 unique identifier of the security zone (
SecurityZone
resource). - 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
resource) for the security zone - security
Zone StringTarget Id - The OCID of the target associated with the security zone
- 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.
- 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 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 security zone's 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 unique identifier of the security zone (
SecurityZone
resource). - 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
resource) for the security zone - security
Zone stringTarget Id - The OCID of the target associated with the security zone
- 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.
- 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 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 security zone'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 (
SecurityZone
resource). - 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
resource) for the security zone - security_
zone_ strtarget_ id - The OCID of the target associated with the security zone
- 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 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 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 security zone's 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 unique identifier of the security zone (
SecurityZone
resource). - 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
resource) for the security zone - security
Zone StringTarget Id - The OCID of the target associated with the security zone
- 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.
- 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.