diff --git a/internal/services/compute/client/client.go b/internal/services/compute/client/client.go index e2f5cb5c7c55..7698c7dbb6a4 100644 --- a/internal/services/compute/client/client.go +++ b/internal/services/compute/client/client.go @@ -29,6 +29,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/availabilitysets" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/dedicatedhostgroups" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/dedicatedhosts" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/sshpublickeys" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineextensions" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineimages" @@ -61,6 +62,7 @@ type Client struct { ImagesClient *images.ImagesClient MarketplaceAgreementsClient *agreements.AgreementsClient ProximityPlacementGroupsClient *proximityplacementgroups.ProximityPlacementGroupsClient + RestorePointCollectionsClient *restorepointcollections.RestorePointCollectionsClient SkusClient *skus.SkusClient SSHPublicKeysClient *sshpublickeys.SshPublicKeysClient SnapshotsClient *snapshots.SnapshotsClient @@ -177,6 +179,12 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(proximityPlacementGroupsClient.Client, o.Authorizers.ResourceManager) + restorePointCollectionsClient, err := restorepointcollections.NewRestorePointCollectionsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building RestorePointCollections client: %+v", err) + } + o.Configure(restorePointCollectionsClient.Client, o.Authorizers.ResourceManager) + skusClient, err := skus.NewSkusClientWithBaseURI(o.Environment.ResourceManager) if err != nil { return nil, fmt.Errorf("building Skus client: %+v", err) @@ -261,6 +269,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) { ImagesClient: imagesClient, MarketplaceAgreementsClient: marketplaceAgreementsClient, ProximityPlacementGroupsClient: proximityPlacementGroupsClient, + RestorePointCollectionsClient: restorePointCollectionsClient, SkusClient: skusClient, SSHPublicKeysClient: sshPublicKeysClient, SnapshotsClient: snapshotsClient, diff --git a/internal/services/compute/registration.go b/internal/services/compute/registration.go index 2cfdf8b72570..7b593ab49697 100644 --- a/internal/services/compute/registration.go +++ b/internal/services/compute/registration.go @@ -92,6 +92,7 @@ func (r Registration) Resources() []sdk.Resource { VirtualMachineRunCommandResource{}, GalleryApplicationResource{}, GalleryApplicationVersionResource{}, + RestorePointCollectionResource{}, VirtualMachineGalleryApplicationAssignmentResource{}, } } diff --git a/internal/services/compute/restore_point_collection_resource.go b/internal/services/compute/restore_point_collection_resource.go new file mode 100644 index 000000000000..dd00d732ca96 --- /dev/null +++ b/internal/services/compute/restore_point_collection_resource.go @@ -0,0 +1,212 @@ +package compute + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" +) + +type RestorePointCollectionResource struct{} + +var _ sdk.ResourceWithUpdate = RestorePointCollectionResource{} + +func (r RestorePointCollectionResource) ModelObject() interface{} { + return &RestorePointCollectionResourceModel{} +} + +type RestorePointCollectionResourceModel struct { + Name string `tfschema:"name"` + ResourceGroup string `tfschema:"resource_group_name"` + Location string `tfschema:"location"` + SourceVirtualMachineId string `tfschema:"source_virtual_machine_id"` + Tags map[string]interface{} `tfschema:"tags"` +} + +func (r RestorePointCollectionResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return restorepointcollections.ValidateRestorePointCollectionID +} + +func (r RestorePointCollectionResource) ResourceType() string { + return "azurerm_restore_point_collection" +} + +func (r RestorePointCollectionResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + ForceNew: true, + Required: true, + Type: pluginsdk.TypeString, + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "location": commonschema.Location(), + + "source_virtual_machine_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: commonids.ValidateVirtualMachineID, + }, + + "tags": commonschema.Tags(), + } +} + +func (r RestorePointCollectionResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r RestorePointCollectionResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Compute.RestorePointCollectionsClient + subscriptionId := metadata.Client.Account.SubscriptionId + + var config RestorePointCollectionResourceModel + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + id := restorepointcollections.NewRestorePointCollectionID(subscriptionId, config.ResourceGroup, config.Name) + + existing, err := client.Get(ctx, id, restorepointcollections.DefaultGetOperationOptions()) + if err != nil { + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for the presence of an existing %s: %+v", id, err) + } + } + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + parameters := restorepointcollections.RestorePointCollection{ + Location: location.Normalize(config.Location), + Properties: &restorepointcollections.RestorePointCollectionProperties{ + Source: &restorepointcollections.RestorePointCollectionSourceProperties{ + Id: pointer.To(config.SourceVirtualMachineId), + }, + }, + Tags: tags.Expand(config.Tags), + } + + if _, err = client.CreateOrUpdate(ctx, id, parameters); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + return nil + }, + } +} + +func (r RestorePointCollectionResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Compute.RestorePointCollectionsClient + + schema := RestorePointCollectionResourceModel{} + + id, err := restorepointcollections.ParseRestorePointCollectionID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id, restorepointcollections.DefaultGetOperationOptions()) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(*id) + } + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + + if model := resp.Model; model != nil { + schema.Name = id.RestorePointCollectionName + schema.ResourceGroup = id.ResourceGroupName + + if props := model.Properties; props != nil { + if source := props.Source; source != nil { + schema.SourceVirtualMachineId = pointer.From(source.Id) + schema.Location = location.Normalize(pointer.From(source.Location)) + } + } + + schema.Tags = tags.Flatten(model.Tags) + } + + return metadata.Encode(&schema) + }, + } +} + +func (r RestorePointCollectionResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Compute.RestorePointCollectionsClient + + id, err := restorepointcollections.ParseRestorePointCollectionID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + existing, err := client.Get(ctx, *id, restorepointcollections.DefaultGetOperationOptions()) + if err != nil { + return fmt.Errorf("retrieving %s: %+v", id, err) + } + + if existing.Model == nil { + return fmt.Errorf("retrieving %s: `model` was nil", id) + } + + payload := *existing.Model + + var config RestorePointCollectionResourceModel + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + if metadata.ResourceData.HasChange("tags") { + payload.Tags = tags.Expand(config.Tags) + } + + if _, err = client.CreateOrUpdate(ctx, *id, payload); err != nil { + return fmt.Errorf("updating %s: %+v", *id, err) + } + + return nil + }, + } +} + +func (r RestorePointCollectionResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Compute.RestorePointCollectionsClient + + id, err := restorepointcollections.ParseRestorePointCollectionID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if err := client.DeleteThenPoll(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", *id, err) + } + + return nil + }, + } +} diff --git a/internal/services/compute/restore_point_collection_resource_test.go b/internal/services/compute/restore_point_collection_resource_test.go new file mode 100644 index 000000000000..2fa3d87f596b --- /dev/null +++ b/internal/services/compute/restore_point_collection_resource_test.go @@ -0,0 +1,169 @@ +package compute_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" + "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" + "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type RestorePointCollectionResource struct{} + +func TestAccRestorePointCollection_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_restore_point_collection", "test") + r := RestorePointCollectionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccRestorePointCollection_update(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_restore_point_collection", "test") + r := RestorePointCollectionResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + { + Config: r.update(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func (r RestorePointCollectionResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + id, err := restorepointcollections.ParseRestorePointCollectionID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clients.Compute.RestorePointCollectionsClient.Get(ctx, *id, restorepointcollections.DefaultGetOperationOptions()) + if err != nil { + return nil, fmt.Errorf("reading %s: %+v", *id, err) + } + + return utils.Bool(resp.Model != nil), nil +} + +func (r RestorePointCollectionResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} +%[1]s +resource "azurerm_restore_point_collection" "test" { + name = "acctestRPC-%[2]s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_linux_virtual_machine.test.location + source_virtual_machine_id = azurerm_linux_virtual_machine.test.id + + tags = { + foo = "bar" + } +} +`, r.template(data), data.RandomString) +} + +func (r RestorePointCollectionResource) update(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} +%[1]s +resource "azurerm_restore_point_collection" "test" { + name = "acctestRPC-%[2]s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_linux_virtual_machine.test.location + source_virtual_machine_id = azurerm_linux_virtual_machine.test.id + + tags = { + bar = "foo" + } +} +`, r.template(data), data.RandomString) +} + +func (r RestorePointCollectionResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +resource "azurerm_resource_group" "test" { + name = "acctestRG-Compute-%[1]d" + location = "%[2]s" +} + + +resource "azurerm_virtual_network" "test" { + name = "acctestnw-%[1]d" + address_space = ["10.0.0.0/16"] + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_subnet" "test" { + name = "acctestinternal-%[1]d" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.0.0/24"] +} + +resource "azurerm_network_interface" "test" { + name = "acctestnic-%[1]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + ip_configuration { + name = "internal" + subnet_id = azurerm_subnet.test.id + private_ip_address_allocation = "Dynamic" + } +} + +resource "azurerm_linux_virtual_machine" "test" { + name = "acctestVM-%[1]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + size = "Standard_F2" + admin_username = "adminuser" + admin_password = "P@$$w0rd1234!" + network_interface_ids = [ + azurerm_network_interface.test.id, + ] + + admin_ssh_key { + username = "adminuser" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com" + } + + os_disk { + caching = "ReadWrite" + storage_account_type = "Standard_LRS" + } + + source_image_reference { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-jammy" + sku = "22_04-lts" + version = "latest" + } +} +`, data.RandomInteger, data.Locations.Primary) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/README.md new file mode 100644 index 000000000000..27964ff3e62d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/README.md @@ -0,0 +1,125 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections` Documentation + +The `restorepointcollections` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections" +``` + + +### Client Initialization + +```go +client := restorepointcollections.NewRestorePointCollectionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `RestorePointCollectionsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := restorepointcollections.NewRestorePointCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "restorePointCollectionValue") + +payload := restorepointcollections.RestorePointCollection{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RestorePointCollectionsClient.Delete` + +```go +ctx := context.TODO() +id := restorepointcollections.NewRestorePointCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "restorePointCollectionValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RestorePointCollectionsClient.Get` + +```go +ctx := context.TODO() +id := restorepointcollections.NewRestorePointCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "restorePointCollectionValue") + +read, err := client.Get(ctx, id, restorepointcollections.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RestorePointCollectionsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RestorePointCollectionsClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RestorePointCollectionsClient.Update` + +```go +ctx := context.TODO() +id := restorepointcollections.NewRestorePointCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "restorePointCollectionValue") + +payload := restorepointcollections.RestorePointCollectionUpdate{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/client.go new file mode 100644 index 000000000000..816bae4a3462 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/client.go @@ -0,0 +1,26 @@ +package restorepointcollections + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointCollectionsClient struct { + Client *resourcemanager.Client +} + +func NewRestorePointCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointCollectionsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepointcollections", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating RestorePointCollectionsClient: %+v", err) + } + + return &RestorePointCollectionsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/constants.go new file mode 100644 index 000000000000..23bd8196d651 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/constants.go @@ -0,0 +1,1481 @@ +package restorepointcollections + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CachingTypes string + +const ( + CachingTypesNone CachingTypes = "None" + CachingTypesReadOnly CachingTypes = "ReadOnly" + CachingTypesReadWrite CachingTypes = "ReadWrite" +) + +func PossibleValuesForCachingTypes() []string { + return []string{ + string(CachingTypesNone), + string(CachingTypesReadOnly), + string(CachingTypesReadWrite), + } +} + +func (s *CachingTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCachingTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCachingTypes(input string) (*CachingTypes, error) { + vals := map[string]CachingTypes{ + "none": CachingTypesNone, + "readonly": CachingTypesReadOnly, + "readwrite": CachingTypesReadWrite, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CachingTypes(input) + return &out, nil +} + +type ComponentNames string + +const ( + ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup ComponentNames = "Microsoft-Windows-Shell-Setup" +) + +func PossibleValuesForComponentNames() []string { + return []string{ + string(ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup), + } +} + +func (s *ComponentNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseComponentNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseComponentNames(input string) (*ComponentNames, error) { + vals := map[string]ComponentNames{ + "microsoft-windows-shell-setup": ComponentNamesMicrosoftNegativeWindowsNegativeShellNegativeSetup, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ComponentNames(input) + return &out, nil +} + +type ConsistencyModeTypes string + +const ( + ConsistencyModeTypesApplicationConsistent ConsistencyModeTypes = "ApplicationConsistent" + ConsistencyModeTypesCrashConsistent ConsistencyModeTypes = "CrashConsistent" + ConsistencyModeTypesFileSystemConsistent ConsistencyModeTypes = "FileSystemConsistent" +) + +func PossibleValuesForConsistencyModeTypes() []string { + return []string{ + string(ConsistencyModeTypesApplicationConsistent), + string(ConsistencyModeTypesCrashConsistent), + string(ConsistencyModeTypesFileSystemConsistent), + } +} + +func (s *ConsistencyModeTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseConsistencyModeTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseConsistencyModeTypes(input string) (*ConsistencyModeTypes, error) { + vals := map[string]ConsistencyModeTypes{ + "applicationconsistent": ConsistencyModeTypesApplicationConsistent, + "crashconsistent": ConsistencyModeTypesCrashConsistent, + "filesystemconsistent": ConsistencyModeTypesFileSystemConsistent, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ConsistencyModeTypes(input) + return &out, nil +} + +type DiskControllerTypes string + +const ( + DiskControllerTypesNVMe DiskControllerTypes = "NVMe" + DiskControllerTypesSCSI DiskControllerTypes = "SCSI" +) + +func PossibleValuesForDiskControllerTypes() []string { + return []string{ + string(DiskControllerTypesNVMe), + string(DiskControllerTypesSCSI), + } +} + +func (s *DiskControllerTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskControllerTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskControllerTypes(input string) (*DiskControllerTypes, error) { + vals := map[string]DiskControllerTypes{ + "nvme": DiskControllerTypesNVMe, + "scsi": DiskControllerTypesSCSI, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskControllerTypes(input) + return &out, nil +} + +type HyperVGenerationTypes string + +const ( + HyperVGenerationTypesVOne HyperVGenerationTypes = "V1" + HyperVGenerationTypesVTwo HyperVGenerationTypes = "V2" +) + +func PossibleValuesForHyperVGenerationTypes() []string { + return []string{ + string(HyperVGenerationTypesVOne), + string(HyperVGenerationTypesVTwo), + } +} + +func (s *HyperVGenerationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHyperVGenerationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHyperVGenerationTypes(input string) (*HyperVGenerationTypes, error) { + vals := map[string]HyperVGenerationTypes{ + "v1": HyperVGenerationTypesVOne, + "v2": HyperVGenerationTypesVTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HyperVGenerationTypes(input) + return &out, nil +} + +type LinuxPatchAssessmentMode string + +const ( + LinuxPatchAssessmentModeAutomaticByPlatform LinuxPatchAssessmentMode = "AutomaticByPlatform" + LinuxPatchAssessmentModeImageDefault LinuxPatchAssessmentMode = "ImageDefault" +) + +func PossibleValuesForLinuxPatchAssessmentMode() []string { + return []string{ + string(LinuxPatchAssessmentModeAutomaticByPlatform), + string(LinuxPatchAssessmentModeImageDefault), + } +} + +func (s *LinuxPatchAssessmentMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinuxPatchAssessmentMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinuxPatchAssessmentMode(input string) (*LinuxPatchAssessmentMode, error) { + vals := map[string]LinuxPatchAssessmentMode{ + "automaticbyplatform": LinuxPatchAssessmentModeAutomaticByPlatform, + "imagedefault": LinuxPatchAssessmentModeImageDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinuxPatchAssessmentMode(input) + return &out, nil +} + +type LinuxVMGuestPatchAutomaticByPlatformRebootSetting string + +const ( + LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Always" + LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired" + LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Never" + LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown" +) + +func PossibleValuesForLinuxVMGuestPatchAutomaticByPlatformRebootSetting() []string { + return []string{ + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways), + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired), + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever), + string(LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + } +} + +func (s *LinuxVMGuestPatchAutomaticByPlatformRebootSetting) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinuxVMGuestPatchAutomaticByPlatformRebootSetting(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinuxVMGuestPatchAutomaticByPlatformRebootSetting(input string) (*LinuxVMGuestPatchAutomaticByPlatformRebootSetting, error) { + vals := map[string]LinuxVMGuestPatchAutomaticByPlatformRebootSetting{ + "always": LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways, + "ifrequired": LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired, + "never": LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever, + "unknown": LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinuxVMGuestPatchAutomaticByPlatformRebootSetting(input) + return &out, nil +} + +type LinuxVMGuestPatchMode string + +const ( + LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform" + LinuxVMGuestPatchModeImageDefault LinuxVMGuestPatchMode = "ImageDefault" +) + +func PossibleValuesForLinuxVMGuestPatchMode() []string { + return []string{ + string(LinuxVMGuestPatchModeAutomaticByPlatform), + string(LinuxVMGuestPatchModeImageDefault), + } +} + +func (s *LinuxVMGuestPatchMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinuxVMGuestPatchMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinuxVMGuestPatchMode(input string) (*LinuxVMGuestPatchMode, error) { + vals := map[string]LinuxVMGuestPatchMode{ + "automaticbyplatform": LinuxVMGuestPatchModeAutomaticByPlatform, + "imagedefault": LinuxVMGuestPatchModeImageDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinuxVMGuestPatchMode(input) + return &out, nil +} + +type Mode string + +const ( + ModeAudit Mode = "Audit" + ModeEnforce Mode = "Enforce" +) + +func PossibleValuesForMode() []string { + return []string{ + string(ModeAudit), + string(ModeEnforce), + } +} + +func (s *Mode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMode(input string) (*Mode, error) { + vals := map[string]Mode{ + "audit": ModeAudit, + "enforce": ModeEnforce, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Mode(input) + return &out, nil +} + +type OperatingSystemType string + +const ( + OperatingSystemTypeLinux OperatingSystemType = "Linux" + OperatingSystemTypeWindows OperatingSystemType = "Windows" +) + +func PossibleValuesForOperatingSystemType() []string { + return []string{ + string(OperatingSystemTypeLinux), + string(OperatingSystemTypeWindows), + } +} + +func (s *OperatingSystemType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperatingSystemType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperatingSystemType(input string) (*OperatingSystemType, error) { + vals := map[string]OperatingSystemType{ + "linux": OperatingSystemTypeLinux, + "windows": OperatingSystemTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OperatingSystemType(input) + return &out, nil +} + +type PassNames string + +const ( + PassNamesOobeSystem PassNames = "OobeSystem" +) + +func PossibleValuesForPassNames() []string { + return []string{ + string(PassNamesOobeSystem), + } +} + +func (s *PassNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePassNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePassNames(input string) (*PassNames, error) { + vals := map[string]PassNames{ + "oobesystem": PassNamesOobeSystem, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PassNames(input) + return &out, nil +} + +type ProtocolTypes string + +const ( + ProtocolTypesHTTP ProtocolTypes = "Http" + ProtocolTypesHTTPS ProtocolTypes = "Https" +) + +func PossibleValuesForProtocolTypes() []string { + return []string{ + string(ProtocolTypesHTTP), + string(ProtocolTypesHTTPS), + } +} + +func (s *ProtocolTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProtocolTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProtocolTypes(input string) (*ProtocolTypes, error) { + vals := map[string]ProtocolTypes{ + "http": ProtocolTypesHTTP, + "https": ProtocolTypesHTTPS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProtocolTypes(input) + return &out, nil +} + +type RestorePointCollectionExpandOptions string + +const ( + RestorePointCollectionExpandOptionsRestorePoints RestorePointCollectionExpandOptions = "restorePoints" +) + +func PossibleValuesForRestorePointCollectionExpandOptions() []string { + return []string{ + string(RestorePointCollectionExpandOptionsRestorePoints), + } +} + +func (s *RestorePointCollectionExpandOptions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRestorePointCollectionExpandOptions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRestorePointCollectionExpandOptions(input string) (*RestorePointCollectionExpandOptions, error) { + vals := map[string]RestorePointCollectionExpandOptions{ + "restorepoints": RestorePointCollectionExpandOptionsRestorePoints, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RestorePointCollectionExpandOptions(input) + return &out, nil +} + +type RestorePointEncryptionType string + +const ( + RestorePointEncryptionTypeEncryptionAtRestWithCustomerKey RestorePointEncryptionType = "EncryptionAtRestWithCustomerKey" + RestorePointEncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys RestorePointEncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys" + RestorePointEncryptionTypeEncryptionAtRestWithPlatformKey RestorePointEncryptionType = "EncryptionAtRestWithPlatformKey" +) + +func PossibleValuesForRestorePointEncryptionType() []string { + return []string{ + string(RestorePointEncryptionTypeEncryptionAtRestWithCustomerKey), + string(RestorePointEncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys), + string(RestorePointEncryptionTypeEncryptionAtRestWithPlatformKey), + } +} + +func (s *RestorePointEncryptionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRestorePointEncryptionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRestorePointEncryptionType(input string) (*RestorePointEncryptionType, error) { + vals := map[string]RestorePointEncryptionType{ + "encryptionatrestwithcustomerkey": RestorePointEncryptionTypeEncryptionAtRestWithCustomerKey, + "encryptionatrestwithplatformandcustomerkeys": RestorePointEncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys, + "encryptionatrestwithplatformkey": RestorePointEncryptionTypeEncryptionAtRestWithPlatformKey, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RestorePointEncryptionType(input) + return &out, nil +} + +type SecurityEncryptionTypes string + +const ( + SecurityEncryptionTypesDiskWithVMGuestState SecurityEncryptionTypes = "DiskWithVMGuestState" + SecurityEncryptionTypesNonPersistedTPM SecurityEncryptionTypes = "NonPersistedTPM" + SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly" +) + +func PossibleValuesForSecurityEncryptionTypes() []string { + return []string{ + string(SecurityEncryptionTypesDiskWithVMGuestState), + string(SecurityEncryptionTypesNonPersistedTPM), + string(SecurityEncryptionTypesVMGuestStateOnly), + } +} + +func (s *SecurityEncryptionTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityEncryptionTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityEncryptionTypes(input string) (*SecurityEncryptionTypes, error) { + vals := map[string]SecurityEncryptionTypes{ + "diskwithvmgueststate": SecurityEncryptionTypesDiskWithVMGuestState, + "nonpersistedtpm": SecurityEncryptionTypesNonPersistedTPM, + "vmgueststateonly": SecurityEncryptionTypesVMGuestStateOnly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityEncryptionTypes(input) + return &out, nil +} + +type SecurityTypes string + +const ( + SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM" + SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch" +) + +func PossibleValuesForSecurityTypes() []string { + return []string{ + string(SecurityTypesConfidentialVM), + string(SecurityTypesTrustedLaunch), + } +} + +func (s *SecurityTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityTypes(input string) (*SecurityTypes, error) { + vals := map[string]SecurityTypes{ + "confidentialvm": SecurityTypesConfidentialVM, + "trustedlaunch": SecurityTypesTrustedLaunch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityTypes(input) + return &out, nil +} + +type SettingNames string + +const ( + SettingNamesAutoLogon SettingNames = "AutoLogon" + SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands" +) + +func PossibleValuesForSettingNames() []string { + return []string{ + string(SettingNamesAutoLogon), + string(SettingNamesFirstLogonCommands), + } +} + +func (s *SettingNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSettingNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSettingNames(input string) (*SettingNames, error) { + vals := map[string]SettingNames{ + "autologon": SettingNamesAutoLogon, + "firstlogoncommands": SettingNamesFirstLogonCommands, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SettingNames(input) + return &out, nil +} + +type StatusLevelTypes string + +const ( + StatusLevelTypesError StatusLevelTypes = "Error" + StatusLevelTypesInfo StatusLevelTypes = "Info" + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +func PossibleValuesForStatusLevelTypes() []string { + return []string{ + string(StatusLevelTypesError), + string(StatusLevelTypesInfo), + string(StatusLevelTypesWarning), + } +} + +func (s *StatusLevelTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusLevelTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { + vals := map[string]StatusLevelTypes{ + "error": StatusLevelTypesError, + "info": StatusLevelTypesInfo, + "warning": StatusLevelTypesWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusLevelTypes(input) + return &out, nil +} + +type StorageAccountTypes string + +const ( + StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" + StorageAccountTypesPremiumVTwoLRS StorageAccountTypes = "PremiumV2_LRS" + StorageAccountTypesPremiumZRS StorageAccountTypes = "Premium_ZRS" + StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" + StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" + StorageAccountTypesStandardSSDZRS StorageAccountTypes = "StandardSSD_ZRS" + StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" +) + +func PossibleValuesForStorageAccountTypes() []string { + return []string{ + string(StorageAccountTypesPremiumLRS), + string(StorageAccountTypesPremiumVTwoLRS), + string(StorageAccountTypesPremiumZRS), + string(StorageAccountTypesStandardLRS), + string(StorageAccountTypesStandardSSDLRS), + string(StorageAccountTypesStandardSSDZRS), + string(StorageAccountTypesUltraSSDLRS), + } +} + +func (s *StorageAccountTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStorageAccountTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStorageAccountTypes(input string) (*StorageAccountTypes, error) { + vals := map[string]StorageAccountTypes{ + "premium_lrs": StorageAccountTypesPremiumLRS, + "premiumv2_lrs": StorageAccountTypesPremiumVTwoLRS, + "premium_zrs": StorageAccountTypesPremiumZRS, + "standard_lrs": StorageAccountTypesStandardLRS, + "standardssd_lrs": StorageAccountTypesStandardSSDLRS, + "standardssd_zrs": StorageAccountTypesStandardSSDZRS, + "ultrassd_lrs": StorageAccountTypesUltraSSDLRS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageAccountTypes(input) + return &out, nil +} + +type VirtualMachineSizeTypes string + +const ( + VirtualMachineSizeTypesBasicAFour VirtualMachineSizeTypes = "Basic_A4" + VirtualMachineSizeTypesBasicAOne VirtualMachineSizeTypes = "Basic_A1" + VirtualMachineSizeTypesBasicAThree VirtualMachineSizeTypes = "Basic_A3" + VirtualMachineSizeTypesBasicATwo VirtualMachineSizeTypes = "Basic_A2" + VirtualMachineSizeTypesBasicAZero VirtualMachineSizeTypes = "Basic_A0" + VirtualMachineSizeTypesStandardAEight VirtualMachineSizeTypes = "Standard_A8" + VirtualMachineSizeTypesStandardAEightVTwo VirtualMachineSizeTypes = "Standard_A8_v2" + VirtualMachineSizeTypesStandardAEightmVTwo VirtualMachineSizeTypes = "Standard_A8m_v2" + VirtualMachineSizeTypesStandardAFive VirtualMachineSizeTypes = "Standard_A5" + VirtualMachineSizeTypesStandardAFour VirtualMachineSizeTypes = "Standard_A4" + VirtualMachineSizeTypesStandardAFourVTwo VirtualMachineSizeTypes = "Standard_A4_v2" + VirtualMachineSizeTypesStandardAFourmVTwo VirtualMachineSizeTypes = "Standard_A4m_v2" + VirtualMachineSizeTypesStandardANine VirtualMachineSizeTypes = "Standard_A9" + VirtualMachineSizeTypesStandardAOne VirtualMachineSizeTypes = "Standard_A1" + VirtualMachineSizeTypesStandardAOneOne VirtualMachineSizeTypes = "Standard_A11" + VirtualMachineSizeTypesStandardAOneVTwo VirtualMachineSizeTypes = "Standard_A1_v2" + VirtualMachineSizeTypesStandardAOneZero VirtualMachineSizeTypes = "Standard_A10" + VirtualMachineSizeTypesStandardASeven VirtualMachineSizeTypes = "Standard_A7" + VirtualMachineSizeTypesStandardASix VirtualMachineSizeTypes = "Standard_A6" + VirtualMachineSizeTypesStandardAThree VirtualMachineSizeTypes = "Standard_A3" + VirtualMachineSizeTypesStandardATwo VirtualMachineSizeTypes = "Standard_A2" + VirtualMachineSizeTypesStandardATwoVTwo VirtualMachineSizeTypes = "Standard_A2_v2" + VirtualMachineSizeTypesStandardATwomVTwo VirtualMachineSizeTypes = "Standard_A2m_v2" + VirtualMachineSizeTypesStandardAZero VirtualMachineSizeTypes = "Standard_A0" + VirtualMachineSizeTypesStandardBEightms VirtualMachineSizeTypes = "Standard_B8ms" + VirtualMachineSizeTypesStandardBFourms VirtualMachineSizeTypes = "Standard_B4ms" + VirtualMachineSizeTypesStandardBOnems VirtualMachineSizeTypes = "Standard_B1ms" + VirtualMachineSizeTypesStandardBOnes VirtualMachineSizeTypes = "Standard_B1s" + VirtualMachineSizeTypesStandardBTwoms VirtualMachineSizeTypes = "Standard_B2ms" + VirtualMachineSizeTypesStandardBTwos VirtualMachineSizeTypes = "Standard_B2s" + VirtualMachineSizeTypesStandardDEightVThree VirtualMachineSizeTypes = "Standard_D8_v3" + VirtualMachineSizeTypesStandardDEightsVThree VirtualMachineSizeTypes = "Standard_D8s_v3" + VirtualMachineSizeTypesStandardDFiveVTwo VirtualMachineSizeTypes = "Standard_D5_v2" + VirtualMachineSizeTypesStandardDFour VirtualMachineSizeTypes = "Standard_D4" + VirtualMachineSizeTypesStandardDFourVThree VirtualMachineSizeTypes = "Standard_D4_v3" + VirtualMachineSizeTypesStandardDFourVTwo VirtualMachineSizeTypes = "Standard_D4_v2" + VirtualMachineSizeTypesStandardDFoursVThree VirtualMachineSizeTypes = "Standard_D4s_v3" + VirtualMachineSizeTypesStandardDOne VirtualMachineSizeTypes = "Standard_D1" + VirtualMachineSizeTypesStandardDOneFiveVTwo VirtualMachineSizeTypes = "Standard_D15_v2" + VirtualMachineSizeTypesStandardDOneFour VirtualMachineSizeTypes = "Standard_D14" + VirtualMachineSizeTypesStandardDOneFourVTwo VirtualMachineSizeTypes = "Standard_D14_v2" + VirtualMachineSizeTypesStandardDOneOne VirtualMachineSizeTypes = "Standard_D11" + VirtualMachineSizeTypesStandardDOneOneVTwo VirtualMachineSizeTypes = "Standard_D11_v2" + VirtualMachineSizeTypesStandardDOneSixVThree VirtualMachineSizeTypes = "Standard_D16_v3" + VirtualMachineSizeTypesStandardDOneSixsVThree VirtualMachineSizeTypes = "Standard_D16s_v3" + VirtualMachineSizeTypesStandardDOneThree VirtualMachineSizeTypes = "Standard_D13" + VirtualMachineSizeTypesStandardDOneThreeVTwo VirtualMachineSizeTypes = "Standard_D13_v2" + VirtualMachineSizeTypesStandardDOneTwo VirtualMachineSizeTypes = "Standard_D12" + VirtualMachineSizeTypesStandardDOneTwoVTwo VirtualMachineSizeTypes = "Standard_D12_v2" + VirtualMachineSizeTypesStandardDOneVTwo VirtualMachineSizeTypes = "Standard_D1_v2" + VirtualMachineSizeTypesStandardDSFiveVTwo VirtualMachineSizeTypes = "Standard_DS5_v2" + VirtualMachineSizeTypesStandardDSFour VirtualMachineSizeTypes = "Standard_DS4" + VirtualMachineSizeTypesStandardDSFourVTwo VirtualMachineSizeTypes = "Standard_DS4_v2" + VirtualMachineSizeTypesStandardDSOne VirtualMachineSizeTypes = "Standard_DS1" + VirtualMachineSizeTypesStandardDSOneFiveVTwo VirtualMachineSizeTypes = "Standard_DS15_v2" + VirtualMachineSizeTypesStandardDSOneFour VirtualMachineSizeTypes = "Standard_DS14" + VirtualMachineSizeTypesStandardDSOneFourNegativeEightVTwo VirtualMachineSizeTypes = "Standard_DS14-8_v2" + VirtualMachineSizeTypesStandardDSOneFourNegativeFourVTwo VirtualMachineSizeTypes = "Standard_DS14-4_v2" + VirtualMachineSizeTypesStandardDSOneFourVTwo VirtualMachineSizeTypes = "Standard_DS14_v2" + VirtualMachineSizeTypesStandardDSOneOne VirtualMachineSizeTypes = "Standard_DS11" + VirtualMachineSizeTypesStandardDSOneOneVTwo VirtualMachineSizeTypes = "Standard_DS11_v2" + VirtualMachineSizeTypesStandardDSOneThree VirtualMachineSizeTypes = "Standard_DS13" + VirtualMachineSizeTypesStandardDSOneThreeNegativeFourVTwo VirtualMachineSizeTypes = "Standard_DS13-4_v2" + VirtualMachineSizeTypesStandardDSOneThreeNegativeTwoVTwo VirtualMachineSizeTypes = "Standard_DS13-2_v2" + VirtualMachineSizeTypesStandardDSOneThreeVTwo VirtualMachineSizeTypes = "Standard_DS13_v2" + VirtualMachineSizeTypesStandardDSOneTwo VirtualMachineSizeTypes = "Standard_DS12" + VirtualMachineSizeTypesStandardDSOneTwoVTwo VirtualMachineSizeTypes = "Standard_DS12_v2" + VirtualMachineSizeTypesStandardDSOneVTwo VirtualMachineSizeTypes = "Standard_DS1_v2" + VirtualMachineSizeTypesStandardDSThree VirtualMachineSizeTypes = "Standard_DS3" + VirtualMachineSizeTypesStandardDSThreeVTwo VirtualMachineSizeTypes = "Standard_DS3_v2" + VirtualMachineSizeTypesStandardDSTwo VirtualMachineSizeTypes = "Standard_DS2" + VirtualMachineSizeTypesStandardDSTwoVTwo VirtualMachineSizeTypes = "Standard_DS2_v2" + VirtualMachineSizeTypesStandardDSixFourVThree VirtualMachineSizeTypes = "Standard_D64_v3" + VirtualMachineSizeTypesStandardDSixFoursVThree VirtualMachineSizeTypes = "Standard_D64s_v3" + VirtualMachineSizeTypesStandardDThree VirtualMachineSizeTypes = "Standard_D3" + VirtualMachineSizeTypesStandardDThreeTwoVThree VirtualMachineSizeTypes = "Standard_D32_v3" + VirtualMachineSizeTypesStandardDThreeTwosVThree VirtualMachineSizeTypes = "Standard_D32s_v3" + VirtualMachineSizeTypesStandardDThreeVTwo VirtualMachineSizeTypes = "Standard_D3_v2" + VirtualMachineSizeTypesStandardDTwo VirtualMachineSizeTypes = "Standard_D2" + VirtualMachineSizeTypesStandardDTwoVThree VirtualMachineSizeTypes = "Standard_D2_v3" + VirtualMachineSizeTypesStandardDTwoVTwo VirtualMachineSizeTypes = "Standard_D2_v2" + VirtualMachineSizeTypesStandardDTwosVThree VirtualMachineSizeTypes = "Standard_D2s_v3" + VirtualMachineSizeTypesStandardEEightVThree VirtualMachineSizeTypes = "Standard_E8_v3" + VirtualMachineSizeTypesStandardEEightsVThree VirtualMachineSizeTypes = "Standard_E8s_v3" + VirtualMachineSizeTypesStandardEFourVThree VirtualMachineSizeTypes = "Standard_E4_v3" + VirtualMachineSizeTypesStandardEFoursVThree VirtualMachineSizeTypes = "Standard_E4s_v3" + VirtualMachineSizeTypesStandardEOneSixVThree VirtualMachineSizeTypes = "Standard_E16_v3" + VirtualMachineSizeTypesStandardEOneSixsVThree VirtualMachineSizeTypes = "Standard_E16s_v3" + VirtualMachineSizeTypesStandardESixFourNegativeOneSixsVThree VirtualMachineSizeTypes = "Standard_E64-16s_v3" + VirtualMachineSizeTypesStandardESixFourNegativeThreeTwosVThree VirtualMachineSizeTypes = "Standard_E64-32s_v3" + VirtualMachineSizeTypesStandardESixFourVThree VirtualMachineSizeTypes = "Standard_E64_v3" + VirtualMachineSizeTypesStandardESixFoursVThree VirtualMachineSizeTypes = "Standard_E64s_v3" + VirtualMachineSizeTypesStandardEThreeTwoNegativeEightsVThree VirtualMachineSizeTypes = "Standard_E32-8s_v3" + VirtualMachineSizeTypesStandardEThreeTwoNegativeOneSixVThree VirtualMachineSizeTypes = "Standard_E32-16_v3" + VirtualMachineSizeTypesStandardEThreeTwoVThree VirtualMachineSizeTypes = "Standard_E32_v3" + VirtualMachineSizeTypesStandardEThreeTwosVThree VirtualMachineSizeTypes = "Standard_E32s_v3" + VirtualMachineSizeTypesStandardETwoVThree VirtualMachineSizeTypes = "Standard_E2_v3" + VirtualMachineSizeTypesStandardETwosVThree VirtualMachineSizeTypes = "Standard_E2s_v3" + VirtualMachineSizeTypesStandardFEight VirtualMachineSizeTypes = "Standard_F8" + VirtualMachineSizeTypesStandardFEights VirtualMachineSizeTypes = "Standard_F8s" + VirtualMachineSizeTypesStandardFEightsVTwo VirtualMachineSizeTypes = "Standard_F8s_v2" + VirtualMachineSizeTypesStandardFFour VirtualMachineSizeTypes = "Standard_F4" + VirtualMachineSizeTypesStandardFFours VirtualMachineSizeTypes = "Standard_F4s" + VirtualMachineSizeTypesStandardFFoursVTwo VirtualMachineSizeTypes = "Standard_F4s_v2" + VirtualMachineSizeTypesStandardFOne VirtualMachineSizeTypes = "Standard_F1" + VirtualMachineSizeTypesStandardFOneSix VirtualMachineSizeTypes = "Standard_F16" + VirtualMachineSizeTypesStandardFOneSixs VirtualMachineSizeTypes = "Standard_F16s" + VirtualMachineSizeTypesStandardFOneSixsVTwo VirtualMachineSizeTypes = "Standard_F16s_v2" + VirtualMachineSizeTypesStandardFOnes VirtualMachineSizeTypes = "Standard_F1s" + VirtualMachineSizeTypesStandardFSevenTwosVTwo VirtualMachineSizeTypes = "Standard_F72s_v2" + VirtualMachineSizeTypesStandardFSixFoursVTwo VirtualMachineSizeTypes = "Standard_F64s_v2" + VirtualMachineSizeTypesStandardFThreeTwosVTwo VirtualMachineSizeTypes = "Standard_F32s_v2" + VirtualMachineSizeTypesStandardFTwo VirtualMachineSizeTypes = "Standard_F2" + VirtualMachineSizeTypesStandardFTwos VirtualMachineSizeTypes = "Standard_F2s" + VirtualMachineSizeTypesStandardFTwosVTwo VirtualMachineSizeTypes = "Standard_F2s_v2" + VirtualMachineSizeTypesStandardGFive VirtualMachineSizeTypes = "Standard_G5" + VirtualMachineSizeTypesStandardGFour VirtualMachineSizeTypes = "Standard_G4" + VirtualMachineSizeTypesStandardGOne VirtualMachineSizeTypes = "Standard_G1" + VirtualMachineSizeTypesStandardGSFive VirtualMachineSizeTypes = "Standard_GS5" + VirtualMachineSizeTypesStandardGSFiveNegativeEight VirtualMachineSizeTypes = "Standard_GS5-8" + VirtualMachineSizeTypesStandardGSFiveNegativeOneSix VirtualMachineSizeTypes = "Standard_GS5-16" + VirtualMachineSizeTypesStandardGSFour VirtualMachineSizeTypes = "Standard_GS4" + VirtualMachineSizeTypesStandardGSFourNegativeEight VirtualMachineSizeTypes = "Standard_GS4-8" + VirtualMachineSizeTypesStandardGSFourNegativeFour VirtualMachineSizeTypes = "Standard_GS4-4" + VirtualMachineSizeTypesStandardGSOne VirtualMachineSizeTypes = "Standard_GS1" + VirtualMachineSizeTypesStandardGSThree VirtualMachineSizeTypes = "Standard_GS3" + VirtualMachineSizeTypesStandardGSTwo VirtualMachineSizeTypes = "Standard_GS2" + VirtualMachineSizeTypesStandardGThree VirtualMachineSizeTypes = "Standard_G3" + VirtualMachineSizeTypesStandardGTwo VirtualMachineSizeTypes = "Standard_G2" + VirtualMachineSizeTypesStandardHEight VirtualMachineSizeTypes = "Standard_H8" + VirtualMachineSizeTypesStandardHEightm VirtualMachineSizeTypes = "Standard_H8m" + VirtualMachineSizeTypesStandardHOneSix VirtualMachineSizeTypes = "Standard_H16" + VirtualMachineSizeTypesStandardHOneSixm VirtualMachineSizeTypes = "Standard_H16m" + VirtualMachineSizeTypesStandardHOneSixmr VirtualMachineSizeTypes = "Standard_H16mr" + VirtualMachineSizeTypesStandardHOneSixr VirtualMachineSizeTypes = "Standard_H16r" + VirtualMachineSizeTypesStandardLEights VirtualMachineSizeTypes = "Standard_L8s" + VirtualMachineSizeTypesStandardLFours VirtualMachineSizeTypes = "Standard_L4s" + VirtualMachineSizeTypesStandardLOneSixs VirtualMachineSizeTypes = "Standard_L16s" + VirtualMachineSizeTypesStandardLThreeTwos VirtualMachineSizeTypes = "Standard_L32s" + VirtualMachineSizeTypesStandardMOneTwoEightNegativeSixFourms VirtualMachineSizeTypes = "Standard_M128-64ms" + VirtualMachineSizeTypesStandardMOneTwoEightNegativeThreeTwoms VirtualMachineSizeTypes = "Standard_M128-32ms" + VirtualMachineSizeTypesStandardMOneTwoEightms VirtualMachineSizeTypes = "Standard_M128ms" + VirtualMachineSizeTypesStandardMOneTwoEights VirtualMachineSizeTypes = "Standard_M128s" + VirtualMachineSizeTypesStandardMSixFourNegativeOneSixms VirtualMachineSizeTypes = "Standard_M64-16ms" + VirtualMachineSizeTypesStandardMSixFourNegativeThreeTwoms VirtualMachineSizeTypes = "Standard_M64-32ms" + VirtualMachineSizeTypesStandardMSixFourms VirtualMachineSizeTypes = "Standard_M64ms" + VirtualMachineSizeTypesStandardMSixFours VirtualMachineSizeTypes = "Standard_M64s" + VirtualMachineSizeTypesStandardNCOneTwo VirtualMachineSizeTypes = "Standard_NC12" + VirtualMachineSizeTypesStandardNCOneTwosVThree VirtualMachineSizeTypes = "Standard_NC12s_v3" + VirtualMachineSizeTypesStandardNCOneTwosVTwo VirtualMachineSizeTypes = "Standard_NC12s_v2" + VirtualMachineSizeTypesStandardNCSix VirtualMachineSizeTypes = "Standard_NC6" + VirtualMachineSizeTypesStandardNCSixsVThree VirtualMachineSizeTypes = "Standard_NC6s_v3" + VirtualMachineSizeTypesStandardNCSixsVTwo VirtualMachineSizeTypes = "Standard_NC6s_v2" + VirtualMachineSizeTypesStandardNCTwoFour VirtualMachineSizeTypes = "Standard_NC24" + VirtualMachineSizeTypesStandardNCTwoFourr VirtualMachineSizeTypes = "Standard_NC24r" + VirtualMachineSizeTypesStandardNCTwoFourrsVThree VirtualMachineSizeTypes = "Standard_NC24rs_v3" + VirtualMachineSizeTypesStandardNCTwoFourrsVTwo VirtualMachineSizeTypes = "Standard_NC24rs_v2" + VirtualMachineSizeTypesStandardNCTwoFoursVThree VirtualMachineSizeTypes = "Standard_NC24s_v3" + VirtualMachineSizeTypesStandardNCTwoFoursVTwo VirtualMachineSizeTypes = "Standard_NC24s_v2" + VirtualMachineSizeTypesStandardNDOneTwos VirtualMachineSizeTypes = "Standard_ND12s" + VirtualMachineSizeTypesStandardNDSixs VirtualMachineSizeTypes = "Standard_ND6s" + VirtualMachineSizeTypesStandardNDTwoFourrs VirtualMachineSizeTypes = "Standard_ND24rs" + VirtualMachineSizeTypesStandardNDTwoFours VirtualMachineSizeTypes = "Standard_ND24s" + VirtualMachineSizeTypesStandardNVOneTwo VirtualMachineSizeTypes = "Standard_NV12" + VirtualMachineSizeTypesStandardNVSix VirtualMachineSizeTypes = "Standard_NV6" + VirtualMachineSizeTypesStandardNVTwoFour VirtualMachineSizeTypes = "Standard_NV24" +) + +func PossibleValuesForVirtualMachineSizeTypes() []string { + return []string{ + string(VirtualMachineSizeTypesBasicAFour), + string(VirtualMachineSizeTypesBasicAOne), + string(VirtualMachineSizeTypesBasicAThree), + string(VirtualMachineSizeTypesBasicATwo), + string(VirtualMachineSizeTypesBasicAZero), + string(VirtualMachineSizeTypesStandardAEight), + string(VirtualMachineSizeTypesStandardAEightVTwo), + string(VirtualMachineSizeTypesStandardAEightmVTwo), + string(VirtualMachineSizeTypesStandardAFive), + string(VirtualMachineSizeTypesStandardAFour), + string(VirtualMachineSizeTypesStandardAFourVTwo), + string(VirtualMachineSizeTypesStandardAFourmVTwo), + string(VirtualMachineSizeTypesStandardANine), + string(VirtualMachineSizeTypesStandardAOne), + string(VirtualMachineSizeTypesStandardAOneOne), + string(VirtualMachineSizeTypesStandardAOneVTwo), + string(VirtualMachineSizeTypesStandardAOneZero), + string(VirtualMachineSizeTypesStandardASeven), + string(VirtualMachineSizeTypesStandardASix), + string(VirtualMachineSizeTypesStandardAThree), + string(VirtualMachineSizeTypesStandardATwo), + string(VirtualMachineSizeTypesStandardATwoVTwo), + string(VirtualMachineSizeTypesStandardATwomVTwo), + string(VirtualMachineSizeTypesStandardAZero), + string(VirtualMachineSizeTypesStandardBEightms), + string(VirtualMachineSizeTypesStandardBFourms), + string(VirtualMachineSizeTypesStandardBOnems), + string(VirtualMachineSizeTypesStandardBOnes), + string(VirtualMachineSizeTypesStandardBTwoms), + string(VirtualMachineSizeTypesStandardBTwos), + string(VirtualMachineSizeTypesStandardDEightVThree), + string(VirtualMachineSizeTypesStandardDEightsVThree), + string(VirtualMachineSizeTypesStandardDFiveVTwo), + string(VirtualMachineSizeTypesStandardDFour), + string(VirtualMachineSizeTypesStandardDFourVThree), + string(VirtualMachineSizeTypesStandardDFourVTwo), + string(VirtualMachineSizeTypesStandardDFoursVThree), + string(VirtualMachineSizeTypesStandardDOne), + string(VirtualMachineSizeTypesStandardDOneFiveVTwo), + string(VirtualMachineSizeTypesStandardDOneFour), + string(VirtualMachineSizeTypesStandardDOneFourVTwo), + string(VirtualMachineSizeTypesStandardDOneOne), + string(VirtualMachineSizeTypesStandardDOneOneVTwo), + string(VirtualMachineSizeTypesStandardDOneSixVThree), + string(VirtualMachineSizeTypesStandardDOneSixsVThree), + string(VirtualMachineSizeTypesStandardDOneThree), + string(VirtualMachineSizeTypesStandardDOneThreeVTwo), + string(VirtualMachineSizeTypesStandardDOneTwo), + string(VirtualMachineSizeTypesStandardDOneTwoVTwo), + string(VirtualMachineSizeTypesStandardDOneVTwo), + string(VirtualMachineSizeTypesStandardDSFiveVTwo), + string(VirtualMachineSizeTypesStandardDSFour), + string(VirtualMachineSizeTypesStandardDSFourVTwo), + string(VirtualMachineSizeTypesStandardDSOne), + string(VirtualMachineSizeTypesStandardDSOneFiveVTwo), + string(VirtualMachineSizeTypesStandardDSOneFour), + string(VirtualMachineSizeTypesStandardDSOneFourNegativeEightVTwo), + string(VirtualMachineSizeTypesStandardDSOneFourNegativeFourVTwo), + string(VirtualMachineSizeTypesStandardDSOneFourVTwo), + string(VirtualMachineSizeTypesStandardDSOneOne), + string(VirtualMachineSizeTypesStandardDSOneOneVTwo), + string(VirtualMachineSizeTypesStandardDSOneThree), + string(VirtualMachineSizeTypesStandardDSOneThreeNegativeFourVTwo), + string(VirtualMachineSizeTypesStandardDSOneThreeNegativeTwoVTwo), + string(VirtualMachineSizeTypesStandardDSOneThreeVTwo), + string(VirtualMachineSizeTypesStandardDSOneTwo), + string(VirtualMachineSizeTypesStandardDSOneTwoVTwo), + string(VirtualMachineSizeTypesStandardDSOneVTwo), + string(VirtualMachineSizeTypesStandardDSThree), + string(VirtualMachineSizeTypesStandardDSThreeVTwo), + string(VirtualMachineSizeTypesStandardDSTwo), + string(VirtualMachineSizeTypesStandardDSTwoVTwo), + string(VirtualMachineSizeTypesStandardDSixFourVThree), + string(VirtualMachineSizeTypesStandardDSixFoursVThree), + string(VirtualMachineSizeTypesStandardDThree), + string(VirtualMachineSizeTypesStandardDThreeTwoVThree), + string(VirtualMachineSizeTypesStandardDThreeTwosVThree), + string(VirtualMachineSizeTypesStandardDThreeVTwo), + string(VirtualMachineSizeTypesStandardDTwo), + string(VirtualMachineSizeTypesStandardDTwoVThree), + string(VirtualMachineSizeTypesStandardDTwoVTwo), + string(VirtualMachineSizeTypesStandardDTwosVThree), + string(VirtualMachineSizeTypesStandardEEightVThree), + string(VirtualMachineSizeTypesStandardEEightsVThree), + string(VirtualMachineSizeTypesStandardEFourVThree), + string(VirtualMachineSizeTypesStandardEFoursVThree), + string(VirtualMachineSizeTypesStandardEOneSixVThree), + string(VirtualMachineSizeTypesStandardEOneSixsVThree), + string(VirtualMachineSizeTypesStandardESixFourNegativeOneSixsVThree), + string(VirtualMachineSizeTypesStandardESixFourNegativeThreeTwosVThree), + string(VirtualMachineSizeTypesStandardESixFourVThree), + string(VirtualMachineSizeTypesStandardESixFoursVThree), + string(VirtualMachineSizeTypesStandardEThreeTwoNegativeEightsVThree), + string(VirtualMachineSizeTypesStandardEThreeTwoNegativeOneSixVThree), + string(VirtualMachineSizeTypesStandardEThreeTwoVThree), + string(VirtualMachineSizeTypesStandardEThreeTwosVThree), + string(VirtualMachineSizeTypesStandardETwoVThree), + string(VirtualMachineSizeTypesStandardETwosVThree), + string(VirtualMachineSizeTypesStandardFEight), + string(VirtualMachineSizeTypesStandardFEights), + string(VirtualMachineSizeTypesStandardFEightsVTwo), + string(VirtualMachineSizeTypesStandardFFour), + string(VirtualMachineSizeTypesStandardFFours), + string(VirtualMachineSizeTypesStandardFFoursVTwo), + string(VirtualMachineSizeTypesStandardFOne), + string(VirtualMachineSizeTypesStandardFOneSix), + string(VirtualMachineSizeTypesStandardFOneSixs), + string(VirtualMachineSizeTypesStandardFOneSixsVTwo), + string(VirtualMachineSizeTypesStandardFOnes), + string(VirtualMachineSizeTypesStandardFSevenTwosVTwo), + string(VirtualMachineSizeTypesStandardFSixFoursVTwo), + string(VirtualMachineSizeTypesStandardFThreeTwosVTwo), + string(VirtualMachineSizeTypesStandardFTwo), + string(VirtualMachineSizeTypesStandardFTwos), + string(VirtualMachineSizeTypesStandardFTwosVTwo), + string(VirtualMachineSizeTypesStandardGFive), + string(VirtualMachineSizeTypesStandardGFour), + string(VirtualMachineSizeTypesStandardGOne), + string(VirtualMachineSizeTypesStandardGSFive), + string(VirtualMachineSizeTypesStandardGSFiveNegativeEight), + string(VirtualMachineSizeTypesStandardGSFiveNegativeOneSix), + string(VirtualMachineSizeTypesStandardGSFour), + string(VirtualMachineSizeTypesStandardGSFourNegativeEight), + string(VirtualMachineSizeTypesStandardGSFourNegativeFour), + string(VirtualMachineSizeTypesStandardGSOne), + string(VirtualMachineSizeTypesStandardGSThree), + string(VirtualMachineSizeTypesStandardGSTwo), + string(VirtualMachineSizeTypesStandardGThree), + string(VirtualMachineSizeTypesStandardGTwo), + string(VirtualMachineSizeTypesStandardHEight), + string(VirtualMachineSizeTypesStandardHEightm), + string(VirtualMachineSizeTypesStandardHOneSix), + string(VirtualMachineSizeTypesStandardHOneSixm), + string(VirtualMachineSizeTypesStandardHOneSixmr), + string(VirtualMachineSizeTypesStandardHOneSixr), + string(VirtualMachineSizeTypesStandardLEights), + string(VirtualMachineSizeTypesStandardLFours), + string(VirtualMachineSizeTypesStandardLOneSixs), + string(VirtualMachineSizeTypesStandardLThreeTwos), + string(VirtualMachineSizeTypesStandardMOneTwoEightNegativeSixFourms), + string(VirtualMachineSizeTypesStandardMOneTwoEightNegativeThreeTwoms), + string(VirtualMachineSizeTypesStandardMOneTwoEightms), + string(VirtualMachineSizeTypesStandardMOneTwoEights), + string(VirtualMachineSizeTypesStandardMSixFourNegativeOneSixms), + string(VirtualMachineSizeTypesStandardMSixFourNegativeThreeTwoms), + string(VirtualMachineSizeTypesStandardMSixFourms), + string(VirtualMachineSizeTypesStandardMSixFours), + string(VirtualMachineSizeTypesStandardNCOneTwo), + string(VirtualMachineSizeTypesStandardNCOneTwosVThree), + string(VirtualMachineSizeTypesStandardNCOneTwosVTwo), + string(VirtualMachineSizeTypesStandardNCSix), + string(VirtualMachineSizeTypesStandardNCSixsVThree), + string(VirtualMachineSizeTypesStandardNCSixsVTwo), + string(VirtualMachineSizeTypesStandardNCTwoFour), + string(VirtualMachineSizeTypesStandardNCTwoFourr), + string(VirtualMachineSizeTypesStandardNCTwoFourrsVThree), + string(VirtualMachineSizeTypesStandardNCTwoFourrsVTwo), + string(VirtualMachineSizeTypesStandardNCTwoFoursVThree), + string(VirtualMachineSizeTypesStandardNCTwoFoursVTwo), + string(VirtualMachineSizeTypesStandardNDOneTwos), + string(VirtualMachineSizeTypesStandardNDSixs), + string(VirtualMachineSizeTypesStandardNDTwoFourrs), + string(VirtualMachineSizeTypesStandardNDTwoFours), + string(VirtualMachineSizeTypesStandardNVOneTwo), + string(VirtualMachineSizeTypesStandardNVSix), + string(VirtualMachineSizeTypesStandardNVTwoFour), + } +} + +func (s *VirtualMachineSizeTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualMachineSizeTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualMachineSizeTypes(input string) (*VirtualMachineSizeTypes, error) { + vals := map[string]VirtualMachineSizeTypes{ + "basic_a4": VirtualMachineSizeTypesBasicAFour, + "basic_a1": VirtualMachineSizeTypesBasicAOne, + "basic_a3": VirtualMachineSizeTypesBasicAThree, + "basic_a2": VirtualMachineSizeTypesBasicATwo, + "basic_a0": VirtualMachineSizeTypesBasicAZero, + "standard_a8": VirtualMachineSizeTypesStandardAEight, + "standard_a8_v2": VirtualMachineSizeTypesStandardAEightVTwo, + "standard_a8m_v2": VirtualMachineSizeTypesStandardAEightmVTwo, + "standard_a5": VirtualMachineSizeTypesStandardAFive, + "standard_a4": VirtualMachineSizeTypesStandardAFour, + "standard_a4_v2": VirtualMachineSizeTypesStandardAFourVTwo, + "standard_a4m_v2": VirtualMachineSizeTypesStandardAFourmVTwo, + "standard_a9": VirtualMachineSizeTypesStandardANine, + "standard_a1": VirtualMachineSizeTypesStandardAOne, + "standard_a11": VirtualMachineSizeTypesStandardAOneOne, + "standard_a1_v2": VirtualMachineSizeTypesStandardAOneVTwo, + "standard_a10": VirtualMachineSizeTypesStandardAOneZero, + "standard_a7": VirtualMachineSizeTypesStandardASeven, + "standard_a6": VirtualMachineSizeTypesStandardASix, + "standard_a3": VirtualMachineSizeTypesStandardAThree, + "standard_a2": VirtualMachineSizeTypesStandardATwo, + "standard_a2_v2": VirtualMachineSizeTypesStandardATwoVTwo, + "standard_a2m_v2": VirtualMachineSizeTypesStandardATwomVTwo, + "standard_a0": VirtualMachineSizeTypesStandardAZero, + "standard_b8ms": VirtualMachineSizeTypesStandardBEightms, + "standard_b4ms": VirtualMachineSizeTypesStandardBFourms, + "standard_b1ms": VirtualMachineSizeTypesStandardBOnems, + "standard_b1s": VirtualMachineSizeTypesStandardBOnes, + "standard_b2ms": VirtualMachineSizeTypesStandardBTwoms, + "standard_b2s": VirtualMachineSizeTypesStandardBTwos, + "standard_d8_v3": VirtualMachineSizeTypesStandardDEightVThree, + "standard_d8s_v3": VirtualMachineSizeTypesStandardDEightsVThree, + "standard_d5_v2": VirtualMachineSizeTypesStandardDFiveVTwo, + "standard_d4": VirtualMachineSizeTypesStandardDFour, + "standard_d4_v3": VirtualMachineSizeTypesStandardDFourVThree, + "standard_d4_v2": VirtualMachineSizeTypesStandardDFourVTwo, + "standard_d4s_v3": VirtualMachineSizeTypesStandardDFoursVThree, + "standard_d1": VirtualMachineSizeTypesStandardDOne, + "standard_d15_v2": VirtualMachineSizeTypesStandardDOneFiveVTwo, + "standard_d14": VirtualMachineSizeTypesStandardDOneFour, + "standard_d14_v2": VirtualMachineSizeTypesStandardDOneFourVTwo, + "standard_d11": VirtualMachineSizeTypesStandardDOneOne, + "standard_d11_v2": VirtualMachineSizeTypesStandardDOneOneVTwo, + "standard_d16_v3": VirtualMachineSizeTypesStandardDOneSixVThree, + "standard_d16s_v3": VirtualMachineSizeTypesStandardDOneSixsVThree, + "standard_d13": VirtualMachineSizeTypesStandardDOneThree, + "standard_d13_v2": VirtualMachineSizeTypesStandardDOneThreeVTwo, + "standard_d12": VirtualMachineSizeTypesStandardDOneTwo, + "standard_d12_v2": VirtualMachineSizeTypesStandardDOneTwoVTwo, + "standard_d1_v2": VirtualMachineSizeTypesStandardDOneVTwo, + "standard_ds5_v2": VirtualMachineSizeTypesStandardDSFiveVTwo, + "standard_ds4": VirtualMachineSizeTypesStandardDSFour, + "standard_ds4_v2": VirtualMachineSizeTypesStandardDSFourVTwo, + "standard_ds1": VirtualMachineSizeTypesStandardDSOne, + "standard_ds15_v2": VirtualMachineSizeTypesStandardDSOneFiveVTwo, + "standard_ds14": VirtualMachineSizeTypesStandardDSOneFour, + "standard_ds14-8_v2": VirtualMachineSizeTypesStandardDSOneFourNegativeEightVTwo, + "standard_ds14-4_v2": VirtualMachineSizeTypesStandardDSOneFourNegativeFourVTwo, + "standard_ds14_v2": VirtualMachineSizeTypesStandardDSOneFourVTwo, + "standard_ds11": VirtualMachineSizeTypesStandardDSOneOne, + "standard_ds11_v2": VirtualMachineSizeTypesStandardDSOneOneVTwo, + "standard_ds13": VirtualMachineSizeTypesStandardDSOneThree, + "standard_ds13-4_v2": VirtualMachineSizeTypesStandardDSOneThreeNegativeFourVTwo, + "standard_ds13-2_v2": VirtualMachineSizeTypesStandardDSOneThreeNegativeTwoVTwo, + "standard_ds13_v2": VirtualMachineSizeTypesStandardDSOneThreeVTwo, + "standard_ds12": VirtualMachineSizeTypesStandardDSOneTwo, + "standard_ds12_v2": VirtualMachineSizeTypesStandardDSOneTwoVTwo, + "standard_ds1_v2": VirtualMachineSizeTypesStandardDSOneVTwo, + "standard_ds3": VirtualMachineSizeTypesStandardDSThree, + "standard_ds3_v2": VirtualMachineSizeTypesStandardDSThreeVTwo, + "standard_ds2": VirtualMachineSizeTypesStandardDSTwo, + "standard_ds2_v2": VirtualMachineSizeTypesStandardDSTwoVTwo, + "standard_d64_v3": VirtualMachineSizeTypesStandardDSixFourVThree, + "standard_d64s_v3": VirtualMachineSizeTypesStandardDSixFoursVThree, + "standard_d3": VirtualMachineSizeTypesStandardDThree, + "standard_d32_v3": VirtualMachineSizeTypesStandardDThreeTwoVThree, + "standard_d32s_v3": VirtualMachineSizeTypesStandardDThreeTwosVThree, + "standard_d3_v2": VirtualMachineSizeTypesStandardDThreeVTwo, + "standard_d2": VirtualMachineSizeTypesStandardDTwo, + "standard_d2_v3": VirtualMachineSizeTypesStandardDTwoVThree, + "standard_d2_v2": VirtualMachineSizeTypesStandardDTwoVTwo, + "standard_d2s_v3": VirtualMachineSizeTypesStandardDTwosVThree, + "standard_e8_v3": VirtualMachineSizeTypesStandardEEightVThree, + "standard_e8s_v3": VirtualMachineSizeTypesStandardEEightsVThree, + "standard_e4_v3": VirtualMachineSizeTypesStandardEFourVThree, + "standard_e4s_v3": VirtualMachineSizeTypesStandardEFoursVThree, + "standard_e16_v3": VirtualMachineSizeTypesStandardEOneSixVThree, + "standard_e16s_v3": VirtualMachineSizeTypesStandardEOneSixsVThree, + "standard_e64-16s_v3": VirtualMachineSizeTypesStandardESixFourNegativeOneSixsVThree, + "standard_e64-32s_v3": VirtualMachineSizeTypesStandardESixFourNegativeThreeTwosVThree, + "standard_e64_v3": VirtualMachineSizeTypesStandardESixFourVThree, + "standard_e64s_v3": VirtualMachineSizeTypesStandardESixFoursVThree, + "standard_e32-8s_v3": VirtualMachineSizeTypesStandardEThreeTwoNegativeEightsVThree, + "standard_e32-16_v3": VirtualMachineSizeTypesStandardEThreeTwoNegativeOneSixVThree, + "standard_e32_v3": VirtualMachineSizeTypesStandardEThreeTwoVThree, + "standard_e32s_v3": VirtualMachineSizeTypesStandardEThreeTwosVThree, + "standard_e2_v3": VirtualMachineSizeTypesStandardETwoVThree, + "standard_e2s_v3": VirtualMachineSizeTypesStandardETwosVThree, + "standard_f8": VirtualMachineSizeTypesStandardFEight, + "standard_f8s": VirtualMachineSizeTypesStandardFEights, + "standard_f8s_v2": VirtualMachineSizeTypesStandardFEightsVTwo, + "standard_f4": VirtualMachineSizeTypesStandardFFour, + "standard_f4s": VirtualMachineSizeTypesStandardFFours, + "standard_f4s_v2": VirtualMachineSizeTypesStandardFFoursVTwo, + "standard_f1": VirtualMachineSizeTypesStandardFOne, + "standard_f16": VirtualMachineSizeTypesStandardFOneSix, + "standard_f16s": VirtualMachineSizeTypesStandardFOneSixs, + "standard_f16s_v2": VirtualMachineSizeTypesStandardFOneSixsVTwo, + "standard_f1s": VirtualMachineSizeTypesStandardFOnes, + "standard_f72s_v2": VirtualMachineSizeTypesStandardFSevenTwosVTwo, + "standard_f64s_v2": VirtualMachineSizeTypesStandardFSixFoursVTwo, + "standard_f32s_v2": VirtualMachineSizeTypesStandardFThreeTwosVTwo, + "standard_f2": VirtualMachineSizeTypesStandardFTwo, + "standard_f2s": VirtualMachineSizeTypesStandardFTwos, + "standard_f2s_v2": VirtualMachineSizeTypesStandardFTwosVTwo, + "standard_g5": VirtualMachineSizeTypesStandardGFive, + "standard_g4": VirtualMachineSizeTypesStandardGFour, + "standard_g1": VirtualMachineSizeTypesStandardGOne, + "standard_gs5": VirtualMachineSizeTypesStandardGSFive, + "standard_gs5-8": VirtualMachineSizeTypesStandardGSFiveNegativeEight, + "standard_gs5-16": VirtualMachineSizeTypesStandardGSFiveNegativeOneSix, + "standard_gs4": VirtualMachineSizeTypesStandardGSFour, + "standard_gs4-8": VirtualMachineSizeTypesStandardGSFourNegativeEight, + "standard_gs4-4": VirtualMachineSizeTypesStandardGSFourNegativeFour, + "standard_gs1": VirtualMachineSizeTypesStandardGSOne, + "standard_gs3": VirtualMachineSizeTypesStandardGSThree, + "standard_gs2": VirtualMachineSizeTypesStandardGSTwo, + "standard_g3": VirtualMachineSizeTypesStandardGThree, + "standard_g2": VirtualMachineSizeTypesStandardGTwo, + "standard_h8": VirtualMachineSizeTypesStandardHEight, + "standard_h8m": VirtualMachineSizeTypesStandardHEightm, + "standard_h16": VirtualMachineSizeTypesStandardHOneSix, + "standard_h16m": VirtualMachineSizeTypesStandardHOneSixm, + "standard_h16mr": VirtualMachineSizeTypesStandardHOneSixmr, + "standard_h16r": VirtualMachineSizeTypesStandardHOneSixr, + "standard_l8s": VirtualMachineSizeTypesStandardLEights, + "standard_l4s": VirtualMachineSizeTypesStandardLFours, + "standard_l16s": VirtualMachineSizeTypesStandardLOneSixs, + "standard_l32s": VirtualMachineSizeTypesStandardLThreeTwos, + "standard_m128-64ms": VirtualMachineSizeTypesStandardMOneTwoEightNegativeSixFourms, + "standard_m128-32ms": VirtualMachineSizeTypesStandardMOneTwoEightNegativeThreeTwoms, + "standard_m128ms": VirtualMachineSizeTypesStandardMOneTwoEightms, + "standard_m128s": VirtualMachineSizeTypesStandardMOneTwoEights, + "standard_m64-16ms": VirtualMachineSizeTypesStandardMSixFourNegativeOneSixms, + "standard_m64-32ms": VirtualMachineSizeTypesStandardMSixFourNegativeThreeTwoms, + "standard_m64ms": VirtualMachineSizeTypesStandardMSixFourms, + "standard_m64s": VirtualMachineSizeTypesStandardMSixFours, + "standard_nc12": VirtualMachineSizeTypesStandardNCOneTwo, + "standard_nc12s_v3": VirtualMachineSizeTypesStandardNCOneTwosVThree, + "standard_nc12s_v2": VirtualMachineSizeTypesStandardNCOneTwosVTwo, + "standard_nc6": VirtualMachineSizeTypesStandardNCSix, + "standard_nc6s_v3": VirtualMachineSizeTypesStandardNCSixsVThree, + "standard_nc6s_v2": VirtualMachineSizeTypesStandardNCSixsVTwo, + "standard_nc24": VirtualMachineSizeTypesStandardNCTwoFour, + "standard_nc24r": VirtualMachineSizeTypesStandardNCTwoFourr, + "standard_nc24rs_v3": VirtualMachineSizeTypesStandardNCTwoFourrsVThree, + "standard_nc24rs_v2": VirtualMachineSizeTypesStandardNCTwoFourrsVTwo, + "standard_nc24s_v3": VirtualMachineSizeTypesStandardNCTwoFoursVThree, + "standard_nc24s_v2": VirtualMachineSizeTypesStandardNCTwoFoursVTwo, + "standard_nd12s": VirtualMachineSizeTypesStandardNDOneTwos, + "standard_nd6s": VirtualMachineSizeTypesStandardNDSixs, + "standard_nd24rs": VirtualMachineSizeTypesStandardNDTwoFourrs, + "standard_nd24s": VirtualMachineSizeTypesStandardNDTwoFours, + "standard_nv12": VirtualMachineSizeTypesStandardNVOneTwo, + "standard_nv6": VirtualMachineSizeTypesStandardNVSix, + "standard_nv24": VirtualMachineSizeTypesStandardNVTwoFour, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualMachineSizeTypes(input) + return &out, nil +} + +type WindowsPatchAssessmentMode string + +const ( + WindowsPatchAssessmentModeAutomaticByPlatform WindowsPatchAssessmentMode = "AutomaticByPlatform" + WindowsPatchAssessmentModeImageDefault WindowsPatchAssessmentMode = "ImageDefault" +) + +func PossibleValuesForWindowsPatchAssessmentMode() []string { + return []string{ + string(WindowsPatchAssessmentModeAutomaticByPlatform), + string(WindowsPatchAssessmentModeImageDefault), + } +} + +func (s *WindowsPatchAssessmentMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWindowsPatchAssessmentMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWindowsPatchAssessmentMode(input string) (*WindowsPatchAssessmentMode, error) { + vals := map[string]WindowsPatchAssessmentMode{ + "automaticbyplatform": WindowsPatchAssessmentModeAutomaticByPlatform, + "imagedefault": WindowsPatchAssessmentModeImageDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WindowsPatchAssessmentMode(input) + return &out, nil +} + +type WindowsVMGuestPatchAutomaticByPlatformRebootSetting string + +const ( + WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Always" + WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired" + WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Never" + WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown" +) + +func PossibleValuesForWindowsVMGuestPatchAutomaticByPlatformRebootSetting() []string { + return []string{ + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways), + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired), + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever), + string(WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + } +} + +func (s *WindowsVMGuestPatchAutomaticByPlatformRebootSetting) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWindowsVMGuestPatchAutomaticByPlatformRebootSetting(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWindowsVMGuestPatchAutomaticByPlatformRebootSetting(input string) (*WindowsVMGuestPatchAutomaticByPlatformRebootSetting, error) { + vals := map[string]WindowsVMGuestPatchAutomaticByPlatformRebootSetting{ + "always": WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways, + "ifrequired": WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired, + "never": WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever, + "unknown": WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WindowsVMGuestPatchAutomaticByPlatformRebootSetting(input) + return &out, nil +} + +type WindowsVMGuestPatchMode string + +const ( + WindowsVMGuestPatchModeAutomaticByOS WindowsVMGuestPatchMode = "AutomaticByOS" + WindowsVMGuestPatchModeAutomaticByPlatform WindowsVMGuestPatchMode = "AutomaticByPlatform" + WindowsVMGuestPatchModeManual WindowsVMGuestPatchMode = "Manual" +) + +func PossibleValuesForWindowsVMGuestPatchMode() []string { + return []string{ + string(WindowsVMGuestPatchModeAutomaticByOS), + string(WindowsVMGuestPatchModeAutomaticByPlatform), + string(WindowsVMGuestPatchModeManual), + } +} + +func (s *WindowsVMGuestPatchMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWindowsVMGuestPatchMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWindowsVMGuestPatchMode(input string) (*WindowsVMGuestPatchMode, error) { + vals := map[string]WindowsVMGuestPatchMode{ + "automaticbyos": WindowsVMGuestPatchModeAutomaticByOS, + "automaticbyplatform": WindowsVMGuestPatchModeAutomaticByPlatform, + "manual": WindowsVMGuestPatchModeManual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WindowsVMGuestPatchMode(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/id_restorepointcollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/id_restorepointcollection.go new file mode 100644 index 000000000000..5ae5a2198296 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/id_restorepointcollection.go @@ -0,0 +1,130 @@ +package restorepointcollections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RestorePointCollectionId{}) +} + +var _ resourceids.ResourceId = &RestorePointCollectionId{} + +// RestorePointCollectionId is a struct representing the Resource ID for a Restore Point Collection +type RestorePointCollectionId struct { + SubscriptionId string + ResourceGroupName string + RestorePointCollectionName string +} + +// NewRestorePointCollectionID returns a new RestorePointCollectionId struct +func NewRestorePointCollectionID(subscriptionId string, resourceGroupName string, restorePointCollectionName string) RestorePointCollectionId { + return RestorePointCollectionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RestorePointCollectionName: restorePointCollectionName, + } +} + +// ParseRestorePointCollectionID parses 'input' into a RestorePointCollectionId +func ParseRestorePointCollectionID(input string) (*RestorePointCollectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&RestorePointCollectionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RestorePointCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRestorePointCollectionIDInsensitively parses 'input' case-insensitively into a RestorePointCollectionId +// note: this method should only be used for API response data and not user input +func ParseRestorePointCollectionIDInsensitively(input string) (*RestorePointCollectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&RestorePointCollectionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RestorePointCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RestorePointCollectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RestorePointCollectionName, ok = input.Parsed["restorePointCollectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "restorePointCollectionName", input) + } + + return nil +} + +// ValidateRestorePointCollectionID checks that 'input' can be parsed as a Restore Point Collection ID +func ValidateRestorePointCollectionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRestorePointCollectionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Restore Point Collection ID +func (id RestorePointCollectionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/restorePointCollections/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RestorePointCollectionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Restore Point Collection ID +func (id RestorePointCollectionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), + resourceids.StaticSegment("staticRestorePointCollections", "restorePointCollections", "restorePointCollections"), + resourceids.UserSpecifiedSegment("restorePointCollectionName", "restorePointCollectionValue"), + } +} + +// String returns a human-readable description of this Restore Point Collection ID +func (id RestorePointCollectionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Restore Point Collection Name: %q", id.RestorePointCollectionName), + } + return fmt.Sprintf("Restore Point Collection (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_createorupdate.go new file mode 100644 index 000000000000..6837427e5be1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_createorupdate.go @@ -0,0 +1,59 @@ +package restorepointcollections + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *RestorePointCollection +} + +// CreateOrUpdate ... +func (c RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, id RestorePointCollectionId, input RestorePointCollection) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model RestorePointCollection + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_delete.go new file mode 100644 index 000000000000..3aefb2adc43f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_delete.go @@ -0,0 +1,71 @@ +package restorepointcollections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c RestorePointCollectionsClient) Delete(ctx context.Context, id RestorePointCollectionId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c RestorePointCollectionsClient) DeleteThenPoll(ctx context.Context, id RestorePointCollectionId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_get.go new file mode 100644 index 000000000000..875f286c7fa8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_get.go @@ -0,0 +1,83 @@ +package restorepointcollections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *RestorePointCollection +} + +type GetOperationOptions struct { + Expand *RestorePointCollectionExpandOptions +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o GetOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o GetOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +// Get ... +func (c RestorePointCollectionsClient) Get(ctx context.Context, id RestorePointCollectionId, options GetOperationOptions) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model RestorePointCollection + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_list.go new file mode 100644 index 000000000000..ab48c4768888 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_list.go @@ -0,0 +1,106 @@ +package restorepointcollections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]RestorePointCollection +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []RestorePointCollection +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c RestorePointCollectionsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Compute/restorePointCollections", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]RestorePointCollection `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c RestorePointCollectionsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, RestorePointCollectionOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RestorePointCollectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RestorePointCollectionOperationPredicate) (result ListCompleteResult, err error) { + items := make([]RestorePointCollection, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_listall.go new file mode 100644 index 000000000000..a254de391708 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_listall.go @@ -0,0 +1,106 @@ +package restorepointcollections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListAllOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]RestorePointCollection +} + +type ListAllCompleteResult struct { + LatestHttpResponse *http.Response + Items []RestorePointCollection +} + +type ListAllCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListAllCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListAll ... +func (c RestorePointCollectionsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListAllCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Compute/restorePointCollections", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]RestorePointCollection `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListAllComplete retrieves all the results into a single object +func (c RestorePointCollectionsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, RestorePointCollectionOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RestorePointCollectionsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RestorePointCollectionOperationPredicate) (result ListAllCompleteResult, err error) { + items := make([]RestorePointCollection, 0) + + resp, err := c.ListAll(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListAllCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_update.go new file mode 100644 index 000000000000..209e763e72dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/method_update.go @@ -0,0 +1,58 @@ +package restorepointcollections + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *RestorePointCollection +} + +// Update ... +func (c RestorePointCollectionsClient) Update(ctx context.Context, id RestorePointCollectionId, input RestorePointCollectionUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model RestorePointCollection + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_additionalunattendcontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_additionalunattendcontent.go new file mode 100644 index 000000000000..a60a8371ab29 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_additionalunattendcontent.go @@ -0,0 +1,11 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdditionalUnattendContent struct { + ComponentName *ComponentNames `json:"componentName,omitempty"` + Content *string `json:"content,omitempty"` + PassName *PassNames `json:"passName,omitempty"` + SettingName *SettingNames `json:"settingName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_apientityreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_apientityreference.go new file mode 100644 index 000000000000..727d790c6565 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_apientityreference.go @@ -0,0 +1,8 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApiEntityReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_bootdiagnostics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_bootdiagnostics.go new file mode 100644 index 000000000000..f7688478a5f6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_bootdiagnostics.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BootDiagnostics struct { + Enabled *bool `json:"enabled,omitempty"` + StorageUri *string `json:"storageUri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diagnosticsprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diagnosticsprofile.go new file mode 100644 index 000000000000..0fe48b89ceda --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diagnosticsprofile.go @@ -0,0 +1,8 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsProfile struct { + BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskencryptionsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskencryptionsettings.go new file mode 100644 index 000000000000..0d821506598e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskencryptionsettings.go @@ -0,0 +1,10 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskEncryptionSettings struct { + DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointattributes.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointattributes.go new file mode 100644 index 000000000000..43124c8f0612 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointattributes.go @@ -0,0 +1,10 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskRestorePointAttributes struct { + Encryption *RestorePointEncryption `json:"encryption,omitempty"` + Id *string `json:"id,omitempty"` + SourceDiskRestorePoint *ApiEntityReference `json:"sourceDiskRestorePoint,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointinstanceview.go new file mode 100644 index 000000000000..210aa74b8236 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointinstanceview.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskRestorePointInstanceView struct { + Id *string `json:"id,omitempty"` + ReplicationStatus *DiskRestorePointReplicationStatus `json:"replicationStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointreplicationstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointreplicationstatus.go new file mode 100644 index 000000000000..a9b1c99fc376 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_diskrestorepointreplicationstatus.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskRestorePointReplicationStatus struct { + CompletionPercent *int64 `json:"completionPercent,omitempty"` + Status *InstanceViewStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_encryptionidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_encryptionidentity.go new file mode 100644 index 000000000000..ff6228b54ee9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_encryptionidentity.go @@ -0,0 +1,8 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EncryptionIdentity struct { + UserAssignedIdentityResourceId *string `json:"userAssignedIdentityResourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_hardwareprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_hardwareprofile.go new file mode 100644 index 000000000000..2d11fed2803e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_hardwareprofile.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HardwareProfile struct { + VMSize *VirtualMachineSizeTypes `json:"vmSize,omitempty"` + VMSizeProperties *VMSizeProperties `json:"vmSizeProperties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_instanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_instanceviewstatus.go new file mode 100644 index 000000000000..c72457c65f6e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_instanceviewstatus.go @@ -0,0 +1,30 @@ +package restorepointcollections + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceViewStatus struct { + Code *string `json:"code,omitempty"` + DisplayStatus *string `json:"displayStatus,omitempty"` + Level *StatusLevelTypes `json:"level,omitempty"` + Message *string `json:"message,omitempty"` + Time *string `json:"time,omitempty"` +} + +func (o *InstanceViewStatus) GetTimeAsTime() (*time.Time, error) { + if o.Time == nil { + return nil, nil + } + return dates.ParseAsFormat(o.Time, "2006-01-02T15:04:05Z07:00") +} + +func (o *InstanceViewStatus) SetTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.Time = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_keyvaultkeyreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_keyvaultkeyreference.go new file mode 100644 index 000000000000..a58940dc6011 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_keyvaultkeyreference.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultKeyReference struct { + KeyUrl string `json:"keyUrl"` + SourceVault SubResource `json:"sourceVault"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_keyvaultsecretreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_keyvaultsecretreference.go new file mode 100644 index 000000000000..9cdda52320c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_keyvaultsecretreference.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultSecretReference struct { + SecretUrl string `json:"secretUrl"` + SourceVault SubResource `json:"sourceVault"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxconfiguration.go new file mode 100644 index 000000000000..331ab8adf5f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxconfiguration.go @@ -0,0 +1,12 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinuxConfiguration struct { + DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` + EnableVMAgentPlatformUpdates *bool `json:"enableVMAgentPlatformUpdates,omitempty"` + PatchSettings *LinuxPatchSettings `json:"patchSettings,omitempty"` + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + Ssh *SshConfiguration `json:"ssh,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxpatchsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxpatchsettings.go new file mode 100644 index 000000000000..1911d1f34cbd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxpatchsettings.go @@ -0,0 +1,10 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinuxPatchSettings struct { + AssessmentMode *LinuxPatchAssessmentMode `json:"assessmentMode,omitempty"` + AutomaticByPlatformSettings *LinuxVMGuestPatchAutomaticByPlatformSettings `json:"automaticByPlatformSettings,omitempty"` + PatchMode *LinuxVMGuestPatchMode `json:"patchMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxvmguestpatchautomaticbyplatformsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxvmguestpatchautomaticbyplatformsettings.go new file mode 100644 index 000000000000..ee79a6f51554 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_linuxvmguestpatchautomaticbyplatformsettings.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinuxVMGuestPatchAutomaticByPlatformSettings struct { + BypassPlatformSafetyChecksOnUserSchedule *bool `json:"bypassPlatformSafetyChecksOnUserSchedule,omitempty"` + RebootSetting *LinuxVMGuestPatchAutomaticByPlatformRebootSetting `json:"rebootSetting,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_manageddiskparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_manageddiskparameters.go new file mode 100644 index 000000000000..c5ceac9dcb8b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_manageddiskparameters.go @@ -0,0 +1,11 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedDiskParameters struct { + DiskEncryptionSet *SubResource `json:"diskEncryptionSet,omitempty"` + Id *string `json:"id,omitempty"` + SecurityProfile *VMDiskSecurityProfile `json:"securityProfile,omitempty"` + StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_osprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_osprofile.go new file mode 100644 index 000000000000..2a8765dd51fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_osprofile.go @@ -0,0 +1,16 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSProfile struct { + AdminPassword *string `json:"adminPassword,omitempty"` + AdminUsername *string `json:"adminUsername,omitempty"` + AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"` + ComputerName *string `json:"computerName,omitempty"` + CustomData *string `json:"customData,omitempty"` + LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` + RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"` + Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` + WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_patchsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_patchsettings.go new file mode 100644 index 000000000000..dccbe861dcc6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_patchsettings.go @@ -0,0 +1,11 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PatchSettings struct { + AssessmentMode *WindowsPatchAssessmentMode `json:"assessmentMode,omitempty"` + AutomaticByPlatformSettings *WindowsVMGuestPatchAutomaticByPlatformSettings `json:"automaticByPlatformSettings,omitempty"` + EnableHotpatching *bool `json:"enableHotpatching,omitempty"` + PatchMode *WindowsVMGuestPatchMode `json:"patchMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_proxyagentsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_proxyagentsettings.go new file mode 100644 index 000000000000..533c54531ee6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_proxyagentsettings.go @@ -0,0 +1,10 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProxyAgentSettings struct { + Enabled *bool `json:"enabled,omitempty"` + KeyIncarnationId *int64 `json:"keyIncarnationId,omitempty"` + Mode *Mode `json:"mode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepoint.go new file mode 100644 index 000000000000..4d1f4152a438 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepoint.go @@ -0,0 +1,11 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePoint struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RestorePointProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollection.go new file mode 100644 index 000000000000..cb0993cc4eec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollection.go @@ -0,0 +1,13 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointCollection struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *RestorePointCollectionProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionproperties.go new file mode 100644 index 000000000000..9d6edb62a228 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionproperties.go @@ -0,0 +1,11 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointCollectionProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` + RestorePointCollectionId *string `json:"restorePointCollectionId,omitempty"` + RestorePoints *[]RestorePoint `json:"restorePoints,omitempty"` + Source *RestorePointCollectionSourceProperties `json:"source,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionsourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionsourceproperties.go new file mode 100644 index 000000000000..0fce692d38bd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionsourceproperties.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointCollectionSourceProperties struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionupdate.go new file mode 100644 index 000000000000..e97da7d44a86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointcollectionupdate.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointCollectionUpdate struct { + Properties *RestorePointCollectionProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointencryption.go new file mode 100644 index 000000000000..ac434a738861 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointencryption.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointEncryption struct { + DiskEncryptionSet *SubResource `json:"diskEncryptionSet,omitempty"` + Type *RestorePointEncryptionType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointinstanceview.go new file mode 100644 index 000000000000..50af16f9dd0d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointinstanceview.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointInstanceView struct { + DiskRestorePoints *[]DiskRestorePointInstanceView `json:"diskRestorePoints,omitempty"` + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointproperties.go new file mode 100644 index 000000000000..083437b0943f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointproperties.go @@ -0,0 +1,32 @@ +package restorepointcollections + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointProperties struct { + ConsistencyMode *ConsistencyModeTypes `json:"consistencyMode,omitempty"` + ExcludeDisks *[]ApiEntityReference `json:"excludeDisks,omitempty"` + InstanceView *RestorePointInstanceView `json:"instanceView,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + SourceMetadata *RestorePointSourceMetadata `json:"sourceMetadata,omitempty"` + SourceRestorePoint *ApiEntityReference `json:"sourceRestorePoint,omitempty"` + TimeCreated *string `json:"timeCreated,omitempty"` +} + +func (o *RestorePointProperties) GetTimeCreatedAsTime() (*time.Time, error) { + if o.TimeCreated == nil { + return nil, nil + } + return dates.ParseAsFormat(o.TimeCreated, "2006-01-02T15:04:05Z07:00") +} + +func (o *RestorePointProperties) SetTimeCreatedAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.TimeCreated = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcemetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcemetadata.go new file mode 100644 index 000000000000..154a3e68682b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcemetadata.go @@ -0,0 +1,17 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointSourceMetadata struct { + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` + HyperVGeneration *HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` + LicenseType *string `json:"licenseType,omitempty"` + Location *string `json:"location,omitempty"` + OsProfile *OSProfile `json:"osProfile,omitempty"` + SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + StorageProfile *RestorePointSourceVMStorageProfile `json:"storageProfile,omitempty"` + UserData *string `json:"userData,omitempty"` + VMId *string `json:"vmId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmdatadisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmdatadisk.go new file mode 100644 index 000000000000..587b86f3ae19 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmdatadisk.go @@ -0,0 +1,14 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointSourceVMDataDisk struct { + Caching *CachingTypes `json:"caching,omitempty"` + DiskRestorePoint *DiskRestorePointAttributes `json:"diskRestorePoint,omitempty"` + DiskSizeGB *int64 `json:"diskSizeGB,omitempty"` + Lun *int64 `json:"lun,omitempty"` + ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` + Name *string `json:"name,omitempty"` + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmosdisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmosdisk.go new file mode 100644 index 000000000000..e75634d6f6f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmosdisk.go @@ -0,0 +1,15 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointSourceVMOSDisk struct { + Caching *CachingTypes `json:"caching,omitempty"` + DiskRestorePoint *DiskRestorePointAttributes `json:"diskRestorePoint,omitempty"` + DiskSizeGB *int64 `json:"diskSizeGB,omitempty"` + EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"` + ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` + Name *string `json:"name,omitempty"` + OsType *OperatingSystemType `json:"osType,omitempty"` + WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmstorageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmstorageprofile.go new file mode 100644 index 000000000000..101439cc548e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_restorepointsourcevmstorageprofile.go @@ -0,0 +1,10 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointSourceVMStorageProfile struct { + DataDisks *[]RestorePointSourceVMDataDisk `json:"dataDisks,omitempty"` + DiskControllerType *DiskControllerTypes `json:"diskControllerType,omitempty"` + OsDisk *RestorePointSourceVMOSDisk `json:"osDisk,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_securityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_securityprofile.go new file mode 100644 index 000000000000..32d20891ded5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_securityprofile.go @@ -0,0 +1,12 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityProfile struct { + EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"` + EncryptionIdentity *EncryptionIdentity `json:"encryptionIdentity,omitempty"` + ProxyAgentSettings *ProxyAgentSettings `json:"proxyAgentSettings,omitempty"` + SecurityType *SecurityTypes `json:"securityType,omitempty"` + UefiSettings *UefiSettings `json:"uefiSettings,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_sshconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_sshconfiguration.go new file mode 100644 index 000000000000..78c9da8533f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_sshconfiguration.go @@ -0,0 +1,8 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SshConfiguration struct { + PublicKeys *[]SshPublicKey `json:"publicKeys,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_sshpublickey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_sshpublickey.go new file mode 100644 index 000000000000..e29505369190 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_sshpublickey.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SshPublicKey struct { + KeyData *string `json:"keyData,omitempty"` + Path *string `json:"path,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_subresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_subresource.go new file mode 100644 index 000000000000..bd10eea4e510 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_subresource.go @@ -0,0 +1,8 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubResource struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_uefisettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_uefisettings.go new file mode 100644 index 000000000000..12510ee841de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_uefisettings.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UefiSettings struct { + SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"` + VTpmEnabled *bool `json:"vTpmEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vaultcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vaultcertificate.go new file mode 100644 index 000000000000..1e6b6948da01 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vaultcertificate.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VaultCertificate struct { + CertificateStore *string `json:"certificateStore,omitempty"` + CertificateUrl *string `json:"certificateUrl,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vaultsecretgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vaultsecretgroup.go new file mode 100644 index 000000000000..039fc20fb7e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vaultsecretgroup.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VaultSecretGroup struct { + SourceVault *SubResource `json:"sourceVault,omitempty"` + VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vmdisksecurityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vmdisksecurityprofile.go new file mode 100644 index 000000000000..af2b07bc05c5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vmdisksecurityprofile.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VMDiskSecurityProfile struct { + DiskEncryptionSet *SubResource `json:"diskEncryptionSet,omitempty"` + SecurityEncryptionType *SecurityEncryptionTypes `json:"securityEncryptionType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vmsizeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vmsizeproperties.go new file mode 100644 index 000000000000..9bd6823b54ef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_vmsizeproperties.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VMSizeProperties struct { + VCPUsAvailable *int64 `json:"vCPUsAvailable,omitempty"` + VCPUsPerCore *int64 `json:"vCPUsPerCore,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_windowsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_windowsconfiguration.go new file mode 100644 index 000000000000..1408c9770a1f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_windowsconfiguration.go @@ -0,0 +1,14 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WindowsConfiguration struct { + AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"` + EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` + EnableVMAgentPlatformUpdates *bool `json:"enableVMAgentPlatformUpdates,omitempty"` + PatchSettings *PatchSettings `json:"patchSettings,omitempty"` + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + WinRM *WinRMConfiguration `json:"winRM,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_windowsvmguestpatchautomaticbyplatformsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_windowsvmguestpatchautomaticbyplatformsettings.go new file mode 100644 index 000000000000..a2b5f7d65b60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_windowsvmguestpatchautomaticbyplatformsettings.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WindowsVMGuestPatchAutomaticByPlatformSettings struct { + BypassPlatformSafetyChecksOnUserSchedule *bool `json:"bypassPlatformSafetyChecksOnUserSchedule,omitempty"` + RebootSetting *WindowsVMGuestPatchAutomaticByPlatformRebootSetting `json:"rebootSetting,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_winrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_winrmconfiguration.go new file mode 100644 index 000000000000..d89758ef38f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_winrmconfiguration.go @@ -0,0 +1,8 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WinRMConfiguration struct { + Listeners *[]WinRMListener `json:"listeners,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_winrmlistener.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_winrmlistener.go new file mode 100644 index 000000000000..48cee24a28f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/model_winrmlistener.go @@ -0,0 +1,9 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WinRMListener struct { + CertificateUrl *string `json:"certificateUrl,omitempty"` + Protocol *ProtocolTypes `json:"protocol,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/predicates.go new file mode 100644 index 000000000000..6f4eb007a65e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/predicates.go @@ -0,0 +1,32 @@ +package restorepointcollections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestorePointCollectionOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p RestorePointCollectionOperationPredicate) Matches(input RestorePointCollection) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/version.go new file mode 100644 index 000000000000..681e25f32a75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections/version.go @@ -0,0 +1,12 @@ +package restorepointcollections + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-03-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/restorepointcollections/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4761b5ecabfb..7b5d86361c9d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -344,6 +344,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/disks github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/availabilitysets github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/dedicatedhostgroups github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/dedicatedhosts +github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/sshpublickeys github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineextensions github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineimages diff --git a/website/docs/r/restore_point_collection.html.markdown b/website/docs/r/restore_point_collection.html.markdown new file mode 100644 index 000000000000..8ecb793514b0 --- /dev/null +++ b/website/docs/r/restore_point_collection.html.markdown @@ -0,0 +1,122 @@ +--- +subcategory: "Compute" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_restore_point_collection" +description: |- + Manages a Restore Point Collection +--- + +# azurerm_restore_point_collection + +Manages a Restore Point Collection. + +## Example Usage + +```hcl +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_virtual_network" "example" { + name = "example-network" + address_space = ["10.0.0.0/16"] + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_subnet" "example" { + name = "internal" + resource_group_name = azurerm_resource_group.example.name + virtual_network_name = azurerm_virtual_network.example.name + address_prefixes = ["10.0.2.0/24"] +} + +resource "azurerm_network_interface" "example" { + name = "example-nic" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + + ip_configuration { + name = "internal" + subnet_id = azurerm_subnet.example.id + private_ip_address_allocation = "Dynamic" + } +} + +resource "azurerm_linux_virtual_machine" "example" { + name = "example-machine" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + size = "Standard_F2" + admin_username = "adminuser" + network_interface_ids = [ + azurerm_network_interface.example.id, + ] + + admin_ssh_key { + username = "adminuser" + public_key = file("~/.ssh/id_rsa.pub") + } + + os_disk { + caching = "ReadWrite" + storage_account_type = "Standard_LRS" + } + + source_image_reference { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-jammy" + sku = "22_04-lts" + version = "latest" + } +} + +resource "azurerm_restore_point_collection" "example" { + name = "example-collection" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_linux_virtual_machine.example.location + source_virtual_machine_id = azurerm_linux_virtual_machine.example.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Specifies the name of the Restore Point Collection. Changing this forces a new resource to be created. + +* `location` - (Required) The Azure location where the Restore Point Collection should exist. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The name of the Resource Group in which the Restore Point Collection should exist. Changing this forces a new resource to be created. + +* `source_virtual_machine_id` - (Required) The ID of the virtual machine that will be associated with this Restore Point Collection. Changing this forces a new resource to be created. + +* `tags` - (Optional) A mapping of tags which should be assigned to this Restore Point Collection. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Restore Point Collection. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Restore Point Collection. +* `update` - (Defaults to 30 minutes) Used when updating the Restore Point Collection. +* `delete` - (Defaults to 30 minutes) Used when deleting the Restore Point Collection. +* `read` - (Defaults to 5 minutes) Used when retrieving the Restore Point Collection. + +## Import + +Restore Point Collections can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_restore_point_collection.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/restorePointCollections/collection1 +```