azure-native.maintenance.ConfigurationAssignment
Explore with Pulumi AI
Configuration Assignment Azure REST API version: 2022-11-01-preview. Prior API version in Azure Native 1.x: 2021-04-01-preview.
Other available API versions: 2023-04-01, 2023-09-01-preview, 2023-10-01-preview.
Example Usage
ConfigurationAssignments_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var configurationAssignment = new AzureNative.Maintenance.ConfigurationAssignment("configurationAssignment", new()
{
ConfigurationAssignmentName = "workervmConfiguration",
MaintenanceConfigurationId = "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
ProviderName = "Microsoft.Compute",
ResourceGroupName = "examplerg",
ResourceName = "smdtest1",
ResourceType = "virtualMachineScaleSets",
});
});
package main
import (
maintenance "github.com/pulumi/pulumi-azure-native-sdk/maintenance/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := maintenance.NewConfigurationAssignment(ctx, "configurationAssignment", &maintenance.ConfigurationAssignmentArgs{
ConfigurationAssignmentName: pulumi.String("workervmConfiguration"),
MaintenanceConfigurationId: pulumi.String("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1"),
ProviderName: pulumi.String("Microsoft.Compute"),
ResourceGroupName: pulumi.String("examplerg"),
ResourceName: pulumi.String("smdtest1"),
ResourceType: pulumi.String("virtualMachineScaleSets"),
})
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.azurenative.maintenance.ConfigurationAssignment;
import com.pulumi.azurenative.maintenance.ConfigurationAssignmentArgs;
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 configurationAssignment = new ConfigurationAssignment("configurationAssignment", ConfigurationAssignmentArgs.builder()
.configurationAssignmentName("workervmConfiguration")
.maintenanceConfigurationId("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1")
.providerName("Microsoft.Compute")
.resourceGroupName("examplerg")
.resourceName("smdtest1")
.resourceType("virtualMachineScaleSets")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
configuration_assignment = azure_native.maintenance.ConfigurationAssignment("configurationAssignment",
configuration_assignment_name="workervmConfiguration",
maintenance_configuration_id="/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
provider_name="Microsoft.Compute",
resource_group_name="examplerg",
resource_name_="smdtest1",
resource_type="virtualMachineScaleSets")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const configurationAssignment = new azure_native.maintenance.ConfigurationAssignment("configurationAssignment", {
configurationAssignmentName: "workervmConfiguration",
maintenanceConfigurationId: "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
providerName: "Microsoft.Compute",
resourceGroupName: "examplerg",
resourceName: "smdtest1",
resourceType: "virtualMachineScaleSets",
});
resources:
configurationAssignment:
type: azure-native:maintenance:ConfigurationAssignment
properties:
configurationAssignmentName: workervmConfiguration
maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
providerName: Microsoft.Compute
resourceGroupName: examplerg
resourceName: smdtest1
resourceType: virtualMachineScaleSets
Create ConfigurationAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ConfigurationAssignment(name: string, args: ConfigurationAssignmentArgs, opts?: CustomResourceOptions);
@overload
def ConfigurationAssignment(resource_name: str,
args: ConfigurationAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ConfigurationAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
provider_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
resource_name_: Optional[str] = None,
resource_type: Optional[str] = None,
configuration_assignment_name: Optional[str] = None,
location: Optional[str] = None,
maintenance_configuration_id: Optional[str] = None,
resource_id: Optional[str] = None)
func NewConfigurationAssignment(ctx *Context, name string, args ConfigurationAssignmentArgs, opts ...ResourceOption) (*ConfigurationAssignment, error)
public ConfigurationAssignment(string name, ConfigurationAssignmentArgs args, CustomResourceOptions? opts = null)
public ConfigurationAssignment(String name, ConfigurationAssignmentArgs args)
public ConfigurationAssignment(String name, ConfigurationAssignmentArgs args, CustomResourceOptions options)
type: azure-native:maintenance:ConfigurationAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ConfigurationAssignmentArgs
- 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 ConfigurationAssignmentArgs
- 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 ConfigurationAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConfigurationAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConfigurationAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var configurationAssignmentResource = new AzureNative.Maintenance.ConfigurationAssignment("configurationAssignmentResource", new()
{
ProviderName = "string",
ResourceGroupName = "string",
ResourceName = "string",
ResourceType = "string",
ConfigurationAssignmentName = "string",
Location = "string",
MaintenanceConfigurationId = "string",
ResourceId = "string",
});
example, err := maintenance.NewConfigurationAssignment(ctx, "configurationAssignmentResource", &maintenance.ConfigurationAssignmentArgs{
ProviderName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ResourceName: pulumi.String("string"),
ResourceType: pulumi.String("string"),
ConfigurationAssignmentName: pulumi.String("string"),
Location: pulumi.String("string"),
MaintenanceConfigurationId: pulumi.String("string"),
ResourceId: pulumi.String("string"),
})
var configurationAssignmentResource = new ConfigurationAssignment("configurationAssignmentResource", ConfigurationAssignmentArgs.builder()
.providerName("string")
.resourceGroupName("string")
.resourceName("string")
.resourceType("string")
.configurationAssignmentName("string")
.location("string")
.maintenanceConfigurationId("string")
.resourceId("string")
.build());
configuration_assignment_resource = azure_native.maintenance.ConfigurationAssignment("configurationAssignmentResource",
provider_name="string",
resource_group_name="string",
resource_name_="string",
resource_type="string",
configuration_assignment_name="string",
location="string",
maintenance_configuration_id="string",
resource_id="string")
const configurationAssignmentResource = new azure_native.maintenance.ConfigurationAssignment("configurationAssignmentResource", {
providerName: "string",
resourceGroupName: "string",
resourceName: "string",
resourceType: "string",
configurationAssignmentName: "string",
location: "string",
maintenanceConfigurationId: "string",
resourceId: "string",
});
type: azure-native:maintenance:ConfigurationAssignment
properties:
configurationAssignmentName: string
location: string
maintenanceConfigurationId: string
providerName: string
resourceGroupName: string
resourceId: string
resourceName: string
resourceType: string
ConfigurationAssignment 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 ConfigurationAssignment resource accepts the following input properties:
- Provider
Name string - Resource provider name
- Resource
Group stringName - Resource group name
- Resource
Name string - Resource identifier
- Resource
Type string - Resource type
- Configuration
Assignment stringName - Configuration assignment name
- Location string
- Location of the resource
- Maintenance
Configuration stringId - The maintenance configuration Id
- Resource
Id string - The unique resourceId
- Provider
Name string - Resource provider name
- Resource
Group stringName - Resource group name
- Resource
Name string - Resource identifier
- Resource
Type string - Resource type
- Configuration
Assignment stringName - Configuration assignment name
- Location string
- Location of the resource
- Maintenance
Configuration stringId - The maintenance configuration Id
- Resource
Id string - The unique resourceId
- provider
Name String - Resource provider name
- resource
Group StringName - Resource group name
- resource
Name String - Resource identifier
- resource
Type String - Resource type
- configuration
Assignment StringName - Configuration assignment name
- location String
- Location of the resource
- maintenance
Configuration StringId - The maintenance configuration Id
- resource
Id String - The unique resourceId
- provider
Name string - Resource provider name
- resource
Group stringName - Resource group name
- resource
Name string - Resource identifier
- resource
Type string - Resource type
- configuration
Assignment stringName - Configuration assignment name
- location string
- Location of the resource
- maintenance
Configuration stringId - The maintenance configuration Id
- resource
Id string - The unique resourceId
- provider_
name str - Resource provider name
- resource_
group_ strname - Resource group name
- resource_
name str - Resource identifier
- resource_
type str - Resource type
- configuration_
assignment_ strname - Configuration assignment name
- location str
- Location of the resource
- maintenance_
configuration_ strid - The maintenance configuration Id
- resource_
id str - The unique resourceId
- provider
Name String - Resource provider name
- resource
Group StringName - Resource group name
- resource
Name String - Resource identifier
- resource
Type String - Resource type
- configuration
Assignment StringName - Configuration assignment name
- location String
- Location of the resource
- maintenance
Configuration StringId - The maintenance configuration Id
- resource
Id String - The unique resourceId
Outputs
All input properties are implicitly available as output properties. Additionally, the ConfigurationAssignment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the resource
- System
Data Pulumi.Azure Native. Maintenance. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- Type of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the resource
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- Type of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the resource
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- Type of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the resource
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- Type of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Name of the resource
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- Type of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the resource
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- Type of the resource
Supporting Types
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:maintenance:ConfigurationAssignment workervmConfiguration /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0