github.com/yoctocloud/packer@v0.6.2-0.20160520224004-e11a0a18423f/builder/azure/arm/capture_template.go (about)

     1  // Copyright (c) Microsoft Corporation. All rights reserved.
     2  // Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
     3  
     4  package arm
     5  
     6  type CaptureTemplateParameter struct {
     7  	Type         string `json:"type"`
     8  	DefaultValue string `json:"defaultValue,omitempty"`
     9  }
    10  
    11  type CaptureHardwareProfile struct {
    12  	VMSize string `json:"vmSize"`
    13  }
    14  
    15  type CaptureUri struct {
    16  	Uri string `json:"uri"`
    17  }
    18  
    19  type CaptureDisk struct {
    20  	OSType       string     `json:"osType"`
    21  	Name         string     `json:"name"`
    22  	Image        CaptureUri `json:"image"`
    23  	Vhd          CaptureUri `json:"vhd"`
    24  	CreateOption string     `json:"createOption"`
    25  	Caching      string     `json:"caching"`
    26  }
    27  
    28  type CaptureStorageProfile struct {
    29  	OSDisk CaptureDisk `json:"osDisk"`
    30  }
    31  
    32  type CaptureOSProfile struct {
    33  	ComputerName  string `json:"computerName"`
    34  	AdminUsername string `json:"adminUsername"`
    35  	AdminPassword string `json:"adminPassword"`
    36  }
    37  
    38  type CaptureNetworkInterface struct {
    39  	Id string `json:"id"`
    40  }
    41  
    42  type CaptureNetworkProfile struct {
    43  	NetworkInterfaces []CaptureNetworkInterface `json:"networkInterfaces"`
    44  }
    45  
    46  type CaptureBootDiagnostics struct {
    47  	Enabled bool `json:"enabled"`
    48  }
    49  
    50  type CaptureDiagnosticProfile struct {
    51  	BootDiagnostics CaptureBootDiagnostics `json:"bootDiagnostics"`
    52  }
    53  
    54  type CaptureProperties struct {
    55  	HardwareProfile    CaptureHardwareProfile   `json:"hardwareProfile"`
    56  	StorageProfile     CaptureStorageProfile    `json:"storageProfile"`
    57  	OSProfile          CaptureOSProfile         `json:"osProfile"`
    58  	NetworkProfile     CaptureNetworkProfile    `json:"networkProfile"`
    59  	DiagnosticsProfile CaptureDiagnosticProfile `json:"diagnosticsProfile"`
    60  	ProvisioningState  int                      `json:"provisioningState"`
    61  }
    62  
    63  type CaptureResources struct {
    64  	ApiVersion string            `json:"apiVersion"`
    65  	Name       string            `json:"name"`
    66  	Type       string            `json:"type"`
    67  	Location   string            `json:"location"`
    68  	Properties CaptureProperties `json:"properties"`
    69  }
    70  
    71  type CaptureTemplate struct {
    72  	Schema         string                              `json:"$schema"`
    73  	ContentVersion string                              `json:"contentVersion"`
    74  	Parameters     map[string]CaptureTemplateParameter `json:"parameters"`
    75  	Resources      []CaptureResources                  `json:"resources"`
    76  }
    77  
    78  type CaptureOperationProperties struct {
    79  	Output *CaptureTemplate `json:"output"`
    80  }
    81  
    82  type CaptureOperation struct {
    83  	OperationId string                      `json:"operationId"`
    84  	Status      string                      `json:"status"`
    85  	Properties  *CaptureOperationProperties `json:"properties"`
    86  }