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:
- CompliancePolicy stringId 
- unique CompliancePolicy identifier.
- CompliancePolicy stringId 
- unique CompliancePolicy identifier.
- compliancePolicy StringId 
- unique CompliancePolicy identifier.
- compliancePolicy stringId 
- unique CompliancePolicy identifier.
- compliance_policy_ strid 
- unique CompliancePolicy identifier.
- compliancePolicy StringId 
- unique CompliancePolicy identifier.
getCompliancePolicy Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment the CompliancePolicy belongs to.
- CompliancePolicy stringId 
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName 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.
- LifecycleDetails 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.
- ProductId 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"}
- TimeCreated string
- The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- TimeUpdated string
- The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- CompartmentId string
- The OCID of the compartment the CompliancePolicy belongs to.
- CompliancePolicy stringId 
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName 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.
- LifecycleDetails 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.
- ProductId 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"}
- TimeCreated string
- The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- TimeUpdated string
- The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId String
- The OCID of the compartment the CompliancePolicy belongs to.
- compliancePolicy StringId 
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName 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.
- lifecycleDetails 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.
- productId 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"}
- timeCreated String
- The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated String
- The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId string
- The OCID of the compartment the CompliancePolicy belongs to.
- compliancePolicy stringId 
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName 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.
- lifecycleDetails 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.
- productId 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"}
- timeCreated string
- The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated 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
- compartmentId String
- The OCID of the compartment the CompliancePolicy belongs to.
- compliancePolicy StringId 
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName 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.
- lifecycleDetails 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.
- productId 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"}
- timeCreated String
- The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated 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.