Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Database.getSchedulingPlans
Explore with Pulumi AI
This data source provides the list of Scheduling Plans in Oracle Cloud Infrastructure Database service.
Lists the Scheduling Plan resources in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSchedulingPlans = oci.Database.getSchedulingPlans({
    compartmentId: compartmentId,
    displayName: schedulingPlanDisplayName,
    id: schedulingPlanId,
    resourceId: testResource.id,
    schedulingPolicyId: testSchedulingPolicy.id,
    state: schedulingPlanState,
});
import pulumi
import pulumi_oci as oci
test_scheduling_plans = oci.Database.get_scheduling_plans(compartment_id=compartment_id,
    display_name=scheduling_plan_display_name,
    id=scheduling_plan_id,
    resource_id=test_resource["id"],
    scheduling_policy_id=test_scheduling_policy["id"],
    state=scheduling_plan_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.GetSchedulingPlans(ctx, &database.GetSchedulingPlansArgs{
			CompartmentId:      compartmentId,
			DisplayName:        pulumi.StringRef(schedulingPlanDisplayName),
			Id:                 pulumi.StringRef(schedulingPlanId),
			ResourceId:         pulumi.StringRef(testResource.Id),
			SchedulingPolicyId: pulumi.StringRef(testSchedulingPolicy.Id),
			State:              pulumi.StringRef(schedulingPlanState),
		}, 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 testSchedulingPlans = Oci.Database.GetSchedulingPlans.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = schedulingPlanDisplayName,
        Id = schedulingPlanId,
        ResourceId = testResource.Id,
        SchedulingPolicyId = testSchedulingPolicy.Id,
        State = schedulingPlanState,
    });
});
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.GetSchedulingPlansArgs;
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 testSchedulingPlans = DatabaseFunctions.getSchedulingPlans(GetSchedulingPlansArgs.builder()
            .compartmentId(compartmentId)
            .displayName(schedulingPlanDisplayName)
            .id(schedulingPlanId)
            .resourceId(testResource.id())
            .schedulingPolicyId(testSchedulingPolicy.id())
            .state(schedulingPlanState)
            .build());
    }
}
variables:
  testSchedulingPlans:
    fn::invoke:
      function: oci:Database:getSchedulingPlans
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${schedulingPlanDisplayName}
        id: ${schedulingPlanId}
        resourceId: ${testResource.id}
        schedulingPolicyId: ${testSchedulingPolicy.id}
        state: ${schedulingPlanState}
Using getSchedulingPlans
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 getSchedulingPlans(args: GetSchedulingPlansArgs, opts?: InvokeOptions): Promise<GetSchedulingPlansResult>
function getSchedulingPlansOutput(args: GetSchedulingPlansOutputArgs, opts?: InvokeOptions): Output<GetSchedulingPlansResult>def get_scheduling_plans(compartment_id: Optional[str] = None,
                         display_name: Optional[str] = None,
                         filters: Optional[Sequence[GetSchedulingPlansFilter]] = None,
                         id: Optional[str] = None,
                         resource_id: Optional[str] = None,
                         scheduling_policy_id: Optional[str] = None,
                         state: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSchedulingPlansResult
def get_scheduling_plans_output(compartment_id: Optional[pulumi.Input[str]] = None,
                         display_name: Optional[pulumi.Input[str]] = None,
                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSchedulingPlansFilterArgs]]]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         resource_id: Optional[pulumi.Input[str]] = None,
                         scheduling_policy_id: Optional[pulumi.Input[str]] = None,
                         state: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSchedulingPlansResult]func GetSchedulingPlans(ctx *Context, args *GetSchedulingPlansArgs, opts ...InvokeOption) (*GetSchedulingPlansResult, error)
func GetSchedulingPlansOutput(ctx *Context, args *GetSchedulingPlansOutputArgs, opts ...InvokeOption) GetSchedulingPlansResultOutput> Note: This function is named GetSchedulingPlans in the Go SDK.
public static class GetSchedulingPlans 
{
    public static Task<GetSchedulingPlansResult> InvokeAsync(GetSchedulingPlansArgs args, InvokeOptions? opts = null)
    public static Output<GetSchedulingPlansResult> Invoke(GetSchedulingPlansInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSchedulingPlansResult> getSchedulingPlans(GetSchedulingPlansArgs args, InvokeOptions options)
public static Output<GetSchedulingPlansResult> getSchedulingPlans(GetSchedulingPlansArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Database/getSchedulingPlans:getSchedulingPlans
  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 Plans Filter> 
- Id string
- A filter to return only resources that match the given Schedule Plan id exactly.
- ResourceId string
- A filter to return only resources that match the given resource id exactly.
- SchedulingPolicy stringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- 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 Plans Filter 
- Id string
- A filter to return only resources that match the given Schedule Plan id exactly.
- ResourceId string
- A filter to return only resources that match the given resource id exactly.
- SchedulingPolicy stringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- 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 Plans Filter> 
- id String
- A filter to return only resources that match the given Schedule Plan id exactly.
- resourceId String
- A filter to return only resources that match the given resource id exactly.
- schedulingPolicy StringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- 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 Plans Filter[] 
- id string
- A filter to return only resources that match the given Schedule Plan id exactly.
- resourceId string
- A filter to return only resources that match the given resource id exactly.
- schedulingPolicy stringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- 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 Plans Filter] 
- id str
- A filter to return only resources that match the given Schedule Plan id exactly.
- resource_id str
- A filter to return only resources that match the given resource id exactly.
- scheduling_policy_ strid 
- A filter to return only resources that match the given scheduling policy id exactly.
- 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>
- id String
- A filter to return only resources that match the given Schedule Plan id exactly.
- resourceId String
- A filter to return only resources that match the given resource id exactly.
- schedulingPolicy StringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- state String
- A filter to return only resources that match the given lifecycle state exactly.
getSchedulingPlans Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment.
- SchedulingPlan List<GetCollections Scheduling Plans Scheduling Plan Collection> 
- The list of scheduling_plan_collection.
- DisplayName string
- The display name of the Scheduling Plan.
- Filters
List<GetScheduling Plans Filter> 
- Id string
- The OCID of the Scheduling Plan.
- ResourceId string
- The OCID of the resource.
- SchedulingPolicy stringId 
- The OCID of the Scheduling Policy.
- State string
- The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED.
- CompartmentId string
- The OCID of the compartment.
- SchedulingPlan []GetCollections Scheduling Plans Scheduling Plan Collection 
- The list of scheduling_plan_collection.
- DisplayName string
- The display name of the Scheduling Plan.
- Filters
[]GetScheduling Plans Filter 
- Id string
- The OCID of the Scheduling Plan.
- ResourceId string
- The OCID of the resource.
- SchedulingPolicy stringId 
- The OCID of the Scheduling Policy.
- State string
- The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED.
- compartmentId String
- The OCID of the compartment.
- schedulingPlan List<GetCollections Scheduling Plans Scheduling Plan Collection> 
- The list of scheduling_plan_collection.
- displayName String
- The display name of the Scheduling Plan.
- filters
List<GetScheduling Plans Filter> 
- id String
- The OCID of the Scheduling Plan.
- resourceId String
- The OCID of the resource.
- schedulingPolicy StringId 
- The OCID of the Scheduling Policy.
- state String
- The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED.
- compartmentId string
- The OCID of the compartment.
- schedulingPlan GetCollections Scheduling Plans Scheduling Plan Collection[] 
- The list of scheduling_plan_collection.
- displayName string
- The display name of the Scheduling Plan.
- filters
GetScheduling Plans Filter[] 
- id string
- The OCID of the Scheduling Plan.
- resourceId string
- The OCID of the resource.
- schedulingPolicy stringId 
- The OCID of the Scheduling Policy.
- state string
- The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED.
- compartment_id str
- The OCID of the compartment.
- scheduling_plan_ Sequence[Getcollections Scheduling Plans Scheduling Plan Collection] 
- The list of scheduling_plan_collection.
- display_name str
- The display name of the Scheduling Plan.
- filters
Sequence[GetScheduling Plans Filter] 
- id str
- The OCID of the Scheduling Plan.
- resource_id str
- The OCID of the resource.
- scheduling_policy_ strid 
- The OCID of the Scheduling Policy.
- state str
- The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED.
- compartmentId String
- The OCID of the compartment.
- schedulingPlan List<Property Map>Collections 
- The list of scheduling_plan_collection.
- displayName String
- The display name of the Scheduling Plan.
- filters List<Property Map>
- id String
- The OCID of the Scheduling Plan.
- resourceId String
- The OCID of the resource.
- schedulingPolicy StringId 
- The OCID of the Scheduling Policy.
- state String
- The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED.
Supporting Types
GetSchedulingPlansFilter   
GetSchedulingPlansSchedulingPlanCollection     
GetSchedulingPlansSchedulingPlanCollectionItem      
- 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.
- EstimatedTime intIn Mins 
- The estimated time for the Scheduling Plan.
- 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
- A filter to return only resources that match the given Schedule Plan id exactly.
- IsUsing boolRecommended Scheduled Actions 
- If true, recommended scheduled actions will be generated for the scheduling plan.
- LifecycleDetails string
- Additional information about the current lifecycle state.
- PlanIntent string
- The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE.
- ResourceId string
- A filter to return only resources that match the given resource id exactly.
- SchedulingPolicy stringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- ServiceType string
- The service type of the Scheduling Plan.
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- TimeCreated string
- The date and time the Scheduling Plan Resource was created.
- TimeUpdated string
- The date and time the Scheduling Plan Resource was updated.
- 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.
- EstimatedTime intIn Mins 
- The estimated time for the Scheduling Plan.
- 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
- A filter to return only resources that match the given Schedule Plan id exactly.
- IsUsing boolRecommended Scheduled Actions 
- If true, recommended scheduled actions will be generated for the scheduling plan.
- LifecycleDetails string
- Additional information about the current lifecycle state.
- PlanIntent string
- The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE.
- ResourceId string
- A filter to return only resources that match the given resource id exactly.
- SchedulingPolicy stringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- ServiceType string
- The service type of the Scheduling Plan.
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- TimeCreated string
- The date and time the Scheduling Plan Resource was created.
- TimeUpdated string
- The date and time the Scheduling Plan Resource was updated.
- 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.
- estimatedTime IntegerIn Mins 
- The estimated time for the Scheduling Plan.
- 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
- A filter to return only resources that match the given Schedule Plan id exactly.
- isUsing BooleanRecommended Scheduled Actions 
- If true, recommended scheduled actions will be generated for the scheduling plan.
- lifecycleDetails String
- Additional information about the current lifecycle state.
- planIntent String
- The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE.
- resourceId String
- A filter to return only resources that match the given resource id exactly.
- schedulingPolicy StringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- serviceType String
- The service type of the Scheduling Plan.
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- timeCreated String
- The date and time the Scheduling Plan Resource was created.
- timeUpdated String
- The date and time the Scheduling Plan Resource was updated.
- 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.
- estimatedTime numberIn Mins 
- The estimated time for the Scheduling Plan.
- {[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
- A filter to return only resources that match the given Schedule Plan id exactly.
- isUsing booleanRecommended Scheduled Actions 
- If true, recommended scheduled actions will be generated for the scheduling plan.
- lifecycleDetails string
- Additional information about the current lifecycle state.
- planIntent string
- The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE.
- resourceId string
- A filter to return only resources that match the given resource id exactly.
- schedulingPolicy stringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- serviceType string
- The service type of the Scheduling Plan.
- state string
- A filter to return only resources that match the given lifecycle state exactly.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- timeCreated string
- The date and time the Scheduling Plan Resource was created.
- timeUpdated string
- The date and time the Scheduling Plan Resource was updated.
- 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.
- estimated_time_ intin_ mins 
- The estimated time for the Scheduling Plan.
- 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
- A filter to return only resources that match the given Schedule Plan id exactly.
- is_using_ boolrecommended_ scheduled_ actions 
- If true, recommended scheduled actions will be generated for the scheduling plan.
- lifecycle_details str
- Additional information about the current lifecycle state.
- plan_intent str
- The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE.
- resource_id str
- A filter to return only resources that match the given resource id exactly.
- scheduling_policy_ strid 
- A filter to return only resources that match the given scheduling policy id exactly.
- service_type str
- The service type of the Scheduling Plan.
- state str
- A filter to return only resources that match the given lifecycle state exactly.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- time_created str
- The date and time the Scheduling Plan Resource was created.
- time_updated str
- The date and time the Scheduling Plan Resource was updated.
- 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.
- estimatedTime NumberIn Mins 
- The estimated time for the Scheduling Plan.
- 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
- A filter to return only resources that match the given Schedule Plan id exactly.
- isUsing BooleanRecommended Scheduled Actions 
- If true, recommended scheduled actions will be generated for the scheduling plan.
- lifecycleDetails String
- Additional information about the current lifecycle state.
- planIntent String
- The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE.
- resourceId String
- A filter to return only resources that match the given resource id exactly.
- schedulingPolicy StringId 
- A filter to return only resources that match the given scheduling policy id exactly.
- serviceType String
- The service type of the Scheduling Plan.
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- timeCreated String
- The date and time the Scheduling Plan Resource was created.
- timeUpdated String
- The date and time the Scheduling Plan Resource was updated.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.