1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. FleetAppsManagement
  5. getCompliancePolicies
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.FleetAppsManagement.getCompliancePolicies

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testCompliancePolicies:
    fn::invoke:
      function: oci:FleetAppsManagement:getCompliancePolicies
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${compliancePolicyDisplayName}
        id: ${compliancePolicyId}
        state: ${compliancePolicyState}
Copy

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>
Copy
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]
Copy
func GetCompliancePolicies(ctx *Context, args *GetCompliancePoliciesArgs, opts ...InvokeOption) (*GetCompliancePoliciesResult, error)
func GetCompliancePoliciesOutput(ctx *Context, args *GetCompliancePoliciesOutputArgs, opts ...InvokeOption) GetCompliancePoliciesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetCompliancePoliciesResult> getCompliancePolicies(GetCompliancePoliciesArgs args, InvokeOptions options)
public static Output<GetCompliancePoliciesResult> getCompliancePolicies(GetCompliancePoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:FleetAppsManagement/getCompliancePolicies:getCompliancePolicies
  arguments:
    # arguments dictionary
Copy

The 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 Changes to this property will trigger replacement. List<GetCompliancePoliciesFilter>
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 Changes to this property will trigger replacement. []GetCompliancePoliciesFilter
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 Changes to this property will trigger replacement. List<GetCompliancePoliciesFilter>
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 Changes to this property will trigger replacement. GetCompliancePoliciesFilter[]
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 Changes to this property will trigger replacement. Sequence[fleetappsmanagement.GetCompliancePoliciesFilter]
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 Changes to this property will trigger replacement. 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:

CompliancePolicyCollections List<GetCompliancePoliciesCompliancePolicyCollection>
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<GetCompliancePoliciesFilter>
Id string
The OCID of the CompliancePolicy.
State string
The current state of the CompliancePolicy.
CompliancePolicyCollections []GetCompliancePoliciesCompliancePolicyCollection
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 []GetCompliancePoliciesFilter
Id string
The OCID of the CompliancePolicy.
State string
The current state of the CompliancePolicy.
compliancePolicyCollections List<GetCompliancePoliciesCompliancePolicyCollection>
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<GetCompliancePoliciesFilter>
id String
The OCID of the CompliancePolicy.
state String
The current state of the CompliancePolicy.
compliancePolicyCollections GetCompliancePoliciesCompliancePolicyCollection[]
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 GetCompliancePoliciesFilter[]
id string
The OCID of the CompliancePolicy.
state string
The current state of the CompliancePolicy.
compliance_policy_collections Sequence[fleetappsmanagement.GetCompliancePoliciesCompliancePolicyCollection]
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.GetCompliancePoliciesFilter]
id str
The OCID of the CompliancePolicy.
state str
The current state of the CompliancePolicy.
compliancePolicyCollections List<Property Map>
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

items This property is required. List<Property Map>

GetCompliancePoliciesCompliancePolicyCollectionItem

CompartmentId This property is required. string
The ID of the compartment in which to list resources.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
DisplayName This property is required. string
A filter to return only resources that match the entire display name given.
FreeformTags This property is required. 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 This property is required. string
unique CompliancePolicy identifier.
LifecycleDetails This property is required. 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 This property is required. string
platformConfiguration OCID corresponding to the Product.
State This property is required. string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
SystemTags This property is required. 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 This property is required. string
The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
TimeUpdated This property is required. string
The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
CompartmentId This property is required. string
The ID of the compartment in which to list resources.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
DisplayName This property is required. string
A filter to return only resources that match the entire display name given.
FreeformTags This property is required. 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 This property is required. string
unique CompliancePolicy identifier.
LifecycleDetails This property is required. 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 This property is required. string
platformConfiguration OCID corresponding to the Product.
State This property is required. string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
SystemTags This property is required. 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 This property is required. string
The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
TimeUpdated This property is required. string
The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. String
The ID of the compartment in which to list resources.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. String
A filter to return only resources that match the entire display name given.
freeformTags This property is required. 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 This property is required. String
unique CompliancePolicy identifier.
lifecycleDetails This property is required. 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 This property is required. String
platformConfiguration OCID corresponding to the Product.
state This property is required. String
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
systemTags This property is required. 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 This property is required. String
The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. String
The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. string
The ID of the compartment in which to list resources.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. string
A filter to return only resources that match the entire display name given.
freeformTags This property is required. {[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 This property is required. string
unique CompliancePolicy identifier.
lifecycleDetails This property is required. 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 This property is required. string
platformConfiguration OCID corresponding to the Product.
state This property is required. string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
systemTags This property is required. {[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 This property is required. string
The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. 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 This property is required. str
The ID of the compartment in which to list resources.
defined_tags This property is required. 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 This property is required. str
A filter to return only resources that match the entire display name given.
freeform_tags This property is required. 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 This property is required. str
unique CompliancePolicy identifier.
lifecycle_details This property is required. 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 This property is required. str
platformConfiguration OCID corresponding to the Product.
state This property is required. str
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
system_tags This property is required. 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 This property is required. 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 This property is required. str
The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. String
The ID of the compartment in which to list resources.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. String
A filter to return only resources that match the entire display name given.
freeformTags This property is required. 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 This property is required. String
unique CompliancePolicy identifier.
lifecycleDetails This property is required. 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 This property is required. String
platformConfiguration OCID corresponding to the Product.
state This property is required. String
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
systemTags This property is required. Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
The date and time the CompliancePolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. String
The date and time the CompliancePolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z

GetCompliancePoliciesFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi