Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.FleetAppsManagement.getCompliancePolicies
Explore with Pulumi AI
This data source provides the list of Compliance Policies in Oracle Cloud Infrastructure Fleet Apps Management service.
Gets a list of compliancePolicies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCompliancePolicies = oci.FleetAppsManagement.getCompliancePolicies({
    compartmentId: compartmentId,
    displayName: compliancePolicyDisplayName,
    id: compliancePolicyId,
    state: compliancePolicyState,
});
import pulumi
import pulumi_oci as oci
test_compliance_policies = oci.FleetAppsManagement.get_compliance_policies(compartment_id=compartment_id,
    display_name=compliance_policy_display_name,
    id=compliance_policy_id,
    state=compliance_policy_state)
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.GetCompliancePolicies(ctx, &fleetappsmanagement.GetCompliancePoliciesArgs{
			CompartmentId: pulumi.StringRef(compartmentId),
			DisplayName:   pulumi.StringRef(compliancePolicyDisplayName),
			Id:            pulumi.StringRef(compliancePolicyId),
			State:         pulumi.StringRef(compliancePolicyState),
		}, 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 testCompliancePolicies = Oci.FleetAppsManagement.GetCompliancePolicies.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = compliancePolicyDisplayName,
        Id = compliancePolicyId,
        State = compliancePolicyState,
    });
});
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.GetCompliancePoliciesArgs;
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 testCompliancePolicies = FleetAppsManagementFunctions.getCompliancePolicies(GetCompliancePoliciesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(compliancePolicyDisplayName)
            .id(compliancePolicyId)
            .state(compliancePolicyState)
            .build());
    }
}
variables:
  testCompliancePolicies:
    fn::invoke:
      function: oci:FleetAppsManagement:getCompliancePolicies
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${compliancePolicyDisplayName}
        id: ${compliancePolicyId}
        state: ${compliancePolicyState}
Using getCompliancePolicies
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 getCompliancePolicies(args: GetCompliancePoliciesArgs, opts?: InvokeOptions): Promise<GetCompliancePoliciesResult>
function getCompliancePoliciesOutput(args: GetCompliancePoliciesOutputArgs, opts?: InvokeOptions): Output<GetCompliancePoliciesResult>def get_compliance_policies(compartment_id: Optional[str] = None,
                            display_name: Optional[str] = None,
                            filters: Optional[Sequence[_fleetappsmanagement.GetCompliancePoliciesFilter]] = None,
                            id: Optional[str] = None,
                            state: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetCompliancePoliciesResult
def get_compliance_policies_output(compartment_id: Optional[pulumi.Input[str]] = None,
                            display_name: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[_fleetappsmanagement.GetCompliancePoliciesFilterArgs]]]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetCompliancePoliciesResult]func GetCompliancePolicies(ctx *Context, args *GetCompliancePoliciesArgs, opts ...InvokeOption) (*GetCompliancePoliciesResult, error)
func GetCompliancePoliciesOutput(ctx *Context, args *GetCompliancePoliciesOutputArgs, opts ...InvokeOption) GetCompliancePoliciesResultOutput> Note: This function is named GetCompliancePolicies in the Go SDK.
public static class GetCompliancePolicies 
{
    public static Task<GetCompliancePoliciesResult> InvokeAsync(GetCompliancePoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetCompliancePoliciesResult> Invoke(GetCompliancePoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCompliancePoliciesResult> getCompliancePolicies(GetCompliancePoliciesArgs args, InvokeOptions options)
public static Output<GetCompliancePoliciesResult> getCompliancePolicies(GetCompliancePoliciesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:FleetAppsManagement/getCompliancePolicies:getCompliancePolicies
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
List<GetCompliance Policies Filter> 
- Id string
- unique CompliancePolicy identifier.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
[]GetCompliance Policies Filter 
- Id string
- unique CompliancePolicy identifier.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters
List<GetCompliance Policies Filter> 
- id String
- unique CompliancePolicy identifier.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartmentId string
- The ID of the compartment in which to list resources.
- displayName string
- A filter to return only resources that match the entire display name given.
- filters
GetCompliance Policies Filter[] 
- id string
- unique CompliancePolicy identifier.
- state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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
Sequence[fleetappsmanagement.Get Compliance Policies Filter] 
- id str
- unique CompliancePolicy identifier.
- state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- id String
- unique CompliancePolicy identifier.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
getCompliancePolicies Result
The following output properties are available:
- CompliancePolicy List<GetCollections Compliance Policies Compliance Policy Collection> 
- The list of compliance_policy_collection.
- CompartmentId string
- The OCID of the compartment the CompliancePolicy belongs to.
- DisplayName string
- Display name for the CompliancePolicy.
- Filters
List<GetCompliance Policies Filter> 
- Id string
- The OCID of the CompliancePolicy.
- State string
- The current state of the CompliancePolicy.
- CompliancePolicy []GetCollections Compliance Policies Compliance Policy Collection 
- The list of compliance_policy_collection.
- CompartmentId string
- The OCID of the compartment the CompliancePolicy belongs to.
- DisplayName string
- Display name for the CompliancePolicy.
- Filters
[]GetCompliance Policies Filter 
- Id string
- The OCID of the CompliancePolicy.
- State string
- The current state of the CompliancePolicy.
- compliancePolicy List<GetCollections Compliance Policies Compliance Policy Collection> 
- The list of compliance_policy_collection.
- compartmentId String
- The OCID of the compartment the CompliancePolicy belongs to.
- displayName String
- Display name for the CompliancePolicy.
- filters
List<GetCompliance Policies Filter> 
- id String
- The OCID of the CompliancePolicy.
- state String
- The current state of the CompliancePolicy.
- compliancePolicy GetCollections Compliance Policies Compliance Policy Collection[] 
- The list of compliance_policy_collection.
- compartmentId string
- The OCID of the compartment the CompliancePolicy belongs to.
- displayName string
- Display name for the CompliancePolicy.
- filters
GetCompliance Policies Filter[] 
- id string
- The OCID of the CompliancePolicy.
- state string
- The current state of the CompliancePolicy.
- compliance_policy_ Sequence[fleetappsmanagement.collections Get Compliance Policies Compliance Policy Collection] 
- The list of compliance_policy_collection.
- compartment_id str
- The OCID of the compartment the CompliancePolicy belongs to.
- display_name str
- Display name for the CompliancePolicy.
- filters
Sequence[fleetappsmanagement.Get Compliance Policies Filter] 
- id str
- The OCID of the CompliancePolicy.
- state str
- The current state of the CompliancePolicy.
- compliancePolicy List<Property Map>Collections 
- The list of compliance_policy_collection.
- compartmentId String
- The OCID of the compartment the CompliancePolicy belongs to.
- displayName String
- Display name for the CompliancePolicy.
- filters List<Property Map>
- id String
- The OCID of the CompliancePolicy.
- state String
- The current state of the CompliancePolicy.
Supporting Types
GetCompliancePoliciesCompliancePolicyCollection     
GetCompliancePoliciesCompliancePolicyCollectionItem      
- CompartmentId string
- The ID of the compartment in which to list resources.
- 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
- A filter to return only resources that match the entire display name given.
- 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
- unique CompliancePolicy identifier.
- 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
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 ID of the compartment in which to list resources.
- 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
- A filter to return only resources that match the entire display name given.
- 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
- unique CompliancePolicy identifier.
- 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
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 ID of the compartment in which to list resources.
- 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
- A filter to return only resources that match the entire display name given.
- 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
- unique CompliancePolicy identifier.
- 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
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 ID of the compartment in which to list resources.
- {[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
- A filter to return only resources that match the entire display name given.
- {[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
- unique CompliancePolicy identifier.
- 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
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- {[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 ID of the compartment in which to list resources.
- 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
- A filter to return only resources that match the entire display name given.
- 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
- unique CompliancePolicy identifier.
- 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
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 ID of the compartment in which to list resources.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName String
- A filter to return only resources that match the entire display name given.
- 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
- unique CompliancePolicy identifier.
- 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
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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
GetCompliancePoliciesFilter   
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.