Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.DataSafe.getSecurityPolicy
Explore with Pulumi AI
This data source provides details about a specific Security Policy resource in Oracle Cloud Infrastructure Data Safe service.
Gets a security policy by the specified OCID of the security policy resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityPolicy = oci.DataSafe.getSecurityPolicy({
securityPolicyId: testSecurityPolicyOciDataSafeSecurityPolicy.id,
});
import pulumi
import pulumi_oci as oci
test_security_policy = oci.DataSafe.get_security_policy(security_policy_id=test_security_policy_oci_data_safe_security_policy["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/DataSafe"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := DataSafe.GetSecurityPolicy(ctx, &datasafe.GetSecurityPolicyArgs{
SecurityPolicyId: testSecurityPolicyOciDataSafeSecurityPolicy.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 testSecurityPolicy = Oci.DataSafe.GetSecurityPolicy.Invoke(new()
{
SecurityPolicyId = testSecurityPolicyOciDataSafeSecurityPolicy.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataSafe.DataSafeFunctions;
import com.pulumi.oci.DataSafe.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 = DataSafeFunctions.getSecurityPolicy(GetSecurityPolicyArgs.builder()
.securityPolicyId(testSecurityPolicyOciDataSafeSecurityPolicy.id())
.build());
}
}
variables:
testSecurityPolicy:
fn::invoke:
Function: oci:DataSafe:getSecurityPolicy
Arguments:
securityPolicyId: ${testSecurityPolicyOciDataSafeSecurityPolicy.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:DataSafe/getSecurityPolicy:getSecurityPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Security
Policy stringId - The OCID of the security policy resource.
- Security
Policy stringId - The OCID of the security policy resource.
- security
Policy StringId - The OCID of the security policy resource.
- security
Policy stringId - The OCID of the security policy resource.
- security_
policy_ strid - The OCID of the security policy resource.
- security
Policy StringId - The OCID of the security policy resource.
getSecurityPolicy Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment containing the security policy.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example:
{"Operations.CostCenter": "42"}
- Description string
- The description of the security policy.
- Display
Name string - The display name of the security policy.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example:
{"Department": "Finance"}
- Id string
- The OCID of the security policy.
- Lifecycle
Details string - Details about the current state of the security policy in Data Safe.
- Security
Policy stringId - State string
- The current state of the security policy.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time that the security policy was created, in the format defined by RFC3339.
- Time
Updated string - The last date and time the security policy was updated, in the format defined by RFC3339.
- Compartment
Id string - The OCID of the compartment containing the security policy.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example:
{"Operations.CostCenter": "42"}
- Description string
- The description of the security policy.
- Display
Name string - The display name of the security policy.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example:
{"Department": "Finance"}
- Id string
- The OCID of the security policy.
- Lifecycle
Details string - Details about the current state of the security policy in Data Safe.
- Security
Policy stringId - State string
- The current state of the security policy.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time that the security policy was created, in the format defined by RFC3339.
- Time
Updated string - The last date and time the security policy was updated, in the format defined by RFC3339.
- compartment
Id String - The OCID of the compartment containing the security policy.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example:
{"Operations.CostCenter": "42"}
- description String
- The description of the security policy.
- display
Name String - The display name of the security policy.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example:
{"Department": "Finance"}
- id String
- The OCID of the security policy.
- lifecycle
Details String - Details about the current state of the security policy in Data Safe.
- security
Policy StringId - state String
- The current state of the security policy.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time that the security policy was created, in the format defined by RFC3339.
- time
Updated String - The last date and time the security policy was updated, in the format defined by RFC3339.
- compartment
Id string - The OCID of the compartment containing the security policy.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example:
{"Operations.CostCenter": "42"}
- description string
- The description of the security policy.
- display
Name string - The display name of the security policy.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example:
{"Department": "Finance"}
- id string
- The OCID of the security policy.
- lifecycle
Details string - Details about the current state of the security policy in Data Safe.
- security
Policy stringId - state string
- The current state of the security policy.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The time that the security policy was created, in the format defined by RFC3339.
- time
Updated string - The last date and time the security policy was updated, in the format defined by RFC3339.
- compartment_
id str - The OCID of the compartment containing the security policy.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example:
{"Operations.CostCenter": "42"}
- description str
- The description of the security policy.
- display_
name str - The display name of the security policy.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example:
{"Department": "Finance"}
- id str
- The OCID of the security policy.
- lifecycle_
details str - Details about the current state of the security policy in Data Safe.
- security_
policy_ strid - state str
- The current state of the security policy.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time_
created str - The time that the security policy was created, in the format defined by RFC3339.
- time_
updated str - The last date and time the security policy was updated, in the format defined by RFC3339.
- compartment
Id String - The OCID of the compartment containing the security policy.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example:
{"Operations.CostCenter": "42"}
- description String
- The description of the security policy.
- display
Name String - The display name of the security policy.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example:
{"Department": "Finance"}
- id String
- The OCID of the security policy.
- lifecycle
Details String - Details about the current state of the security policy in Data Safe.
- security
Policy StringId - state String
- The current state of the security policy.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time that the security policy was created, in the format defined by RFC3339.
- time
Updated String - The last date and time the security policy was updated, in the format defined by RFC3339.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.