1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Database
  5. getExecutionWindows
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

oci.Database.getExecutionWindows

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

This data source provides the list of Execution Windows in Oracle Cloud Infrastructure Database service.

Lists the execution window resources in the specified compartment.

Example Usage

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

const testExecutionWindows = oci.Database.getExecutionWindows({
    compartmentId: compartmentId,
    displayName: executionWindowDisplayName,
    executionResourceId: testResource.id,
    state: executionWindowState,
});
Copy
import pulumi
import pulumi_oci as oci

test_execution_windows = oci.Database.get_execution_windows(compartment_id=compartment_id,
    display_name=execution_window_display_name,
    execution_resource_id=test_resource["id"],
    state=execution_window_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.GetExecutionWindows(ctx, &database.GetExecutionWindowsArgs{
			CompartmentId:       compartmentId,
			DisplayName:         pulumi.StringRef(executionWindowDisplayName),
			ExecutionResourceId: pulumi.StringRef(testResource.Id),
			State:               pulumi.StringRef(executionWindowState),
		}, 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 testExecutionWindows = Oci.Database.GetExecutionWindows.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = executionWindowDisplayName,
        ExecutionResourceId = testResource.Id,
        State = executionWindowState,
    });

});
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.GetExecutionWindowsArgs;
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 testExecutionWindows = DatabaseFunctions.getExecutionWindows(GetExecutionWindowsArgs.builder()
            .compartmentId(compartmentId)
            .displayName(executionWindowDisplayName)
            .executionResourceId(testResource.id())
            .state(executionWindowState)
            .build());

    }
}
Copy
variables:
  testExecutionWindows:
    fn::invoke:
      function: oci:Database:getExecutionWindows
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${executionWindowDisplayName}
        executionResourceId: ${testResource.id}
        state: ${executionWindowState}
Copy

