Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.CloudGuard.getSecurityZone
Explore with Pulumi AI
This data source provides details about a specific Security Zone resource in Oracle Cloud Infrastructure Cloud Guard service.
Returns a security zone (SecurityZone resource) identified by securityZoneId.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityZone = oci.CloudGuard.getSecurityZone({
    securityZoneId: testSecurityZoneOciCloudGuardSecurityZone.id,
});
import pulumi
import pulumi_oci as oci
test_security_zone = oci.CloudGuard.get_security_zone(security_zone_id=test_security_zone_oci_cloud_guard_security_zone["id"])
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.GetSecurityZone(ctx, &cloudguard.GetSecurityZoneArgs{
			SecurityZoneId: testSecurityZoneOciCloudGuardSecurityZone.Id,
		}, 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 testSecurityZone = Oci.CloudGuard.GetSecurityZone.Invoke(new()
    {
        SecurityZoneId = testSecurityZoneOciCloudGuardSecurityZone.Id,
    });
});
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.GetSecurityZoneArgs;
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 testSecurityZone = CloudGuardFunctions.getSecurityZone(GetSecurityZoneArgs.builder()
            .securityZoneId(testSecurityZoneOciCloudGuardSecurityZone.id())
            .build());
    }
}
variables:
  testSecurityZone:
    fn::invoke:
      function: oci:CloudGuard:getSecurityZone
      arguments:
        securityZoneId: ${testSecurityZoneOciCloudGuardSecurityZone.id}
Using getSecurityZone
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 getSecurityZone(args: GetSecurityZoneArgs, opts?: InvokeOptions): Promise<GetSecurityZoneResult>
function getSecurityZoneOutput(args: GetSecurityZoneOutputArgs, opts?: InvokeOptions): Output<GetSecurityZoneResult>def get_security_zone(security_zone_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetSecurityZoneResult
def get_security_zone_output(security_zone_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetSecurityZoneResult]func LookupSecurityZone(ctx *Context, args *LookupSecurityZoneArgs, opts ...InvokeOption) (*LookupSecurityZoneResult, error)
func LookupSecurityZoneOutput(ctx *Context, args *LookupSecurityZoneOutputArgs, opts ...InvokeOption) LookupSecurityZoneResultOutput> Note: This function is named LookupSecurityZone in the Go SDK.
public static class GetSecurityZone 
{
    public static Task<GetSecurityZoneResult> InvokeAsync(GetSecurityZoneArgs args, InvokeOptions? opts = null)
    public static Output<GetSecurityZoneResult> Invoke(GetSecurityZoneInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecurityZoneResult> getSecurityZone(GetSecurityZoneArgs args, InvokeOptions options)
public static Output<GetSecurityZoneResult> getSecurityZone(GetSecurityZoneArgs args, InvokeOptions options)
fn::invoke:
  function: oci:CloudGuard/getSecurityZone:getSecurityZone
  arguments:
    # arguments dictionaryThe following arguments are supported:
- SecurityZone stringId 
- The unique identifier of the security zone (SecurityZoneresource).
- SecurityZone stringId 
- The unique identifier of the security zone (SecurityZoneresource).
- securityZone StringId 
- The unique identifier of the security zone (SecurityZoneresource).
- securityZone stringId 
- The unique identifier of the security zone (SecurityZoneresource).
- security_zone_ strid 
- The unique identifier of the security zone (SecurityZoneresource).
- securityZone StringId 
- The unique identifier of the security zone (SecurityZoneresource).
getSecurityZone Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment for the security zone
- 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
- DisplayName string
- The security zone's display name
- 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
- Unique identifier that can’t be changed after creation
- InheritedBy List<string>Compartments 
- List of inherited compartments
- LifecycleDetails 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 Failedstate.
- SecurityZone stringId 
- SecurityZone stringRecipe Id 
- The OCID of the recipe (SecurityReciperesource) for the security zone
- SecurityZone stringTarget Id 
- The OCID of the target associated with the security zone
- State string
- The current lifecycle state of the security zone
- TimeCreated string
- The time the security zone was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time the security zone was last updated. An RFC3339 formatted datetime string.
- CompartmentId string
- The OCID of the compartment for the security zone
- 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
- DisplayName string
- The security zone's display name
- 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
- Unique identifier that can’t be changed after creation
- InheritedBy []stringCompartments 
- List of inherited compartments
- LifecycleDetails 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 Failedstate.
- SecurityZone stringId 
- SecurityZone stringRecipe Id 
- The OCID of the recipe (SecurityReciperesource) for the security zone
- SecurityZone stringTarget Id 
- The OCID of the target associated with the security zone
- State string
- The current lifecycle state of the security zone
- TimeCreated string
- The time the security zone was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartmentId String
- The OCID of the compartment for the security zone
- 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
- displayName String
- The security zone's display name
- 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
- Unique identifier that can’t be changed after creation
- inheritedBy List<String>Compartments 
- List of inherited compartments
- lifecycleDetails 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 Failedstate.
- securityZone StringId 
- securityZone StringRecipe Id 
- The OCID of the recipe (SecurityReciperesource) for the security zone
- securityZone StringTarget Id 
- The OCID of the target associated with the security zone
- state String
- The current lifecycle state of the security zone
- timeCreated String
- The time the security zone was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartmentId string
- The OCID of the compartment for the security zone
- {[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
- displayName string
- The security zone's display name
- {[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
- Unique identifier that can’t be changed after creation
- inheritedBy string[]Compartments 
- List of inherited compartments
- lifecycleDetails 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 Failedstate.
- securityZone stringId 
- securityZone stringRecipe Id 
- The OCID of the recipe (SecurityReciperesource) for the security zone
- securityZone stringTarget Id 
- The OCID of the target associated with the security zone
- state string
- The current lifecycle state of the security zone
- timeCreated string
- The time the security zone was created. An RFC3339 formatted datetime string.
- timeUpdated string
- The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment_id str
- The OCID of the compartment for the security zone
- 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
- The security zone's display name
- 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
- Unique identifier that can’t be changed after creation
- 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 Failedstate.
- security_zone_ strid 
- security_zone_ strrecipe_ id 
- The OCID of the recipe (SecurityReciperesource) for the security zone
- security_zone_ strtarget_ id 
- The OCID of the target associated with the security zone
- state str
- The current lifecycle state of the security zone
- 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.
- compartmentId String
- The OCID of the compartment for the security zone
- 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
- displayName String
- The security zone's display name
- 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
- Unique identifier that can’t be changed after creation
- inheritedBy List<String>Compartments 
- List of inherited compartments
- lifecycleDetails 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 Failedstate.
- securityZone StringId 
- securityZone StringRecipe Id 
- The OCID of the recipe (SecurityReciperesource) for the security zone
- securityZone StringTarget Id 
- The OCID of the target associated with the security zone
- state String
- The current lifecycle state of the security zone
- timeCreated String
- The time the security zone was created. An RFC3339 formatted datetime string.
- timeUpdated 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 ociTerraform Provider.