1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. StackMonitoring
  5. getMaintenanceWindows
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.StackMonitoring.getMaintenanceWindows

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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/v2/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[_stackmonitoring.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[_stackmonitoring.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:StackMonitoring/getMaintenanceWindows:getMaintenanceWindows
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which data is listed.
    Filters List<GetMaintenanceWindowsFilter>
    LifecycleDetails 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.
    CompartmentId string
    The ID of the compartment in which data is listed.
    Filters []GetMaintenanceWindowsFilter
    LifecycleDetails 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.
    compartmentId String
    The ID of the compartment in which data is listed.
    filters List<GetMaintenanceWindowsFilter>
    lifecycleDetails 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.
    compartmentId string
    The ID of the compartment in which data is listed.
    filters GetMaintenanceWindowsFilter[]
    lifecycleDetails 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[stackmonitoring.GetMaintenanceWindowsFilter]
    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.
    compartmentId String
    The ID of the compartment in which data is listed.
    filters List<Property Map>
    lifecycleDetails 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:

    CompartmentId string
    Compartment Identifier OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    MaintenanceWindowCollections List<GetMaintenanceWindowsMaintenanceWindowCollection>
    The list of maintenance_window_collection.
    Filters List<GetMaintenanceWindowsFilter>
    LifecycleDetails string
    Lifecycle Details of the Maintenance Window.
    Name string
    Name of the monitored resource
    Status string
    CompartmentId string
    Compartment Identifier OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    MaintenanceWindowCollections []GetMaintenanceWindowsMaintenanceWindowCollection
    The list of maintenance_window_collection.
    Filters []GetMaintenanceWindowsFilter
    LifecycleDetails string
    Lifecycle Details of the Maintenance Window.
    Name string
    Name of the monitored resource
    Status string
    compartmentId String
    Compartment Identifier OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    maintenanceWindowCollections List<GetMaintenanceWindowsMaintenanceWindowCollection>
    The list of maintenance_window_collection.
    filters List<GetMaintenanceWindowsFilter>
    lifecycleDetails String
    Lifecycle Details of the Maintenance Window.
    name String
    Name of the monitored resource
    status String
    compartmentId string
    Compartment Identifier OCID.
    id string
    The provider-assigned unique ID for this managed resource.
    maintenanceWindowCollections GetMaintenanceWindowsMaintenanceWindowCollection[]
    The list of maintenance_window_collection.
    filters GetMaintenanceWindowsFilter[]
    lifecycleDetails 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_collections Sequence[stackmonitoring.GetMaintenanceWindowsMaintenanceWindowCollection]
    The list of maintenance_window_collection.
    filters Sequence[stackmonitoring.GetMaintenanceWindowsFilter]
    lifecycle_details str
    Lifecycle Details of the Maintenance Window.
    name str
    Name of the monitored resource
    status str
    compartmentId String
    Compartment Identifier OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    maintenanceWindowCollections List<Property Map>
    The list of maintenance_window_collection.
    filters List<Property Map>
    lifecycleDetails String
    Lifecycle Details of the Maintenance Window.
    name String
    Name of the monitored resource
    status String

    Supporting Types

    GetMaintenanceWindowsFilter

    Name string
    A filter to return maintenance windows that match exact resource name.
    Values List<string>
    Regex bool
    Name string
    A filter to return maintenance windows that match exact resource name.
    Values []string
    Regex bool
    name String
    A filter to return maintenance windows that match exact resource name.
    values List<String>
    regex Boolean
    name string
    A filter to return maintenance windows that match exact resource name.
    values string[]
    regex boolean
    name str
    A filter to return maintenance windows that match exact resource name.
    values Sequence[str]
    regex bool
    name String
    A filter to return maintenance windows that match exact resource name.
    values List<String>
    regex Boolean

    GetMaintenanceWindowsMaintenanceWindowCollection

    GetMaintenanceWindowsMaintenanceWindowCollectionItem

    CompartmentId string
    The ID of the compartment in which data is listed.
    DefinedTags Dictionary<string, string>
    FreeformTags Dictionary<string, string>
    Id string
    The OCID of maintenance window.
    LifecycleDetails string
    A filter to return maintenance windows with matching lifecycleDetails.
    LifecycleState string
    Name string
    A filter to return maintenance windows that match exact resource name.
    NumberOfResources int
    OperationStatus string
    OperationType string
    Schedules List<GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule>
    Schedule information of the Maintenance Window
    State string
    Lifecycle state of the monitored resource.
    SystemTags Dictionary<string, string>
    CompartmentId string
    The ID of the compartment in which data is listed.
    DefinedTags map[string]string
    FreeformTags map[string]string
    Id string
    The OCID of maintenance window.
    LifecycleDetails string
    A filter to return maintenance windows with matching lifecycleDetails.
    LifecycleState string
    Name string
    A filter to return maintenance windows that match exact resource name.
    NumberOfResources int
    OperationStatus string
    OperationType string
    Schedules []GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule
    Schedule information of the Maintenance Window
    State string
    Lifecycle state of the monitored resource.
    SystemTags map[string]string
    compartmentId String
    The ID of the compartment in which data is listed.
    definedTags Map<String,String>
    freeformTags Map<String,String>
    id String
    The OCID of maintenance window.
    lifecycleDetails String
    A filter to return maintenance windows with matching lifecycleDetails.
    lifecycleState String
    name String
    A filter to return maintenance windows that match exact resource name.
    numberOfResources Integer
    operationStatus String
    operationType String
    schedules List<GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule>
    Schedule information of the Maintenance Window
    state String
    Lifecycle state of the monitored resource.
    systemTags Map<String,String>
    compartmentId string
    The ID of the compartment in which data is listed.
    definedTags {[key: string]: string}
    freeformTags {[key: string]: string}
    id string
    The OCID of maintenance window.
    lifecycleDetails string
    A filter to return maintenance windows with matching lifecycleDetails.
    lifecycleState string
    name string
    A filter to return maintenance windows that match exact resource name.
    numberOfResources number
    operationStatus string
    operationType string
    schedules GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule[]
    Schedule information of the Maintenance Window
    state string
    Lifecycle state of the monitored resource.
    systemTags {[key: string]: string}
    compartment_id str
    The ID of the compartment in which data is listed.
    defined_tags Mapping[str, str]
    freeform_tags Mapping[str, str]
    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_resources int
    operation_status str
    operation_type str
    schedules Sequence[stackmonitoring.GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule]
    Schedule information of the Maintenance Window
    state str
    Lifecycle state of the monitored resource.
    system_tags Mapping[str, str]
    compartmentId String
    The ID of the compartment in which data is listed.
    definedTags Map<String>
    freeformTags Map<String>
    id String
    The OCID of maintenance window.
    lifecycleDetails String
    A filter to return maintenance windows with matching lifecycleDetails.
    lifecycleState String
    name String
    A filter to return maintenance windows that match exact resource name.
    numberOfResources Number
    operationStatus String
    operationType String
    schedules List<Property Map>
    Schedule information of the Maintenance Window
    state String
    Lifecycle state of the monitored resource.
    systemTags Map<String>

    GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule

    MaintenanceWindowDuration string
    Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
    MaintenanceWindowRecurrences string
    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 timeMaintenanceWindowStart value. BYMINUTE: Specifies the start minute of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 BYSECOND: Specifies the start second of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 Other Rules are not supported.
    ScheduleType string
    Property to identify the type of the Maintenance Window.
    TimeMaintenanceWindowEnd string
    Start time of Maintenance window. A RFC3339 formatted datetime string
    TimeMaintenanceWindowStart string
    Start time of Maintenance window. A RFC3339 formatted datetime string
    MaintenanceWindowDuration string
    Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
    MaintenanceWindowRecurrences string
    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 timeMaintenanceWindowStart value. BYMINUTE: Specifies the start minute of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 BYSECOND: Specifies the start second of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 Other Rules are not supported.
    ScheduleType string
    Property to identify the type of the Maintenance Window.
    TimeMaintenanceWindowEnd string
    Start time of Maintenance window. A RFC3339 formatted datetime string
    TimeMaintenanceWindowStart string
    Start time of Maintenance window. A RFC3339 formatted datetime string
    maintenanceWindowDuration String
    Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
    maintenanceWindowRecurrences String
    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 timeMaintenanceWindowStart value. BYMINUTE: Specifies the start minute of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 BYSECOND: Specifies the start second of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 Other Rules are not supported.
    scheduleType String
    Property to identify the type of the Maintenance Window.
    timeMaintenanceWindowEnd String
    Start time of Maintenance window. A RFC3339 formatted datetime string
    timeMaintenanceWindowStart String
    Start time of Maintenance window. A RFC3339 formatted datetime string
    maintenanceWindowDuration string
    Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
    maintenanceWindowRecurrences string
    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 timeMaintenanceWindowStart value. BYMINUTE: Specifies the start minute of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 BYSECOND: Specifies the start second of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 Other Rules are not supported.
    scheduleType string
    Property to identify the type of the Maintenance Window.
    timeMaintenanceWindowEnd string
    Start time of Maintenance window. A RFC3339 formatted datetime string
    timeMaintenanceWindowStart string
    Start time of Maintenance window. A RFC3339 formatted datetime string
    maintenance_window_duration str
    Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
    maintenance_window_recurrences str
    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 timeMaintenanceWindowStart value. BYMINUTE: Specifies the start minute of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 BYSECOND: Specifies the start second of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 Other Rules are not supported.
    schedule_type str
    Property to identify the type of the Maintenance Window.
    time_maintenance_window_end str
    Start time of Maintenance window. A RFC3339 formatted datetime string
    time_maintenance_window_start str
    Start time of Maintenance window. A RFC3339 formatted datetime string
    maintenanceWindowDuration String
    Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
    maintenanceWindowRecurrences String
    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 timeMaintenanceWindowStart value. BYMINUTE: Specifies the start minute of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 BYSECOND: Specifies the start second of each reccurrence after timeMaintenanceWindowStart value. The default value is 00 Other Rules are not supported.
    scheduleType String
    Property to identify the type of the Maintenance Window.
    timeMaintenanceWindowEnd String
    Start time of Maintenance window. A RFC3339 formatted datetime string
    timeMaintenanceWindowStart String
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi