Oracle Cloud Infrastructure v0.20.0, May 31 23
Oracle Cloud Infrastructure v0.20.0, May 31 23
oci.CloudGuard.getSecurityPolicies
Explore with Pulumi AI
This data source provides the list of Security Policies in Oracle Cloud Infrastructure Cloud Guard service.
Returns a list of security zone policies. Specify any compartment.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testSecurityPolicies = Oci.CloudGuard.GetSecurityPolicies.Invoke(new()
{
CompartmentId = @var.Compartment_id,
DisplayName = @var.Security_policy_display_name,
Id = @var.Security_policy_id,
State = @var.Security_policy_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.GetSecurityPolicies(ctx, &cloudguard.GetSecurityPoliciesArgs{
CompartmentId: _var.Compartment_id,
DisplayName: pulumi.StringRef(_var.Security_policy_display_name),
Id: pulumi.StringRef(_var.Security_policy_id),
State: pulumi.StringRef(_var.Security_policy_state),
}, 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.GetSecurityPoliciesArgs;
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 testSecurityPolicies = CloudGuardFunctions.getSecurityPolicies(GetSecurityPoliciesArgs.builder()
.compartmentId(var_.compartment_id())
.displayName(var_.security_policy_display_name())
.id(var_.security_policy_id())
.state(var_.security_policy_state())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_security_policies = oci.CloudGuard.get_security_policies(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityPolicies = oci.CloudGuard.getSecurityPolicies({
compartmentId: _var.compartment_id,
displayName: _var.security_policy_display_name,
id: _var.security_policy_id,
state: _var.security_policy_state,
});
variables:
testSecurityPolicies:
fn::invoke:
Function: oci:CloudGuard:getSecurityPolicies
Arguments:
compartmentId: ${var.compartment_id}
displayName: ${var.security_policy_display_name}
id: ${var.security_policy_id}
state: ${var.security_policy_state}
Using getSecurityPolicies
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 getSecurityPolicies(args: GetSecurityPoliciesArgs, opts?: InvokeOptions): Promise<GetSecurityPoliciesResult>
function getSecurityPoliciesOutput(args: GetSecurityPoliciesOutputArgs, opts?: InvokeOptions): Output<GetSecurityPoliciesResult>
def get_security_policies(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_cloudguard.GetSecurityPoliciesFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecurityPoliciesResult
def get_security_policies_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_cloudguard.GetSecurityPoliciesFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecurityPoliciesResult]
func GetSecurityPolicies(ctx *Context, args *GetSecurityPoliciesArgs, opts ...InvokeOption) (*GetSecurityPoliciesResult, error)
func GetSecurityPoliciesOutput(ctx *Context, args *GetSecurityPoliciesOutputArgs, opts ...InvokeOption) GetSecurityPoliciesResultOutput
> Note: This function is named GetSecurityPolicies
in the Go SDK.
public static class GetSecurityPolicies
{
public static Task<GetSecurityPoliciesResult> InvokeAsync(GetSecurityPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetSecurityPoliciesResult> Invoke(GetSecurityPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecurityPoliciesResult> getSecurityPolicies(GetSecurityPoliciesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:CloudGuard/getSecurityPolicies:getSecurityPolicies
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 Policies Filter> - Id string
The unique identifier of the security zone policy (
SecurityPolicy
)- 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 Policies Filter - Id string
The unique identifier of the security zone policy (
SecurityPolicy
)- 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 Policies Filter> - id String
The unique identifier of the security zone policy (
SecurityPolicy
)- 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 Policies Filter[] - id string
The unique identifier of the security zone policy (
SecurityPolicy
)- 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
Get
Security Policies Filter] - id str
The unique identifier of the security zone policy (
SecurityPolicy
)- 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 policy (
SecurityPolicy
)- 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.
getSecurityPolicies Result
The following output properties are available:
- Compartment
Id string The id of the security policy's compartment
- Security
Policy List<GetCollections Security Policies Security Policy Collection> The list of security_policy_collection.
- Display
Name string The security policy's full name
- Filters
List<Get
Security Policies Filter> - Id string
Unique identifier that is immutable on creation
- State string
The current state of the security policy
- Compartment
Id string The id of the security policy's compartment
- Security
Policy []GetCollections Security Policies Security Policy Collection The list of security_policy_collection.
- Display
Name string The security policy's full name
- Filters
[]Get
Security Policies Filter - Id string
Unique identifier that is immutable on creation
- State string
The current state of the security policy
- compartment
Id String The id of the security policy's compartment
- security
Policy List<GetCollections Security Policies Security Policy Collection> The list of security_policy_collection.
- display
Name String The security policy's full name
- filters
List<Get
Security Policies Filter> - id String
Unique identifier that is immutable on creation
- state String
The current state of the security policy
- compartment
Id string The id of the security policy's compartment
- security
Policy GetCollections Security Policies Security Policy Collection[] The list of security_policy_collection.
- display
Name string The security policy's full name
- filters
Get
Security Policies Filter[] - id string
Unique identifier that is immutable on creation
- state string
The current state of the security policy
- compartment_
id str The id of the security policy's compartment
- security_
policy_ Getcollections Security Policies Security Policy Collection] The list of security_policy_collection.
- display_
name str The security policy's full name
- filters
Get
Security Policies Filter] - id str
Unique identifier that is immutable on creation
- state str
The current state of the security policy
- compartment
Id String The id of the security policy's compartment
- security
Policy List<Property Map>Collections The list of security_policy_collection.
- display
Name String The security policy's full name
- filters List<Property Map>
- id String
Unique identifier that is immutable on creation
- state String
The current state of the security policy
Supporting Types
GetSecurityPoliciesFilter
GetSecurityPoliciesSecurityPolicyCollection
GetSecurityPoliciesSecurityPolicyCollectionItem
- Category string
The category of security policy
- 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 policy'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"}
- Friendly
Name string A shorter version of the security policy's name
- Id string
The unique identifier of the security zone policy (
SecurityPolicy
)- Lifecycle
Details 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
- Services List<string>
The list of services that the security policy protects
- 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 policy was created. An RFC3339 formatted datetime string.
- Time
Updated string The time the security policy was last updated. An RFC3339 formatted datetime string.
- Category string
The category of security policy
- 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 policy'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"}
- Friendly
Name string A shorter version of the security policy's name
- Id string
The unique identifier of the security zone policy (
SecurityPolicy
)- Lifecycle
Details 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
- Services []string
The list of services that the security policy protects
- 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 policy was created. An RFC3339 formatted datetime string.
- Time
Updated string The time the security policy was last updated. An RFC3339 formatted datetime string.
- category String
The category of security policy
- 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 policy'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"}
- friendly
Name String A shorter version of the security policy's name
- id String
The unique identifier of the security zone policy (
SecurityPolicy
)- lifecycle
Details 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
- services List<String>
The list of services that the security policy protects
- 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 policy was created. An RFC3339 formatted datetime string.
- time
Updated String The time the security policy was last updated. An RFC3339 formatted datetime string.
- category string
The category of security policy
- 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 policy'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"}
- friendly
Name string A shorter version of the security policy's name
- id string
The unique identifier of the security zone policy (
SecurityPolicy
)- lifecycle
Details 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
- services string[]
The list of services that the security policy protects
- 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 policy was created. An RFC3339 formatted datetime string.
- time
Updated 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 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 policy'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"}
- friendly_
name str A shorter version of the security policy's name
- id str
The unique identifier of the security zone policy (
SecurityPolicy
)- 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
- services Sequence[str]
The list of services that the security policy protects
- 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 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
- 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 policy'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"}
- friendly
Name String A shorter version of the security policy's name
- id String
The unique identifier of the security zone policy (
SecurityPolicy
)- lifecycle
Details 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
- services List<String>
The list of services that the security policy protects
- 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 policy was created. An RFC3339 formatted datetime string.
- time
Updated 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.