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

oci.OsManagementHub.getWindowsUpdates

Explore with Pulumi AI

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

This data source provides the list of Windows Updates in Oracle Cloud Infrastructure Os Management Hub service.

Lists Windows updates that have been reported to the service.

Example Usage

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

const testWindowsUpdates = oci.OsManagementHub.getWindowsUpdates({
    compartmentId: compartmentId,
    classificationTypes: windowsUpdateClassificationType,
    displayNameContains: windowsUpdateDisplayNameContains,
    names: windowsUpdateName,
});
Copy
import pulumi
import pulumi_oci as oci

test_windows_updates = oci.OsManagementHub.get_windows_updates(compartment_id=compartment_id,
    classification_types=windows_update_classification_type,
    display_name_contains=windows_update_display_name_contains,
    names=windows_update_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/osmanagementhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := osmanagementhub.GetWindowsUpdates(ctx, &osmanagementhub.GetWindowsUpdatesArgs{
			CompartmentId:       compartmentId,
			ClassificationTypes: windowsUpdateClassificationType,
			DisplayNameContains: pulumi.StringRef(windowsUpdateDisplayNameContains),
			Names:               windowsUpdateName,
		}, 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 testWindowsUpdates = Oci.OsManagementHub.GetWindowsUpdates.Invoke(new()
    {
        CompartmentId = compartmentId,
        ClassificationTypes = windowsUpdateClassificationType,
        DisplayNameContains = windowsUpdateDisplayNameContains,
        Names = windowsUpdateName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OsManagementHub.OsManagementHubFunctions;
import com.pulumi.oci.OsManagementHub.inputs.GetWindowsUpdatesArgs;
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 testWindowsUpdates = OsManagementHubFunctions.getWindowsUpdates(GetWindowsUpdatesArgs.builder()
            .compartmentId(compartmentId)
            .classificationTypes(windowsUpdateClassificationType)
            .displayNameContains(windowsUpdateDisplayNameContains)
            .names(windowsUpdateName)
            .build());

    }
}
Copy
variables:
  testWindowsUpdates:
    fn::invoke:
      function: oci:OsManagementHub:getWindowsUpdates
      arguments:
        compartmentId: ${compartmentId}
        classificationTypes: ${windowsUpdateClassificationType}
        displayNameContains: ${windowsUpdateDisplayNameContains}
        names: ${windowsUpdateName}
Copy

Using getWindowsUpdates

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 getWindowsUpdates(args: GetWindowsUpdatesArgs, opts?: InvokeOptions): Promise<GetWindowsUpdatesResult>
function getWindowsUpdatesOutput(args: GetWindowsUpdatesOutputArgs, opts?: InvokeOptions): Output<GetWindowsUpdatesResult>
Copy
def get_windows_updates(classification_types: Optional[Sequence[str]] = None,
                        compartment_id: Optional[str] = None,
                        display_name_contains: Optional[str] = None,
                        filters: Optional[Sequence[_osmanagementhub.GetWindowsUpdatesFilter]] = None,
                        names: Optional[Sequence[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetWindowsUpdatesResult
def get_windows_updates_output(classification_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        compartment_id: Optional[pulumi.Input[str]] = None,
                        display_name_contains: Optional[pulumi.Input[str]] = None,
                        filters: Optional[pulumi.Input[Sequence[pulumi.Input[_osmanagementhub.GetWindowsUpdatesFilterArgs]]]] = None,
                        names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetWindowsUpdatesResult]
Copy
func GetWindowsUpdates(ctx *Context, args *GetWindowsUpdatesArgs, opts ...InvokeOption) (*GetWindowsUpdatesResult, error)
func GetWindowsUpdatesOutput(ctx *Context, args *GetWindowsUpdatesOutputArgs, opts ...InvokeOption) GetWindowsUpdatesResultOutput
Copy

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

public static class GetWindowsUpdates 
{
    public static Task<GetWindowsUpdatesResult> InvokeAsync(GetWindowsUpdatesArgs args, InvokeOptions? opts = null)
    public static Output<GetWindowsUpdatesResult> Invoke(GetWindowsUpdatesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetWindowsUpdatesResult> getWindowsUpdates(GetWindowsUpdatesArgs args, InvokeOptions options)
public static Output<GetWindowsUpdatesResult> getWindowsUpdates(GetWindowsUpdatesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:OsManagementHub/getWindowsUpdates:getWindowsUpdates
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.
ClassificationTypes List<string>
A filter to return only packages that match the given update classification type.
DisplayNameContains string
A filter to return resources that may partially match the given display name.
Filters Changes to this property will trigger replacement. List<GetWindowsUpdatesFilter>
Names List<string>
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
CompartmentId This property is required. string
The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.
ClassificationTypes []string
A filter to return only packages that match the given update classification type.
DisplayNameContains string
A filter to return resources that may partially match the given display name.
Filters Changes to this property will trigger replacement. []GetWindowsUpdatesFilter
Names []string
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
compartmentId This property is required. String
The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.
classificationTypes List<String>
A filter to return only packages that match the given update classification type.
displayNameContains String
A filter to return resources that may partially match the given display name.
filters Changes to this property will trigger replacement. List<GetWindowsUpdatesFilter>
names List<String>
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
compartmentId This property is required. string
The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.
classificationTypes string[]
A filter to return only packages that match the given update classification type.
displayNameContains string
A filter to return resources that may partially match the given display name.
filters Changes to this property will trigger replacement. GetWindowsUpdatesFilter[]
names string[]
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
compartment_id This property is required. str
The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.
classification_types Sequence[str]
A filter to return only packages that match the given update classification type.
display_name_contains str
A filter to return resources that may partially match the given display name.
filters Changes to this property will trigger replacement. Sequence[osmanagementhub.GetWindowsUpdatesFilter]
names Sequence[str]
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
compartmentId This property is required. String
The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.
classificationTypes List<String>
A filter to return only packages that match the given update classification type.
displayNameContains String
A filter to return resources that may partially match the given display name.
filters Changes to this property will trigger replacement. List<Property Map>
names List<String>
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'

getWindowsUpdates Result

The following output properties are available:

CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
WindowsUpdateCollections List<GetWindowsUpdatesWindowsUpdateCollection>
The list of windows_update_collection.
ClassificationTypes List<string>
DisplayNameContains string
Filters List<GetWindowsUpdatesFilter>
Names List<string>
Name of the Windows update.
CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
WindowsUpdateCollections []GetWindowsUpdatesWindowsUpdateCollection
The list of windows_update_collection.
ClassificationTypes []string
DisplayNameContains string
Filters []GetWindowsUpdatesFilter
Names []string
Name of the Windows update.
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
windowsUpdateCollections List<GetWindowsUpdatesWindowsUpdateCollection>
The list of windows_update_collection.
classificationTypes List<String>
displayNameContains String
filters List<GetWindowsUpdatesFilter>
names List<String>
Name of the Windows update.
compartmentId string
id string
The provider-assigned unique ID for this managed resource.
windowsUpdateCollections GetWindowsUpdatesWindowsUpdateCollection[]
The list of windows_update_collection.
classificationTypes string[]
displayNameContains string
filters GetWindowsUpdatesFilter[]
names string[]
Name of the Windows update.
compartment_id str
id str
The provider-assigned unique ID for this managed resource.
windows_update_collections Sequence[osmanagementhub.GetWindowsUpdatesWindowsUpdateCollection]
The list of windows_update_collection.
classification_types Sequence[str]
display_name_contains str
filters Sequence[osmanagementhub.GetWindowsUpdatesFilter]
names Sequence[str]
Name of the Windows update.
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
windowsUpdateCollections List<Property Map>
The list of windows_update_collection.
classificationTypes List<String>
displayNameContains String
filters List<Property Map>
names List<String>
Name of the Windows update.

Supporting Types

GetWindowsUpdatesFilter

Name This property is required. string
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
Values This property is required. List<string>
Regex bool
Name This property is required. string
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
Values This property is required. []string
Regex bool
name This property is required. String
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
values This property is required. List<String>
regex Boolean
name This property is required. string
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
values This property is required. string[]
regex boolean
name This property is required. str
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
values This property is required. Sequence[str]
regex bool
name This property is required. String
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
values This property is required. List<String>
regex Boolean

GetWindowsUpdatesWindowsUpdateCollection

items This property is required. List<Property Map>

GetWindowsUpdatesWindowsUpdateCollectionItem

Description This property is required. string
Description of the update.
Installable This property is required. string
Indicates whether the update can be installed using the service.
InstallationRequirements This property is required. List<string>
List of requirements for installing the update on the managed instance.
IsRebootRequiredForInstallation This property is required. bool
Indicates whether a reboot is required to complete the installation of this update.
KbArticleIds This property is required. List<string>
List of the Microsoft Knowledge Base Article Ids related to this Windows Update.
Name This property is required. string
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
SizeInBytes This property is required. string
size of the package in bytes
UpdateId This property is required. string
Unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
UpdateType This property is required. string
The type of Windows update.
Description This property is required. string
Description of the update.
Installable This property is required. string
Indicates whether the update can be installed using the service.
InstallationRequirements This property is required. []string
List of requirements for installing the update on the managed instance.
IsRebootRequiredForInstallation This property is required. bool
Indicates whether a reboot is required to complete the installation of this update.
KbArticleIds This property is required. []string
List of the Microsoft Knowledge Base Article Ids related to this Windows Update.
Name This property is required. string
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
SizeInBytes This property is required. string
size of the package in bytes
UpdateId This property is required. string
Unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
UpdateType This property is required. string
The type of Windows update.
description This property is required. String
Description of the update.
installable This property is required. String
Indicates whether the update can be installed using the service.
installationRequirements This property is required. List<String>
List of requirements for installing the update on the managed instance.
isRebootRequiredForInstallation This property is required. Boolean
Indicates whether a reboot is required to complete the installation of this update.
kbArticleIds This property is required. List<String>
List of the Microsoft Knowledge Base Article Ids related to this Windows Update.
name This property is required. String
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
sizeInBytes This property is required. String
size of the package in bytes
updateId This property is required. String
Unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
updateType This property is required. String
The type of Windows update.
description This property is required. string
Description of the update.
installable This property is required. string
Indicates whether the update can be installed using the service.
installationRequirements This property is required. string[]
List of requirements for installing the update on the managed instance.
isRebootRequiredForInstallation This property is required. boolean
Indicates whether a reboot is required to complete the installation of this update.
kbArticleIds This property is required. string[]
List of the Microsoft Knowledge Base Article Ids related to this Windows Update.
name This property is required. string
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
sizeInBytes This property is required. string
size of the package in bytes
updateId This property is required. string
Unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
updateType This property is required. string
The type of Windows update.
description This property is required. str
Description of the update.
installable This property is required. str
Indicates whether the update can be installed using the service.
installation_requirements This property is required. Sequence[str]
List of requirements for installing the update on the managed instance.
is_reboot_required_for_installation This property is required. bool
Indicates whether a reboot is required to complete the installation of this update.
kb_article_ids This property is required. Sequence[str]
List of the Microsoft Knowledge Base Article Ids related to this Windows Update.
name This property is required. str
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
size_in_bytes This property is required. str
size of the package in bytes
update_id This property is required. str
Unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
update_type This property is required. str
The type of Windows update.
description This property is required. String
Description of the update.
installable This property is required. String
Indicates whether the update can be installed using the service.
installationRequirements This property is required. List<String>
List of requirements for installing the update on the managed instance.
isRebootRequiredForInstallation This property is required. Boolean
Indicates whether a reboot is required to complete the installation of this update.
kbArticleIds This property is required. List<String>
List of the Microsoft Knowledge Base Article Ids related to this Windows Update.
name This property is required. String
A filter based on the unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
sizeInBytes This property is required. String
size of the package in bytes
updateId This property is required. String
Unique identifier for the Windows update. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. Example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'
updateType This property is required. String
The type of Windows update.

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