Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.StackMonitoring.getMaintenanceWindows
Start a Neo task
Explain and create an oci.StackMonitoring.getMaintenanceWindows resource
This data source provides the list of Maintenance Windows in Oracle Cloud Infrastructure Stack Monitoring service.
Returns a list of maintenance windows.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMaintenanceWindows = oci.StackMonitoring.getMaintenanceWindows({
compartmentId: compartmentId,
lifecycleDetails: maintenanceWindowLifecycleDetails,
name: maintenanceWindowName,
status: maintenanceWindowStatus,
});
import pulumi
import pulumi_oci as oci
test_maintenance_windows = oci.StackMonitoring.get_maintenance_windows(compartment_id=compartment_id,
lifecycle_details=maintenance_window_lifecycle_details,
name=maintenance_window_name,
status=maintenance_window_status)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/stackmonitoring"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := stackmonitoring.GetMaintenanceWindows(ctx, &stackmonitoring.GetMaintenanceWindowsArgs{
CompartmentId: compartmentId,
LifecycleDetails: pulumi.StringRef(maintenanceWindowLifecycleDetails),
Name: pulumi.StringRef(maintenanceWindowName),
Status: pulumi.StringRef(maintenanceWindowStatus),
}, 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 testMaintenanceWindows = Oci.StackMonitoring.GetMaintenanceWindows.Invoke(new()
{
CompartmentId = compartmentId,
LifecycleDetails = maintenanceWindowLifecycleDetails,
Name = maintenanceWindowName,
Status = maintenanceWindowStatus,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.StackMonitoring.StackMonitoringFunctions;
import com.pulumi.oci.StackMonitoring.inputs.GetMaintenanceWindowsArgs;
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 testMaintenanceWindows = StackMonitoringFunctions.getMaintenanceWindows(GetMaintenanceWindowsArgs.builder()
.compartmentId(compartmentId)
.lifecycleDetails(maintenanceWindowLifecycleDetails)
.name(maintenanceWindowName)
.status(maintenanceWindowStatus)
.build());
}
}
variables:
testMaintenanceWindows:
fn::invoke:
function: oci:StackMonitoring:getMaintenanceWindows
arguments:
compartmentId: ${compartmentId}
lifecycleDetails: ${maintenanceWindowLifecycleDetails}
name: ${maintenanceWindowName}
status: ${maintenanceWindowStatus}
Using getMaintenanceWindows
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 getMaintenanceWindows(args: GetMaintenanceWindowsArgs, opts?: InvokeOptions): Promise<GetMaintenanceWindowsResult>
function getMaintenanceWindowsOutput(args: GetMaintenanceWindowsOutputArgs, opts?: InvokeOptions): Output<GetMaintenanceWindowsResult>def get_maintenance_windows(compartment_id: Optional[str] = None,
filters: Optional[Sequence[GetMaintenanceWindowsFilter]] = None,
lifecycle_details: Optional[str] = None,
name: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMaintenanceWindowsResult
def get_maintenance_windows_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetMaintenanceWindowsFilterArgs]]]] = None,
lifecycle_details: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMaintenanceWindowsResult]func GetMaintenanceWindows(ctx *Context, args *GetMaintenanceWindowsArgs, opts ...InvokeOption) (*GetMaintenanceWindowsResult, error)
func GetMaintenanceWindowsOutput(ctx *Context, args *GetMaintenanceWindowsOutputArgs, opts ...InvokeOption) GetMaintenanceWindowsResultOutput> Note: This function is named GetMaintenanceWindows in the Go SDK.
public static class GetMaintenanceWindows
{
public static Task<GetMaintenanceWindowsResult> InvokeAsync(GetMaintenanceWindowsArgs args, InvokeOptions? opts = null)
public static Output<GetMaintenanceWindowsResult> Invoke(GetMaintenanceWindowsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMaintenanceWindowsResult> getMaintenanceWindows(GetMaintenanceWindowsArgs args, InvokeOptions options)
public static Output<GetMaintenanceWindowsResult> getMaintenanceWindows(GetMaintenanceWindowsArgs args, InvokeOptions options)
fn::invoke:
function: oci:StackMonitoring/getMaintenanceWindows:getMaintenanceWindows
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - The ID of the compartment in which data is listed.
- Filters
List<Get
Maintenance Windows Filter> - Lifecycle
Details string - A filter to return maintenance windows with matching lifecycleDetails.
- Name string
- A filter to return maintenance windows that match exact resource name.
- Status string
- A filter to return only maintenance windows with matching lifecycleState.
- Compartment
Id string - The ID of the compartment in which data is listed.
- Filters
[]Get
Maintenance Windows Filter - Lifecycle
Details string - A filter to return maintenance windows with matching lifecycleDetails.
- Name string
- A filter to return maintenance windows that match exact resource name.
- Status string
- A filter to return only maintenance windows with matching lifecycleState.
- compartment
Id String - The ID of the compartment in which data is listed.
- filters
List<Get
Maintenance Windows Filter> - lifecycle
Details String - A filter to return maintenance windows with matching lifecycleDetails.
- name String
- A filter to return maintenance windows that match exact resource name.
- status String
- A filter to return only maintenance windows with matching lifecycleState.
- compartment
Id string - The ID of the compartment in which data is listed.
- filters
Get
Maintenance Windows Filter[] - lifecycle
Details string - A filter to return maintenance windows with matching lifecycleDetails.
- name string
- A filter to return maintenance windows that match exact resource name.
- status string
- A filter to return only maintenance windows with matching lifecycleState.
- compartment_
id str - The ID of the compartment in which data is listed.
- filters
Sequence[Get
Maintenance Windows Filter] - lifecycle_
details str - A filter to return maintenance windows with matching lifecycleDetails.
- name str
- A filter to return maintenance windows that match exact resource name.
- status str
- A filter to return only maintenance windows with matching lifecycleState.
- compartment
Id String - The ID of the compartment in which data is listed.
- filters List<Property Map>
- lifecycle
Details String - A filter to return maintenance windows with matching lifecycleDetails.
- name String
- A filter to return maintenance windows that match exact resource name.
- status String
- A filter to return only maintenance windows with matching lifecycleState.
getMaintenanceWindows Result
The following output properties are available:
- Compartment
Id string - Compartment Identifier OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Maintenance
Window List<GetCollections Maintenance Windows Maintenance Window Collection> - The list of maintenance_window_collection.
- Filters
List<Get
Maintenance Windows Filter> - Lifecycle
Details string - Lifecycle Details of the Maintenance Window.
- Name string
- Name of the monitored resource
- Status string
- Compartment
Id string - Compartment Identifier OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Maintenance
Window []GetCollections Maintenance Windows Maintenance Window Collection - The list of maintenance_window_collection.
- Filters
[]Get
Maintenance Windows Filter - Lifecycle
Details string - Lifecycle Details of the Maintenance Window.
- Name string
- Name of the monitored resource
- Status string
- compartment
Id String - Compartment Identifier OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- maintenance
Window List<GetCollections Maintenance Windows Maintenance Window Collection> - The list of maintenance_window_collection.
- filters
List<Get
Maintenance Windows Filter> - lifecycle
Details String - Lifecycle Details of the Maintenance Window.
- name String
- Name of the monitored resource
- status String
- compartment
Id string - Compartment Identifier OCID.
- id string
- The provider-assigned unique ID for this managed resource.
- maintenance
Window GetCollections Maintenance Windows Maintenance Window Collection[] - The list of maintenance_window_collection.
- filters
Get
Maintenance Windows Filter[] - lifecycle
Details string - Lifecycle Details of the Maintenance Window.
- name string
- Name of the monitored resource
- status string
- compartment_
id str - Compartment Identifier OCID.
- id str
- The provider-assigned unique ID for this managed resource.
- maintenance_
window_ Sequence[Getcollections Maintenance Windows Maintenance Window Collection] - The list of maintenance_window_collection.
- filters
Sequence[Get
Maintenance Windows Filter] - lifecycle_
details str - Lifecycle Details of the Maintenance Window.
- name str
- Name of the monitored resource
- status str
- compartment
Id String - Compartment Identifier OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- maintenance
Window List<Property Map>Collections - The list of maintenance_window_collection.
- filters List<Property Map>
- lifecycle
Details String - Lifecycle Details of the Maintenance Window.
- name String
- Name of the monitored resource
- status String
Supporting Types
GetMaintenanceWindowsFilter
GetMaintenanceWindowsMaintenanceWindowCollection
GetMaintenanceWindowsMaintenanceWindowCollectionItem
- Compartment
Id string - The ID of the compartment in which data is listed.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"} - Id string
- The OCID of maintenance window.
- Lifecycle
Details string - A filter to return maintenance windows with matching lifecycleDetails.
- Lifecycle
State string - Name string
- A filter to return maintenance windows that match exact resource name.
- Number
Of intResources - Operation
Status string - Operation
Type string - Schedules
List<Get
Maintenance Windows Maintenance Window Collection Item Schedule> - Schedule information of the Maintenance Window
- State string
- Lifecycle state of the monitored resource.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Compartment
Id string - The ID of the compartment in which data is listed.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"} - Id string
- The OCID of maintenance window.
- Lifecycle
Details string - A filter to return maintenance windows with matching lifecycleDetails.
- Lifecycle
State string - Name string
- A filter to return maintenance windows that match exact resource name.
- Number
Of intResources - Operation
Status string - Operation
Type string - Schedules
[]Get
Maintenance Windows Maintenance Window Collection Item Schedule - Schedule information of the Maintenance Window
- State string
- Lifecycle state of the monitored resource.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- compartment
Id String - The ID of the compartment in which data is listed.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"} - id String
- The OCID of maintenance window.
- lifecycle
Details String - A filter to return maintenance windows with matching lifecycleDetails.
- lifecycle
State String - name String
- A filter to return maintenance windows that match exact resource name.
- number
Of IntegerResources - operation
Status String - operation
Type String - schedules
List<Get
Maintenance Windows Maintenance Window Collection Item Schedule> - Schedule information of the Maintenance Window
- state String
- Lifecycle state of the monitored resource.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- compartment
Id string - The ID of the compartment in which data is listed.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"} - id string
- The OCID of maintenance window.
- lifecycle
Details string - A filter to return maintenance windows with matching lifecycleDetails.
- lifecycle
State string - name string
- A filter to return maintenance windows that match exact resource name.
- number
Of numberResources - operation
Status string - operation
Type string - schedules
Get
Maintenance Windows Maintenance Window Collection Item Schedule[] - Schedule information of the Maintenance Window
- state string
- Lifecycle state of the monitored resource.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- compartment_
id str - The ID of the compartment in which data is listed.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"} - id str
- The OCID of maintenance window.
- lifecycle_
details str - A filter to return maintenance windows with matching lifecycleDetails.
- lifecycle_
state str - name str
- A filter to return maintenance windows that match exact resource name.
- number_
of_ intresources - operation_
status str - operation_
type str - schedules
Sequence[Get
Maintenance Windows Maintenance Window Collection Item Schedule] - Schedule information of the Maintenance Window
- state str
- Lifecycle state of the monitored resource.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- compartment
Id String - The ID of the compartment in which data is listed.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"} - id String
- The OCID of maintenance window.
- lifecycle
Details String - A filter to return maintenance windows with matching lifecycleDetails.
- lifecycle
State String - name String
- A filter to return maintenance windows that match exact resource name.
- number
Of NumberResources - operation
Status String - operation
Type String - schedules List<Property Map>
- Schedule information of the Maintenance Window
- state String
- Lifecycle state of the monitored resource.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule
- Maintenance
Window stringDuration - Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- Maintenance
Window stringRecurrences - A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after
timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported. - Schedule
Type string - Property to identify the type of the Maintenance Window.
- Time
Maintenance stringWindow End - Start time of Maintenance window. A RFC3339 formatted datetime string
- Time
Maintenance stringWindow Start - Start time of Maintenance window. A RFC3339 formatted datetime string
- Maintenance
Window stringDuration - Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- Maintenance
Window stringRecurrences - A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after
timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported. - Schedule
Type string - Property to identify the type of the Maintenance Window.
- Time
Maintenance stringWindow End - Start time of Maintenance window. A RFC3339 formatted datetime string
- Time
Maintenance stringWindow Start - Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenance
Window StringDuration - Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenance
Window StringRecurrences - A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after
timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported. - schedule
Type String - Property to identify the type of the Maintenance Window.
- time
Maintenance StringWindow End - Start time of Maintenance window. A RFC3339 formatted datetime string
- time
Maintenance StringWindow Start - Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenance
Window stringDuration - Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenance
Window stringRecurrences - A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after
timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported. - schedule
Type string - Property to identify the type of the Maintenance Window.
- time
Maintenance stringWindow End - Start time of Maintenance window. A RFC3339 formatted datetime string
- time
Maintenance stringWindow Start - Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenance_
window_ strduration - Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenance_
window_ strrecurrences - A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after
timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported. - schedule_
type str - Property to identify the type of the Maintenance Window.
- time_
maintenance_ strwindow_ end - Start time of Maintenance window. A RFC3339 formatted datetime string
- time_
maintenance_ strwindow_ start - Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenance
Window StringDuration - Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenance
Window StringRecurrences - A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after
timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported. - schedule
Type String - Property to identify the type of the Maintenance Window.
- time
Maintenance StringWindow End - Start time of Maintenance window. A RFC3339 formatted datetime string
- time
Maintenance StringWindow Start - Start time of Maintenance window. A RFC3339 formatted datetime string
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
