Azure Classic

v5.25.0 published on Thursday, Nov 24, 2022 by Pulumi

getPublicConfigurations

Use this data source to access information about existing Public Maintenance Configurations.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var existing = Azure.Maintenance.GetPublicConfigurations.Invoke(new()
    {
        Location = "West Europe",
        Scope = "SQLManagedInstance",
        RecurEvery = "Monday-Thursday",
    });

    return new Dictionary<string, object?>
    {
        ["name"] = existing.Apply(getPublicConfigurationsResult => getPublicConfigurationsResult.Configs[0]?.Name),
    };
});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/maintenance"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		existing, err := maintenance.GetPublicConfigurations(ctx, &maintenance.GetPublicConfigurationsArgs{
			Location:   pulumi.StringRef("West Europe"),
			Scope:      pulumi.StringRef("SQLManagedInstance"),
			RecurEvery: pulumi.StringRef("Monday-Thursday"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("name", existing.Configs[0].Name)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.maintenance.MaintenanceFunctions;
import com.pulumi.azure.maintenance.inputs.GetPublicConfigurationsArgs;
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 existing = MaintenanceFunctions.getPublicConfigurations(GetPublicConfigurationsArgs.builder()
            .location("West Europe")
            .scope("SQLManagedInstance")
            .recurEvery("Monday-Thursday")
            .build());

        ctx.export("name", existing.applyValue(getPublicConfigurationsResult -> getPublicConfigurationsResult.configs()[0].name()));
    }
}
import pulumi
import pulumi_azure as azure

existing = azure.maintenance.get_public_configurations(location="West Europe",
    scope="SQLManagedInstance",
    recur_every="Monday-Thursday")
pulumi.export("name", existing.configs[0].name)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const existing = azure.maintenance.getPublicConfigurations({
    location: "West Europe",
    scope: "SQLManagedInstance",
    recurEvery: "Monday-Thursday",
});
export const name = existing.then(existing => existing.configs?[0]?.name);
variables:
  existing:
    Fn::Invoke:
      Function: azure:maintenance:getPublicConfigurations
      Arguments:
        location: West Europe
        scope: SQLManagedInstance
        recurEvery: Monday-Thursday
outputs:
  name: ${existing.configs[0].name}

