Documentation ¶
Index ¶
- type AutoRunState
- type ClientFactory
- type CreatedByType
- type DistributeVersioner
- type DistributeVersionerClassification
- type DistributeVersionerLatest
- type DistributeVersionerSource
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type ImageTemplate
- type ImageTemplateAutoRun
- type ImageTemplateCustomizer
- type ImageTemplateCustomizerClassification
- type ImageTemplateDistributor
- type ImageTemplateDistributorClassification
- type ImageTemplateFileCustomizer
- type ImageTemplateFileValidator
- type ImageTemplateIdentity
- type ImageTemplateInVMValidator
- type ImageTemplateInVMValidatorClassification
- type ImageTemplateLastRunStatus
- type ImageTemplateListResult
- type ImageTemplateManagedImageDistributor
- type ImageTemplateManagedImageSource
- type ImageTemplatePlatformImageSource
- type ImageTemplatePowerShellCustomizer
- type ImageTemplatePowerShellValidator
- type ImageTemplateProperties
- type ImageTemplatePropertiesErrorHandling
- type ImageTemplatePropertiesOptimize
- type ImageTemplatePropertiesOptimizeVMBoot
- type ImageTemplatePropertiesValidate
- type ImageTemplateRestartCustomizer
- type ImageTemplateSharedImageDistributor
- type ImageTemplateSharedImageVersionSource
- type ImageTemplateShellCustomizer
- type ImageTemplateShellValidator
- type ImageTemplateSource
- type ImageTemplateSourceClassification
- type ImageTemplateUpdateParameters
- type ImageTemplateUpdateParametersProperties
- type ImageTemplateVMProfile
- type ImageTemplateVhdDistributor
- type ImageTemplateWindowsUpdateCustomizer
- type OnBuildError
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PlatformImagePurchasePlan
- type ProvisioningError
- type ProvisioningErrorCode
- type ProvisioningState
- type ProxyResource
- type Resource
- type ResourceIdentityType
- type RunOutput
- type RunOutputCollection
- type RunOutputProperties
- type RunState
- type RunSubState
- type SharedImageStorageAccountType
- type SourceImageTriggerProperties
- type SystemData
- type TargetRegion
- type TrackedResource
- type Trigger
- type TriggerCollection
- type TriggerProperties
- type TriggerPropertiesClassification
- type TriggerStatus
- type TriggersClient
- func (client *TriggersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (*runtime.Poller[TriggersClientCreateOrUpdateResponse], error)
- func (client *TriggersClient) BeginDelete(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (*runtime.Poller[TriggersClientDeleteResponse], error)
- func (client *TriggersClient) Get(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (TriggersClientGetResponse, error)
- func (client *TriggersClient) NewListByImageTemplatePager(resourceGroupName string, imageTemplateName string, ...) *runtime.Pager[TriggersClientListByImageTemplateResponse]
- type TriggersClientBeginCreateOrUpdateOptions
- type TriggersClientBeginDeleteOptions
- type TriggersClientCreateOrUpdateResponse
- type TriggersClientDeleteResponse
- type TriggersClientGetOptions
- type TriggersClientGetResponse
- type TriggersClientListByImageTemplateOptions
- type TriggersClientListByImageTemplateResponse
- type UserAssignedIdentity
- type VMBootOptimizationState
- type VirtualMachineImageTemplatesClient
- func (client *VirtualMachineImageTemplatesClient) BeginCancel(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (*runtime.Poller[VirtualMachineImageTemplatesClientCancelResponse], error)
- func (client *VirtualMachineImageTemplatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (*runtime.Poller[VirtualMachineImageTemplatesClientCreateOrUpdateResponse], ...)
- func (client *VirtualMachineImageTemplatesClient) BeginDelete(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (*runtime.Poller[VirtualMachineImageTemplatesClientDeleteResponse], error)
- func (client *VirtualMachineImageTemplatesClient) BeginRun(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (*runtime.Poller[VirtualMachineImageTemplatesClientRunResponse], error)
- func (client *VirtualMachineImageTemplatesClient) BeginUpdate(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (*runtime.Poller[VirtualMachineImageTemplatesClientUpdateResponse], error)
- func (client *VirtualMachineImageTemplatesClient) Get(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (VirtualMachineImageTemplatesClientGetResponse, error)
- func (client *VirtualMachineImageTemplatesClient) GetRunOutput(ctx context.Context, resourceGroupName string, imageTemplateName string, ...) (VirtualMachineImageTemplatesClientGetRunOutputResponse, error)
- func (client *VirtualMachineImageTemplatesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualMachineImageTemplatesClientListByResourceGroupResponse]
- func (client *VirtualMachineImageTemplatesClient) NewListPager(options *VirtualMachineImageTemplatesClientListOptions) *runtime.Pager[VirtualMachineImageTemplatesClientListResponse]
- func (client *VirtualMachineImageTemplatesClient) NewListRunOutputsPager(resourceGroupName string, imageTemplateName string, ...) *runtime.Pager[VirtualMachineImageTemplatesClientListRunOutputsResponse]
- type VirtualMachineImageTemplatesClientBeginCancelOptions
- type VirtualMachineImageTemplatesClientBeginCreateOrUpdateOptions
- type VirtualMachineImageTemplatesClientBeginDeleteOptions
- type VirtualMachineImageTemplatesClientBeginRunOptions
- type VirtualMachineImageTemplatesClientBeginUpdateOptions
- type VirtualMachineImageTemplatesClientCancelResponse
- type VirtualMachineImageTemplatesClientCreateOrUpdateResponse
- type VirtualMachineImageTemplatesClientDeleteResponse
- type VirtualMachineImageTemplatesClientGetOptions
- type VirtualMachineImageTemplatesClientGetResponse
- type VirtualMachineImageTemplatesClientGetRunOutputOptions
- type VirtualMachineImageTemplatesClientGetRunOutputResponse
- type VirtualMachineImageTemplatesClientListByResourceGroupOptions
- type VirtualMachineImageTemplatesClientListByResourceGroupResponse
- type VirtualMachineImageTemplatesClientListOptions
- type VirtualMachineImageTemplatesClientListResponse
- type VirtualMachineImageTemplatesClientListRunOutputsOptions
- type VirtualMachineImageTemplatesClientListRunOutputsResponse
- type VirtualMachineImageTemplatesClientRunResponse
- type VirtualMachineImageTemplatesClientUpdateResponse
- type VirtualNetworkConfig
Examples ¶
- OperationsClient.NewListPager
- TriggersClient.BeginCreateOrUpdate
- TriggersClient.BeginDelete
- TriggersClient.Get
- TriggersClient.NewListByImageTemplatePager
- VirtualMachineImageTemplatesClient.BeginCancel
- VirtualMachineImageTemplatesClient.BeginCreateOrUpdate (CreateAnImageTemplateForLinux)
- VirtualMachineImageTemplatesClient.BeginCreateOrUpdate (CreateAnImageTemplateForWindows)
- VirtualMachineImageTemplatesClient.BeginDelete
- VirtualMachineImageTemplatesClient.BeginRun
- VirtualMachineImageTemplatesClient.BeginUpdate (RemoveIdentitiesForAnImageTemplate)
- VirtualMachineImageTemplatesClient.BeginUpdate (UpdateParametersForVmProfile)
- VirtualMachineImageTemplatesClient.BeginUpdate (UpdateTheTagsForAnImageTemplate)
- VirtualMachineImageTemplatesClient.Get
- VirtualMachineImageTemplatesClient.GetRunOutput
- VirtualMachineImageTemplatesClient.NewListByResourceGroupPager
- VirtualMachineImageTemplatesClient.NewListPager
- VirtualMachineImageTemplatesClient.NewListRunOutputsPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoRunState ¶ added in v2.3.0
type AutoRunState string
AutoRunState - Enabling this field will trigger an automatic build on image template creation or update.
const ( // AutoRunStateAutoRunDisabled - Autorun is disabled AutoRunStateAutoRunDisabled AutoRunState = "Disabled" // AutoRunStateAutoRunEnabled - Autorun is enabled AutoRunStateAutoRunEnabled AutoRunState = "Enabled" )
func PossibleAutoRunStateValues ¶ added in v2.3.0
func PossibleAutoRunStateValues() []AutoRunState
PossibleAutoRunStateValues returns the possible values for the AutoRunState const type.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewTriggersClient ¶
func (c *ClientFactory) NewTriggersClient() *TriggersClient
NewTriggersClient creates a new instance of TriggersClient.
func (*ClientFactory) NewVirtualMachineImageTemplatesClient ¶
func (c *ClientFactory) NewVirtualMachineImageTemplatesClient() *VirtualMachineImageTemplatesClient
NewVirtualMachineImageTemplatesClient creates a new instance of VirtualMachineImageTemplatesClient.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DistributeVersioner ¶
type DistributeVersioner struct { // REQUIRED; Version numbering scheme to be used. Scheme *string }
DistributeVersioner - Describes how to generate new x.y.z version number for distribution.
func (*DistributeVersioner) GetDistributeVersioner ¶
func (d *DistributeVersioner) GetDistributeVersioner() *DistributeVersioner
GetDistributeVersioner implements the DistributeVersionerClassification interface for type DistributeVersioner.
func (DistributeVersioner) MarshalJSON ¶
func (d DistributeVersioner) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributeVersioner.
func (*DistributeVersioner) UnmarshalJSON ¶
func (d *DistributeVersioner) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributeVersioner.
type DistributeVersionerClassification ¶
type DistributeVersionerClassification interface { // GetDistributeVersioner returns the DistributeVersioner content of the underlying type. GetDistributeVersioner() *DistributeVersioner }
DistributeVersionerClassification provides polymorphic access to related types. Call the interface's GetDistributeVersioner() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DistributeVersioner, *DistributeVersionerLatest, *DistributeVersionerSource
type DistributeVersionerLatest ¶
type DistributeVersionerLatest struct { // REQUIRED; Version numbering scheme to be used. Scheme *string // Major version for the generated version number. Determine what is "latest" based on versions with this value as the major // version. -1 is equivalent to leaving it unset. Major *int32 }
DistributeVersionerLatest - Generates version number that will be latest based on existing version numbers.
func (*DistributeVersionerLatest) GetDistributeVersioner ¶
func (d *DistributeVersionerLatest) GetDistributeVersioner() *DistributeVersioner
GetDistributeVersioner implements the DistributeVersionerClassification interface for type DistributeVersionerLatest.
func (DistributeVersionerLatest) MarshalJSON ¶
func (d DistributeVersionerLatest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributeVersionerLatest.
func (*DistributeVersionerLatest) UnmarshalJSON ¶
func (d *DistributeVersionerLatest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributeVersionerLatest.
type DistributeVersionerSource ¶
type DistributeVersionerSource struct { // REQUIRED; Version numbering scheme to be used. Scheme *string }
DistributeVersionerSource - Generates version number based on version number of source image
func (*DistributeVersionerSource) GetDistributeVersioner ¶
func (d *DistributeVersionerSource) GetDistributeVersioner() *DistributeVersioner
GetDistributeVersioner implements the DistributeVersionerClassification interface for type DistributeVersionerSource.
func (DistributeVersionerSource) MarshalJSON ¶
func (d DistributeVersionerSource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributeVersionerSource.
func (*DistributeVersionerSource) UnmarshalJSON ¶
func (d *DistributeVersionerSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributeVersionerSource.
type ErrorAdditionalInfo ¶ added in v2.2.0
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶ added in v2.2.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v2.2.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶ added in v2.2.0
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶ added in v2.2.0
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶ added in v2.2.0
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ErrorResponse ¶ added in v2.2.0
type ErrorResponse struct { // The error object. Error *ErrorDetail }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
func (ErrorResponse) MarshalJSON ¶ added in v2.2.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v2.2.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type ImageTemplate ¶
type ImageTemplate struct { // REQUIRED; The identity of the image template, if configured. Identity *ImageTemplateIdentity // REQUIRED; The geo-location where the resource lives Location *string // The properties of the image template Properties *ImageTemplateProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ImageTemplate - Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider
func (ImageTemplate) MarshalJSON ¶
func (i ImageTemplate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplate.
func (*ImageTemplate) UnmarshalJSON ¶
func (i *ImageTemplate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplate.
type ImageTemplateAutoRun ¶ added in v2.3.0
type ImageTemplateAutoRun struct { // Enabling this field will trigger an automatic build on image template creation or update. State *AutoRunState }
ImageTemplateAutoRun - Indicates if the image template needs to be built on create/update
func (ImageTemplateAutoRun) MarshalJSON ¶ added in v2.3.0
func (i ImageTemplateAutoRun) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateAutoRun.
func (*ImageTemplateAutoRun) UnmarshalJSON ¶ added in v2.3.0
func (i *ImageTemplateAutoRun) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateAutoRun.
type ImageTemplateCustomizer ¶
type ImageTemplateCustomizer struct { // REQUIRED; The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer Type *string // Friendly Name to provide context on what this customization step does Name *string }
ImageTemplateCustomizer - Describes a unit of image customization
func (*ImageTemplateCustomizer) GetImageTemplateCustomizer ¶
func (i *ImageTemplateCustomizer) GetImageTemplateCustomizer() *ImageTemplateCustomizer
GetImageTemplateCustomizer implements the ImageTemplateCustomizerClassification interface for type ImageTemplateCustomizer.
func (ImageTemplateCustomizer) MarshalJSON ¶
func (i ImageTemplateCustomizer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateCustomizer.
func (*ImageTemplateCustomizer) UnmarshalJSON ¶
func (i *ImageTemplateCustomizer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateCustomizer.
type ImageTemplateCustomizerClassification ¶
type ImageTemplateCustomizerClassification interface { // GetImageTemplateCustomizer returns the ImageTemplateCustomizer content of the underlying type. GetImageTemplateCustomizer() *ImageTemplateCustomizer }
ImageTemplateCustomizerClassification provides polymorphic access to related types. Call the interface's GetImageTemplateCustomizer() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ImageTemplateCustomizer, *ImageTemplateFileCustomizer, *ImageTemplatePowerShellCustomizer, *ImageTemplateRestartCustomizer, - *ImageTemplateShellCustomizer, *ImageTemplateWindowsUpdateCustomizer
type ImageTemplateDistributor ¶
type ImageTemplateDistributor struct { // REQUIRED; The name to be used for the associated RunOutput. RunOutputName *string // REQUIRED; Type of distribution. Type *string // Tags that will be applied to the artifact once it has been created/updated by the distributor. ArtifactTags map[string]*string }
ImageTemplateDistributor - Generic distribution object
func (*ImageTemplateDistributor) GetImageTemplateDistributor ¶
func (i *ImageTemplateDistributor) GetImageTemplateDistributor() *ImageTemplateDistributor
GetImageTemplateDistributor implements the ImageTemplateDistributorClassification interface for type ImageTemplateDistributor.
func (ImageTemplateDistributor) MarshalJSON ¶
func (i ImageTemplateDistributor) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateDistributor.
func (*ImageTemplateDistributor) UnmarshalJSON ¶
func (i *ImageTemplateDistributor) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateDistributor.
type ImageTemplateDistributorClassification ¶
type ImageTemplateDistributorClassification interface { // GetImageTemplateDistributor returns the ImageTemplateDistributor content of the underlying type. GetImageTemplateDistributor() *ImageTemplateDistributor }
ImageTemplateDistributorClassification provides polymorphic access to related types. Call the interface's GetImageTemplateDistributor() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ImageTemplateDistributor, *ImageTemplateManagedImageDistributor, *ImageTemplateSharedImageDistributor, *ImageTemplateVhdDistributor
type ImageTemplateFileCustomizer ¶
type ImageTemplateFileCustomizer struct { // REQUIRED; The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer Type *string // The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be // uploaded to in the VM Destination *string // Friendly Name to provide context on what this customization step does Name *string // SHA256 checksum of the file provided in the sourceUri field above SHA256Checksum *string // The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc SourceURI *string }
ImageTemplateFileCustomizer - Uploads files to VMs (Linux, Windows). Corresponds to Packer file provisioner
func (*ImageTemplateFileCustomizer) GetImageTemplateCustomizer ¶
func (i *ImageTemplateFileCustomizer) GetImageTemplateCustomizer() *ImageTemplateCustomizer
GetImageTemplateCustomizer implements the ImageTemplateCustomizerClassification interface for type ImageTemplateFileCustomizer.
func (ImageTemplateFileCustomizer) MarshalJSON ¶
func (i ImageTemplateFileCustomizer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateFileCustomizer.
func (*ImageTemplateFileCustomizer) UnmarshalJSON ¶
func (i *ImageTemplateFileCustomizer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateFileCustomizer.
type ImageTemplateFileValidator ¶
type ImageTemplateFileValidator struct { // REQUIRED; The type of validation you want to use on the Image. For example, "Shell" can be shell validation Type *string // The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be // uploaded to in the VM Destination *string // Friendly Name to provide context on what this validation step does Name *string // SHA256 checksum of the file provided in the sourceUri field above SHA256Checksum *string // The URI of the file to be uploaded to the VM for validation. It can be a github link, Azure Storage URI (authorized or // SAS), etc SourceURI *string }
ImageTemplateFileValidator - Uploads files required for validation to VMs (Linux, Windows). Corresponds to Packer file provisioner
func (*ImageTemplateFileValidator) GetImageTemplateInVMValidator ¶
func (i *ImageTemplateFileValidator) GetImageTemplateInVMValidator() *ImageTemplateInVMValidator
GetImageTemplateInVMValidator implements the ImageTemplateInVMValidatorClassification interface for type ImageTemplateFileValidator.
func (ImageTemplateFileValidator) MarshalJSON ¶
func (i ImageTemplateFileValidator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateFileValidator.
func (*ImageTemplateFileValidator) UnmarshalJSON ¶
func (i *ImageTemplateFileValidator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateFileValidator.
type ImageTemplateIdentity ¶
type ImageTemplateIdentity struct { // The type of identity used for the image template. The type 'None' will remove any identities from the image template. Type *ResourceIdentityType // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM // resource ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. // The dictionary values can be empty objects ({}) in // requests. UserAssignedIdentities map[string]*UserAssignedIdentity }
ImageTemplateIdentity - Identity for the image template.
func (ImageTemplateIdentity) MarshalJSON ¶
func (i ImageTemplateIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateIdentity.
func (*ImageTemplateIdentity) UnmarshalJSON ¶
func (i *ImageTemplateIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateIdentity.
type ImageTemplateInVMValidator ¶
type ImageTemplateInVMValidator struct { // REQUIRED; The type of validation you want to use on the Image. For example, "Shell" can be shell validation Type *string // Friendly Name to provide context on what this validation step does Name *string }
ImageTemplateInVMValidator - Describes a unit of in-VM validation of image
func (*ImageTemplateInVMValidator) GetImageTemplateInVMValidator ¶
func (i *ImageTemplateInVMValidator) GetImageTemplateInVMValidator() *ImageTemplateInVMValidator
GetImageTemplateInVMValidator implements the ImageTemplateInVMValidatorClassification interface for type ImageTemplateInVMValidator.
func (ImageTemplateInVMValidator) MarshalJSON ¶
func (i ImageTemplateInVMValidator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateInVMValidator.
func (*ImageTemplateInVMValidator) UnmarshalJSON ¶
func (i *ImageTemplateInVMValidator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateInVMValidator.
type ImageTemplateInVMValidatorClassification ¶
type ImageTemplateInVMValidatorClassification interface { // GetImageTemplateInVMValidator returns the ImageTemplateInVMValidator content of the underlying type. GetImageTemplateInVMValidator() *ImageTemplateInVMValidator }
ImageTemplateInVMValidatorClassification provides polymorphic access to related types. Call the interface's GetImageTemplateInVMValidator() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ImageTemplateFileValidator, *ImageTemplateInVMValidator, *ImageTemplatePowerShellValidator, *ImageTemplateShellValidator
type ImageTemplateLastRunStatus ¶
type ImageTemplateLastRunStatus struct { // End time of the last run (UTC) EndTime *time.Time // Verbose information about the last run state Message *string // State of the last run RunState *RunState // Sub-state of the last run RunSubState *RunSubState // Start time of the last run (UTC) StartTime *time.Time }
ImageTemplateLastRunStatus - Describes the latest status of running an image template
func (ImageTemplateLastRunStatus) MarshalJSON ¶
func (i ImageTemplateLastRunStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateLastRunStatus.
func (*ImageTemplateLastRunStatus) UnmarshalJSON ¶
func (i *ImageTemplateLastRunStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateLastRunStatus.
type ImageTemplateListResult ¶
type ImageTemplateListResult struct { // The continuation token. NextLink *string // An array of image templates Value []*ImageTemplate }
ImageTemplateListResult - The result of List image templates operation
func (ImageTemplateListResult) MarshalJSON ¶
func (i ImageTemplateListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateListResult.
func (*ImageTemplateListResult) UnmarshalJSON ¶
func (i *ImageTemplateListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateListResult.
type ImageTemplateManagedImageDistributor ¶
type ImageTemplateManagedImageDistributor struct { // REQUIRED; Resource Id of the Managed Disk Image ImageID *string // REQUIRED; Azure location for the image, should match if image already exists Location *string // REQUIRED; The name to be used for the associated RunOutput. RunOutputName *string // REQUIRED; Type of distribution. Type *string // Tags that will be applied to the artifact once it has been created/updated by the distributor. ArtifactTags map[string]*string }
ImageTemplateManagedImageDistributor - Distribute as a Managed Disk Image.
func (*ImageTemplateManagedImageDistributor) GetImageTemplateDistributor ¶
func (i *ImageTemplateManagedImageDistributor) GetImageTemplateDistributor() *ImageTemplateDistributor
GetImageTemplateDistributor implements the ImageTemplateDistributorClassification interface for type ImageTemplateManagedImageDistributor.
func (ImageTemplateManagedImageDistributor) MarshalJSON ¶
func (i ImageTemplateManagedImageDistributor) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateManagedImageDistributor.
func (*ImageTemplateManagedImageDistributor) UnmarshalJSON ¶
func (i *ImageTemplateManagedImageDistributor) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateManagedImageDistributor.
type ImageTemplateManagedImageSource ¶
type ImageTemplateManagedImageSource struct { // REQUIRED; ARM resource id of the managed image in customer subscription ImageID *string // REQUIRED; Specifies the type of source image you want to start with. Type *string }
ImageTemplateManagedImageSource - Describes an image source that is a managed image in customer subscription. This image must reside in the same subscription and region as the Image Builder template.
func (*ImageTemplateManagedImageSource) GetImageTemplateSource ¶
func (i *ImageTemplateManagedImageSource) GetImageTemplateSource() *ImageTemplateSource
GetImageTemplateSource implements the ImageTemplateSourceClassification interface for type ImageTemplateManagedImageSource.
func (ImageTemplateManagedImageSource) MarshalJSON ¶
func (i ImageTemplateManagedImageSource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateManagedImageSource.
func (*ImageTemplateManagedImageSource) UnmarshalJSON ¶
func (i *ImageTemplateManagedImageSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateManagedImageSource.
type ImageTemplatePlatformImageSource ¶
type ImageTemplatePlatformImageSource struct { // REQUIRED; Specifies the type of source image you want to start with. Type *string // Image offer from the Azure Gallery Images [https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages]. Offer *string // Optional configuration of purchase plan for platform image. PlanInfo *PlatformImagePurchasePlan // Image Publisher in Azure Gallery Images [https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages]. Publisher *string // Image sku from the Azure Gallery Images [https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages]. SKU *string // Image version from the Azure Gallery Images [https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages]. If // 'latest' is specified here, the version is evaluated when the image build takes // place, not when the template is submitted. Version *string // READ-ONLY; Image version from the Azure Gallery Images [https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages]. // This readonly field differs from 'version', only if the value specified in // 'version' field is 'latest'. ExactVersion *string }
ImageTemplatePlatformImageSource - Describes an image source from Azure Gallery Images [https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages].
func (*ImageTemplatePlatformImageSource) GetImageTemplateSource ¶
func (i *ImageTemplatePlatformImageSource) GetImageTemplateSource() *ImageTemplateSource
GetImageTemplateSource implements the ImageTemplateSourceClassification interface for type ImageTemplatePlatformImageSource.
func (ImageTemplatePlatformImageSource) MarshalJSON ¶
func (i ImageTemplatePlatformImageSource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplatePlatformImageSource.
func (*ImageTemplatePlatformImageSource) UnmarshalJSON ¶
func (i *ImageTemplatePlatformImageSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplatePlatformImageSource.
type ImageTemplatePowerShellCustomizer ¶
type ImageTemplatePowerShellCustomizer struct { // REQUIRED; The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer Type *string // Array of PowerShell commands to execute Inline []*string // Friendly Name to provide context on what this customization step does Name *string // If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true // when the runElevated field above is set to true. RunAsSystem *bool // If specified, the PowerShell script will be run with elevated privileges RunElevated *bool // SHA256 checksum of the power shell script provided in the scriptUri field above SHA256Checksum *string // URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc ScriptURI *string // Valid exit codes for the PowerShell script. [Default: 0] ValidExitCodes []*int32 }
ImageTemplatePowerShellCustomizer - Runs the specified PowerShell on the VM (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
func (*ImageTemplatePowerShellCustomizer) GetImageTemplateCustomizer ¶
func (i *ImageTemplatePowerShellCustomizer) GetImageTemplateCustomizer() *ImageTemplateCustomizer
GetImageTemplateCustomizer implements the ImageTemplateCustomizerClassification interface for type ImageTemplatePowerShellCustomizer.
func (ImageTemplatePowerShellCustomizer) MarshalJSON ¶
func (i ImageTemplatePowerShellCustomizer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplatePowerShellCustomizer.
func (*ImageTemplatePowerShellCustomizer) UnmarshalJSON ¶
func (i *ImageTemplatePowerShellCustomizer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplatePowerShellCustomizer.
type ImageTemplatePowerShellValidator ¶
type ImageTemplatePowerShellValidator struct { // REQUIRED; The type of validation you want to use on the Image. For example, "Shell" can be shell validation Type *string // Array of PowerShell commands to execute Inline []*string // Friendly Name to provide context on what this validation step does Name *string // If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true // when the runElevated field above is set to true. RunAsSystem *bool // If specified, the PowerShell script will be run with elevated privileges RunElevated *bool // SHA256 checksum of the power shell script provided in the scriptUri field above SHA256Checksum *string // URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc ScriptURI *string // Valid exit codes for the PowerShell script. [Default: 0] ValidExitCodes []*int32 }
ImageTemplatePowerShellValidator - Runs the specified PowerShell script during the validation phase (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
func (*ImageTemplatePowerShellValidator) GetImageTemplateInVMValidator ¶
func (i *ImageTemplatePowerShellValidator) GetImageTemplateInVMValidator() *ImageTemplateInVMValidator
GetImageTemplateInVMValidator implements the ImageTemplateInVMValidatorClassification interface for type ImageTemplatePowerShellValidator.
func (ImageTemplatePowerShellValidator) MarshalJSON ¶
func (i ImageTemplatePowerShellValidator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplatePowerShellValidator.
func (*ImageTemplatePowerShellValidator) UnmarshalJSON ¶
func (i *ImageTemplatePowerShellValidator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplatePowerShellValidator.
type ImageTemplateProperties ¶
type ImageTemplateProperties struct { // REQUIRED; The distribution targets where the image output needs to go to. Distribute []ImageTemplateDistributorClassification // REQUIRED; Specifies the properties used to describe the source image. Source ImageTemplateSourceClassification // Indicates whether or not to automatically run the image template build on template creation or update. AutoRun *ImageTemplateAutoRun // Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and // distributions). Omit or specify 0 to use the default (4 hours). BuildTimeoutInMinutes *int32 // Specifies the properties used to describe the customization steps of the image, like Image source etc Customize []ImageTemplateCustomizerClassification // Error handling options upon a build failure ErrorHandling *ImageTemplatePropertiesErrorHandling // Tags that will be applied to the resource group and/or resources created by the service. ManagedResourceTags map[string]*string // Specifies optimization to be performed on image. Optimize *ImageTemplatePropertiesOptimize // The staging resource group id in the same subscription as the image template that will be used to build the image. If this // field is empty, a resource group with a random name will be created. If the // resource group specified in this field doesn't exist, it will be created with the same name. If the resource group specified // exists, it must be empty and in the same region as the image template. The // resource group created will be deleted during template deletion if this field is empty or the resource group specified // doesn't exist, but if the resource group specified exists the resources created // in the resource group will be deleted during template deletion and the resource group itself will remain. StagingResourceGroup *string // Describes how virtual machine is set up to build images VMProfile *ImageTemplateVMProfile // Configuration options and list of validations to be performed on the resulting image. Validate *ImageTemplatePropertiesValidate // READ-ONLY; The staging resource group id in the same subscription as the image template that will be used to build the // image. This read-only field differs from 'stagingResourceGroup' only if the value specified // in the 'stagingResourceGroup' field is empty. ExactStagingResourceGroup *string // READ-ONLY; State of 'run' that is currently executing or was last executed. LastRunStatus *ImageTemplateLastRunStatus // READ-ONLY; Provisioning error, if any ProvisioningError *ProvisioningError // READ-ONLY; Provisioning state of the resource ProvisioningState *ProvisioningState }
ImageTemplateProperties - Describes the properties of an image template
func (ImageTemplateProperties) MarshalJSON ¶
func (i ImageTemplateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateProperties.
func (*ImageTemplateProperties) UnmarshalJSON ¶
func (i *ImageTemplateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateProperties.
type ImageTemplatePropertiesErrorHandling ¶ added in v2.2.0
type ImageTemplatePropertiesErrorHandling struct { // If there is a customizer error and this field is set to 'cleanup', the build VM and associated network resources will be // cleaned up. This is the default behavior. If there is a customizer error and // this field is set to 'abort', the build VM will be preserved. OnCustomizerError *OnBuildError // If there is a validation error and this field is set to 'cleanup', the build VM and associated network resources will be // cleaned up. This is the default behavior. If there is a validation error and // this field is set to 'abort', the build VM will be preserved. OnValidationError *OnBuildError }
ImageTemplatePropertiesErrorHandling - Error handling options upon a build failure
func (ImageTemplatePropertiesErrorHandling) MarshalJSON ¶ added in v2.2.0
func (i ImageTemplatePropertiesErrorHandling) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplatePropertiesErrorHandling.
func (*ImageTemplatePropertiesErrorHandling) UnmarshalJSON ¶ added in v2.2.0
func (i *ImageTemplatePropertiesErrorHandling) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplatePropertiesErrorHandling.
type ImageTemplatePropertiesOptimize ¶
type ImageTemplatePropertiesOptimize struct { // Optimization is applied on the image for a faster VM boot. VMBoot *ImageTemplatePropertiesOptimizeVMBoot }
ImageTemplatePropertiesOptimize - Specifies optimization to be performed on image.
func (ImageTemplatePropertiesOptimize) MarshalJSON ¶
func (i ImageTemplatePropertiesOptimize) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplatePropertiesOptimize.
func (*ImageTemplatePropertiesOptimize) UnmarshalJSON ¶
func (i *ImageTemplatePropertiesOptimize) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplatePropertiesOptimize.
type ImageTemplatePropertiesOptimizeVMBoot ¶
type ImageTemplatePropertiesOptimizeVMBoot struct { // Enabling this field will improve VM boot time by optimizing the final customized image output. State *VMBootOptimizationState }
ImageTemplatePropertiesOptimizeVMBoot - Optimization is applied on the image for a faster VM boot.
func (ImageTemplatePropertiesOptimizeVMBoot) MarshalJSON ¶
func (i ImageTemplatePropertiesOptimizeVMBoot) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplatePropertiesOptimizeVMBoot.
func (*ImageTemplatePropertiesOptimizeVMBoot) UnmarshalJSON ¶
func (i *ImageTemplatePropertiesOptimizeVMBoot) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplatePropertiesOptimizeVMBoot.
type ImageTemplatePropertiesValidate ¶
type ImageTemplatePropertiesValidate struct { // If validation fails and this field is set to false, output image(s) will not be distributed. This is the default behavior. // If validation fails and this field is set to true, output image(s) will still // be distributed. Please use this option with caution as it may result in bad images being distributed for use. In either // case (true or false), the end to end image run will be reported as having failed // in case of a validation failure. [Note: This field has no effect if validation succeeds.] ContinueDistributeOnFailure *bool // List of validations to be performed. InVMValidations []ImageTemplateInVMValidatorClassification // If this field is set to true, the image specified in the 'source' section will directly be validated. No separate build // will be run to generate and then validate a customized image. SourceValidationOnly *bool }
ImageTemplatePropertiesValidate - Configuration options and list of validations to be performed on the resulting image.
func (ImageTemplatePropertiesValidate) MarshalJSON ¶
func (i ImageTemplatePropertiesValidate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplatePropertiesValidate.
func (*ImageTemplatePropertiesValidate) UnmarshalJSON ¶
func (i *ImageTemplatePropertiesValidate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplatePropertiesValidate.
type ImageTemplateRestartCustomizer ¶
type ImageTemplateRestartCustomizer struct { // REQUIRED; The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer Type *string // Friendly Name to provide context on what this customization step does Name *string // Command to check if restart succeeded [Default: ”] RestartCheckCommand *string // Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"'] RestartCommand *string // Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'] RestartTimeout *string }
ImageTemplateRestartCustomizer - Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner
func (*ImageTemplateRestartCustomizer) GetImageTemplateCustomizer ¶
func (i *ImageTemplateRestartCustomizer) GetImageTemplateCustomizer() *ImageTemplateCustomizer
GetImageTemplateCustomizer implements the ImageTemplateCustomizerClassification interface for type ImageTemplateRestartCustomizer.
func (ImageTemplateRestartCustomizer) MarshalJSON ¶
func (i ImageTemplateRestartCustomizer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateRestartCustomizer.
func (*ImageTemplateRestartCustomizer) UnmarshalJSON ¶
func (i *ImageTemplateRestartCustomizer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateRestartCustomizer.
type ImageTemplateSharedImageDistributor ¶
type ImageTemplateSharedImageDistributor struct { string RunOutputName *string Type *string ArtifactTags map[string]*string ExcludeFromLatest *bool // not specified. This field is deprecated - use targetRegions instead. ReplicationRegions []*string // can be specified only if replicationRegions is specified. This field is // deprecated - use targetRegions instead. StorageAccountType *SharedImageStorageAccountType // and can be specified only if replicationRegions is not specified. TargetRegions []*TargetRegion Versioning DistributeVersionerClassification }GalleryImageID *
ImageTemplateSharedImageDistributor - Distribute via Azure Compute Gallery.
func (*ImageTemplateSharedImageDistributor) GetImageTemplateDistributor ¶
func (i *ImageTemplateSharedImageDistributor) GetImageTemplateDistributor() *ImageTemplateDistributor
GetImageTemplateDistributor implements the ImageTemplateDistributorClassification interface for type ImageTemplateSharedImageDistributor.
func (ImageTemplateSharedImageDistributor) MarshalJSON ¶
func (i ImageTemplateSharedImageDistributor) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateSharedImageDistributor.
func (*ImageTemplateSharedImageDistributor) UnmarshalJSON ¶
func (i *ImageTemplateSharedImageDistributor) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateSharedImageDistributor.
type ImageTemplateSharedImageVersionSource ¶
type ImageTemplateSharedImageVersionSource struct { // image build takes place. ImageVersionID *string Type *string // only if the version name specified in 'imageVersionId' field is 'latest'. ExactVersion *string }
ImageTemplateSharedImageVersionSource - Describes an image source that is an image version in an Azure Compute Gallery or a Direct Shared Gallery.
func (*ImageTemplateSharedImageVersionSource) GetImageTemplateSource ¶
func (i *ImageTemplateSharedImageVersionSource) GetImageTemplateSource() *ImageTemplateSource
GetImageTemplateSource implements the ImageTemplateSourceClassification interface for type ImageTemplateSharedImageVersionSource.
func (ImageTemplateSharedImageVersionSource) MarshalJSON ¶
func (i ImageTemplateSharedImageVersionSource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateSharedImageVersionSource.
func (*ImageTemplateSharedImageVersionSource) UnmarshalJSON ¶
func (i *ImageTemplateSharedImageVersionSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateSharedImageVersionSource.
type ImageTemplateShellCustomizer ¶
type ImageTemplateShellCustomizer struct { // REQUIRED; The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer Type *string // Array of shell commands to execute Inline []*string // Friendly Name to provide context on what this customization step does Name *string // SHA256 checksum of the shell script provided in the scriptUri field SHA256Checksum *string // URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc ScriptURI *string }
ImageTemplateShellCustomizer - Runs a shell script during the customization phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
func (*ImageTemplateShellCustomizer) GetImageTemplateCustomizer ¶
func (i *ImageTemplateShellCustomizer) GetImageTemplateCustomizer() *ImageTemplateCustomizer
GetImageTemplateCustomizer implements the ImageTemplateCustomizerClassification interface for type ImageTemplateShellCustomizer.
func (ImageTemplateShellCustomizer) MarshalJSON ¶
func (i ImageTemplateShellCustomizer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateShellCustomizer.
func (*ImageTemplateShellCustomizer) UnmarshalJSON ¶
func (i *ImageTemplateShellCustomizer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateShellCustomizer.
type ImageTemplateShellValidator ¶
type ImageTemplateShellValidator struct { // REQUIRED; The type of validation you want to use on the Image. For example, "Shell" can be shell validation Type *string // Array of shell commands to execute Inline []*string // Friendly Name to provide context on what this validation step does Name *string // SHA256 checksum of the shell script provided in the scriptUri field SHA256Checksum *string // URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc ScriptURI *string }
ImageTemplateShellValidator - Runs the specified shell script during the validation phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
func (*ImageTemplateShellValidator) GetImageTemplateInVMValidator ¶
func (i *ImageTemplateShellValidator) GetImageTemplateInVMValidator() *ImageTemplateInVMValidator
GetImageTemplateInVMValidator implements the ImageTemplateInVMValidatorClassification interface for type ImageTemplateShellValidator.
func (ImageTemplateShellValidator) MarshalJSON ¶
func (i ImageTemplateShellValidator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateShellValidator.
func (*ImageTemplateShellValidator) UnmarshalJSON ¶
func (i *ImageTemplateShellValidator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateShellValidator.
type ImageTemplateSource ¶
type ImageTemplateSource struct { // REQUIRED; Specifies the type of source image you want to start with. Type *string }
ImageTemplateSource - Describes a virtual machine image source for building, customizing and distributing
func (*ImageTemplateSource) GetImageTemplateSource ¶
func (i *ImageTemplateSource) GetImageTemplateSource() *ImageTemplateSource
GetImageTemplateSource implements the ImageTemplateSourceClassification interface for type ImageTemplateSource.
func (ImageTemplateSource) MarshalJSON ¶
func (i ImageTemplateSource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateSource.
func (*ImageTemplateSource) UnmarshalJSON ¶
func (i *ImageTemplateSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateSource.
type ImageTemplateSourceClassification ¶
type ImageTemplateSourceClassification interface { // GetImageTemplateSource returns the ImageTemplateSource content of the underlying type. GetImageTemplateSource() *ImageTemplateSource }
ImageTemplateSourceClassification provides polymorphic access to related types. Call the interface's GetImageTemplateSource() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ImageTemplateManagedImageSource, *ImageTemplatePlatformImageSource, *ImageTemplateSharedImageVersionSource, *ImageTemplateSource
type ImageTemplateUpdateParameters ¶
type ImageTemplateUpdateParameters struct { // The identity of the image template, if configured. Identity *ImageTemplateIdentity // Parameters for updating an image template. Properties *ImageTemplateUpdateParametersProperties // The user-specified tags associated with the image template. Tags map[string]*string }
ImageTemplateUpdateParameters - Parameters for updating an image template.
func (ImageTemplateUpdateParameters) MarshalJSON ¶
func (i ImageTemplateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateUpdateParameters.
func (*ImageTemplateUpdateParameters) UnmarshalJSON ¶
func (i *ImageTemplateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateUpdateParameters.
type ImageTemplateUpdateParametersProperties ¶ added in v2.2.0
type ImageTemplateUpdateParametersProperties struct { // The distribution targets where the image output needs to go to. Distribute []ImageTemplateDistributorClassification // Describes how virtual machine is set up to build images VMProfile *ImageTemplateVMProfile }
ImageTemplateUpdateParametersProperties - Parameters for updating an image template.
func (ImageTemplateUpdateParametersProperties) MarshalJSON ¶ added in v2.2.0
func (i ImageTemplateUpdateParametersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateUpdateParametersProperties.
func (*ImageTemplateUpdateParametersProperties) UnmarshalJSON ¶ added in v2.2.0
func (i *ImageTemplateUpdateParametersProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateUpdateParametersProperties.
type ImageTemplateVMProfile ¶
type ImageTemplateVMProfile struct { // Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size. OSDiskSizeGB *int32 // Optional array of resource IDs of user assigned managed identities to be configured on the build VM and validation VM. // This may include the identity of the image template. UserAssignedIdentities []*string // Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default // (StandardD1v2 for Gen1 images and StandardD2dsv4 for Gen2 images). VMSize *string // Optional configuration of the virtual network to use to deploy the build VM and validation VM in. Omit if no specific virtual // network needs to be used. VnetConfig *VirtualNetworkConfig }
ImageTemplateVMProfile - Describes the virtual machines used to build and validate images
func (ImageTemplateVMProfile) MarshalJSON ¶
func (i ImageTemplateVMProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateVMProfile.
func (*ImageTemplateVMProfile) UnmarshalJSON ¶
func (i *ImageTemplateVMProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateVMProfile.
type ImageTemplateVhdDistributor ¶
type ImageTemplateVhdDistributor struct { // REQUIRED; The name to be used for the associated RunOutput. RunOutputName *string // REQUIRED; Type of distribution. Type *string // Tags that will be applied to the artifact once it has been created/updated by the distributor. ArtifactTags map[string]*string // Optional Azure Storage URI for the distributed VHD blob. Omit to use the default (empty string) in which case VHD would // be published to the storage account in the staging resource group. URI *string }
ImageTemplateVhdDistributor - Distribute via VHD in a storage account.
func (*ImageTemplateVhdDistributor) GetImageTemplateDistributor ¶
func (i *ImageTemplateVhdDistributor) GetImageTemplateDistributor() *ImageTemplateDistributor
GetImageTemplateDistributor implements the ImageTemplateDistributorClassification interface for type ImageTemplateVhdDistributor.
func (ImageTemplateVhdDistributor) MarshalJSON ¶
func (i ImageTemplateVhdDistributor) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateVhdDistributor.
func (*ImageTemplateVhdDistributor) UnmarshalJSON ¶
func (i *ImageTemplateVhdDistributor) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateVhdDistributor.
type ImageTemplateWindowsUpdateCustomizer ¶
type ImageTemplateWindowsUpdateCustomizer struct { // REQUIRED; The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer Type *string // Array of filters to select updates to apply. Omit or specify empty array to use the default (no filter). Refer to above // link for examples and detailed description of this field. Filters []*string // Friendly Name to provide context on what this customization step does Name *string // Criteria to search updates. Omit or specify empty string to use the default (search all). Refer to above link for examples // and detailed description of this field. SearchCriteria *string // Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000) UpdateLimit *int32 }
ImageTemplateWindowsUpdateCustomizer - Installs Windows Updates. Corresponds to Packer Windows Update Provisioner (https://github.com/rgl/packer-provisioner-windows-update)
func (*ImageTemplateWindowsUpdateCustomizer) GetImageTemplateCustomizer ¶
func (i *ImageTemplateWindowsUpdateCustomizer) GetImageTemplateCustomizer() *ImageTemplateCustomizer
GetImageTemplateCustomizer implements the ImageTemplateCustomizerClassification interface for type ImageTemplateWindowsUpdateCustomizer.
func (ImageTemplateWindowsUpdateCustomizer) MarshalJSON ¶
func (i ImageTemplateWindowsUpdateCustomizer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageTemplateWindowsUpdateCustomizer.
func (*ImageTemplateWindowsUpdateCustomizer) UnmarshalJSON ¶
func (i *ImageTemplateWindowsUpdateCustomizer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageTemplateWindowsUpdateCustomizer.
type OnBuildError ¶ added in v2.2.0
type OnBuildError string
OnBuildError - Error handling behavior upon build failure
const ( OnBuildErrorAbort OnBuildError = "abort" OnBuildErrorCleanup OnBuildError = "cleanup" )
func PossibleOnBuildErrorValues ¶ added in v2.2.0
func PossibleOnBuildErrorValues() []OnBuildError
PossibleOnBuildErrorValues returns the possible values for the OnBuildError const type.
type Operation ¶
type Operation struct { // The object that describes the operation. Display *OperationDisplay // The flag that indicates whether the operation applies to data plane. IsDataAction *bool // This is of the format {provider}/{resource}/{operation} Name *string // The intended executor of the operation. Origin *string // Properties of the operation. Properties any }
Operation - A REST API operation
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // The friendly name of the operation Description *string // For example: read, write, delete, or listKeys/action Operation *string // Friendly name of the resource provider. Provider *string // The resource type on which the operation is performed. Resource *string }
OperationDisplay - The object that describes the operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // The URL to get the next set of operation list results if there are any. NextLink *string // The list of operations supported by the resource provider. Value []*Operation }
OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists available operations for the Microsoft.VirtualMachineImages provider
Generated from API version 2024-02-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/OperationsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armvirtualmachineimagebuilder.OperationListResult{ // Value: []*armvirtualmachineimagebuilder.Operation{ // { // Name: to.Ptr("Microsoft.VirtualMachineImages/register/action"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Register Virtual Machine Image Builder RP"), // Operation: to.Ptr("Register Virtual Machine Image Builder RP"), // Provider: to.Ptr("Virtual Machine Image Builder"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/unregister/action"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Unregister Virtual Machine Image Builder RP"), // Operation: to.Ptr("Unregister Virtual Machine Image Builder RP"), // Provider: to.Ptr("Virtual Machine Image Builder"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/read"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Get a VM image template instance resource"), // Operation: to.Ptr("Get a VM image template instance resource"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("VM Image template"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/write"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Create or update a VM image template instance resource"), // Operation: to.Ptr("Create or update a VM image template instance resource"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("VM Image template"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/delete"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Delete a VM image template instance resource"), // Operation: to.Ptr("Delete a VM image template instance resource"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("VM Image template"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/run/action"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Execute a VM image template to produce its outputs"), // Operation: to.Ptr("Execute a VM image template to produce its outputs"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("VM Image template"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/runOutputs/read"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Get a VM image template run output resource"), // Operation: to.Ptr("Get a VM image template run output resource"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("VM Image template run output"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/operations/read"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("List available Virtual Machine Image Builder Operations"), // Operation: to.Ptr("List available Virtual Machine Image Builder Operations"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("Operation"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/locations/operations/read"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Get the status of an asynchronous operation"), // Operation: to.Ptr("Get the status of an asynchronous operation"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("Asynchronous Operation"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/cancel/action"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Cancel a running image build"), // Operation: to.Ptr("Cancel a running image build"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("VM Image template"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/triggers/write"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Create or update a trigger for a VM image template resource"), // Operation: to.Ptr("Create or update a trigger for a VM image template resource"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("Trigger"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/triggers/read"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Get a trigger for a VM image template resource"), // Operation: to.Ptr("Get a trigger for a VM image template resource"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("Trigger"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/triggers/delete"), // Display: &armvirtualmachineimagebuilder.OperationDisplay{ // Description: to.Ptr("Delete a trigger for a VM image template resource"), // Operation: to.Ptr("Delete a trigger for a VM image template resource"), // Provider: to.Ptr("Virtual Machine Image Builder"), // Resource: to.Ptr("Trigger"), // }, // IsDataAction: to.Ptr(false), // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next // set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PlatformImagePurchasePlan ¶
type PlatformImagePurchasePlan struct { // REQUIRED; Name of the purchase plan. PlanName *string // REQUIRED; Product of the purchase plan. PlanProduct *string // REQUIRED; Publisher of the purchase plan. PlanPublisher *string }
PlatformImagePurchasePlan - Purchase plan configuration for platform image.
func (PlatformImagePurchasePlan) MarshalJSON ¶
func (p PlatformImagePurchasePlan) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PlatformImagePurchasePlan.
func (*PlatformImagePurchasePlan) UnmarshalJSON ¶
func (p *PlatformImagePurchasePlan) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PlatformImagePurchasePlan.
type ProvisioningError ¶
type ProvisioningError struct { // Verbose error message about the provisioning failure Message *string // Error code of the provisioning failure ProvisioningErrorCode *ProvisioningErrorCode }
ProvisioningError - Describes the error happened when create or update an image template
func (ProvisioningError) MarshalJSON ¶
func (p ProvisioningError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProvisioningError.
func (*ProvisioningError) UnmarshalJSON ¶
func (p *ProvisioningError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningError.
type ProvisioningErrorCode ¶
type ProvisioningErrorCode string
ProvisioningErrorCode - Error code of the provisioning failure
const ( ProvisioningErrorCodeBadCustomizerType ProvisioningErrorCode = "BadCustomizerType" ProvisioningErrorCodeBadDistributeType ProvisioningErrorCode = "BadDistributeType" ProvisioningErrorCodeBadManagedImageSource ProvisioningErrorCode = "BadManagedImageSource" ProvisioningErrorCodeBadPIRSource ProvisioningErrorCode = "BadPIRSource" ProvisioningErrorCodeBadSourceType ProvisioningErrorCode = "BadSourceType" ProvisioningErrorCodeBadStagingResourceGroup ProvisioningErrorCode = "BadStagingResourceGroup" ProvisioningErrorCodeBadValidatorType ProvisioningErrorCode = "BadValidatorType" ProvisioningErrorCodeNoCustomizerScript ProvisioningErrorCode = "NoCustomizerScript" ProvisioningErrorCodeNoValidatorScript ProvisioningErrorCode = "NoValidatorScript" ProvisioningErrorCodeOther ProvisioningErrorCode = "Other" ProvisioningErrorCodeServerError ProvisioningErrorCode = "ServerError" ProvisioningErrorCodeUnsupportedCustomizerType ProvisioningErrorCode = "UnsupportedCustomizerType" ProvisioningErrorCodeUnsupportedValidatorType ProvisioningErrorCode = "UnsupportedValidatorType" )
func PossibleProvisioningErrorCodeValues ¶
func PossibleProvisioningErrorCodeValues() []ProvisioningErrorCode
PossibleProvisioningErrorCodeValues returns the possible values for the ProvisioningErrorCode const type.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Provisioning state of the resource
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceIdentityType ¶
type ResourceIdentityType string
ResourceIdentityType - The type of identity used for the image template. The type 'None' will remove any identities from the image template.
const ( ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
type RunOutput ¶
type RunOutput struct { // The properties of the run output Properties *RunOutputProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
RunOutput - Represents an output that was created by running an image template.
func (RunOutput) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type RunOutput.
func (*RunOutput) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type RunOutput.
type RunOutputCollection ¶
type RunOutputCollection struct { // The continuation token. NextLink *string // An array of run outputs Value []*RunOutput }
RunOutputCollection - The result of List run outputs operation
func (RunOutputCollection) MarshalJSON ¶
func (r RunOutputCollection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RunOutputCollection.
func (*RunOutputCollection) UnmarshalJSON ¶
func (r *RunOutputCollection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RunOutputCollection.
type RunOutputProperties ¶
type RunOutputProperties struct { // The resource id of the artifact. ArtifactID *string // The location URI of the artifact. ArtifactURI *string // READ-ONLY; Provisioning state of the resource ProvisioningState *ProvisioningState }
RunOutputProperties - Describes the properties of a run output
func (RunOutputProperties) MarshalJSON ¶
func (r RunOutputProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RunOutputProperties.
func (*RunOutputProperties) UnmarshalJSON ¶
func (r *RunOutputProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RunOutputProperties.
type RunState ¶
type RunState string
RunState - State of the last run
func PossibleRunStateValues ¶
func PossibleRunStateValues() []RunState
PossibleRunStateValues returns the possible values for the RunState const type.
type RunSubState ¶
type RunSubState string
RunSubState - Sub-state of the last run
const ( RunSubStateBuilding RunSubState = "Building" RunSubStateCustomizing RunSubState = "Customizing" RunSubStateDistributing RunSubState = "Distributing" RunSubStateOptimizing RunSubState = "Optimizing" RunSubStateQueued RunSubState = "Queued" RunSubStateValidating RunSubState = "Validating" )
func PossibleRunSubStateValues ¶
func PossibleRunSubStateValues() []RunSubState
PossibleRunSubStateValues returns the possible values for the RunSubState const type.
type SharedImageStorageAccountType ¶
type SharedImageStorageAccountType string
SharedImageStorageAccountType - Specifies the storage account type to be used to store the Azure Compute Gallery image version in.
const ()
func PossibleSharedImageStorageAccountTypeValues ¶
func PossibleSharedImageStorageAccountTypeValues() []SharedImageStorageAccountType
PossibleSharedImageStorageAccountTypeValues returns the possible values for the SharedImageStorageAccountType const type.
type SourceImageTriggerProperties ¶
type SourceImageTriggerProperties struct { // REQUIRED; The kind of trigger. Kind *string // READ-ONLY; Provisioning state of the resource ProvisioningState *ProvisioningState // READ-ONLY; Trigger status Status *TriggerStatus }
SourceImageTriggerProperties - Properties of SourceImage kind of trigger
func (*SourceImageTriggerProperties) GetTriggerProperties ¶
func (s *SourceImageTriggerProperties) GetTriggerProperties() *TriggerProperties
GetTriggerProperties implements the TriggerPropertiesClassification interface for type SourceImageTriggerProperties.
func (SourceImageTriggerProperties) MarshalJSON ¶
func (s SourceImageTriggerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SourceImageTriggerProperties.
func (*SourceImageTriggerProperties) UnmarshalJSON ¶
func (s *SourceImageTriggerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SourceImageTriggerProperties.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TargetRegion ¶
type TargetRegion struct { // REQUIRED; The name of the region. Name *string // The number of replicas of the Image Version to be created in this region. Omit to use the default (1). ReplicaCount *int32 // Specifies the storage account type to be used to store the image in this region. Omit to use the default (Standard_LRS). StorageAccountType *SharedImageStorageAccountType }
TargetRegion - Describes the target region information.
func (TargetRegion) MarshalJSON ¶
func (t TargetRegion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TargetRegion.
func (*TargetRegion) UnmarshalJSON ¶
func (t *TargetRegion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TargetRegion.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type Trigger ¶
type Trigger struct { // The properties of a trigger Properties TriggerPropertiesClassification // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Trigger - Represents a trigger that can invoke an image template build.
func (Trigger) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Trigger.
func (*Trigger) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Trigger.
type TriggerCollection ¶
type TriggerCollection struct { // REQUIRED; An array of triggers Value []*Trigger // The continuation token. NextLink *string }
TriggerCollection - The result of List triggers operation
func (TriggerCollection) MarshalJSON ¶
func (t TriggerCollection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TriggerCollection.
func (*TriggerCollection) UnmarshalJSON ¶
func (t *TriggerCollection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TriggerCollection.
type TriggerProperties ¶
type TriggerProperties struct { // REQUIRED; The kind of trigger. Kind *string // READ-ONLY; Provisioning state of the resource ProvisioningState *ProvisioningState // READ-ONLY; Trigger status Status *TriggerStatus }
TriggerProperties - Describes the properties of a trigger
func (*TriggerProperties) GetTriggerProperties ¶
func (t *TriggerProperties) GetTriggerProperties() *TriggerProperties
GetTriggerProperties implements the TriggerPropertiesClassification interface for type TriggerProperties.
func (TriggerProperties) MarshalJSON ¶
func (t TriggerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TriggerProperties.
func (*TriggerProperties) UnmarshalJSON ¶
func (t *TriggerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TriggerProperties.
type TriggerPropertiesClassification ¶
type TriggerPropertiesClassification interface { // GetTriggerProperties returns the TriggerProperties content of the underlying type. GetTriggerProperties() *TriggerProperties }
TriggerPropertiesClassification provides polymorphic access to related types. Call the interface's GetTriggerProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *SourceImageTriggerProperties, *TriggerProperties
type TriggerStatus ¶
type TriggerStatus struct { // READ-ONLY; The status code. Code *string // READ-ONLY; The detailed status message, including for alerts and error messages. Message *string // READ-ONLY; The time of the status. Time *time.Time }
TriggerStatus - Describes the status of a trigger
func (TriggerStatus) MarshalJSON ¶
func (t TriggerStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TriggerStatus.
func (*TriggerStatus) UnmarshalJSON ¶
func (t *TriggerStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TriggerStatus.
type TriggersClient ¶
type TriggersClient struct {
// contains filtered or unexported fields
}
TriggersClient contains the methods for the Triggers group. Don't use this type directly, use NewTriggersClient() instead.
func NewTriggersClient ¶
func NewTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TriggersClient, error)
NewTriggersClient creates a new instance of TriggersClient with the specified values.
- subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TriggersClient) BeginCreateOrUpdate ¶
func (client *TriggersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, imageTemplateName string, triggerName string, parameters Trigger, options *TriggersClientBeginCreateOrUpdateOptions) (*runtime.Poller[TriggersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a trigger for the specified virtual machine image template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- triggerName - The name of the trigger
- parameters - Parameters supplied to the CreateTrigger operation
- options - TriggersClientBeginCreateOrUpdateOptions contains the optional parameters for the TriggersClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateSourceImageTrigger.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTriggersClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myImageTemplate", "source", armvirtualmachineimagebuilder.Trigger{ Properties: &armvirtualmachineimagebuilder.SourceImageTriggerProperties{ Kind: to.Ptr("SourceImage"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Trigger = armvirtualmachineimagebuilder.Trigger{ // Name: to.Ptr("source"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/triggers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers/source"), // Properties: &armvirtualmachineimagebuilder.SourceImageTriggerProperties{ // Kind: to.Ptr("SourceImage"), // ProvisioningState: to.Ptr(armvirtualmachineimagebuilder.ProvisioningStateSucceeded), // Status: &armvirtualmachineimagebuilder.TriggerStatus{ // Code: to.Ptr("Healthy"), // Message: to.Ptr(""), // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-02-21T17:32:28.000Z"); return t}()), // }, // }, // }
Output:
func (*TriggersClient) BeginDelete ¶
func (client *TriggersClient) BeginDelete(ctx context.Context, resourceGroupName string, imageTemplateName string, triggerName string, options *TriggersClientBeginDeleteOptions) (*runtime.Poller[TriggersClientDeleteResponse], error)
BeginDelete - Delete a trigger for the specified virtual machine image template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- triggerName - The name of the trigger
- options - TriggersClientBeginDeleteOptions contains the optional parameters for the TriggersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteTrigger.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTriggersClient().BeginDelete(ctx, "myResourceGroup", "myImageTemplate", "trigger1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*TriggersClient) Get ¶
func (client *TriggersClient) Get(ctx context.Context, resourceGroupName string, imageTemplateName string, triggerName string, options *TriggersClientGetOptions) (TriggersClientGetResponse, error)
Get - Get the specified trigger for the specified image template resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- triggerName - The name of the trigger
- options - TriggersClientGetOptions contains the optional parameters for the TriggersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetTrigger.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTriggersClient().Get(ctx, "myResourceGroup", "myImageTemplate", "source", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Trigger = armvirtualmachineimagebuilder.Trigger{ // Name: to.Ptr("source"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/triggers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers/source"), // Properties: &armvirtualmachineimagebuilder.SourceImageTriggerProperties{ // Kind: to.Ptr("SourceImage"), // ProvisioningState: to.Ptr(armvirtualmachineimagebuilder.ProvisioningStateSucceeded), // Status: &armvirtualmachineimagebuilder.TriggerStatus{ // Code: to.Ptr("Healthy"), // Message: to.Ptr(""), // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-02-21T17:32:28.000Z"); return t}()), // }, // }, // }
Output:
func (*TriggersClient) NewListByImageTemplatePager ¶
func (client *TriggersClient) NewListByImageTemplatePager(resourceGroupName string, imageTemplateName string, options *TriggersClientListByImageTemplateOptions) *runtime.Pager[TriggersClientListByImageTemplateResponse]
NewListByImageTemplatePager - List all triggers for the specified Image Template resource
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- options - TriggersClientListByImageTemplateOptions contains the optional parameters for the TriggersClient.NewListByImageTemplatePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListTriggers.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTriggersClient().NewListByImageTemplatePager("myResourceGroup", "myImageTemplate", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TriggerCollection = armvirtualmachineimagebuilder.TriggerCollection{ // Value: []*armvirtualmachineimagebuilder.Trigger{ // { // Name: to.Ptr("source"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/triggers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers/source"), // Properties: &armvirtualmachineimagebuilder.SourceImageTriggerProperties{ // Kind: to.Ptr("SourceImage"), // ProvisioningState: to.Ptr(armvirtualmachineimagebuilder.ProvisioningStateSucceeded), // Status: &armvirtualmachineimagebuilder.TriggerStatus{ // Code: to.Ptr("Healthy"), // Message: to.Ptr(""), // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-02-21T17:32:28.000Z"); return t}()), // }, // }, // }}, // } }
Output:
type TriggersClientBeginCreateOrUpdateOptions ¶
type TriggersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TriggersClientBeginCreateOrUpdateOptions contains the optional parameters for the TriggersClient.BeginCreateOrUpdate method.
type TriggersClientBeginDeleteOptions ¶
type TriggersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TriggersClientBeginDeleteOptions contains the optional parameters for the TriggersClient.BeginDelete method.
type TriggersClientCreateOrUpdateResponse ¶
type TriggersClientCreateOrUpdateResponse struct { // Represents a trigger that can invoke an image template build. Trigger }
TriggersClientCreateOrUpdateResponse contains the response from method TriggersClient.BeginCreateOrUpdate.
type TriggersClientDeleteResponse ¶
type TriggersClientDeleteResponse struct { }
TriggersClientDeleteResponse contains the response from method TriggersClient.BeginDelete.
type TriggersClientGetOptions ¶
type TriggersClientGetOptions struct { }
TriggersClientGetOptions contains the optional parameters for the TriggersClient.Get method.
type TriggersClientGetResponse ¶
type TriggersClientGetResponse struct { // Represents a trigger that can invoke an image template build. Trigger }
TriggersClientGetResponse contains the response from method TriggersClient.Get.
type TriggersClientListByImageTemplateOptions ¶
type TriggersClientListByImageTemplateOptions struct { }
TriggersClientListByImageTemplateOptions contains the optional parameters for the TriggersClient.NewListByImageTemplatePager method.
type TriggersClientListByImageTemplateResponse ¶
type TriggersClientListByImageTemplateResponse struct { // The result of List triggers operation TriggerCollection }
TriggersClientListByImageTemplateResponse contains the response from method TriggersClient.NewListByImageTemplatePager.
type UserAssignedIdentity ¶
type UserAssignedIdentity struct { // READ-ONLY; The client ID of the assigned identity. ClientID *string // READ-ONLY; The principal ID of the assigned identity. PrincipalID *string }
UserAssignedIdentity - User assigned identity properties
func (UserAssignedIdentity) MarshalJSON ¶
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type VMBootOptimizationState ¶
type VMBootOptimizationState string
VMBootOptimizationState - Enabling this field will improve VM boot time by optimizing the final customized image output.
const ( VMBootOptimizationStateDisabled VMBootOptimizationState = "Disabled" VMBootOptimizationStateEnabled VMBootOptimizationState = "Enabled" )
func PossibleVMBootOptimizationStateValues ¶
func PossibleVMBootOptimizationStateValues() []VMBootOptimizationState
PossibleVMBootOptimizationStateValues returns the possible values for the VMBootOptimizationState const type.
type VirtualMachineImageTemplatesClient ¶
type VirtualMachineImageTemplatesClient struct {
// contains filtered or unexported fields
}
VirtualMachineImageTemplatesClient contains the methods for the VirtualMachineImageTemplates group. Don't use this type directly, use NewVirtualMachineImageTemplatesClient() instead.
func NewVirtualMachineImageTemplatesClient ¶
func NewVirtualMachineImageTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineImageTemplatesClient, error)
NewVirtualMachineImageTemplatesClient creates a new instance of VirtualMachineImageTemplatesClient with the specified values.
- subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualMachineImageTemplatesClient) BeginCancel ¶
func (client *VirtualMachineImageTemplatesClient) BeginCancel(ctx context.Context, resourceGroupName string, imageTemplateName string, options *VirtualMachineImageTemplatesClientBeginCancelOptions) (*runtime.Poller[VirtualMachineImageTemplatesClientCancelResponse], error)
BeginCancel - Cancel the long running image build based on the image template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- options - VirtualMachineImageTemplatesClientBeginCancelOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginCancel method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CancelImageBuild.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginCancel(ctx, "myResourceGroup", "myImageTemplate", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*VirtualMachineImageTemplatesClient) BeginCreateOrUpdate ¶
func (client *VirtualMachineImageTemplatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, imageTemplateName string, parameters ImageTemplate, options *VirtualMachineImageTemplatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineImageTemplatesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a virtual machine image template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- parameters - Parameters supplied to the CreateImageTemplate operation
- options - VirtualMachineImageTemplatesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginCreateOrUpdate method.
Example (CreateAnImageTemplateForLinux) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateImageTemplateLinux.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myImageTemplate", armvirtualmachineimagebuilder.ImageTemplate{ Location: to.Ptr("westus"), Tags: map[string]*string{ "imagetemplate_tag1": to.Ptr("IT_T1"), "imagetemplate_tag2": to.Ptr("IT_T2"), }, Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {}, }, }, Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ Name: to.Ptr("Shell Customizer Example"), Type: to.Ptr("Shell"), ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), }}, Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ Type: to.Ptr("ManagedImage"), ArtifactTags: map[string]*string{ "tagName": to.Ptr("value"), }, RunOutputName: to.Ptr("image_it_pir_1"), ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), Location: to.Ptr("1_location"), }}, Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ Type: to.Ptr("ManagedImage"), ImageID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"), }, VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ OSDiskSizeGB: to.Ptr[int32](64), VMSize: to.Ptr("Standard_D2s_v3"), VnetConfig: &armvirtualmachineimagebuilder.VirtualNetworkConfig{ SubnetID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name"), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImageTemplate = armvirtualmachineimagebuilder.ImageTemplate{ // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell Customizer Example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D2s_v3"), // }, // }, // }
Output:
Example (CreateAnImageTemplateForWindows) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateImageTemplateWindows.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myImageTemplate", armvirtualmachineimagebuilder.ImageTemplate{ Location: to.Ptr("westus"), Tags: map[string]*string{ "imagetemplate_tag1": to.Ptr("IT_T1"), "imagetemplate_tag2": to.Ptr("IT_T2"), }, Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {}, }, }, Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ Name: to.Ptr("PowerShell (inline) Customizer Example"), Type: to.Ptr("PowerShell"), Inline: []*string{ to.Ptr("Powershell command-1"), to.Ptr("Powershell command-2"), to.Ptr("Powershell command-3")}, }, &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ Name: to.Ptr("PowerShell (inline) Customizer Elevated user Example"), Type: to.Ptr("PowerShell"), Inline: []*string{ to.Ptr("Powershell command-1"), to.Ptr("Powershell command-2"), to.Ptr("Powershell command-3")}, RunElevated: to.Ptr(true), }, &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ Name: to.Ptr("PowerShell (inline) Customizer Elevated Local System user Example"), Type: to.Ptr("PowerShell"), Inline: []*string{ to.Ptr("Powershell command-1"), to.Ptr("Powershell command-2"), to.Ptr("Powershell command-3")}, RunAsSystem: to.Ptr(true), RunElevated: to.Ptr(true), }, &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ Name: to.Ptr("PowerShell (script) Customizer Example"), Type: to.Ptr("PowerShell"), ScriptURI: to.Ptr("https://example.com/path/to/script.ps1"), ValidExitCodes: []*int32{ to.Ptr[int32](0), to.Ptr[int32](1)}, }, &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ Name: to.Ptr("PowerShell (script) Customizer Elevated Local System user Example"), Type: to.Ptr("PowerShell"), RunElevated: to.Ptr(true), ScriptURI: to.Ptr("https://example.com/path/to/script.ps1"), ValidExitCodes: []*int32{ to.Ptr[int32](0), to.Ptr[int32](1)}, }, &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ Name: to.Ptr("PowerShell (script) Customizer Elevated Local System user Example"), Type: to.Ptr("PowerShell"), RunAsSystem: to.Ptr(true), RunElevated: to.Ptr(true), ScriptURI: to.Ptr("https://example.com/path/to/script.ps1"), ValidExitCodes: []*int32{ to.Ptr[int32](0), to.Ptr[int32](1)}, }, &armvirtualmachineimagebuilder.ImageTemplateRestartCustomizer{ Name: to.Ptr("Restart Customizer Example"), Type: to.Ptr("WindowsRestart"), RestartCheckCommand: to.Ptr("powershell -command \"& {Write-Output 'restarted.'}\""), RestartCommand: to.Ptr("shutdown /f /r /t 0 /c \"packer restart\""), RestartTimeout: to.Ptr("10m"), }, &armvirtualmachineimagebuilder.ImageTemplateWindowsUpdateCustomizer{ Name: to.Ptr("Windows Update Customizer Example"), Type: to.Ptr("WindowsUpdate"), Filters: []*string{ to.Ptr("$_.BrowseOnly")}, SearchCriteria: to.Ptr("BrowseOnly=0 and IsInstalled=0"), UpdateLimit: to.Ptr[int32](100), }}, Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ Type: to.Ptr("ManagedImage"), ArtifactTags: map[string]*string{ "tagName": to.Ptr("value"), }, RunOutputName: to.Ptr("image_it_pir_1"), ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), Location: to.Ptr("1_location"), }}, Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ Type: to.Ptr("ManagedImage"), ImageID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"), }, VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ OSDiskSizeGB: to.Ptr[int32](64), VMSize: to.Ptr("Standard_D2s_v3"), VnetConfig: &armvirtualmachineimagebuilder.VirtualNetworkConfig{ SubnetID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name"), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImageTemplate = armvirtualmachineimagebuilder.ImageTemplate{ // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ // Name: to.Ptr("PowerShell (inline) Customizer Example"), // Type: to.Ptr("PowerShell"), // Inline: []*string{ // to.Ptr("Powershell command-1"), // to.Ptr("Powershell command-2"), // to.Ptr("Powershell command-3")}, // RunAsSystem: to.Ptr(false), // RunElevated: to.Ptr(false), // }, // &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ // Name: to.Ptr("PowerShell (inline) Customizer Elevated user Example"), // Type: to.Ptr("PowerShell"), // Inline: []*string{ // to.Ptr("Powershell command-1"), // to.Ptr("Powershell command-2"), // to.Ptr("Powershell command-3")}, // RunAsSystem: to.Ptr(false), // RunElevated: to.Ptr(true), // }, // &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ // Name: to.Ptr("PowerShell (inline) Customizer Elevated Local System user Example"), // Type: to.Ptr("PowerShell"), // Inline: []*string{ // to.Ptr("Powershell command-1"), // to.Ptr("Powershell command-2"), // to.Ptr("Powershell command-3")}, // RunAsSystem: to.Ptr(true), // RunElevated: to.Ptr(true), // }, // &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ // Name: to.Ptr("PowerShell (script) Customizer Example"), // Type: to.Ptr("PowerShell"), // RunAsSystem: to.Ptr(false), // RunElevated: to.Ptr(false), // ScriptURI: to.Ptr("https://example.com/path/to/script.ps1"), // ValidExitCodes: []*int32{ // to.Ptr[int32](0), // to.Ptr[int32](1)}, // }, // &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ // Name: to.Ptr("PowerShell (script) Customizer Elevated Local System user Example"), // Type: to.Ptr("PowerShell"), // RunAsSystem: to.Ptr(false), // RunElevated: to.Ptr(true), // ScriptURI: to.Ptr("https://example.com/path/to/script.ps1"), // ValidExitCodes: []*int32{ // to.Ptr[int32](0), // to.Ptr[int32](1)}, // }, // &armvirtualmachineimagebuilder.ImageTemplatePowerShellCustomizer{ // Name: to.Ptr("PowerShell (script) Customizer Elevated Local System user Example"), // Type: to.Ptr("PowerShell"), // RunAsSystem: to.Ptr(true), // RunElevated: to.Ptr(true), // ScriptURI: to.Ptr("https://example.com/path/to/script.ps1"), // ValidExitCodes: []*int32{ // to.Ptr[int32](0), // to.Ptr[int32](1)}, // }, // &armvirtualmachineimagebuilder.ImageTemplateRestartCustomizer{ // Name: to.Ptr("Restart Customizer Example"), // Type: to.Ptr("WindowsRestart"), // RestartCheckCommand: to.Ptr("powershell -command \"& {Write-Output 'restarted.'}\""), // RestartCommand: to.Ptr("shutdown /f /r /t 0 /c \"packer restart\""), // RestartTimeout: to.Ptr("10m"), // }, // &armvirtualmachineimagebuilder.ImageTemplateWindowsUpdateCustomizer{ // Name: to.Ptr("Windows Update Customizer Example"), // Type: to.Ptr("WindowsUpdate"), // Filters: []*string{ // to.Ptr("$_.BrowseOnly")}, // SearchCriteria: to.Ptr("BrowseOnly=0 and IsInstalled=0"), // UpdateLimit: to.Ptr[int32](100), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D2s_v3"), // }, // }, // }
Output:
func (*VirtualMachineImageTemplatesClient) BeginDelete ¶
func (client *VirtualMachineImageTemplatesClient) BeginDelete(ctx context.Context, resourceGroupName string, imageTemplateName string, options *VirtualMachineImageTemplatesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineImageTemplatesClientDeleteResponse], error)
BeginDelete - Delete a virtual machine image template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- options - VirtualMachineImageTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteImageTemplate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginDelete(ctx, "myResourceGroup", "myImageTemplate", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*VirtualMachineImageTemplatesClient) BeginRun ¶
func (client *VirtualMachineImageTemplatesClient) BeginRun(ctx context.Context, resourceGroupName string, imageTemplateName string, options *VirtualMachineImageTemplatesClientBeginRunOptions) (*runtime.Poller[VirtualMachineImageTemplatesClientRunResponse], error)
BeginRun - Create artifacts from a existing image template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- options - VirtualMachineImageTemplatesClientBeginRunOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginRun method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/RunImageTemplate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginRun(ctx, "myResourceGroup", "myImageTemplate", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*VirtualMachineImageTemplatesClient) BeginUpdate ¶
func (client *VirtualMachineImageTemplatesClient) BeginUpdate(ctx context.Context, resourceGroupName string, imageTemplateName string, parameters ImageTemplateUpdateParameters, options *VirtualMachineImageTemplatesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineImageTemplatesClientUpdateResponse], error)
BeginUpdate - Update the tags for this Virtual Machine Image Template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- parameters - Additional parameters for Image Template update.
- options - VirtualMachineImageTemplatesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginUpdate method.
Example (RemoveIdentitiesForAnImageTemplate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateToRemoveIdentities.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginUpdate(ctx, "myResourceGroup", "myImageTemplate", armvirtualmachineimagebuilder.ImageTemplateUpdateParameters{ Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeNone), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImageTemplate = armvirtualmachineimagebuilder.ImageTemplate{ // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "new-tag": to.Ptr("new-value"), // }, // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeNone), // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell customization example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D2s_v3"), // }, // }, // }
Output:
Example (UpdateParametersForVmProfile) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateVmProfile.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginUpdate(ctx, "myResourceGroup", "myImageTemplate", armvirtualmachineimagebuilder.ImageTemplateUpdateParameters{ Properties: &armvirtualmachineimagebuilder.ImageTemplateUpdateParametersProperties{ VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ OSDiskSizeGB: to.Ptr[int32](127), VMSize: to.Ptr("{updated_vmsize}"), VnetConfig: &armvirtualmachineimagebuilder.VirtualNetworkConfig{ ContainerInstanceSubnetID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/subnetname"), SubnetID: to.Ptr("{updated_aci_subnet}"), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImageTemplate = armvirtualmachineimagebuilder.ImageTemplate{ // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "tag": to.Ptr("tag-value"), // }, // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeNone), // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell customization example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](127), // VMSize: to.Ptr("{updated_vmsize}"), // VnetConfig: &armvirtualmachineimagebuilder.VirtualNetworkConfig{ // ContainerInstanceSubnetID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/subnetname"), // SubnetID: to.Ptr("{updated_aci_subnet}}"), // }, // }, // }, // }
Output:
Example (UpdateTheTagsForAnImageTemplate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateTags.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineImageTemplatesClient().BeginUpdate(ctx, "myResourceGroup", "myImageTemplate", armvirtualmachineimagebuilder.ImageTemplateUpdateParameters{ Tags: map[string]*string{ "new-tag": to.Ptr("new-value"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImageTemplate = armvirtualmachineimagebuilder.ImageTemplate{ // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "new-tag": to.Ptr("new-value"), // }, // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell customization example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D2s_v3"), // }, // }, // }
Output:
func (*VirtualMachineImageTemplatesClient) Get ¶
func (client *VirtualMachineImageTemplatesClient) Get(ctx context.Context, resourceGroupName string, imageTemplateName string, options *VirtualMachineImageTemplatesClientGetOptions) (VirtualMachineImageTemplatesClientGetResponse, error)
Get - Get information about a virtual machine image template If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- options - VirtualMachineImageTemplatesClientGetOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetImageTemplate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachineImageTemplatesClient().Get(ctx, "myResourceGroup", "myImageTemplate", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImageTemplate = armvirtualmachineimagebuilder.ImageTemplate{ // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell Customizer Example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D2s_v3"), // }, // }, // }
Output:
func (*VirtualMachineImageTemplatesClient) GetRunOutput ¶
func (client *VirtualMachineImageTemplatesClient) GetRunOutput(ctx context.Context, resourceGroupName string, imageTemplateName string, runOutputName string, options *VirtualMachineImageTemplatesClientGetRunOutputOptions) (VirtualMachineImageTemplatesClientGetRunOutputResponse, error)
GetRunOutput - Get the specified run output for the specified image template resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- runOutputName - The name of the run output
- options - VirtualMachineImageTemplatesClientGetRunOutputOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.GetRunOutput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetRunOutput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachineImageTemplatesClient().GetRunOutput(ctx, "myResourceGroup", "myImageTemplate", "myManagedImageOutput", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RunOutput = armvirtualmachineimagebuilder.RunOutput{ // Name: to.Ptr("myManagedImageOutput"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/runOutputs"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput"), // Properties: &armvirtualmachineimagebuilder.RunOutputProperties{ // ArtifactID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image"), // ProvisioningState: to.Ptr(armvirtualmachineimagebuilder.ProvisioningStateSucceeded), // }, // }
Output:
func (*VirtualMachineImageTemplatesClient) NewListByResourceGroupPager ¶
func (client *VirtualMachineImageTemplatesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualMachineImageTemplatesClientListByResourceGroupOptions) *runtime.Pager[VirtualMachineImageTemplatesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets information about the VM image templates associated with the specified resource group.
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- options - VirtualMachineImageTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplatesByRg.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachineImageTemplatesClient().NewListByResourceGroupPager("myResourceGroup", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ImageTemplateListResult = armvirtualmachineimagebuilder.ImageTemplateListResult{ // Value: []*armvirtualmachineimagebuilder.ImageTemplate{ // { // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell customization example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D2s_v3"), // }, // }, // }, // { // Name: to.Ptr("myOtherImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myOtherImageTemplate"), // Location: to.Ptr("eastus"), // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell customization example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // RunOutputName: to.Ptr("singleImage"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/baseimage-cus"), // Location: to.Ptr("centralus"), // }, // &armvirtualmachineimagebuilder.ImageTemplateSharedImageDistributor{ // Type: to.Ptr("SharedImage"), // RunOutputName: to.Ptr("gallery"), // ExcludeFromLatest: to.Ptr(true), // GalleryImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/gallery/baseimages/images/baseimage"), // ReplicationRegions: []*string{ // to.Ptr("eastus"), // to.Ptr("westus")}, // StorageAccountType: to.Ptr(armvirtualmachineimagebuilder.SharedImageStorageAccountTypeStandardLRS), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplatePlatformImageSource{ // Type: to.Ptr("PlatformImage"), // Offer: to.Ptr("UbuntuServer"), // PlanInfo: &armvirtualmachineimagebuilder.PlatformImagePurchasePlan{ // PlanName: to.Ptr("example_plan_name"), // PlanProduct: to.Ptr("example_plan_product"), // PlanPublisher: to.Ptr("example_plan_publisher"), // }, // Publisher: to.Ptr("Canonical"), // SKU: to.Ptr("18.04-LTS"), // Version: to.Ptr("18.04.201902121"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }}, // } }
Output:
func (*VirtualMachineImageTemplatesClient) NewListPager ¶
func (client *VirtualMachineImageTemplatesClient) NewListPager(options *VirtualMachineImageTemplatesClientListOptions) *runtime.Pager[VirtualMachineImageTemplatesClientListResponse]
NewListPager - Gets information about the VM image templates associated with the subscription.
Generated from API version 2024-02-01
- options - VirtualMachineImageTemplatesClientListOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplates.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachineImageTemplatesClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ImageTemplateListResult = armvirtualmachineimagebuilder.ImageTemplateListResult{ // Value: []*armvirtualmachineimagebuilder.ImageTemplate{ // { // Name: to.Ptr("myImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate"), // Location: to.Ptr("westus"), // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell customization example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "tagName": to.Ptr("value"), // }, // RunOutputName: to.Ptr("image_it_pir_1"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1"), // Location: to.Ptr("1_location"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplateManagedImageSource{ // Type: to.Ptr("ManagedImage"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](64), // VMSize: to.Ptr("Standard_D2s_v3"), // }, // }, // }, // { // Name: to.Ptr("mySecondImageTemplate"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myOtherResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/mySecondImageTemplate"), // Location: to.Ptr("westus"), // Identity: &armvirtualmachineimagebuilder.ImageTemplateIdentity{ // Type: to.Ptr(armvirtualmachineimagebuilder.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armvirtualmachineimagebuilder.UserAssignedIdentity{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": &armvirtualmachineimagebuilder.UserAssignedIdentity{ // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // }, // }, // Properties: &armvirtualmachineimagebuilder.ImageTemplateProperties{ // Customize: []armvirtualmachineimagebuilder.ImageTemplateCustomizerClassification{ // &armvirtualmachineimagebuilder.ImageTemplateShellCustomizer{ // Name: to.Ptr("Shell customization example"), // Type: to.Ptr("Shell"), // ScriptURI: to.Ptr("https://example.com/path/to/script.sh"), // }}, // Distribute: []armvirtualmachineimagebuilder.ImageTemplateDistributorClassification{ // &armvirtualmachineimagebuilder.ImageTemplateManagedImageDistributor{ // Type: to.Ptr("ManagedImage"), // ArtifactTags: map[string]*string{ // "stage": to.Ptr("development"), // }, // RunOutputName: to.Ptr("eus"), // ImageID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/mySecondImage-eus"), // Location: to.Ptr("eastus"), // }}, // Source: &armvirtualmachineimagebuilder.ImageTemplatePlatformImageSource{ // Type: to.Ptr("PlatformImage"), // Offer: to.Ptr("UbuntuServer"), // PlanInfo: &armvirtualmachineimagebuilder.PlatformImagePurchasePlan{ // PlanName: to.Ptr("example_plan_name"), // PlanProduct: to.Ptr("example_plan_product"), // PlanPublisher: to.Ptr("example_plan_publisher"), // }, // Publisher: to.Ptr("Canonical"), // SKU: to.Ptr("18.04-LTS"), // Version: to.Ptr("18.04.201902121"), // }, // VMProfile: &armvirtualmachineimagebuilder.ImageTemplateVMProfile{ // OSDiskSizeGB: to.Ptr[int32](32), // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }}, // } }
Output:
func (*VirtualMachineImageTemplatesClient) NewListRunOutputsPager ¶
func (client *VirtualMachineImageTemplatesClient) NewListRunOutputsPager(resourceGroupName string, imageTemplateName string, options *VirtualMachineImageTemplatesClientListRunOutputsOptions) *runtime.Pager[VirtualMachineImageTemplatesClientListRunOutputsResponse]
NewListRunOutputsPager - List all run outputs for the specified Image Template resource
Generated from API version 2024-02-01
- resourceGroupName - The name of the resource group.
- imageTemplateName - The name of the image Template
- options - VirtualMachineImageTemplatesClientListRunOutputsOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.NewListRunOutputsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b22c642b361e6d6e7d72a2347a09b0bcf6075d70/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListRunOutputs.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvirtualmachineimagebuilder.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachineImageTemplatesClient().NewListRunOutputsPager("myResourceGroup", "myImageTemplate", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RunOutputCollection = armvirtualmachineimagebuilder.RunOutputCollection{ // Value: []*armvirtualmachineimagebuilder.RunOutput{ // { // Name: to.Ptr("myManagedImageOutput"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/runOutputs"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput"), // Properties: &armvirtualmachineimagebuilder.RunOutputProperties{ // ArtifactID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image"), // ProvisioningState: to.Ptr(armvirtualmachineimagebuilder.ProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("mySharedImageOutput"), // Type: to.Ptr("Microsoft.VirtualMachineImages/imageTemplates/runOutputs"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/mySharedImageOutput"), // Properties: &armvirtualmachineimagebuilder.RunOutputProperties{ // ArtifactID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/galleries/Gallery1/images/SharedImageOutput/imageversions/1.2.3"), // ProvisioningState: to.Ptr(armvirtualmachineimagebuilder.ProvisioningStateSucceeded), // }, // }}, // } }
Output:
type VirtualMachineImageTemplatesClientBeginCancelOptions ¶
type VirtualMachineImageTemplatesClientBeginCancelOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineImageTemplatesClientBeginCancelOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginCancel method.
type VirtualMachineImageTemplatesClientBeginCreateOrUpdateOptions ¶
type VirtualMachineImageTemplatesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineImageTemplatesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginCreateOrUpdate method.
type VirtualMachineImageTemplatesClientBeginDeleteOptions ¶
type VirtualMachineImageTemplatesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineImageTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginDelete method.
type VirtualMachineImageTemplatesClientBeginRunOptions ¶
type VirtualMachineImageTemplatesClientBeginRunOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineImageTemplatesClientBeginRunOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginRun method.
type VirtualMachineImageTemplatesClientBeginUpdateOptions ¶
type VirtualMachineImageTemplatesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineImageTemplatesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.BeginUpdate method.
type VirtualMachineImageTemplatesClientCancelResponse ¶
type VirtualMachineImageTemplatesClientCancelResponse struct { }
VirtualMachineImageTemplatesClientCancelResponse contains the response from method VirtualMachineImageTemplatesClient.BeginCancel.
type VirtualMachineImageTemplatesClientCreateOrUpdateResponse ¶
type VirtualMachineImageTemplatesClientCreateOrUpdateResponse struct { // Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider ImageTemplate }
VirtualMachineImageTemplatesClientCreateOrUpdateResponse contains the response from method VirtualMachineImageTemplatesClient.BeginCreateOrUpdate.
type VirtualMachineImageTemplatesClientDeleteResponse ¶
type VirtualMachineImageTemplatesClientDeleteResponse struct { }
VirtualMachineImageTemplatesClientDeleteResponse contains the response from method VirtualMachineImageTemplatesClient.BeginDelete.
type VirtualMachineImageTemplatesClientGetOptions ¶
type VirtualMachineImageTemplatesClientGetOptions struct { }
VirtualMachineImageTemplatesClientGetOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.Get method.
type VirtualMachineImageTemplatesClientGetResponse ¶
type VirtualMachineImageTemplatesClientGetResponse struct { // Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider ImageTemplate }
VirtualMachineImageTemplatesClientGetResponse contains the response from method VirtualMachineImageTemplatesClient.Get.
type VirtualMachineImageTemplatesClientGetRunOutputOptions ¶
type VirtualMachineImageTemplatesClientGetRunOutputOptions struct { }
VirtualMachineImageTemplatesClientGetRunOutputOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.GetRunOutput method.
type VirtualMachineImageTemplatesClientGetRunOutputResponse ¶
type VirtualMachineImageTemplatesClientGetRunOutputResponse struct { // Represents an output that was created by running an image template. RunOutput }
VirtualMachineImageTemplatesClientGetRunOutputResponse contains the response from method VirtualMachineImageTemplatesClient.GetRunOutput.
type VirtualMachineImageTemplatesClientListByResourceGroupOptions ¶
type VirtualMachineImageTemplatesClientListByResourceGroupOptions struct { }
VirtualMachineImageTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.NewListByResourceGroupPager method.
type VirtualMachineImageTemplatesClientListByResourceGroupResponse ¶
type VirtualMachineImageTemplatesClientListByResourceGroupResponse struct { // The result of List image templates operation ImageTemplateListResult }
VirtualMachineImageTemplatesClientListByResourceGroupResponse contains the response from method VirtualMachineImageTemplatesClient.NewListByResourceGroupPager.
type VirtualMachineImageTemplatesClientListOptions ¶
type VirtualMachineImageTemplatesClientListOptions struct { }
VirtualMachineImageTemplatesClientListOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.NewListPager method.
type VirtualMachineImageTemplatesClientListResponse ¶
type VirtualMachineImageTemplatesClientListResponse struct { // The result of List image templates operation ImageTemplateListResult }
VirtualMachineImageTemplatesClientListResponse contains the response from method VirtualMachineImageTemplatesClient.NewListPager.
type VirtualMachineImageTemplatesClientListRunOutputsOptions ¶
type VirtualMachineImageTemplatesClientListRunOutputsOptions struct { }
VirtualMachineImageTemplatesClientListRunOutputsOptions contains the optional parameters for the VirtualMachineImageTemplatesClient.NewListRunOutputsPager method.
type VirtualMachineImageTemplatesClientListRunOutputsResponse ¶
type VirtualMachineImageTemplatesClientListRunOutputsResponse struct { // The result of List run outputs operation RunOutputCollection }
VirtualMachineImageTemplatesClientListRunOutputsResponse contains the response from method VirtualMachineImageTemplatesClient.NewListRunOutputsPager.
type VirtualMachineImageTemplatesClientRunResponse ¶
type VirtualMachineImageTemplatesClientRunResponse struct { }
VirtualMachineImageTemplatesClientRunResponse contains the response from method VirtualMachineImageTemplatesClient.BeginRun.
type VirtualMachineImageTemplatesClientUpdateResponse ¶
type VirtualMachineImageTemplatesClientUpdateResponse struct { // Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider ImageTemplate }
VirtualMachineImageTemplatesClientUpdateResponse contains the response from method VirtualMachineImageTemplatesClient.BeginUpdate.
type VirtualNetworkConfig ¶
type VirtualNetworkConfig struct { // Resource id of a pre-existing subnet on which Azure Container Instance will be deployed for Isolated Builds. This field // may be specified only if subnetId is also specified and must be on the same // Virtual Network as the subnet specified in subnetId. ContainerInstanceSubnetID *string // Size of the proxy virtual machine used to pass traffic to the build VM and validation VM. This must not be specified if // containerInstanceSubnetId is specified because no proxy virtual machine is // deployed in that case. Omit or specify empty string to use the default (StandardA1v2). ProxyVMSize *string // Resource id of a pre-existing subnet on which the build VM and validation VM will be deployed SubnetID *string }
VirtualNetworkConfig - Virtual Network configuration.
func (VirtualNetworkConfig) MarshalJSON ¶
func (v VirtualNetworkConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConfig.
func (*VirtualNetworkConfig) UnmarshalJSON ¶
func (v *VirtualNetworkConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConfig.