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

oci.Database.getSchedulingPolicy

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

This data source provides details about a specific Scheduling Policy resource in Oracle Cloud Infrastructure Database service.

Gets information about the specified Scheduling Policy.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testSchedulingPolicy = oci.Database.getSchedulingPolicy({
    schedulingPolicyId: testSchedulingPolicyOciDatabaseSchedulingPolicy.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_scheduling_policy = oci.Database.get_scheduling_policy(scheduling_policy_id=test_scheduling_policy_oci_database_scheduling_policy["id"])
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.GetSchedulingPolicy(ctx, &database.GetSchedulingPolicyArgs{
			SchedulingPolicyId: testSchedulingPolicyOciDatabaseSchedulingPolicy.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 testSchedulingPolicy = Oci.Database.GetSchedulingPolicy.Invoke(new()
    {
        SchedulingPolicyId = testSchedulingPolicyOciDatabaseSchedulingPolicy.Id,
    });

});
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.GetSchedulingPolicyArgs;
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 testSchedulingPolicy = DatabaseFunctions.getSchedulingPolicy(GetSchedulingPolicyArgs.builder()
            .schedulingPolicyId(testSchedulingPolicyOciDatabaseSchedulingPolicy.id())
            .build());

    }
}
Copy
variables:
  testSchedulingPolicy:
    fn::invoke:
      function: oci:Database:getSchedulingPolicy
      arguments:
        schedulingPolicyId: ${testSchedulingPolicyOciDatabaseSchedulingPolicy.id}
Copy

Using getSchedulingPolicy

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 getSchedulingPolicy(args: GetSchedulingPolicyArgs, opts?: InvokeOptions): Promise<GetSchedulingPolicyResult>
function getSchedulingPolicyOutput(args: GetSchedulingPolicyOutputArgs, opts?: InvokeOptions): Output<GetSchedulingPolicyResult>
Copy
def get_scheduling_policy(scheduling_policy_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSchedulingPolicyResult
def get_scheduling_policy_output(scheduling_policy_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetSchedulingPolicyResult]
Copy
func GetSchedulingPolicy(ctx *Context, args *GetSchedulingPolicyArgs, opts ...InvokeOption) (*GetSchedulingPolicyResult, error)
func GetSchedulingPolicyOutput(ctx *Context, args *GetSchedulingPolicyOutputArgs, opts ...InvokeOption) GetSchedulingPolicyResultOutput
Copy

> Note: This function is named GetSchedulingPolicy in the Go SDK.

public static class GetSchedulingPolicy 
{
    public static Task<GetSchedulingPolicyResult> InvokeAsync(GetSchedulingPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetSchedulingPolicyResult> Invoke(GetSchedulingPolicyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSchedulingPolicyResult> getSchedulingPolicy(GetSchedulingPolicyArgs args, InvokeOptions options)
public static Output<GetSchedulingPolicyResult> getSchedulingPolicy(GetSchedulingPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Database/getSchedulingPolicy:getSchedulingPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

SchedulingPolicyId This property is required. string
The Scheduling Policy OCID.
SchedulingPolicyId This property is required. string
The Scheduling Policy OCID.
schedulingPolicyId This property is required. String
The Scheduling Policy OCID.
schedulingPolicyId This property is required. string
The Scheduling Policy OCID.
scheduling_policy_id This property is required. str
The Scheduling Policy OCID.
schedulingPolicyId This property is required. String
The Scheduling Policy OCID.

getSchedulingPolicy Result

The following output properties are available:

Cadence string
The cadence period.
CadenceStartMonths List<GetSchedulingPolicyCadenceStartMonth>
Start of the month to be followed during the cadence period.
CompartmentId string
The OCID of the compartment.
DefinedTags 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
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
FreeformTags 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.
SchedulingPolicyId string
State string
The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
TimeCreated string
The date and time the Scheduling Policy was created.
TimeNextWindowStarts string
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.
CadenceStartMonths []GetSchedulingPolicyCadenceStartMonth
Start of the month to be followed during the cadence period.
CompartmentId string
The OCID of the compartment.
DefinedTags 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
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
FreeformTags 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.
SchedulingPolicyId string
State string
The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
TimeCreated string
The date and time the Scheduling Policy was created.
TimeNextWindowStarts string
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.
cadenceStartMonths List<GetSchedulingPolicyCadenceStartMonth>
Start of the month to be followed during the cadence period.
compartmentId String
The OCID of the compartment.
definedTags 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
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
freeformTags 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.
schedulingPolicyId String
state String
The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
timeCreated String
The date and time the Scheduling Policy was created.
timeNextWindowStarts String
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.
cadenceStartMonths GetSchedulingPolicyCadenceStartMonth[]
Start of the month to be followed during the cadence period.
compartmentId string
The OCID of the compartment.
definedTags {[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
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
freeformTags {[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.
schedulingPolicyId string
state string
The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
timeCreated string
The date and time the Scheduling Policy was created.
timeNextWindowStarts string
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_months Sequence[database.GetSchedulingPolicyCadenceStartMonth]
Start of the month to be followed during the cadence period.
compartment_id str
The OCID of the compartment.
defined_tags 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
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
freeform_tags 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.
scheduling_policy_id str
state str
The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
time_created str
The date and time the Scheduling Policy was created.
time_next_window_starts str
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.
cadenceStartMonths List<Property Map>
Start of the month to be followed during the cadence period.
compartmentId String
The OCID of the compartment.
definedTags Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
displayName String
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
freeformTags 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.
schedulingPolicyId String
state String
The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED.
timeCreated String
The date and time the Scheduling Policy was created.
timeNextWindowStarts String
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.

Supporting Types

GetSchedulingPolicyCadenceStartMonth

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