maintenance

package
v3.30.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentDedicatedHost added in v3.10.0

type AssignmentDedicatedHost struct {
	pulumi.CustomResourceState

	// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
	DedicatedHostId pulumi.StringOutput `pulumi:"dedicatedHostId"`
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringOutput `pulumi:"location"`
	// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
	MaintenanceConfigurationId pulumi.StringOutput `pulumi:"maintenanceConfigurationId"`
}

Manages a maintenance assignment to Dedicated Host.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleDedicatedHostGroup, err := compute.NewDedicatedHostGroup(ctx, "exampleDedicatedHostGroup", &compute.DedicatedHostGroupArgs{
			ResourceGroupName:        exampleResourceGroup.Name,
			Location:                 exampleResourceGroup.Location,
			PlatformFaultDomainCount: pulumi.Int(2),
		})
		if err != nil {
			return err
		}
		exampleDedicatedHost, err := compute.NewDedicatedHost(ctx, "exampleDedicatedHost", &compute.DedicatedHostArgs{
			Location:             exampleResourceGroup.Location,
			DedicatedHostGroupId: exampleDedicatedHostGroup.ID(),
			SkuName:              pulumi.String("DSv3-Type1"),
			PlatformFaultDomain:  pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		exampleConfiguration, err := maintenance.NewConfiguration(ctx, "exampleConfiguration", &maintenance.ConfigurationArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
			Scope:             pulumi.String("All"),
		})
		if err != nil {
			return err
		}
		_, err = maintenance.NewAssignmentDedicatedHost(ctx, "exampleAssignmentDedicatedHost", &maintenance.AssignmentDedicatedHostArgs{
			Location:                   exampleResourceGroup.Location,
			MaintenanceConfigurationId: exampleConfiguration.ID(),
			DedicatedHostId:            exampleDedicatedHost.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetAssignmentDedicatedHost added in v3.10.0

func GetAssignmentDedicatedHost(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssignmentDedicatedHostState, opts ...pulumi.ResourceOption) (*AssignmentDedicatedHost, error)

GetAssignmentDedicatedHost gets an existing AssignmentDedicatedHost resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssignmentDedicatedHost added in v3.10.0

func NewAssignmentDedicatedHost(ctx *pulumi.Context,
	name string, args *AssignmentDedicatedHostArgs, opts ...pulumi.ResourceOption) (*AssignmentDedicatedHost, error)

NewAssignmentDedicatedHost registers a new resource with the given unique name, arguments, and options.

type AssignmentDedicatedHostArgs added in v3.10.0

type AssignmentDedicatedHostArgs struct {
	// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
	DedicatedHostId pulumi.StringInput
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
	MaintenanceConfigurationId pulumi.StringInput
}

The set of arguments for constructing a AssignmentDedicatedHost resource.

func (AssignmentDedicatedHostArgs) ElementType added in v3.10.0

type AssignmentDedicatedHostState added in v3.10.0

type AssignmentDedicatedHostState struct {
	// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
	DedicatedHostId pulumi.StringPtrInput
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
	MaintenanceConfigurationId pulumi.StringPtrInput
}

func (AssignmentDedicatedHostState) ElementType added in v3.10.0

type AssignmentVirtualMachine added in v3.10.0

type AssignmentVirtualMachine struct {
	pulumi.CustomResourceState

	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringOutput `pulumi:"location"`
	// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
	MaintenanceConfigurationId pulumi.StringOutput `pulumi:"maintenanceConfigurationId"`
	// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
	VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"`
}

Manages a maintenance assignment to virtual machine.

func GetAssignmentVirtualMachine added in v3.10.0

func GetAssignmentVirtualMachine(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssignmentVirtualMachineState, opts ...pulumi.ResourceOption) (*AssignmentVirtualMachine, error)

GetAssignmentVirtualMachine gets an existing AssignmentVirtualMachine resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssignmentVirtualMachine added in v3.10.0

func NewAssignmentVirtualMachine(ctx *pulumi.Context,
	name string, args *AssignmentVirtualMachineArgs, opts ...pulumi.ResourceOption) (*AssignmentVirtualMachine, error)

NewAssignmentVirtualMachine registers a new resource with the given unique name, arguments, and options.

type AssignmentVirtualMachineArgs added in v3.10.0

type AssignmentVirtualMachineArgs struct {
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
	MaintenanceConfigurationId pulumi.StringInput
	// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
	VirtualMachineId pulumi.StringInput
}

The set of arguments for constructing a AssignmentVirtualMachine resource.

func (AssignmentVirtualMachineArgs) ElementType added in v3.10.0

type AssignmentVirtualMachineState added in v3.10.0

type AssignmentVirtualMachineState struct {
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
	MaintenanceConfigurationId pulumi.StringPtrInput
	// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
	VirtualMachineId pulumi.StringPtrInput
}

func (AssignmentVirtualMachineState) ElementType added in v3.10.0

type Configuration

type Configuration struct {
	pulumi.CustomResourceState

	// Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringOutput `pulumi:"location"`
	// Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The scope of the Maintenance Configuration. Possible values are `All`, `Host`, `Resource` or `InResource`. Default to `All`.
	Scope pulumi.StringPtrOutput `pulumi:"scope"`
	// A mapping of tags to assign to the resource. The key could not contain upper case letter.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Manages a maintenance configuration.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"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 {
		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
	})
}

```

func GetConfiguration

func GetConfiguration(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ConfigurationState, opts ...pulumi.ResourceOption) (*Configuration, error)

GetConfiguration gets an existing Configuration resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewConfiguration

func NewConfiguration(ctx *pulumi.Context,
	name string, args *ConfigurationArgs, opts ...pulumi.ResourceOption) (*Configuration, error)

NewConfiguration registers a new resource with the given unique name, arguments, and options.

type ConfigurationArgs

type ConfigurationArgs struct {
	// Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// The scope of the Maintenance Configuration. Possible values are `All`, `Host`, `Resource` or `InResource`. Default to `All`.
	Scope pulumi.StringPtrInput
	// A mapping of tags to assign to the resource. The key could not contain upper case letter.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a Configuration resource.

func (ConfigurationArgs) ElementType

func (ConfigurationArgs) ElementType() reflect.Type

type ConfigurationState

type ConfigurationState struct {
	// Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The scope of the Maintenance Configuration. Possible values are `All`, `Host`, `Resource` or `InResource`. Default to `All`.
	Scope pulumi.StringPtrInput
	// A mapping of tags to assign to the resource. The key could not contain upper case letter.
	Tags pulumi.StringMapInput
}

func (ConfigurationState) ElementType

func (ConfigurationState) ElementType() reflect.Type

type LookupConfigurationArgs added in v3.4.0

type LookupConfigurationArgs struct {
	// Specifies the name of the Maintenance Configuration.
	Name string `pulumi:"name"`
	// Specifies the name of the Resource Group where this Maintenance Configuration exists.
	ResourceGroupName string `pulumi:"resourceGroupName"`
}

A collection of arguments for invoking getConfiguration.

type LookupConfigurationResult added in v3.4.0

type LookupConfigurationResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The Azure location where the resource exists.
	Location          string `pulumi:"location"`
	Name              string `pulumi:"name"`
	ResourceGroupName string `pulumi:"resourceGroupName"`
	// The scope of the Maintenance Configuration.
	Scope string `pulumi:"scope"`
	// A mapping of tags assigned to the resource.
	Tags map[string]string `pulumi:"tags"`
}

A collection of values returned by getConfiguration.

func LookupConfiguration added in v3.4.0

func LookupConfiguration(ctx *pulumi.Context, args *LookupConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupConfigurationResult, error)

Use this data source to access information about an existing Maintenance Configuration.

## Example Usage

```go 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
	})
}

```

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL