1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. FleetAppsManagement
  5. getCompliancePolicy
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.FleetAppsManagement.getCompliancePolicy

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

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,
});
Copy
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"])
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.GetCompliancePolicy(ctx, &fleetappsmanagement.GetCompliancePolicyArgs{
			CompliancePolicyId: testCompliancePolicyOciFleetAppsManagementCompliancePolicy.Id,
		}, 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 testCompliancePolicy = Oci.FleetAppsManagement.GetCompliancePolicy.Invoke(new()
    {
        CompliancePolicyId = testCompliancePolicyOciFleetAppsManagementCompliancePolicy.Id,
    });

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

    }
}
Copy
variables:
  testCompliancePolicy:
    fn::invoke:
      function: oci:FleetAppsManagement:getCompliancePolicy
      arguments:
        compliancePolicyId: ${testCompliancePolicyOciFleetAppsManagementCompliancePolicy.id}
Copy

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>
Copy
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]
Copy
func GetCompliancePolicy(ctx *Context, args *GetCompliancePolicyArgs, opts ...InvokeOption) (*GetCompliancePolicyResult, error)
func GetCompliancePolicyOutput(ctx *Context, args *GetCompliancePolicyOutputArgs, opts ...InvokeOption) GetCompliancePolicyResultOutput
Copy

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

The following arguments are supported:

CompliancePolicyId This property is required. string
unique CompliancePolicy identifier.
CompliancePolicyId This property is required. string
unique CompliancePolicy identifier.
compliancePolicyId This property is required. String
unique CompliancePolicy identifier.
compliancePolicyId This property is required. string
unique CompliancePolicy identifier.
compliance_policy_id This property is required. str
unique CompliancePolicy identifier.
compliancePolicyId This property is required. String
unique CompliancePolicy identifier.

getCompliancePolicy Result

The following output properties are available:

CompartmentId string
The OCID of the compartment the CompliancePolicy belongs to.
CompliancePolicyId string
DefinedTags 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.
FreeformTags 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.
SystemTags 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.
CompliancePolicyId string
DefinedTags 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.
FreeformTags 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.
SystemTags 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.
compliancePolicyId String
definedTags 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.
freeformTags 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.
systemTags 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.
compliancePolicyId string
definedTags {[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.
freeformTags {[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.
systemTags {[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_id str
defined_tags 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.
freeform_tags 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.
system_tags 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.
compliancePolicyId String
definedTags 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.
freeformTags 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.
systemTags 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 oci Terraform Provider.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi