oci logo
Oracle Cloud Infrastructure v0.6.0, Jan 23 23

oci.CloudGuard.getSecurityPolicy

This data source provides details about a specific Security Policy resource in Oracle Cloud Infrastructure Cloud Guard service.

Gets a security zone policy using its identifier. When a policy is enabled in a security zone, then any action in the zone that attempts to violate that policy is denied.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testSecurityPolicy = Oci.CloudGuard.GetSecurityPolicy.Invoke(new()
    {
        SecurityPolicyId = oci_cloud_guard_security_policy.Test_security_policy.Id,
    });

});
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.GetSecurityPolicy(ctx, &cloudguard.GetSecurityPolicyArgs{
			SecurityPolicyId: oci_cloud_guard_security_policy.Test_security_policy.Id,
		}, nil)
		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.CloudGuard.CloudGuardFunctions;
import com.pulumi.oci.CloudGuard.inputs.GetSecurityPolicyArgs;
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 testSecurityPolicy = CloudGuardFunctions.getSecurityPolicy(GetSecurityPolicyArgs.builder()
            .securityPolicyId(oci_cloud_guard_security_policy.test_security_policy().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_security_policy = oci.CloudGuard.get_security_policy(security_policy_id=oci_cloud_guard_security_policy["test_security_policy"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testSecurityPolicy = oci.CloudGuard.getSecurityPolicy({
    securityPolicyId: oci_cloud_guard_security_policy.test_security_policy.id,
});
variables:
  testSecurityPolicy:
    fn::invoke:
      Function: oci:CloudGuard:getSecurityPolicy
      Arguments:
        securityPolicyId: ${oci_cloud_guard_security_policy.test_security_policy.id}

Using getSecurityPolicy

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 getSecurityPolicy(args: GetSecurityPolicyArgs, opts?: InvokeOptions): Promise<GetSecurityPolicyResult>
function getSecurityPolicyOutput(args: GetSecurityPolicyOutputArgs, opts?: InvokeOptions): Output<GetSecurityPolicyResult>
def get_security_policy(security_policy_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetSecurityPolicyResult
def get_security_policy_output(security_policy_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetSecurityPolicyResult]
func GetSecurityPolicy(ctx *Context, args *GetSecurityPolicyArgs, opts ...InvokeOption) (*GetSecurityPolicyResult, error)
func GetSecurityPolicyOutput(ctx *Context, args *GetSecurityPolicyOutputArgs, opts ...InvokeOption) GetSecurityPolicyResultOutput

> Note: This function is named GetSecurityPolicy in the Go SDK.

public static class GetSecurityPolicy 
{
    public static Task<GetSecurityPolicyResult> InvokeAsync(GetSecurityPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetSecurityPolicyResult> Invoke(GetSecurityPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecurityPolicyResult> getSecurityPolicy(GetSecurityPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:CloudGuard/getSecurityPolicy:getSecurityPolicy
  arguments:
    # arguments dictionary

The following arguments are supported:

SecurityPolicyId string

The unique identifier of the security zone policy (SecurityPolicy)

SecurityPolicyId string

The unique identifier of the security zone policy (SecurityPolicy)

securityPolicyId String

The unique identifier of the security zone policy (SecurityPolicy)

securityPolicyId string

The unique identifier of the security zone policy (SecurityPolicy)

security_policy_id str

The unique identifier of the security zone policy (SecurityPolicy)

securityPolicyId String

The unique identifier of the security zone policy (SecurityPolicy)

getSecurityPolicy Result

The following output properties are available:

Category string

The category of security policy

CompartmentId string

The id of the security policy's compartment

DefinedTags 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 policy's description

DisplayName string

The security policy's full name

FreeformTags 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"}

FriendlyName string

A shorter version of the security policy's name

Id string

The provider-assigned unique ID for this managed resource.

LifecycleDetails string

A message describing the current state in more detail. For example, this can be used to provide actionable information for a resource in a Failed state.

Owner string

The owner of the security policy

SecurityPolicyId string
Services List<string>

The list of services that the security policy protects

State string

The current state of the security policy

SystemTags Dictionary<string, object>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The time the security policy was created. An RFC3339 formatted datetime string.

TimeUpdated string

The time the security policy was last updated. An RFC3339 formatted datetime string.

Category string

The category of security policy

CompartmentId string

The id of the security policy's compartment

DefinedTags 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 policy's description

DisplayName string

The security policy's full name

FreeformTags 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"}

FriendlyName string

A shorter version of the security policy's name

Id string

The provider-assigned unique ID for this managed resource.

LifecycleDetails string

A message describing the current state in more detail. For example, this can be used to provide actionable information for a resource in a Failed state.

Owner string

The owner of the security policy

SecurityPolicyId string
Services []string

The list of services that the security policy protects

State string

The current state of the security policy

SystemTags map[string]interface{}

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The time the security policy was created. An RFC3339 formatted datetime string.

TimeUpdated string

The time the security policy was last updated. An RFC3339 formatted datetime string.

category String

The category of security policy

compartmentId String

The id of the security policy's compartment

definedTags 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 policy's description

displayName String

The security policy's full name

freeformTags 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"}

friendlyName String

A shorter version of the security policy's name

id String

The provider-assigned unique ID for this managed resource.

lifecycleDetails String

A message describing the current state in more detail. For example, this can be used to provide actionable information for a resource in a Failed state.

owner String

The owner of the security policy

securityPolicyId String
services List<String>

The list of services that the security policy protects

state String

The current state of the security policy

systemTags Map<String,Object>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The time the security policy was created. An RFC3339 formatted datetime string.

timeUpdated String

The time the security policy was last updated. An RFC3339 formatted datetime string.

category string

The category of security policy

compartmentId string

The id of the security policy's compartment

definedTags {[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 policy's description

displayName string

The security policy's full name

freeformTags {[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"}

friendlyName string

A shorter version of the security policy's name

id string

The provider-assigned unique ID for this managed resource.

lifecycleDetails string

A message describing the current state in more detail. For example, this can be used to provide actionable information for a resource in a Failed state.

owner string

The owner of the security policy

securityPolicyId string
services string[]

The list of services that the security policy protects

state string

The current state of the security policy

systemTags {[key: string]: any}

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated string

The time the security policy was created. An RFC3339 formatted datetime string.

timeUpdated string

The time the security policy was last updated. An RFC3339 formatted datetime string.

category str

The category of security policy

compartment_id str

The id of the security policy's compartment

defined_tags 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 policy's description

display_name str

The security policy's full name

freeform_tags 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"}

friendly_name str

A shorter version of the security policy's name

id str

The provider-assigned unique ID for this managed resource.

lifecycle_details str

A message describing the current state in more detail. For example, this can be used to provide actionable information for a resource in a Failed state.

owner str

The owner of the security policy

security_policy_id str
services Sequence[str]

The list of services that the security policy protects

state str

The current state of the security policy

system_tags Mapping[str, Any]

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

time_created str

The time the security policy was created. An RFC3339 formatted datetime string.

time_updated str

The time the security policy was last updated. An RFC3339 formatted datetime string.

category String

The category of security policy

compartmentId String

The id of the security policy's compartment

definedTags 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 policy's description

displayName String

The security policy's full name

freeformTags 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"}

friendlyName String

A shorter version of the security policy's name

id String

The provider-assigned unique ID for this managed resource.

lifecycleDetails String

A message describing the current state in more detail. For example, this can be used to provide actionable information for a resource in a Failed state.

owner String

The owner of the security policy

securityPolicyId String
services List<String>

The list of services that the security policy protects

state String

The current state of the security policy

systemTags Map<Any>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The time the security policy was created. An RFC3339 formatted datetime string.

timeUpdated String

The time the security policy 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.