Using getExecutionWindows

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 getExecutionWindows(args: GetExecutionWindowsArgs, opts?: InvokeOptions): Promise<GetExecutionWindowsResult>
function getExecutionWindowsOutput(args: GetExecutionWindowsOutputArgs, opts?: InvokeOptions): Output<GetExecutionWindowsResult>
Copy
def get_execution_windows(compartment_id: Optional[str] = None,
                          display_name: Optional[str] = None,
                          execution_resource_id: Optional[str] = None,
                          filters: Optional[Sequence[_database.GetExecutionWindowsFilter]] = None,
                          state: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetExecutionWindowsResult
def get_execution_windows_output(compartment_id: Optional[pulumi.Input[str]] = None,
                          display_name: Optional[pulumi.Input[str]] = None,
                          execution_resource_id: Optional[pulumi.Input[str]] = None,
                          filters: Optional[pulumi.Input[Sequence[pulumi.Input[_database.GetExecutionWindowsFilterArgs]]]] = None,
                          state: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetExecutionWindowsResult]
Copy
func GetExecutionWindows(ctx *Context, args *GetExecutionWindowsArgs, opts ...InvokeOption) (*GetExecutionWindowsResult, error)
func GetExecutionWindowsOutput(ctx *Context, args *GetExecutionWindowsOutputArgs, opts ...InvokeOption) GetExecutionWindowsResultOutput
Copy

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

public static class GetExecutionWindows 
{
    public static Task<GetExecutionWindowsResult> InvokeAsync(GetExecutionWindowsArgs args, InvokeOptions? opts = null)
    public static Output<GetExecutionWindowsResult> Invoke(GetExecutionWindowsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetExecutionWindowsResult> getExecutionWindows(GetExecutionWindowsArgs args, InvokeOptions options)
public static Output<GetExecutionWindowsResult> getExecutionWindows(GetExecutionWindowsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Database/getExecutionWindows:getExecutionWindows
  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.
ExecutionResourceId string
A filter to return only resources that match the given resource id exactly.
Filters Changes to this property will trigger replacement. List<GetExecutionWindowsFilter>
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.
ExecutionResourceId string
A filter to return only resources that match the given resource id exactly.
Filters Changes to this property will trigger replacement. []GetExecutionWindowsFilter
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.
executionResourceId String
A filter to return only resources that match the given resource id exactly.
filters Changes to this property will trigger replacement. List<GetExecutionWindowsFilter>
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.
executionResourceId string
A filter to return only resources that match the given resource id exactly.
filters Changes to this property will trigger replacement. GetExecutionWindowsFilter[]
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.
execution_resource_id str
A filter to return only resources that match the given resource id exactly.
filters Changes to this property will trigger replacement. Sequence[database.GetExecutionWindowsFilter]
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.
executionResourceId String
A filter to return only resources that match the given resource id exactly.
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.

getExecutionWindows Result

The following output properties are available:

CompartmentId string
The OCID of the compartment.
ExecutionWindows List<GetExecutionWindowsExecutionWindow>
The list of execution_windows.
Id string
The provider-assigned unique ID for this managed resource.
DisplayName string
The user-friendly name for the execution window. The name does not need to be unique.
ExecutionResourceId string
The OCID of the execution resource the execution window belongs to.
Filters List<GetExecutionWindowsFilter>
State string
The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS.
CompartmentId string
The OCID of the compartment.
ExecutionWindows []GetExecutionWindowsExecutionWindow
The list of execution_windows.
Id string
The provider-assigned unique ID for this managed resource.
DisplayName string
The user-friendly name for the execution window. The name does not need to be unique.
ExecutionResourceId string
The OCID of the execution resource the execution window belongs to.
Filters []GetExecutionWindowsFilter
State string
The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS.
compartmentId String
The OCID of the compartment.
executionWindows List<GetExecutionWindowsExecutionWindow>
The list of execution_windows.
id String
The provider-assigned unique ID for this managed resource.
displayName String
The user-friendly name for the execution window. The name does not need to be unique.
executionResourceId String
The OCID of the execution resource the execution window belongs to.
filters List<GetExecutionWindowsFilter>
state String
The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS.
compartmentId string
The OCID of the compartment.
executionWindows GetExecutionWindowsExecutionWindow[]
The list of execution_windows.
id string
The provider-assigned unique ID for this managed resource.
displayName string
The user-friendly name for the execution window. The name does not need to be unique.
executionResourceId string
The OCID of the execution resource the execution window belongs to.
filters GetExecutionWindowsFilter[]
state string
The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS.
compartment_id str
The OCID of the compartment.
execution_windows Sequence[database.GetExecutionWindowsExecutionWindow]
The list of execution_windows.
id str
The provider-assigned unique ID for this managed resource.
display_name str
The user-friendly name for the execution window. The name does not need to be unique.
execution_resource_id str
The OCID of the execution resource the execution window belongs to.
filters Sequence[database.GetExecutionWindowsFilter]
state str
The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS.
compartmentId String
The OCID of the compartment.
executionWindows List<Property Map>
The list of execution_windows.
id String
The provider-assigned unique ID for this managed resource.
displayName String
The user-friendly name for the execution window. The name does not need to be unique.
executionResourceId String
The OCID of the execution resource the execution window belongs to.
filters List<Property Map>
state String
The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS.

Supporting Types

GetExecutionWindowsExecutionWindow

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.
Description This property is required. string
Description of the execution window.
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.
EstimatedTimeInMins This property is required. int
The estimated time of the execution window in minutes.
ExecutionResourceId This property is required. string
A filter to return only resources that match the given resource id exactly.
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 execution window.
IsEnforcedDuration This property is required. bool
Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is FALSE.
LifecycleDetails This property is required. string
Additional information about the current lifecycle state.
LifecycleSubstate This property is required. string
The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING.
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 execution window was created.
TimeEnded This property is required. string
The date and time that the execution window ended.
TimeScheduled This property is required. string
The scheduled start date and time of the execution window.
TimeStarted This property is required. string
The date and time that the execution window was started.
TimeUpdated This property is required. string
The last date and time that the execution window was updated.
TotalTimeTakenInMins This property is required. int
The total time taken by corresponding resource activity in minutes.
WindowDurationInMins This property is required. int
Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes.
WindowType This property is required. string
The execution window is of PLANNED or UNPLANNED type.
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.
Description This property is required. string
Description of the execution window.
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.
EstimatedTimeInMins This property is required. int
The estimated time of the execution window in minutes.
ExecutionResourceId This property is required. string
A filter to return only resources that match the given resource id exactly.
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 execution window.
IsEnforcedDuration This property is required. bool
Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is FALSE.
LifecycleDetails This property is required. string
Additional information about the current lifecycle state.
LifecycleSubstate This property is required. string
The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING.
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 execution window was created.
TimeEnded This property is required. string
The date and time that the execution window ended.
TimeScheduled This property is required. string
The scheduled start date and time of the execution window.
TimeStarted This property is required. string
The date and time that the execution window was started.
TimeUpdated This property is required. string
The last date and time that the execution window was updated.
TotalTimeTakenInMins This property is required. int
The total time taken by corresponding resource activity in minutes.
WindowDurationInMins This property is required. int
Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes.
WindowType This property is required. string
The execution window is of PLANNED or UNPLANNED type.
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.
description This property is required. String
Description of the execution window.
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.
estimatedTimeInMins This property is required. Integer
The estimated time of the execution window in minutes.
executionResourceId This property is required. String
A filter to return only resources that match the given resource id exactly.
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 execution window.
isEnforcedDuration This property is required. Boolean
Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is FALSE.
lifecycleDetails This property is required. String
Additional information about the current lifecycle state.
lifecycleSubstate This property is required. String
The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING.
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 execution window was created.
timeEnded This property is required. String
The date and time that the execution window ended.
timeScheduled This property is required. String
The scheduled start date and time of the execution window.
timeStarted This property is required. String
The date and time that the execution window was started.
timeUpdated This property is required. String
The last date and time that the execution window was updated.
totalTimeTakenInMins This property is required. Integer
The total time taken by corresponding resource activity in minutes.
windowDurationInMins This property is required. Integer
Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes.
windowType This property is required. String
The execution window is of PLANNED or UNPLANNED type.
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.
description This property is required. string
Description of the execution window.
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.
estimatedTimeInMins This property is required. number
The estimated time of the execution window in minutes.
executionResourceId This property is required. string
A filter to return only resources that match the given resource id exactly.
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 execution window.
isEnforcedDuration This property is required. boolean
Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is FALSE.
lifecycleDetails This property is required. string
Additional information about the current lifecycle state.
lifecycleSubstate This property is required. string
The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING.
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 execution window was created.
timeEnded This property is required. string
The date and time that the execution window ended.
timeScheduled This property is required. string
The scheduled start date and time of the execution window.
timeStarted This property is required. string
The date and time that the execution window was started.
timeUpdated This property is required. string
The last date and time that the execution window was updated.
totalTimeTakenInMins This property is required. number
The total time taken by corresponding resource activity in minutes.
windowDurationInMins This property is required. number
Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes.
windowType This property is required. string
The execution window is of PLANNED or UNPLANNED type.
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.
description This property is required. str
Description of the execution window.
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.
estimated_time_in_mins This property is required. int
The estimated time of the execution window in minutes.
execution_resource_id This property is required. str
A filter to return only resources that match the given resource id exactly.
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 execution window.
is_enforced_duration This property is required. bool
Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is FALSE.
lifecycle_details This property is required. str
Additional information about the current lifecycle state.
lifecycle_substate This property is required. str
The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING.
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 execution window was created.
time_ended This property is required. str
The date and time that the execution window ended.
time_scheduled This property is required. str
The scheduled start date and time of the execution window.
time_started This property is required. str
The date and time that the execution window was started.
time_updated This property is required. str
The last date and time that the execution window was updated.
total_time_taken_in_mins This property is required. int
The total time taken by corresponding resource activity in minutes.
window_duration_in_mins This property is required. int
Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes.
window_type This property is required. str
The execution window is of PLANNED or UNPLANNED type.
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.
description This property is required. String
Description of the execution window.
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.
estimatedTimeInMins This property is required. Number
The estimated time of the execution window in minutes.
executionResourceId This property is required. String
A filter to return only resources that match the given resource id exactly.
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 execution window.
isEnforcedDuration This property is required. Boolean
Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is FALSE.
lifecycleDetails This property is required. String
Additional information about the current lifecycle state.
lifecycleSubstate This property is required. String
The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING.
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 execution window was created.
timeEnded This property is required. String
The date and time that the execution window ended.
timeScheduled This property is required. String
The scheduled start date and time of the execution window.
timeStarted This property is required. String
The date and time that the execution window was started.
timeUpdated This property is required. String
The last date and time that the execution window was updated.
totalTimeTakenInMins This property is required. Number
The total time taken by corresponding resource activity in minutes.
windowDurationInMins This property is required. Number
Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes.
windowType This property is required. String
The execution window is of PLANNED or UNPLANNED type.

GetExecutionWindowsFilter

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

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.32.0 published on Thursday, Apr 24, 2025 by Pulumi