Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Database.getSchedulingPolicies
Explore with Pulumi AI
This data source provides the list of Scheduling Policies in Oracle Cloud Infrastructure Database service.
Lists the Scheduling Policy resources in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSchedulingPolicies = oci.Database.getSchedulingPolicies({
    compartmentId: compartmentId,
    displayName: schedulingPolicyDisplayName,
    state: schedulingPolicyState,
});
import pulumi
import pulumi_oci as oci
test_scheduling_policies = oci.Database.get_scheduling_policies(compartment_id=compartment_id,
    display_name=scheduling_policy_display_name,
    state=scheduling_policy_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/database"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := database.GetSchedulingPolicies(ctx, &database.GetSchedulingPoliciesArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(schedulingPolicyDisplayName),
			State:         pulumi.StringRef(schedulingPolicyState),
		}, 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 testSchedulingPolicies = Oci.Database.GetSchedulingPolicies.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = schedulingPolicyDisplayName,
        State = schedulingPolicyState,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Database.DatabaseFunctions;
import com.pulumi.oci.Database.inputs.GetSchedulingPoliciesArgs;
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 testSchedulingPolicies = DatabaseFunctions.getSchedulingPolicies(GetSchedulingPoliciesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(schedulingPolicyDisplayName)
            .state(schedulingPolicyState)
            .build());
    }
}
variables:
  testSchedulingPolicies:
    fn::invoke:
      function: oci:Database:getSchedulingPolicies
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${schedulingPolicyDisplayName}
        state: ${schedulingPolicyState}
Using getSchedulingPolicies
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 getSchedulingPolicies(args: GetSchedulingPoliciesArgs, opts?: InvokeOptions): Promise<GetSchedulingPoliciesResult>
function getSchedulingPoliciesOutput(args: GetSchedulingPoliciesOutputArgs, opts?: InvokeOptions): Output<GetSchedulingPoliciesResult>def get_scheduling_policies(compartment_id: Optional[str] = None,
                            display_name: Optional[str] = None,
                            filters: Optional[Sequence[GetSchedulingPoliciesFilter]] = None,
                            state: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetSchedulingPoliciesResult
def get_scheduling_policies_output(compartment_id: Optional[pulumi.Input[str]] = None,
                            display_name: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSchedulingPoliciesFilterArgs]]]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetSchedulingPoliciesResult]func GetSchedulingPolicies(ctx *Context, args *GetSchedulingPoliciesArgs, opts ...InvokeOption) (*GetSchedulingPoliciesResult, error)
func GetSchedulingPoliciesOutput(ctx *Context, args *GetSchedulingPoliciesOutputArgs, opts ...InvokeOption) GetSchedulingPoliciesResultOutput> Note: This function is named GetSchedulingPolicies in the Go SDK.
public static class GetSchedulingPolicies 
{
    public static Task<GetSchedulingPoliciesResult> InvokeAsync(GetSchedulingPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetSchedulingPoliciesResult> Invoke(GetSchedulingPoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSchedulingPoliciesResult> getSchedulingPolicies(GetSchedulingPoliciesArgs args, InvokeOptions options)
public static Output<GetSchedulingPoliciesResult> getSchedulingPolicies(GetSchedulingPoliciesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Database/getSchedulingPolicies:getSchedulingPolicies
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The compartment OCID.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Filters
List<GetScheduling Policies Filter> 
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- CompartmentId string
- The compartment OCID.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Filters
[]GetScheduling Policies Filter 
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- compartmentId String
- The compartment OCID.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
List<GetScheduling Policies Filter> 
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- compartmentId string
- The compartment OCID.
- displayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
GetScheduling Policies Filter[] 
- state string
- A filter to return only resources that match the given lifecycle state exactly.
- compartment_id str
- The compartment OCID.
- display_name str
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
Sequence[GetScheduling Policies Filter] 
- state str
- A filter to return only resources that match the given lifecycle state exactly.
- compartmentId String
- The compartment OCID.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters List<Property Map>
- state String
- A filter to return only resources that match the given lifecycle state exactly.
getSchedulingPolicies Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment.
- Id string
- The provider-assigned unique ID for this managed resource.
- SchedulingPolicies List<GetScheduling Policies Scheduling Policy> 
- The list of scheduling_policies.
- DisplayName string
- The user-friendly name for the Scheduling Policy. The name does not need to be unique.
- Filters
List<GetScheduling Policies Filter> 
- State string
- The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
- CompartmentId string
- The OCID of the compartment.
- Id string
- The provider-assigned unique ID for this managed resource.
- SchedulingPolicies []GetScheduling Policies Scheduling Policy 
- The list of scheduling_policies.
- DisplayName string
- The user-friendly name for the Scheduling Policy. The name does not need to be unique.
- Filters
[]GetScheduling Policies Filter 
- State string
- The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
- compartmentId String
- The OCID of the compartment.
- id String
- The provider-assigned unique ID for this managed resource.
- schedulingPolicies List<GetScheduling Policies Scheduling Policy> 
- The list of scheduling_policies.
- displayName String
- The user-friendly name for the Scheduling Policy. The name does not need to be unique.
- filters
List<GetScheduling Policies Filter> 
- state String
- The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
- compartmentId string
- The OCID of the compartment.
- id string
- The provider-assigned unique ID for this managed resource.
- schedulingPolicies GetScheduling Policies Scheduling Policy[] 
- The list of scheduling_policies.
- displayName string
- The user-friendly name for the Scheduling Policy. The name does not need to be unique.
- filters
GetScheduling Policies Filter[] 
- state string
- The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
- compartment_id str
- The OCID of the compartment.
- id str
- The provider-assigned unique ID for this managed resource.
- scheduling_policies Sequence[GetScheduling Policies Scheduling Policy] 
- The list of scheduling_policies.
- display_name str
- The user-friendly name for the Scheduling Policy. The name does not need to be unique.
- filters
Sequence[GetScheduling Policies Filter] 
- state str
- The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
- compartmentId String
- The OCID of the compartment.
- id String
- The provider-assigned unique ID for this managed resource.
- schedulingPolicies List<Property Map>
- The list of scheduling_policies.
- displayName String
- The user-friendly name for the Scheduling Policy. The name does not need to be unique.
- filters List<Property Map>
- state String
- The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
Supporting Types
GetSchedulingPoliciesFilter   
GetSchedulingPoliciesSchedulingPolicy    
- Cadence string
- The cadence period.
- CadenceStart List<GetMonths Scheduling Policies Scheduling Policy Cadence Start Month> 
- Start of the month to be followed during the cadence period.
- CompartmentId string
- The compartment OCID.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- The OCID of the Scheduling Policy.
- LifecycleDetails string
- Additional information about the current lifecycle state.
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- TimeCreated string
- The date and time the Scheduling Policy was created.
- TimeNext stringWindow Starts 
- The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
- TimeUpdated string
- The last date and time that the Scheduling Policy was updated.
- Cadence string
- The cadence period.
- CadenceStart []GetMonths Scheduling Policies Scheduling Policy Cadence Start Month 
- Start of the month to be followed during the cadence period.
- CompartmentId string
- The compartment OCID.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- The OCID of the Scheduling Policy.
- LifecycleDetails string
- Additional information about the current lifecycle state.
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- TimeCreated string
- The date and time the Scheduling Policy was created.
- TimeNext stringWindow Starts 
- The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
- TimeUpdated string
- The last date and time that the Scheduling Policy was updated.
- cadence String
- The cadence period.
- cadenceStart List<GetMonths Scheduling Policies Scheduling Policy Cadence Start Month> 
- Start of the month to be followed during the cadence period.
- compartmentId String
- The compartment OCID.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- The OCID of the Scheduling Policy.
- lifecycleDetails String
- Additional information about the current lifecycle state.
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- timeCreated String
- The date and time the Scheduling Policy was created.
- timeNext StringWindow Starts 
- The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
- timeUpdated String
- The last date and time that the Scheduling Policy was updated.
- cadence string
- The cadence period.
- cadenceStart GetMonths Scheduling Policies Scheduling Policy Cadence Start Month[] 
- Start of the month to be followed during the cadence period.
- compartmentId string
- The compartment OCID.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id string
- The OCID of the Scheduling Policy.
- lifecycleDetails string
- Additional information about the current lifecycle state.
- state string
- A filter to return only resources that match the given lifecycle state exactly.
- timeCreated string
- The date and time the Scheduling Policy was created.
- timeNext stringWindow Starts 
- The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
- timeUpdated string
- The last date and time that the Scheduling Policy was updated.
- cadence str
- The cadence period.
- cadence_start_ Sequence[Getmonths Scheduling Policies Scheduling Policy Cadence Start Month] 
- Start of the month to be followed during the cadence period.
- compartment_id str
- The compartment OCID.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- display_name str
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id str
- The OCID of the Scheduling Policy.
- lifecycle_details str
- Additional information about the current lifecycle state.
- state str
- A filter to return only resources that match the given lifecycle state exactly.
- time_created str
- The date and time the Scheduling Policy was created.
- time_next_ strwindow_ starts 
- The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
- time_updated str
- The last date and time that the Scheduling Policy was updated.
- cadence String
- The cadence period.
- cadenceStart List<Property Map>Months 
- Start of the month to be followed during the cadence period.
- compartmentId String
- The compartment OCID.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- The OCID of the Scheduling Policy.
- lifecycleDetails String
- Additional information about the current lifecycle state.
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- timeCreated String
- The date and time the Scheduling Policy was created.
- timeNext StringWindow Starts 
- The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
- timeUpdated String
- The last date and time that the Scheduling Policy was updated.
GetSchedulingPoliciesSchedulingPolicyCadenceStartMonth       
- Name string
- Name of the month of the year.
- Name string
- Name of the month of the year.
- name String
- Name of the month of the year.
- name string
- Name of the month of the year.
- name str
- Name of the month of the year.
- name String
- Name of the month of the year.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.