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

oci.Database.getSchedulingPolicies

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

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

    }
}
Copy
variables:
  testSchedulingPolicies:
    fn::invoke:
      function: oci:Database:getSchedulingPolicies
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${schedulingPolicyDisplayName}
        state: ${schedulingPolicyState}
Copy

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>
Copy
def get_scheduling_policies(compartment_id: Optional[str] = None,
                            display_name: Optional[str] = None,
                            filters: Optional[Sequence[_database.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[_database.GetSchedulingPoliciesFilterArgs]]]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetSchedulingPoliciesResult]
Copy
func GetSchedulingPolicies(ctx *Context, args *GetSchedulingPoliciesArgs, opts ...InvokeOption) (*GetSchedulingPoliciesResult, error)
func GetSchedulingPoliciesOutput(ctx *Context, args *GetSchedulingPoliciesOutputArgs, opts ...InvokeOption) GetSchedulingPoliciesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSchedulingPoliciesResult> getSchedulingPolicies(GetSchedulingPoliciesArgs args, InvokeOptions options)
public static Output<GetSchedulingPoliciesResult> getSchedulingPolicies(GetSchedulingPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Database/getSchedulingPolicies:getSchedulingPolicies
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. 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 Changes to this property will trigger replacement. List<GetSchedulingPoliciesFilter>
State string
A filter to return only resources that match the given lifecycle state exactly.
CompartmentId This property is required. 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 Changes to this property will trigger replacement. []GetSchedulingPoliciesFilter
State string
A filter to return only resources that match the given lifecycle state exactly.
compartmentId This property is required. 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 Changes to this property will trigger replacement. List<GetSchedulingPoliciesFilter>
state String
A filter to return only resources that match the given lifecycle state exactly.
compartmentId This property is required. 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 Changes to this property will trigger replacement. GetSchedulingPoliciesFilter[]
state string
A filter to return only resources that match the given lifecycle state exactly.
compartment_id This property is required. 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 Changes to this property will trigger replacement. Sequence[database.GetSchedulingPoliciesFilter]
state str
A filter to return only resources that match the given lifecycle state exactly.
compartmentId This property is required. 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 Changes to this property will trigger replacement. 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<GetSchedulingPoliciesSchedulingPolicy>
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<GetSchedulingPoliciesFilter>
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 []GetSchedulingPoliciesSchedulingPolicy
The list of scheduling_policies.
DisplayName string
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
Filters []GetSchedulingPoliciesFilter
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<GetSchedulingPoliciesSchedulingPolicy>
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<GetSchedulingPoliciesFilter>
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 GetSchedulingPoliciesSchedulingPolicy[]
The list of scheduling_policies.
displayName string
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
filters GetSchedulingPoliciesFilter[]
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[database.GetSchedulingPoliciesSchedulingPolicy]
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[database.GetSchedulingPoliciesFilter]
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

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

GetSchedulingPoliciesSchedulingPolicy

Cadence This property is required. string
The cadence period.
CadenceStartMonths This property is required. List<GetSchedulingPoliciesSchedulingPolicyCadenceStartMonth>
Start of the month to be followed during the cadence period.
CompartmentId This property is required. string
The compartment OCID.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
DisplayName This property is required. string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
FreeformTags This property is required. 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 This property is required. string
The OCID of the Scheduling Policy.
LifecycleDetails This property is required. string
Additional information about the current lifecycle state.
State This property is required. string
A filter to return only resources that match the given lifecycle state exactly.
TimeCreated This property is required. string
The date and time the Scheduling Policy was created.
TimeNextWindowStarts This property is required. string
The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
TimeUpdated This property is required. string
The last date and time that the Scheduling Policy was updated.
Cadence This property is required. string
The cadence period.
CadenceStartMonths This property is required. []GetSchedulingPoliciesSchedulingPolicyCadenceStartMonth
Start of the month to be followed during the cadence period.
CompartmentId This property is required. string
The compartment OCID.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
DisplayName This property is required. string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
FreeformTags This property is required. 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 This property is required. string
The OCID of the Scheduling Policy.
LifecycleDetails This property is required. string
Additional information about the current lifecycle state.
State This property is required. string
A filter to return only resources that match the given lifecycle state exactly.
TimeCreated This property is required. string
The date and time the Scheduling Policy was created.
TimeNextWindowStarts This property is required. string
The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
TimeUpdated This property is required. string
The last date and time that the Scheduling Policy was updated.
cadence This property is required. String
The cadence period.
cadenceStartMonths This property is required. List<GetSchedulingPoliciesSchedulingPolicyCadenceStartMonth>
Start of the month to be followed during the cadence period.
compartmentId This property is required. String
The compartment OCID.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
displayName This property is required. String
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeformTags This property is required. 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 This property is required. String
The OCID of the Scheduling Policy.
lifecycleDetails This property is required. String
Additional information about the current lifecycle state.
state This property is required. String
A filter to return only resources that match the given lifecycle state exactly.
timeCreated This property is required. String
The date and time the Scheduling Policy was created.
timeNextWindowStarts This property is required. String
The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
timeUpdated This property is required. String
The last date and time that the Scheduling Policy was updated.
cadence This property is required. string
The cadence period.
cadenceStartMonths This property is required. GetSchedulingPoliciesSchedulingPolicyCadenceStartMonth[]
Start of the month to be followed during the cadence period.
compartmentId This property is required. string
The compartment OCID.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
displayName This property is required. string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeformTags This property is required. {[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 This property is required. string
The OCID of the Scheduling Policy.
lifecycleDetails This property is required. string
Additional information about the current lifecycle state.
state This property is required. string
A filter to return only resources that match the given lifecycle state exactly.
timeCreated This property is required. string
The date and time the Scheduling Policy was created.
timeNextWindowStarts This property is required. string
The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
timeUpdated This property is required. string
The last date and time that the Scheduling Policy was updated.
cadence This property is required. str
The cadence period.
cadence_start_months This property is required. Sequence[database.GetSchedulingPoliciesSchedulingPolicyCadenceStartMonth]
Start of the month to be followed during the cadence period.
compartment_id This property is required. str
The compartment OCID.
defined_tags This property is required. 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 This property is required. str
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeform_tags This property is required. 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 This property is required. str
The OCID of the Scheduling Policy.
lifecycle_details This property is required. str
Additional information about the current lifecycle state.
state This property is required. str
A filter to return only resources that match the given lifecycle state exactly.
time_created This property is required. str
The date and time the Scheduling Policy was created.
time_next_window_starts This property is required. str
The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
time_updated This property is required. str
The last date and time that the Scheduling Policy was updated.
cadence This property is required. String
The cadence period.
cadenceStartMonths This property is required. List<Property Map>
Start of the month to be followed during the cadence period.
compartmentId This property is required. String
The compartment OCID.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
displayName This property is required. String
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeformTags This property is required. 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 This property is required. String
The OCID of the Scheduling Policy.
lifecycleDetails This property is required. String
Additional information about the current lifecycle state.
state This property is required. String
A filter to return only resources that match the given lifecycle state exactly.
timeCreated This property is required. String
The date and time the Scheduling Policy was created.
timeNextWindowStarts This property is required. String
The date and time of the next scheduling window associated with the schedulingPolicy is planned to start.
timeUpdated This property is required. String
The last date and time that the Scheduling Policy was updated.

GetSchedulingPoliciesSchedulingPolicyCadenceStartMonth

Name This property is required. string
Name of the month of the year.
Name This property is required. string
Name of the month of the year.
name This property is required. String
Name of the month of the year.
name This property is required. string
Name of the month of the year.
name This property is required. str
Name of the month of the year.
name This property is required. 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 oci Terraform Provider.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi