Azure Classic
Configuration
Manages a maintenance configuration.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleConfiguration = new Azure.Maintenance.Configuration("exampleConfiguration", new Azure.Maintenance.ConfigurationArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Scope = "All",
Tags =
{
{ "Env", "prod" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"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 {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = maintenance.NewConfiguration(ctx, "exampleConfiguration", &maintenance.ConfigurationArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Scope: pulumi.String("All"),
Tags: pulumi.StringMap{
"Env": pulumi.String("prod"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.maintenance.Configuration;
import com.pulumi.azure.maintenance.ConfigurationArgs;
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) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.scope("All")
.tags(Map.of("Env", "prod"))
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_configuration = azure.maintenance.Configuration("exampleConfiguration",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
scope="All",
tags={
"Env": "prod",
})
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleConfiguration = new azure.maintenance.Configuration("exampleConfiguration", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
scope: "All",
tags: {
Env: "prod",
},
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleConfiguration:
type: azure:maintenance:Configuration
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
scope: All
tags:
Env: prod
Create a Configuration Resource
new Configuration(name: string, args: ConfigurationArgs, opts?: CustomResourceOptions);
@overload
def Configuration(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
name: Optional[str] = None,
properties: Optional[Mapping[str, str]] = None,
resource_group_name: Optional[str] = None,
scope: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
visibility: Optional[str] = None,
window: Optional[ConfigurationWindowArgs] = None)
@overload
def Configuration(resource_name: str,
args: ConfigurationArgs,
opts: Optional[ResourceOptions] = None)
func NewConfiguration(ctx *Context, name string, args ConfigurationArgs, opts ...ResourceOption) (*Configuration, error)
public Configuration(string name, ConfigurationArgs args, CustomResourceOptions? opts = null)
public Configuration(String name, ConfigurationArgs args)
public Configuration(String name, ConfigurationArgs args, CustomResourceOptions options)
type: azure:maintenance:Configuration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ConfigurationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConfigurationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Configuration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Configuration resource accepts the following input properties:
- Resource
Group stringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- Location string
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- Properties Dictionary<string, string>
A mapping of properties to assign to the resource.
- Scope string
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Dictionary<string, string>
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- Visibility string
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- Window
Configuration
Window Args A
window
block as defined below.
- Resource
Group stringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- Location string
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- Properties map[string]string
A mapping of properties to assign to the resource.
- Scope string
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- map[string]string
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- Visibility string
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- Window
Configuration
Window Args A
window
block as defined below.
- resource
Group StringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- location String
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties Map<String,String>
A mapping of properties to assign to the resource.
- scope String
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Map<String,String>
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility String
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window
Configuration
Window Args A
window
block as defined below.
- resource
Group stringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- location string
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties {[key: string]: string}
A mapping of properties to assign to the resource.
- scope string
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- {[key: string]: string}
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility string
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window
Configuration
Window Args A
window
block as defined below.
- resource_
group_ strname The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- location str
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties Mapping[str, str]
A mapping of properties to assign to the resource.
- scope str
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Mapping[str, str]
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility str
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window
Configuration
Window Args A
window
block as defined below.
- resource
Group StringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- location String
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties Map<String>
A mapping of properties to assign to the resource.
- scope String
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Map<String>
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility String
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window Property Map
A
window
block as defined below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Configuration resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up an Existing Configuration Resource
Get an existing Configuration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ConfigurationState, opts?: CustomResourceOptions): Configuration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
name: Optional[str] = None,
properties: Optional[Mapping[str, str]] = None,
resource_group_name: Optional[str] = None,
scope: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
visibility: Optional[str] = None,
window: Optional[ConfigurationWindowArgs] = None) -> Configuration
func GetConfiguration(ctx *Context, name string, id IDInput, state *ConfigurationState, opts ...ResourceOption) (*Configuration, error)
public static Configuration Get(string name, Input<string> id, ConfigurationState? state, CustomResourceOptions? opts = null)
public static Configuration get(String name, Output<String> id, ConfigurationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Location string
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- Properties Dictionary<string, string>
A mapping of properties to assign to the resource.
- Resource
Group stringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- Scope string
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Dictionary<string, string>
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- Visibility string
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- Window
Configuration
Window Args A
window
block as defined below.
- Location string
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- Properties map[string]string
A mapping of properties to assign to the resource.
- Resource
Group stringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- Scope string
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- map[string]string
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- Visibility string
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- Window
Configuration
Window Args A
window
block as defined below.
- location String
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties Map<String,String>
A mapping of properties to assign to the resource.
- resource
Group StringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- scope String
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Map<String,String>
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility String
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window
Configuration
Window Args A
window
block as defined below.
- location string
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties {[key: string]: string}
A mapping of properties to assign to the resource.
- resource
Group stringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- scope string
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- {[key: string]: string}
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility string
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window
Configuration
Window Args A
window
block as defined below.
- location str
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties Mapping[str, str]
A mapping of properties to assign to the resource.
- resource_
group_ strname The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- scope str
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Mapping[str, str]
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility str
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window
Configuration
Window Args A
window
block as defined below.
- location String
Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
- properties Map<String>
A mapping of properties to assign to the resource.
- resource
Group StringName The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
- scope String
The scope of the Maintenance Configuration. Possible values are
All
,Extension
,Host
,InGuestPatch
,OSImage
,SQLDB
orSQLManagedInstance
. Defaults toAll
.- Map<String>
A mapping of tags to assign to the resource. The key could not contain upper case letter.
- visibility String
The visibility of the Maintenance Configuration. The only allowable value is
Custom
.- window Property Map
A
window
block as defined below.
Supporting Types
ConfigurationWindow
- Start
Date stringTime Effective start date of the maintenance window in YYYY-MM-DD hh:mm format.
- Time
Zone string The time zone for the maintenance window. A list of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
- Duration string
The duration of the maintenance window in HH:mm format.
- Expiration
Date stringTime Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format.
- Recur
Every string The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules.
- Start
Date stringTime Effective start date of the maintenance window in YYYY-MM-DD hh:mm format.
- Time
Zone string The time zone for the maintenance window. A list of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
- Duration string
The duration of the maintenance window in HH:mm format.
- Expiration
Date stringTime Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format.
- Recur
Every string The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules.
- start
Date StringTime Effective start date of the maintenance window in YYYY-MM-DD hh:mm format.
- time
Zone String The time zone for the maintenance window. A list of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
- duration String
The duration of the maintenance window in HH:mm format.
- expiration
Date StringTime Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format.
- recur
Every String The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules.
- start
Date stringTime Effective start date of the maintenance window in YYYY-MM-DD hh:mm format.
- time
Zone string The time zone for the maintenance window. A list of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
- duration string
The duration of the maintenance window in HH:mm format.
- expiration
Date stringTime Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format.
- recur
Every string The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules.
- start_
date_ strtime Effective start date of the maintenance window in YYYY-MM-DD hh:mm format.
- time_
zone str The time zone for the maintenance window. A list of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
- duration str
The duration of the maintenance window in HH:mm format.
- expiration_
date_ strtime Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format.
- recur_
every str The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules.
- start
Date StringTime Effective start date of the maintenance window in YYYY-MM-DD hh:mm format.
- time
Zone String The time zone for the maintenance window. A list of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
- duration String
The duration of the maintenance window in HH:mm format.
- expiration
Date StringTime Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format.
- recur
Every String The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules.
Import
Maintenance Configuration can be imported using the resource id
, e.g.
$ pulumi import azure:maintenance/configuration:Configuration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/microsoft.maintenance/maintenanceconfigurations/example-mc
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.