Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.FleetAppsManagement.getCompliancePolicies
Start a Neo task
Explain and create an oci.FleetAppsManagement.getCompliancePolicies resource
This data source provides the list of Compliance Policies in Oracle Cloud Infrastructure Fleet Apps Management service.
Returns a list of all the Compliance Policies in the specified compartment.
The query parameter compartmentId is required unless the query parameter id is specified.
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,
type: compliancePolicyType,
});
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,
type=compliance_policy_type)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/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),
Type: pulumi.StringRef(compliancePolicyType),
}, 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,
Type = compliancePolicyType,
});
});
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)
.type(compliancePolicyType)
.build());
}
}
variables:
testCompliancePolicies:
fn::invoke:
function: oci:FleetAppsManagement:getCompliancePolicies
arguments:
compartmentId: ${compartmentId}
displayName: ${compliancePolicyDisplayName}
id: ${compliancePolicyId}
state: ${compliancePolicyState}
type: ${compliancePolicyType}
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[GetCompliancePoliciesFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
type: 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[GetCompliancePoliciesFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
type: 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:
- Compartment
Id string - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Filters
List<Get
Compliance Policies Filter> - Id string
- Unique identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Type string
- A filter to return Platform Configurations whose type matches the given type.
- Compartment
Id string - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Filters
[]Get
Compliance Policies Filter - Id string
- Unique identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Type string
- A filter to return Platform Configurations whose type matches the given type.
- compartment
Id String - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- display
Name String - A filter to return only resources that match the entire display name given.
- filters
List<Get
Compliance Policies Filter> - id String
- Unique identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- type String
- A filter to return Platform Configurations whose type matches the given type.
- compartment
Id string - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- display
Name string - A filter to return only resources that match the entire display name given.
- filters
Get
Compliance Policies Filter[] - id string
- Unique identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- type string
- A filter to return Platform Configurations whose type matches the given type.
- compartment_
id str - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- display_
name str - A filter to return only resources that match the entire display name given.
- filters
Sequence[Get
Compliance Policies Filter] - id str
- Unique identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- type str
- A filter to return Platform Configurations whose type matches the given type.
- compartment
Id String - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- display
Name String - A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- id String
- Unique identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- type String
- A filter to return Platform Configurations whose type matches the given type.
getCompliancePolicies Result
The following output properties are available:
- Compliance
Policy List<GetCollections Compliance Policies Compliance Policy Collection> - The list of compliance_policy_collection.
- Compartment
Id string - The OCID of the compartment the CompliancePolicy belongs to.
- Display
Name string - Display name for the CompliancePolicy.
- Filters
List<Get
Compliance Policies Filter> - Id string
- The OCID of the CompliancePolicy.
- State string
- The current state of the CompliancePolicy.
- Type string
- The type of the Compliance Policy.
- Compliance
Policy []GetCollections Compliance Policies Compliance Policy Collection - The list of compliance_policy_collection.
- Compartment
Id string - The OCID of the compartment the CompliancePolicy belongs to.
- Display
Name string - Display name for the CompliancePolicy.
- Filters
[]Get
Compliance Policies Filter - Id string
- The OCID of the CompliancePolicy.
- State string
- The current state of the CompliancePolicy.
- Type string
- The type of the Compliance Policy.
- compliance
Policy List<GetCollections Compliance Policies Compliance Policy Collection> - The list of compliance_policy_collection.
- compartment
Id String - The OCID of the compartment the CompliancePolicy belongs to.
- display
Name String - Display name for the CompliancePolicy.
- filters
List<Get
Compliance Policies Filter> - id String
- The OCID of the CompliancePolicy.
- state String
- The current state of the CompliancePolicy.
- type String
- The type of the Compliance Policy.
- compliance
Policy GetCollections Compliance Policies Compliance Policy Collection[] - The list of compliance_policy_collection.
- compartment
Id string - The OCID of the compartment the CompliancePolicy belongs to.
- display
Name string - Display name for the CompliancePolicy.
- filters
Get
Compliance Policies Filter[] - id string
- The OCID of the CompliancePolicy.
- state string
- The current state of the CompliancePolicy.
- type string
- The type of the Compliance Policy.
- compliance_
policy_ Sequence[Getcollections 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[Get
Compliance Policies Filter] - id str
- The OCID of the CompliancePolicy.
- state str
- The current state of the CompliancePolicy.
- type str
- The type of the Compliance Policy.
- compliance
Policy List<Property Map>Collections - The list of compliance_policy_collection.
- compartment
Id String - The OCID of the compartment the CompliancePolicy belongs to.
- display
Name 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.
- type String
- The type of the Compliance Policy.
Supporting Types
GetCompliancePoliciesCompliancePolicyCollection
GetCompliancePoliciesCompliancePolicyCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- 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 - 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 identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- 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
- 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"} - 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 - Type string
- A filter to return Platform Configurations whose type matches the given type.
- Compartment
Id string - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- 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 - 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 identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- 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
- 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"} - 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 - Type string
- A filter to return Platform Configurations whose type matches the given type.
- compartment
Id String - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- 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 - 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 identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- 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
- 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"} - 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 - type String
- A filter to return Platform Configurations whose type matches the given type.
- compartment
Id string - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- {[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 - 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 identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- 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
- 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"} - 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 - type string
- A filter to return Platform Configurations whose type matches the given type.
- compartment_
id str - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- 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 identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- 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 - type str
- A filter to return Platform Configurations whose type matches the given type.
- compartment
Id String - The ID of the compartment in which to list resources. Empty only if the resource OCID query param is not specified.
- 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 - 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 identifier or OCID for listing a single Compliance Policy by id. Either compartmentId or id must be provided.
- 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
- 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"} - 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 - type String
- A filter to return Platform Configurations whose type matches the given type.
GetCompliancePoliciesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
