Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.FleetAppsManagement.getCompliancePolicy
Explore with Pulumi AI
This data source provides details about a specific Compliance Policy resource in Oracle Cloud Infrastructure Fleet Apps Management service.
Gets information about a CompliancePolicy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCompliancePolicy = oci.FleetAppsManagement.getCompliancePolicy({
    compliancePolicyId: testCompliancePolicyOciFleetAppsManagementCompliancePolicy.id,
});
import pulumi
import pulumi_oci as oci
test_compliance_policy = oci.FleetAppsManagement.get_compliance_policy(compliance_policy_id=test_compliance_policy_oci_fleet_apps_management_compliance_policy["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/fleetappsmanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fleetappsmanagement.GetCompliancePolicy(ctx, &fleetappsmanagement.GetCompliancePolicyArgs{
			CompliancePolicyId: testCompliancePolicyOciFleetAppsManagementCompliancePolicy.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 testCompliancePolicy = Oci.FleetAppsManagement.GetCompliancePolicy.Invoke(new()
    {
        CompliancePolicyId = testCompliancePolicyOciFleetAppsManagementCompliancePolicy.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.FleetAppsManagement.FleetAppsManagementFunctions;
import com.pulumi.oci.FleetAppsManagement.inputs.GetCompliancePolicyArgs;
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 testCompliancePolicy = FleetAppsManagementFunctions.getCompliancePolicy(GetCompliancePolicyArgs.builder()
            .compliancePolicyId(testCompliancePolicyOciFleetAppsManagementCompliancePolicy.id())
            .build());
    }
}
variables:
  testCompliancePolicy:
    fn::invoke:
      function: oci:FleetAppsManagement:getCompliancePolicy
      arguments:
        compliancePolicyId: ${testCompliancePolicyOciFleetAppsManagementCompliancePolicy.id}
Using getCompliancePolicy
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 getCompliancePolicy(args: GetCompliancePolicyArgs, opts?: InvokeOptions): Promise<GetCompliancePolicyResult>
function getCompliancePolicyOutput(args: GetCompliancePolicyOutputArgs, opts?: InvokeOptions): Output<GetCompliancePolicyResult>def get_compliance_policy(compliance_policy_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCompliancePolicyResult
def get_compliance_policy_output(compliance_policy_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCompliancePolicyResult]func GetCompliancePolicy(ctx *Context, args *GetCompliancePolicyArgs, opts ...InvokeOption) (*GetCompliancePolicyResult, error)
func GetCompliancePolicyOutput(ctx *Context, args *GetCompliancePolicyOutputArgs, opts ...InvokeOption) GetCompliancePolicyResultOutput> Note: This function is named GetCompliancePolicy in the Go SDK.
public static class GetCompliancePolicy 
{
    public static Task<GetCompliancePolicyResult> InvokeAsync(GetCompliancePolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetCompliancePolicyResult> Invoke(GetCompliancePolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCompliancePolicyResult> getCompliancePolicy(GetCompliancePolicyArgs args, InvokeOptions options)
public static Output<GetCompliancePolicyResult> getCompliancePolicy(GetCompliancePolicyArgs args, InvokeOptions options)
fn::invoke:
  function: oci:FleetAppsManagement/getCompliancePolicy:getCompliancePolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Compliance
Policy stringId  - unique CompliancePolicy identifier.
 
- Compliance
Policy stringId  - unique CompliancePolicy identifier.
 
- compliance
Policy StringId  - unique CompliancePolicy identifier.
 
- compliance
Policy stringId  - unique CompliancePolicy identifier.
 
- compliance_
policy_ strid  - unique CompliancePolicy identifier.
 
- compliance
Policy StringId  - unique CompliancePolicy identifier.
 
getCompliancePolicy Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment the CompliancePolicy belongs to.
 - Compliance
Policy stringId  - Dictionary<string, string>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - Display
Name string - Display name for the CompliancePolicy.
 - 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 provider-assigned unique ID for this managed resource.
 - Lifecycle
Details string - A message that describes the current state of the CompliancePolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
 - Product
Id string - platformConfiguration OCID corresponding to the Product.
 - State string
 - The current state of the CompliancePolicy.
 - Dictionary<string, string>
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z 
- Compartment
Id string - The OCID of the compartment the CompliancePolicy belongs to.
 - Compliance
Policy stringId  - map[string]string
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - Display
Name string - Display name for the CompliancePolicy.
 - 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 provider-assigned unique ID for this managed resource.
 - Lifecycle
Details string - A message that describes the current state of the CompliancePolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
 - Product
Id string - platformConfiguration OCID corresponding to the Product.
 - State string
 - The current state of the CompliancePolicy.
 - map[string]string
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z 
- compartment
Id String - The OCID of the compartment the CompliancePolicy belongs to.
 - compliance
Policy StringId  - Map<String,String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - display
Name String - Display name for the CompliancePolicy.
 - 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 provider-assigned unique ID for this managed resource.
 - lifecycle
Details String - A message that describes the current state of the CompliancePolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
 - product
Id String - platformConfiguration OCID corresponding to the Product.
 - state String
 - The current state of the CompliancePolicy.
 - Map<String,String>
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z 
- compartment
Id string - The OCID of the compartment the CompliancePolicy belongs to.
 - compliance
Policy stringId  - {[key: string]: string}
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - display
Name string - Display name for the CompliancePolicy.
 - {[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 provider-assigned unique ID for this managed resource.
 - lifecycle
Details string - A message that describes the current state of the CompliancePolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
 - product
Id string - platformConfiguration OCID corresponding to the Product.
 - state string
 - The current state of the CompliancePolicy.
 - {[key: string]: string}
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created string - The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z - time
Updated string - The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z 
- compartment_
id str - The OCID of the compartment the CompliancePolicy belongs to.
 - compliance_
policy_ strid  - Mapping[str, str]
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - display_
name str - Display name for the CompliancePolicy.
 - 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 provider-assigned unique ID for this managed resource.
 - lifecycle_
details str - A message that describes the current state of the CompliancePolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
 - product_
id str - platformConfiguration OCID corresponding to the Product.
 - state str
 - The current state of the CompliancePolicy.
 - Mapping[str, str]
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time_
created str - The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z - time_
updated str - The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z 
- compartment
Id String - The OCID of the compartment the CompliancePolicy belongs to.
 - compliance
Policy StringId  - Map<String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - display
Name String - Display name for the CompliancePolicy.
 - 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 provider-assigned unique ID for this managed resource.
 - lifecycle
Details String - A message that describes the current state of the CompliancePolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
 - product
Id String - platformConfiguration OCID corresponding to the Product.
 - state String
 - The current state of the CompliancePolicy.
 - Map<String>
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 
2016-08-25T21:10:29.600Z 
Package Details
- Repository
 - oci pulumi/pulumi-oci
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ociTerraform Provider.