GetConfiguration
Use this data source to access information about an existing Maintenance Configuration.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var existing = Output.Create(Azure.Maintenance.GetConfiguration.InvokeAsync(new Azure.Maintenance.GetConfigurationArgs
{
Name = "example-mc",
ResourceGroupName = "example-resources",
}));
this.Id = azurerm_maintenance_configuration.Existing.Id;
}
[Output("id")]
public Output<string> Id { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/maintenance"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := maintenance.LookupConfiguration(ctx, &maintenance.LookupConfigurationArgs{
Name: "example-mc",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("id", azurerm_maintenance_configuration.Existing.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
existing = azure.maintenance.get_configuration(name="example-mc",
resource_group_name="example-resources")
pulumi.export("id", azurerm_maintenance_configuration["existing"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const existing = azure.maintenance.getConfiguration({
name: "example-mc",
resourceGroupName: "example-resources",
});
export const id = azurerm_maintenance_configuration.existing.id;Using GetConfiguration
function getConfiguration(args: GetConfigurationArgs, opts?: InvokeOptions): Promise<GetConfigurationResult>function get_configuration(name=None, resource_group_name=None, opts=None)func LookupConfiguration(ctx *Context, args *LookupConfigurationArgs, opts ...InvokeOption) (*LookupConfigurationResult, error)Note: This function is named
LookupConfigurationin the Go SDK.
public static class GetConfiguration {
public static Task<GetConfigurationResult> InvokeAsync(GetConfigurationArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the Maintenance Configuration.
- Resource
Group stringName Specifies the name of the Resource Group where this Maintenance Configuration exists.
- Name string
Specifies the name of the Maintenance Configuration.
- Resource
Group stringName Specifies the name of the Resource Group where this Maintenance Configuration exists.
- name string
Specifies the name of the Maintenance Configuration.
- resource
Group stringName Specifies the name of the Resource Group where this Maintenance Configuration exists.
- name str
Specifies the name of the Maintenance Configuration.
- resource_
group_ strname Specifies the name of the Resource Group where this Maintenance Configuration exists.
GetConfiguration Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.