Using getPublicConfigurations

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 getPublicConfigurations(args: GetPublicConfigurationsArgs, opts?: InvokeOptions): Promise<GetPublicConfigurationsResult>
function getPublicConfigurationsOutput(args: GetPublicConfigurationsOutputArgs, opts?: InvokeOptions): Output<GetPublicConfigurationsResult>
def get_public_configurations(location: Optional[str] = None,
                              recur_every: Optional[str] = None,
                              scope: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetPublicConfigurationsResult
def get_public_configurations_output(location: Optional[pulumi.Input[str]] = None,
                              recur_every: Optional[pulumi.Input[str]] = None,
                              scope: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetPublicConfigurationsResult]
func GetPublicConfigurations(ctx *Context, args *GetPublicConfigurationsArgs, opts ...InvokeOption) (*GetPublicConfigurationsResult, error)
func GetPublicConfigurationsOutput(ctx *Context, args *GetPublicConfigurationsOutputArgs, opts ...InvokeOption) GetPublicConfigurationsResultOutput

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

public static class GetPublicConfigurations 
{
    public static Task<GetPublicConfigurationsResult> InvokeAsync(GetPublicConfigurationsArgs args, InvokeOptions? opts = null)
    public static Output<GetPublicConfigurationsResult> Invoke(GetPublicConfigurationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPublicConfigurationsResult> getPublicConfigurations(GetPublicConfigurationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:maintenance/getPublicConfigurations:getPublicConfigurations
  arguments:
    # arguments dictionary

The following arguments are supported:

Location string

The Azure location to filter the list of Public Maintenance Configurations against.

RecurEvery string

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

Scope string

The scope to filter the list of Public Maintenance Configurations against. Possible values are Extension, Host, InGuestPatch, OSImage, SQLDB and SQLManagedInstance.

Location string

The Azure location to filter the list of Public Maintenance Configurations against.

RecurEvery string

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

Scope string

The scope to filter the list of Public Maintenance Configurations against. Possible values are Extension, Host, InGuestPatch, OSImage, SQLDB and SQLManagedInstance.

location String

The Azure location to filter the list of Public Maintenance Configurations against.

recurEvery String

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

scope String

The scope to filter the list of Public Maintenance Configurations against. Possible values are Extension, Host, InGuestPatch, OSImage, SQLDB and SQLManagedInstance.

location string

The Azure location to filter the list of Public Maintenance Configurations against.

recurEvery string

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

scope string

The scope to filter the list of Public Maintenance Configurations against. Possible values are Extension, Host, InGuestPatch, OSImage, SQLDB and SQLManagedInstance.

location str

The Azure location to filter the list of Public Maintenance Configurations against.

recur_every str

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

scope str

The scope to filter the list of Public Maintenance Configurations against. Possible values are Extension, Host, InGuestPatch, OSImage, SQLDB and SQLManagedInstance.

location String

The Azure location to filter the list of Public Maintenance Configurations against.

recurEvery String

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

scope String

The scope to filter the list of Public Maintenance Configurations against. Possible values are Extension, Host, InGuestPatch, OSImage, SQLDB and SQLManagedInstance.

getPublicConfigurations Result

The following output properties are available:

Configs List<GetPublicConfigurationsConfig>

A configs block as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure location of the Public Maintenance Configuration.

RecurEvery string

The rate at which a maintenance window is expected to recur.

Scope string
Configs []GetPublicConfigurationsConfig

A configs block as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure location of the Public Maintenance Configuration.

RecurEvery string

The rate at which a maintenance window is expected to recur.

Scope string
configs List<GetPublicConfigurationsConfig>

A configs block as defined below.

id String

The provider-assigned unique ID for this managed resource.

location String

The Azure location of the Public Maintenance Configuration.

recurEvery String

The rate at which a maintenance window is expected to recur.

scope String
configs GetPublicConfigurationsConfig[]

A configs block as defined below.

id string

The provider-assigned unique ID for this managed resource.

location string

The Azure location of the Public Maintenance Configuration.

recurEvery string

The rate at which a maintenance window is expected to recur.

scope string
configs Sequence[GetPublicConfigurationsConfig]

A configs block as defined below.

id str

The provider-assigned unique ID for this managed resource.

location str

The Azure location of the Public Maintenance Configuration.

recur_every str

The rate at which a maintenance window is expected to recur.

scope str
configs List<Property Map>

A configs block as defined below.

id String

The provider-assigned unique ID for this managed resource.

location String

The Azure location of the Public Maintenance Configuration.

recurEvery String

The rate at which a maintenance window is expected to recur.

scope String

Supporting Types

GetPublicConfigurationsConfig

Description string

A description of the Public Maintenance Configuration.

Duration string

The duration of the Public Maintenance Configuration window.

Id string

The id of the Public Maintenance Configuration.

Location string

The Azure location to filter the list of Public Maintenance Configurations against.

MaintenanceScope string

The scope of the Public Maintenance Configuration.

Name string

The name of the Public Maintenance Configuration.

RecurEvery string

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

TimeZone string

The time zone for the maintenance window.

Description string

A description of the Public Maintenance Configuration.

Duration string

The duration of the Public Maintenance Configuration window.

Id string

The id of the Public Maintenance Configuration.

Location string

The Azure location to filter the list of Public Maintenance Configurations against.

MaintenanceScope string

The scope of the Public Maintenance Configuration.

Name string

The name of the Public Maintenance Configuration.

RecurEvery string

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

TimeZone string

The time zone for the maintenance window.

description String

A description of the Public Maintenance Configuration.

duration String

The duration of the Public Maintenance Configuration window.

id String

The id of the Public Maintenance Configuration.

location String

The Azure location to filter the list of Public Maintenance Configurations against.

maintenanceScope String

The scope of the Public Maintenance Configuration.

name String

The name of the Public Maintenance Configuration.

recurEvery String

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

timeZone String

The time zone for the maintenance window.

description string

A description of the Public Maintenance Configuration.

duration string

The duration of the Public Maintenance Configuration window.

id string

The id of the Public Maintenance Configuration.

location string

The Azure location to filter the list of Public Maintenance Configurations against.

maintenanceScope string

The scope of the Public Maintenance Configuration.

name string

The name of the Public Maintenance Configuration.

recurEvery string

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

timeZone string

The time zone for the maintenance window.

description str

A description of the Public Maintenance Configuration.

duration str

The duration of the Public Maintenance Configuration window.

id str

The id of the Public Maintenance Configuration.

location str

The Azure location to filter the list of Public Maintenance Configurations against.

maintenance_scope str

The scope of the Public Maintenance Configuration.

name str

The name of the Public Maintenance Configuration.

recur_every str

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

time_zone str

The time zone for the maintenance window.

description String

A description of the Public Maintenance Configuration.

duration String

The duration of the Public Maintenance Configuration window.

id String

The id of the Public Maintenance Configuration.

location String

The Azure location to filter the list of Public Maintenance Configurations against.

maintenanceScope String

The scope of the Public Maintenance Configuration.

name String

The name of the Public Maintenance Configuration.

recurEvery String

The recurring window to filter the list of Public Maintenance Configurations against. Possible values are Monday-Thursday and Friday-Sunday

timeZone String

The time zone for the maintenance window.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.